:root {
  --ink: #0f172a;
  --muted: #64748b;
  --bg: #f8fafc;
  --primary: #4f46e5;
  --primary-glow: rgba(79, 70, 229, 0.15);
  --getbill-blue-rgb: 75, 139, 249;
  --getbill-orange-rgb: 255, 150, 103;
  --green: #10b981;
  --amber: #f59e0b;
  --glass: rgba(255, 255, 255, 0.7);
  --glass-strong: rgba(255, 255, 255, 0.9);
  --border: rgba(15, 23, 42, 0.08);
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.05);
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: rgba(248, 250, 252, 0.76);
  background-image:
    linear-gradient(140deg, rgba(var(--getbill-blue-rgb), 0.2) 0%, rgba(var(--getbill-blue-rgb), 0.08) 24%, transparent 46%),
    linear-gradient(315deg, rgba(var(--getbill-orange-rgb), 0.2) 0%, rgba(var(--getbill-orange-rgb), 0.08) 28%, transparent 52%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(248, 250, 252, 0.84) 100%);
  background-attachment: fixed;
}

#app {
  min-height: 100vh;
}

.page-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(520px, 1.2fr);
  gap: 30px;
  padding: 30px;
  max-width: 1500px;
  margin: 0 auto;
}

.page-shell > * {
  min-width: 0;
}

/* Glass Panels */
.hero-panel,
.step-card,
.summary-panel,
.checkout-card {
  background: var(--glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-strong);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

/* Sidebar / Hero */
.hero-panel {
  position: sticky;
  top: 30px;
  height: calc(100vh - 60px);
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  background: var(--primary);
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 800;
  font-size: 24px;
  box-shadow: 0 8px 16px var(--primary-glow);
}

.brand-text strong {
  display: block;
  font-size: 20px;
  letter-spacing: -0.5px;
}

.brand-text small {
  font-size: 13px;
  color: var(--muted);
}

.hero-copy h1 {
  font-size: 52px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -2px;
  margin: 0 0 24px;
}

.hero-copy p {
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
}

.hero-copy .audience-line {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  margin: 18px 0 0;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.value-stack {
  display: grid;
  gap: 12px;
}

.value-stack div {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
}

.value-stack strong {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
}

.value-stack span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.strategy-value-stack {
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 18px;
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  background: white;
  padding: 10px 14px;
  border-radius: 100px;
  border: 1px solid var(--border);
}

.trust-icon {
  color: var(--green);
  font-size: 14px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Wizard Column */
.wizard-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: calc(100vh - 60px);
}

.language-control {
  display: inline-flex;
  align-self: flex-start;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--glass-strong);
  box-shadow: var(--shadow);
}

.language-control button {
  min-width: 42px;
  border: 0;
  border-radius: 8px;
  padding: 7px 10px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.language-control button.active,
.language-control button[aria-pressed="true"] {
  background: var(--primary);
  color: white;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--glass-strong);
  box-shadow: var(--shadow);
}

.app-header div {
  min-width: 0;
}

.app-header span,
.app-header strong {
  display: block;
}

.app-header span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.app-header strong {
  margin-top: 3px;
  font-size: 16px;
}

.app-header button {
  flex: 0 0 auto;
}

.notice {
  padding: 14px 20px;
  background: #fffbeb;
  border: 1px solid #fef3c7;
  color: #92400e;
  border-radius: 16px;
  font-weight: 600;
  font-size: 14px;
}

.stepper {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.stepper button {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--glass);
  padding: 12px 4px;
  border-radius: 14px;
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  transition: all 0.2s;
}

.stepper button span {
  display: block;
  font-size: 10px;
  opacity: 0.6;
  margin-bottom: 2px;
}

.stepper .active button {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 8px 16px var(--primary-glow);
}

.stepper .done button {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}

/* Step Card Content */
.step-card {
  flex: 1;
  padding: 48px;
  background: var(--glass-strong);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

/* Step-specific layout adjustments */
.step-auth {
  justify-content: center;
  align-items: center;
  text-align: center;
}

.step-auth .step-heading {
  max-width: 520px;
  width: 100%;
  margin-bottom: 48px;
}

.step-auth form {
  max-width: 440px;
  width: 100%;
}

.step-auth label {
  align-items: center;
}

.step-auth input {
  text-align: center;
  width: 100%;
  padding: 16px;
  font-size: 17px;
}

.step-auth .actions-row {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  border-top: none;
  margin-top: 40px;
  padding-top: 0;
  width: 100%;
}

.step-auth .actions-row button {
  width: 100%;
  padding: 16px 32px;
  font-size: 16px;
}

.step-auth .volume-cta {
  margin-top: 48px;
}

.step-upload {
  padding: 32px 40px 28px;
  overflow-y: hidden;
}

.step-upload .step-heading p {
  margin-bottom: 18px;
}

.step-upload .upload-zone {
  flex: 1 1 260px;
  justify-content: center;
  min-height: 230px;
}

.step-mode .mode-grid {
  flex: 1;
}

.step-payment {
  justify-content: center;
}

.step-payment .step-heading,
.step-payment .checkout-card,
.step-payment .promo-code-field,
.step-payment .checkout-pricing,
.step-payment .embedded-payment-shell,
.step-payment .actions-row {
  max-width: 520px;
  width: 100%;
}

.step-launch {
  justify-content: center;
  align-items: center;
}

.step-launch > div {
  max-width: 520px;
  width: 100%;
}

.launch-actions {
  justify-content: center;
  border-top: none;
  padding-top: 0;
}

.step-heading h2 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -1px;
  margin: 0 0 10px;
}

.step-heading p {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 32px;
}

/* Components */
.upload-zone {
  border: 2px dashed #e2e8f0;
  border-radius: 20px;
  padding: clamp(28px, 4.5vh, 52px) 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  background: #f8fafc;
  cursor: pointer;
  transition: 0.2s;
  position: relative;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--primary);
  background: #f1f5f9;
}

.upload-zone input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  width: 100%;
  height: 100%;
  justify-content: center;
}

.upload-icon {
  width: clamp(44px, 5vh, 56px);
  height: clamp(44px, 5vh, 56px);
  color: var(--primary);
  margin-bottom: 2px;
  opacity: 0.75;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.upload-zone:hover .upload-icon,
.upload-zone.drag-over .upload-icon {
  transform: translateY(-4px);
  opacity: 1;
}

.upload-text-prompt {
  font-size: 19px;
  font-weight: 800;
  color: var(--ink);
}

.upload-button {
  display: inline-block;
  padding: 8px 18px;
  background: white;
  border: 1px solid #e2e8f0;
  color: var(--ink) !important;
  font-weight: 700;
  border-radius: 100px;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.03);
  font-size: 13px !important;
  transition: background 0.2s, border-color 0.2s;
}

.upload-zone:hover .upload-button,
.upload-zone.drag-over .upload-button {
  border-color: var(--primary);
  background: var(--bg);
}

.upload-hint {
  font-size: 12px !important;
  color: var(--muted);
  margin-top: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-grid.single-col {
  grid-template-columns: 1fr;
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

input {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  font-size: 16px;
  background: white;
}

input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

.review-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.1fr);
  gap: 22px;
  align-items: stretch;
}

.preview-pane {
  min-height: 460px;
}

.invoice-preview {
  width: 100%;
  height: 100%;
  min-height: 460px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  object-fit: contain;
}

.invoice-preview-empty {
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  padding: 24px;
}

.review-fields {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.review-field > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.confidence-badge {
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(245, 158, 11, 0.16);
  color: var(--amber);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.mode-card {
  padding: 24px;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  background: white;
  cursor: pointer;
  transition: 0.3s;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mode-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.mode-card.selected {
  border-color: var(--primary);
  background: #f5f3ff;
  box-shadow: 0 0 0 1px var(--primary);
}

.mode-card h3 { font-size: 18px; margin: 0; font-weight: 700; }
.mode-card .price strong { font-size: 28px; display: block; }
.mode-card .price small { font-size: 12px; color: var(--muted); }

.mode-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.actions-row {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #f1f5f9;
}

.volume-cta {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.volume-cta a {
  color: var(--primary);
  font-weight: 800;
  text-decoration: none;
}

.volume-cta a:hover {
  text-decoration: underline;
}

.manual-entry-row {
  margin-top: 0;
  text-align: center;
}

.manual-entry-row .secondary {
  min-width: 220px;
}

.choice-separator {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 12px 0 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-align: center;
}

.choice-separator::before,
.choice-separator::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.choice-separator span {
  white-space: nowrap;
}

.pennylane-import-card {
  margin: 12px auto 0;
  width: 100%;
  max-width: 440px;
  border-radius: 18px;
  background: linear-gradient(135deg, #004433 0%, #D1FADF 100%);
  padding: 1px;
  box-shadow: 0 14px 32px rgba(0, 68, 51, 0.15);
}

.pennylane-import-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 11px 12px;
  border: 0;
  border-radius: 17px;
  background: #004433;
  color: #ffffff;
  cursor: pointer;
  text-align: left;
  transition: background 0.25s ease;
}

.pennylane-import-button:hover {
  background: #002d21;
}

.pennylane-logo-wrap {
  width: 98px;
  min-width: 98px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: white;
  border: 1px solid rgba(0, 68, 51, 0.08);
}

.pennylane-logo-wrap img {
  width: 76px;
  height: auto;
  display: block;
}

.pennylane-import-button strong {
  display: block;
  font-size: 13px;
  line-height: 1.2;
}

.pennylane-import-button small {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 11px;
  line-height: 1.35;
  transition: color 0.25s ease;
}

.pennylane-import-button:hover small {
  color: #ffffff;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(3px);
}

.integration-drawer {
  position: fixed;
  top: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 41;
  width: min(430px, calc(100vw - 36px));
  padding: 28px;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  background:
    linear-gradient(180deg, rgba(97, 216, 153, 0.2), rgba(255, 255, 255, 0.92) 34%),
    white;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.22);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.drawer-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(29, 35, 31, 0.1);
  border-radius: 999px;
  background: white;
  color: #1D231F;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.drawer-logo-card {
  width: 150px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: white;
  border: 1px solid rgba(29, 35, 31, 0.08);
}

.drawer-logo-card img {
  width: 118px;
  height: auto;
  display: block;
}

.drawer-kicker {
  margin-top: 8px;
  color: #1D231F;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.integration-drawer h2 {
  margin: 0;
  color: #1D231F;
  font-size: 28px;
  line-height: 1.1;
}

.integration-drawer p {
  margin: 0;
  color: rgba(29, 35, 31, 0.68);
  font-size: 15px;
  line-height: 1.55;
  text-align: left;
}

.drawer-steps {
  display: grid;
  gap: 12px;
  margin: 8px 0;
}

.drawer-steps div {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(29, 35, 31, 0.06);
}

.drawer-steps strong {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #61D899;
  color: #1D231F;
  font-size: 13px;
}

.drawer-steps span {
  color: rgba(29, 35, 31, 0.72);
  font-size: 13px;
  line-height: 1.35;
}

.drawer-empty {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(29, 35, 31, 0.08);
  color: rgba(29, 35, 31, 0.72);
  font-size: 14px;
}

.drawer-empty strong {
  color: #1D231F;
}

.drawer-empty-error {
  border-color: rgba(245, 158, 11, 0.32);
  background: rgba(255, 251, 235, 0.86);
}

.drawer-inline-error {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 251, 235, 0.9);
  border: 1px solid rgba(245, 158, 11, 0.32);
  color: #92400e;
  font-size: 13px;
  font-weight: 700;
}

.pennylane-invoice-list {
  display: grid;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.pennylane-invoice-row {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(29, 35, 31, 0.08);
  cursor: pointer;
}

.pennylane-invoice-row:hover {
  border-color: rgba(97, 216, 153, 0.72);
}

.pennylane-invoice-row input {
  width: 18px;
  height: 18px;
  padding: 0;
  accent-color: #61D899;
}

.pennylane-invoice-row strong {
  display: block;
  color: #1D231F;
  font-size: 13px;
}

.pennylane-invoice-row small {
  display: block;
  margin-top: 3px;
  color: rgba(29, 35, 31, 0.62);
  font-size: 12px;
  line-height: 1.35;
}

.drawer-primary {
  margin-top: auto;
  background: #1D231F;
  box-shadow: none;
}

.drawer-primary:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.drawer-secondary {
  width: 100%;
}

.primary, .secondary {
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  border: none;
  transition: 0.2s;
}

.primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 8px 16px var(--primary-glow);
}

.primary:hover { background: #4338ca; transform: translateY(-1px); }
.secondary { background: white; border: 1px solid #e2e8f0; }

.summary-panel {
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.summary-panel span { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.summary-panel strong { font-size: 16px; display: block; }

.check {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  cursor: pointer;
  margin-bottom: 10px;
  background: white;
}

.check input { width: 20px; height: 20px; accent-color: var(--primary); }

.checkout-card {
  padding: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
}

.checkout-card strong { font-size: 40px; font-weight: 800; }

.promo-code-field {
  margin-top: 18px;
}

.promo-code-field input {
  text-transform: uppercase;
}

.promo-code-field small {
  display: block;
}

.promo-code-error {
  color: #b91c1c;
  font-size: 13px;
  font-weight: 700;
}

.checkout-pricing {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
}

.checkout-pricing div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.checkout-pricing span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.checkout-pricing strong {
  font-size: 15px;
}

.checkout-pricing div:last-child {
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}

.checkout-pricing div:last-child strong {
  color: var(--green);
  font-size: 18px;
}

.embedded-payment-shell {
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 8px;
  padding: 18px;
  display: grid;
  gap: 16px;
}

.embedded-payment-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 14px;
}

.embedded-payment-title strong {
  font-size: 16px;
}

.embedded-payment-title span {
  color: var(--muted);
  font-weight: 700;
}

.embedded-payment-frame {
  width: 100%;
  min-height: 560px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.embedded-payment-post-form {
  display: none;
}

.stripe-embedded-form,
.lyra-embedded-form {
  display: grid;
  gap: 14px;
}

#stripe-payment-element,
.lyra-embedded-form .kr-embedded {
  min-height: 180px;
}

.embedded-payment-inline-error,
.embedded-payment-error {
  color: var(--red);
  font-size: 13px;
}

.embedded-payment-success {
  color: var(--green);
}

.embedded-payment-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-weight: 700;
}

.embedded-payment-fallback {
  justify-self: start;
}

.case-page {
  gap: 22px;
}

.cases-page {
  gap: 22px;
}

.case-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.case-header .step-heading p {
  margin-bottom: 0;
}

.case-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.case-summary div {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: white;
}

.case-summary span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.case-summary strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 16px;
}

.case-loading {
  flex: 1;
  min-height: 240px;
  display: grid;
  place-items: center;
}

.case-empty {
  padding: 22px;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  color: var(--muted);
  background: #f8fafc;
  font-size: 14px;
  font-weight: 700;
}

.case-list {
  display: grid;
  gap: 12px;
}

.case-list-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: white;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.case-list-item:hover {
  border-color: rgba(79, 70, 229, 0.34);
  background: #f8fafc;
}

.case-list-item span,
.case-list-item strong,
.case-list-item small,
.case-list-item em {
  display: block;
}

.case-list-item strong,
.case-list-item small {
  overflow-wrap: anywhere;
}

.case-list-item strong {
  font-size: 15px;
}

.case-list-item small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.case-list-item em {
  flex: 0 0 auto;
  font-style: normal;
  font-size: 15px;
  font-weight: 800;
}

.case-timeline {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #ffffff;
}

.case-timeline-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.case-timeline-heading h3 {
  margin: 0;
  font-size: 18px;
}

.case-timeline-heading span {
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}

.case-timeline-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.case-timeline-progress {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--primary));
}

.case-timeline-nodes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.case-timeline-node {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: start;
  min-width: 0;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
}

.case-timeline-node.current {
  border-color: rgba(79, 70, 229, 0.3);
  background: #eef2ff;
}

.case-timeline-node.completed {
  border-color: rgba(16, 185, 129, 0.28);
  background: #ecfdf5;
}

.case-node-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: white;
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
}

.case-timeline-node.completed .case-node-icon {
  background: var(--green);
  color: white;
}

.case-timeline-node.current .case-node-icon {
  background: var(--primary);
  color: white;
}

.case-timeline-node strong,
.case-timeline-node span {
  display: block;
  overflow-wrap: anywhere;
}

.case-timeline-node strong {
  font-size: 13px;
}

.case-timeline-node span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

/* Loading Spinner */
.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--primary-glow);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1100px) {
  .page-shell { grid-template-columns: 1fr; }
  .hero-panel { height: auto; position: static; }
  .wizard-panel { height: auto; }
  .step-card { overflow-y: visible; }
}

@media (max-width: 900px) {
  .review-layout {
    grid-template-columns: 1fr;
  }

  .preview-pane,
  .invoice-preview {
    min-height: 320px;
  }

  .case-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .mode-grid, .form-grid, .summary-panel, .strategy-value-stack, .case-summary { grid-template-columns: 1fr; }
  .case-header { flex-direction: column; }
  .case-list-item { align-items: flex-start; flex-direction: column; }
  .step-auth .actions-row { grid-template-columns: 1fr; }
  .page-shell { padding: 18px; gap: 18px; }
  .hero-panel,
  .step-card { padding: 28px; }
  .hero-copy h1 { font-size: 40px; }
}

@media (max-width: 480px) {
  .page-shell {
    padding: 12px;
    gap: 12px;
  }

  .hero-panel,
  .step-card {
    padding: 20px;
    border-radius: 20px;
  }

  .hero-copy .audience-line {
    width: auto;
  }

  .hero-copy h1 {
    font-size: 34px;
  }

  .app-header {
    align-items: stretch;
    flex-direction: column;
  }

  .app-header button,
  .actions-row button {
    width: 100%;
  }

  .stepper {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .stepper button {
    padding: 10px 2px;
    border-radius: 10px;
    font-size: 10px;
  }

  .step-heading h2 {
    font-size: 26px;
  }

  .actions-row {
    flex-direction: column;
  }

  .checkout-card {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .checkout-card > div:last-child {
    text-align: left !important;
  }
}
