
    :root {
      --bg: #eef3fb;
      --panel: #ffffff;
      --panel-2: #f8faff;
      --line: #dbe3ee;
      --line-2: #e8eef5;
      --text: #17212f;
      --muted: #5f6f86;
      --accent: #6366f1;
      --accent-dark: #4f46e5;
      --accent-soft: #eef0ff;
      --success: #137a45;
      --warning: #9a6700;
      --danger: #b42318;
      --info: #0f5cc0;
      --shadow: 0 14px 34px rgba(13, 31, 56, 0.08);
      --radius: 18px;
    }

    * { box-sizing: border-box; }
    html, body {
      margin: 0;
      padding: 0;
      background: var(--bg);
      color: var(--text);
      font-family: 'Inter', Arial, Helvetica, sans-serif;
    }
    body { min-height: 100vh; position: relative; overflow-x: hidden; }
    body::before {
      content: "";
      position: fixed;
      inset: 0;
      background:
        radial-gradient(circle at 15% -10%, rgba(99, 102, 241, 0.14), transparent 34%),
        radial-gradient(circle at 85% 0%, rgba(99, 102, 241, 0.08), transparent 28%);
      pointer-events: none;
      z-index: 0;
    }
    a { color: inherit; text-decoration: none; }

    .app-shell {
      position: relative;
      z-index: 1;
      min-height: 100vh;
      display: grid;
      grid-template-columns: 280px 1fr;
    }

    .sidebar {
      background: #0f1726;
      color: #eef3fb;
      padding: 28px 20px;
      display: flex;
      flex-direction: column;
      gap: 24px;
      position: sticky;
      top: 0;
      min-height: 100vh;
      opacity: 1;
      pointer-events: auto;
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 14px;
      padding-bottom: 20px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .brand-mark {
      width: 44px;
      height: 44px;
      border-radius: 14px;
      display: grid;
      place-items: center;
      background: linear-gradient(135deg, #2d6bff 0%, #7aa2ff 100%);
      font-size: 18px;
      font-weight: bold;
      letter-spacing: 0.5px;
    }

    .brand-copy h1 {
      margin: 0;
      font-size: 18px;
      line-height: 1.2;
    }

    .brand-copy p {
      margin: 4px 0 0;
      font-size: 12px;
      color: rgba(238, 243, 251, 0.72);
    }

    .sidebar-section-title {
      font-size: 11px;
      color: rgba(238, 243, 251, 0.55);
      letter-spacing: 0.12em;
      text-transform: uppercase;
      margin-bottom: 10px;
    }

    .nav-group {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .nav-link {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px 14px;
      border-radius: 14px;
      color: rgba(238, 243, 251, 0.86);
      transition: 0.2s ease;
      cursor: pointer;
      user-select: none;
    }

    .nav-link:hover {
      background: rgba(255, 255, 255, 0.06);
      color: #fff;
    }

    .nav-link.active {
      background: rgba(45, 107, 255, 0.18);
      color: #fff;
      border: 1px solid rgba(122, 162, 255, 0.24);
    }

    .nav-icon {
      width: 18px;
      text-align: center;
      opacity: 0.9;
    }

    .sidebar-foot {
      margin-top: auto;
      padding: 16px;
      border-radius: 16px;
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(255, 255, 255, 0.08);
    }

    .sidebar-foot h3 {
      margin: 0 0 6px;
      font-size: 14px;
    }

    .sidebar-foot p {
      margin: 0;
      font-size: 12px;
      color: rgba(238, 243, 251, 0.68);
      line-height: 1.5;
    }

    .main {
      padding: 24px;
      display: flex;
      flex-direction: column;
      gap: 20px;
    }

    .topbar {
      background: var(--panel);
      border: 1px solid var(--line);
      box-shadow: var(--shadow);
      border-radius: var(--radius);
      padding: 18px 22px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 18px;
    }

    .topbar-left h2 {
      margin: 0;
      font-size: 24px;
    }

    .topbar-left p {
      margin: 6px 0 0;
      color: var(--muted);
      font-size: 14px;
    }

    .topbar-right {
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
    }

    .badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 8px 12px;
      border-radius: 999px;
      background: var(--panel-2);
      border: 1px solid var(--line-2);
      color: var(--muted);
      font-size: 13px;
      white-space: nowrap;
    }

    .badge.status-pending {
      color: var(--warning);
      background: #fff7e6;
      border-color: #f2d7a2;
    }

    .badge.status-live {
      color: var(--success);
      background: #e9f8ef;
      border-color: #bfe2c9;
    }

    .badge.status-info {
      color: var(--info);
      background: #edf5ff;
      border-color: #c7dcff;
    }

    .ghost-btn,
    .primary-btn,
    .danger-btn,
    .secondary-btn {
      appearance: none;
      border: none;
      border-radius: 12px;
      padding: 11px 16px;
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      transition: 0.2s ease;
    }

    .ghost-btn {
      background: #fff;
      border: 1px solid var(--line);
      color: var(--text);
    }

    .ghost-btn:hover { background: #f8fafc; }

    .topup-light-btn {
      appearance: none;
      border: 1px solid #b9d8ff;
      border-radius: 12px;
      padding: 11px 16px;
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      transition: 0.2s ease;
      background: #dff0ff;
      color: #0f3d91;
    }

    .topup-light-btn:hover {
      background: #d2eaff;
      border-color: #9fc8ff;
    }

    .primary-btn {
      background: var(--accent);
      color: #fff;
      box-shadow: 0 8px 20px rgba(31, 94, 255, 0.25);
    }

    .primary-btn:hover { filter: brightness(1.03); }

    .secondary-btn {
      background: var(--accent-soft);
      color: var(--accent);
      border: 1px solid #bfd0ff;
    }

    .danger-btn {
      background: #fff1f2;
      color: var(--danger);
      border: 1px solid #fecdd3;
    }

    .page {
      display: none;
      flex-direction: column;
      gap: 20px;
    }

    .page.active { display: flex; }

    .grid-2, .grid-3, .grid-4 {
      display: grid;
      gap: 18px;
    }

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

    .panel {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      overflow: hidden;
    }

    .panel-head {
      padding: 20px 22px 0;
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 14px;
    }

    .panel-head.with-border {
      padding-bottom: 18px;
      border-bottom: 1px solid var(--line-2);
    }

    .panel-title {
      margin: 0;
      font-size: 18px;
    }

    .panel-subtitle {
      margin: 6px 0 0;
      font-size: 13px;
      color: var(--muted);
      line-height: 1.5;
    }

    .panel-body { padding: 20px 22px 22px; }

    .metric-card {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 18px;
      box-shadow: var(--shadow);
      padding: 18px;
      min-height: 124px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      gap: 14px;
    }

    .metric-label { font-size: 13px; color: var(--muted); }
    .metric-value {
      font-size: 28px;
      font-weight: 700;
      letter-spacing: -0.02em;
    }
    .metric-hint { font-size: 12px; color: var(--muted); }
    .metric-value-danger { color: var(--danger); }

    .summary-list, .detail-list, .list-stack {
      display: grid;
      gap: 14px;
    }

    .summary-row, .detail-row, .list-row {
      display: flex;
      justify-content: space-between;
      gap: 18px;
      padding-bottom: 12px;
      border-bottom: 1px solid var(--line-2);
      align-items: flex-start;
    }

    .summary-row:last-child,
    .detail-row:last-child,
    .list-row:last-child {
      border-bottom: none;
      padding-bottom: 0;
    }

    .summary-label, .detail-label, .list-label {
      color: var(--muted);
      font-size: 13px;
    }

    .summary-value, .detail-value, .list-value {
      font-size: 14px;
      font-weight: 600;
      text-align: right;
    }

    .quick-actions, .inline-actions {
      display: flex;
      gap: 12px;
      flex-wrap: wrap;
    }

    .empty-state {
      border: 1px dashed var(--line);
      background: linear-gradient(180deg, #fbfdff 0%, #f7faff 100%);
      border-radius: 18px;
      padding: 28px;
      text-align: center;
    }

    .empty-state strong {
      display: block;
      font-size: 16px;
      margin-bottom: 8px;
    }

    .empty-state p {
      margin: 0 auto 16px;
      max-width: 520px;
      color: var(--muted);
      line-height: 1.6;
      font-size: 14px;
    }

    .table-wrap {
      width: 100%;
      overflow: auto;
      border: 1px solid var(--line-2);
      border-radius: 16px;
    }

    table {
      width: 100%;
      border-collapse: collapse;
      min-width: 860px;
      background: #fff;
    }

    thead { background: #f8fafc; }
    th, td {
      padding: 14px 16px;
      text-align: left;
      font-size: 14px;
      border-bottom: 1px solid var(--line-2);
      vertical-align: top;
    }

    th {
      font-size: 12px;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: var(--muted);
    }

    tbody tr:last-child td { border-bottom: none; }

    .table-actions {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }

    .table-actions-single {
      justify-content: center;
    }

    .mini-btn {
      appearance: none;
      border: 1px solid var(--line);
      background: #fff;
      border-radius: 10px;
      padding: 8px 10px;
      font-size: 12px;
      cursor: pointer;
      color: var(--text);
    }

    .mini-btn:hover { background: #f8fafc; }

    .form-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 16px;
    }

    .form-grid .full { grid-column: 1 / -1; }

    .field {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .field label {
      font-size: 13px;
      font-weight: 600;
      color: var(--text);
    }

    .field .hint {
      font-size: 12px;
      color: var(--muted);
      margin-top: -2px;
    }

    input, select, textarea {
      width: 100%;
      border: 1px solid var(--line);
      border-radius: 12px;
      padding: 12px 13px;
      font-size: 14px;
      color: var(--text);
      background: #fff;
      outline: none;
      transition: 0.2s ease;
    }

    input:focus, select:focus, textarea:focus {
      border-color: var(--accent);
      box-shadow: 0 0 0 4px rgba(31, 94, 255, 0.1);
    }

    textarea {
      min-height: 120px;
      resize: vertical;
    }

    .check-row {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      padding: 10px 12px;
      border: 1px solid var(--line-2);
      border-radius: 12px;
      background: #fbfcfe;
    }

    .check-row input[type="checkbox"] {
      width: auto;
      margin-top: 3px;
    }

    .check-row label {
      font-size: 13px;
      color: var(--text);
      line-height: 1.5;
    }

    .section-divider {
      height: 1px;
      background: var(--line-2);
      margin: 4px 0 2px;
    }

    .stack {
      display: flex;
      flex-direction: column;
      gap: 14px;
    }

    .split-hero {
      display: grid;
      grid-template-columns: 1.2fr 0.8fr;
      gap: 18px;
    }

    .hero-card {
      background: linear-gradient(135deg, #0f1726 0%, #19305a 60%, #204182 100%);
      color: #fff;
      border-radius: 22px;
      padding: 28px;
      box-shadow: var(--shadow);
      min-height: 260px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      gap: 18px;
    }

    .hero-card h3 {
      margin: 0;
      font-size: 28px;
      line-height: 1.2;
      letter-spacing: -0.03em;
      max-width: 460px;
    }

    .hero-card p {
      margin: 0;
      color: rgba(255, 255, 255, 0.8);
      max-width: 520px;
      line-height: 1.6;
      font-size: 14px;
    }

    .hero-points {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }

    .hero-pill {
      padding: 9px 12px;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.1);
      border: 1px solid rgba(255, 255, 255, 0.12);
      font-size: 12px;
      color: rgba(255, 255, 255, 0.9);
    }

    .card-note {
      padding: 14px 16px;
      border-radius: 14px;
      background: #f8fafc;
      border: 1px solid var(--line-2);
      color: var(--muted);
      font-size: 13px;
      line-height: 1.6;
    }

    .footer-actions {
      display: flex;
      justify-content: flex-end;
      gap: 12px;
      flex-wrap: wrap;
      padding-top: 6px;
    }

    .page-anchor-row {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
    }

    .page-anchor {
      padding: 8px 12px;
      border-radius: 999px;
      border: 1px solid var(--line);
      background: #fff;
      color: var(--muted);
      font-size: 13px;
      cursor: default;
    }

    .page-anchor.active {
      background: var(--accent-soft);
      color: var(--accent);
      border-color: #bfd0ff;
    }

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

    .tab-btn {
      padding: 9px 14px;
      border-radius: 999px;
      border: 1px solid var(--line);
      background: #fff;
      color: var(--muted);
      font-size: 13px;
      cursor: pointer;
    }

    .tab-btn.active {
      background: var(--accent-soft);
      color: var(--accent);
      border-color: #bfd0ff;
    }

    .tab-pane { display: none; }
    .tab-pane.active { display: block; }

    .status-chip {
      display: inline-flex;
      align-items: center;
      padding: 6px 10px;
      border-radius: 999px;
      font-size: 12px;
      font-weight: 600;
      white-space: nowrap;
    }

    .chip-success { background: #e9f8ef; color: var(--success); }
    .chip-warning { background: #fff7e6; color: var(--warning); }
    .chip-danger { background: #fff1f2; color: var(--danger); }
    .chip-info { background: #edf5ff; color: var(--info); }

    .code-box {
      background: #0f1726;
      color: #e9f2ff;
      border-radius: 16px;
      padding: 18px;
      overflow: auto;
      font-family: Consolas, Monaco, monospace;
      font-size: 13px;
      line-height: 1.6;
      border: 1px solid rgba(255,255,255,0.06);
      white-space: pre-wrap;
    }

    .console-output {
      margin: 0;
      background: #0f1726;
      color: #e9f2ff;
      border-radius: 16px;
      padding: 18px;
      overflow: auto;
      font-family: Consolas, Monaco, monospace;
      font-size: 13px;
      line-height: 1.6;
      border: 1px solid rgba(255,255,255,0.06);
      white-space: pre-wrap;
      word-break: break-word;
      min-height: 260px;
      max-height: 560px;
    }

    .console-output-raw {
      margin: 0;
      white-space: pre-wrap;
      word-break: break-word;
      font: inherit;
      color: inherit;
      background: transparent;
    }


    .console-output-json {
      margin: 0;
      background: #0f1726;
      color: #e9f2ff;
      border-radius: 16px;
      padding: 18px;
      overflow-x: auto;
      overflow-y: auto;
      font-family: Consolas, Monaco, monospace;
      font-size: 13px;
      line-height: 1.7;
      border: 1px solid rgba(255,255,255,0.06);
      white-space: pre-wrap;
      word-break: normal;
      tab-size: 2;
      min-height: 260px;
      max-height: 560px;
    }

    .console-output-json code {
      font: inherit;
      color: inherit;
      white-space: inherit;
      background: transparent;
    }

    .structured-response {
      background: #f8fafc;
      color: var(--text);
      border: 1px solid var(--line);
      font-family: inherit;
      font-size: 14px;
      line-height: 1.6;
      white-space: normal;
    }

    .response-card {
      display: grid;
      gap: 16px;
    }

    .response-ref-row {
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
      gap: 8px 16px;
      padding: 12px 14px;
      border-radius: 14px;
      background: #eef4ff;
      border: 1px solid #d6e4ff;
    }

    .response-ref-label {
      font-weight: 700;
      color: var(--muted);
    }

    .response-ref-value {
      font-family: Consolas, Monaco, monospace;
      color: var(--text);
      word-break: break-all;
    }

    .response-sections {
      display: grid;
      gap: 12px;
    }

    .response-section {
      padding: 14px 16px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: #ffffff;
    }

    .response-heading {
      margin: 0 0 8px 0;
      font-size: 13px;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      color: var(--muted);
    }

    .response-text {
      color: var(--text);
    }

    .response-list {
      margin: 0;
      padding-left: 20px;
      color: var(--text);
    }

    .response-list li + li {
      margin-top: 6px;
    }


    .response-output-wrap {
      display: grid;
      gap: 12px;
    }

    .response-disclaimer {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 6px;
      font-family: 'Inter', Arial, Helvetica, sans-serif;
      font-size: 12px;
      line-height: 1.5;
      color: var(--muted);
      padding: 0 2px;
    }

    .response-disclaimer-link {
      color: var(--accent-dark);
      text-decoration: underline;
      font-weight: 500;
      cursor: pointer;
    }

    .response-disclaimer-link:hover {
      color: var(--accent);
    }

    .toast {
      position: fixed;
      right: 24px;
      bottom: 24px;
      background: #0f1726;
      color: #fff;
      padding: 14px 16px;
      border-radius: 14px;
      box-shadow: 0 14px 30px rgba(13, 31, 56, 0.22);
      opacity: 0;
      transform: translateY(10px);
      pointer-events: none;
      transition: 0.25s ease;
      max-width: 360px;
      font-size: 14px;
      line-height: 1.5;
      z-index: 20;
    }

    .toast.show {
      opacity: 1;
      transform: translateY(0);
    }


    .registration-topbar {
      display: none;

      position: sticky;
      top: 0;
      z-index: 1200;
      backdrop-filter: blur(14px);
      background: rgba(5, 8, 16, 0.78);
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
      box-shadow: 0 10px 30px rgba(5, 8, 16, 0.18);
    }

    .registration-topbar-inner {
      width: min(1280px, 94%);
      margin: 0 auto;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 18px;
      padding: 18px 0;
    }

    .registration-topbar-left,
    .registration-topbar-right {
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
    }

    .fios-top-link,
    .fios-top-login {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 10px 16px;
      border-radius: 999px;
      border: 1px solid rgba(255,255,255,0.12);
      background: rgba(255,255,255,0.04);
      color: #e8edff;
      text-decoration: none;
      font-size: 0.84rem;
      font-weight: 700;
      transition: all 0.25s ease;
      cursor: pointer;
      font-family: inherit;
    }

    .fios-top-link:hover,
    .fios-top-login:hover {
      background: rgba(255,255,255,0.08);
      transform: translateY(-1px);
    }

    .fios-top-title {
      min-width: 0;
    }

    .fios-top-title strong {
      display: block;
      color: #fff;
      font-family: 'Space Grotesk', sans-serif;
      font-size: 1rem;
      letter-spacing: -0.03em;
      line-height: 1.1;
    }

    .fios-top-title span {
      display: block;
      color: rgba(226, 232, 240, 0.75);
      font-size: 0.76rem;
      margin-top: 4px;
    }

    .main {
      padding: 28px;
      display: flex;
      flex-direction: column;
      gap: 20px;
      width: min(1280px, 94%);
      margin: 0 auto;
    }

    .topbar {
      background: rgba(255,255,255,0.92);
      border: 1px solid rgba(219, 227, 238, 0.9);
      box-shadow: var(--shadow);
      border-radius: 22px;
    }

    .topbar-left h2,
    .hero-card h3,
    .panel-title,
    .section-card h4,
    .review-card h4,
    .step-title {
      font-family: 'Space Grotesk', sans-serif;
      letter-spacing: -0.03em;
    }

    .topbar-left h2 {
      font-size: 28px;
    }

    .helper-toggle,
    .ghost-btn,
    .primary-btn,
    .secondary-btn,
    .danger-btn,
    .mini-btn,
    .agent-chip {
      font-family: inherit;
    }

    .ghost-btn,
    .secondary-btn,
    .helper-toggle,
    .mini-btn {
      border-radius: 999px;
    }

    .ghost-btn,
    .helper-toggle,
    .mini-btn {
      background: rgba(255,255,255,0.92);
      border: 1px solid rgba(99, 102, 241, 0.14);
    }

    .ghost-btn:hover,
    .helper-toggle:hover,
    .mini-btn:hover {
      background: var(--accent-soft);
      border-color: rgba(99, 102, 241, 0.28);
      color: var(--accent-dark);
    }

    .primary-btn {
      background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
      border-radius: 999px;
      color: #fff;
      box-shadow: 0 12px 24px rgba(99, 102, 241, 0.22);
    }

    .primary-btn:hover {
      filter: brightness(1.02);
      transform: translateY(-1px);
    }

    .secondary-btn {
      background: rgba(99, 102, 241, 0.08);
      color: var(--accent-dark);
      border: 1px solid rgba(99, 102, 241, 0.18);
    }

    .step-card.active {
      background: linear-gradient(180deg, rgba(99, 102, 241, 0.08), rgba(99, 102, 241, 0.04));
      border-color: rgba(99, 102, 241, 0.28);
      box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.08);
    }

    .section-card,
    .review-card,
    .panel,
    .metric-card {
      border-radius: 20px;
    }

    .login-modal-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(5, 8, 16, 0.72);
      backdrop-filter: blur(10px);
      display: none;
      align-items: center;
      justify-content: center;
      padding: 20px;
      z-index: 3000;
    }

    .login-modal-backdrop.show {
      display: flex;
    }

    .login-modal {
      width: min(460px, 100%);
      border-radius: 24px;
      border: 1px solid rgba(255,255,255,0.08);
      background: linear-gradient(180deg, rgba(10,15,25,0.98), rgba(7,10,18,0.98));
      box-shadow: 0 30px 80px rgba(0,0,0,0.45);
      padding: 28px;
    }

    .login-modal h3 {
      font-family: 'Space Grotesk', sans-serif;
      font-size: 1.8rem;
      margin-bottom: 10px;
      letter-spacing: -0.04em;
      color: #fff;
    }

    .login-modal p {
      color: #93a4bf;
      font-size: 0.95rem;
      line-height: 1.6;
      margin-bottom: 24px;
    }

    .login-form {
      display: grid;
      gap: 14px;
    }

    .login-field {
      display: grid;
      gap: 8px;
    }

    .login-field label {
      font-size: 0.82rem;
      color: #dbe4f3;
      font-weight: 600;
    }

    .login-field input {
      width: 100%;
      border-radius: 14px;
      border: 1px solid rgba(255,255,255,0.08);
      background: rgba(255,255,255,0.04);
      color: #fff;
      padding: 14px 16px;
      font-size: 0.95rem;
      outline: none;
      font-family: inherit;
      margin: 0;
    }

    .login-field input:focus {
      border-color: rgba(99, 102, 241, 0.55);
      box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
    }

    .login-actions {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
      margin-top: 6px;
    }

    .login-secondary,
    .login-primary {
      padding: 12px 16px;
      border-radius: 999px;
      font-weight: 700;
      font-size: 0.85rem;
      cursor: pointer;
      font-family: inherit;
      transition: all 0.25s ease;
    }

    .login-secondary {
      border: 1px solid rgba(255,255,255,0.12);
      background: transparent;
      color: #e2e8f0;
    }

    .login-secondary:hover {
      background: rgba(255,255,255,0.05);
    }

    .login-primary {
      border: none;
      background: var(--accent);
      color: #fff;
    }

    .login-primary:hover {
      background: var(--accent-dark);
      transform: translateY(-1px);
    }

    .login-note {
      margin-top: 14px;
      color: #93a4bf;
      font-size: 0.78rem;
      line-height: 1.5;
    }

    .modal-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(10, 18, 31, 0.56);
      display: none;
      align-items: flex-start;
      justify-content: center;
      padding: 24px 20px;
      overflow-y: auto;
      z-index: 3000;
    }

    .modal-backdrop.show {
      display: flex;
    }

    .modal,
    .modal-card {
      position: relative;
      width: min(760px, 100%);
      max-height: min(calc(100vh - 48px), 900px);
      margin: auto 0;
      display: flex;
      flex-direction: column;
      background: #ffffff;
      border-radius: 22px;
      box-shadow: 0 20px 60px rgba(13, 31, 56, 0.25);
      border: 1px solid var(--line);
      overflow: hidden;
    }

    .modal-close {
      position: absolute;
      top: 14px;
      right: 14px;
      width: 36px;
      height: 36px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: #ffffff;
      color: var(--muted);
      font-size: 18px;
      line-height: 1;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 8px 20px rgba(13, 31, 56, 0.08);
      transition: background 0.15s ease, transform 0.15s ease, color 0.15s ease;
      z-index: 2;
    }

    .modal-close:hover {
      background: #f8fafc;
      color: var(--text);
      transform: translateY(-1px);
    }

    .modal-head {
      flex: 0 0 auto;
      padding: 20px 64px 18px 22px;
      border-bottom: 1px solid var(--line-2);
      background: #ffffff;
    }

    .modal-head h3 {
      margin: 0;
    }

    .modal-head p {
      margin: 8px 0 0;
      color: var(--muted);
      line-height: 1.55;
    }

    .modal-body,
    #modal-body {
      flex: 1 1 auto;
      padding: 20px 22px 22px;
      overflow: auto;
      max-height: calc(100vh - 180px);
      background: #ffffff;
    }


    .registration-shell {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      gap: 18px;
      max-width: 1080px;
    }

    .registration-intro {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 16px;
      flex-wrap: wrap;
      padding: 6px 0 0;
    }

    .registration-intro p {
      margin: 8px 0 0;
      color: var(--muted);
      font-size: 14px;
      line-height: 1.6;
      max-width: 720px;
    }

    .helper-toggle {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 10px 14px;
      border-radius: 999px;
      border: 1px solid var(--line);
      background: #fff;
      color: var(--text);
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
    }

    .helper-panel {
      display: none;
      padding: 16px 18px;
      border-radius: 16px;
      background: #fbfcfe;
      border: 1px solid var(--line-2);
    }

    .helper-panel.show { display: block; }

    .helper-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 12px;
    }

    .helper-item {
      padding: 14px;
      border-radius: 14px;
      background: #fff;
      border: 1px solid var(--line-2);
      font-size: 13px;
      color: var(--muted);
      line-height: 1.55;
    }

    .helper-item strong {
      display: block;
      color: var(--text);
      font-size: 13px;
      margin-bottom: 6px;
    }

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

    .step-card {
      padding: 14px 16px;
      border-radius: 16px;
      border: 1px solid var(--line);
      background: #fff;
      min-height: 88px;
      display: flex;
      flex-direction: column;
      gap: 6px;
      cursor: pointer;
      transition: 0.2s ease;
    }

    .step-card.active {
      background: var(--accent-soft);
      border-color: #bfd0ff;
      box-shadow: inset 0 0 0 1px rgba(31, 94, 255, 0.08);
    }

    .step-card.done {
      background: #f4fbf6;
      border-color: #cde9d5;
    }

    .step-number {
      font-size: 12px;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.06em;
      font-weight: 700;
    }

    .step-card.active .step-number,
    .step-card.active .step-title {
      color: var(--accent);
    }

    .step-card.done .step-number,
    .step-card.done .step-title {
      color: var(--success);
    }

    .step-title {
      font-size: 15px;
      font-weight: 700;
      color: var(--text);
    }

    .step-copy {
      font-size: 12px;
      color: var(--muted);
      line-height: 1.45;
    }

    .form-step { display: none; }
    .form-step.active { display: block; }

    .section-group {
      display: grid;
      gap: 16px;
    }

    .section-card {
      border: 1px solid var(--line-2);
      border-radius: 16px;
      padding: 18px;
      background: #fcfdff;
    }

    .section-card h4 {
      margin: 0 0 4px;
      font-size: 15px;
    }

    .section-card p {
      margin: 0 0 14px;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.55;
    }

    .field-error {
      font-size: 12px;
      color: var(--danger);
      display: none;
    }

    .field.invalid input,
    .field.invalid select,
    .field.invalid textarea {
      border-color: #f4a6ae;
      box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.08);
    }

    .field.invalid .field-error { display: block; }

.hint.status-ok {
  color: var(--success);
}

.hint.status-error {
  color: var(--danger);
}

    .chip-group {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }

    .agent-chip {
      border: 1px solid var(--line);
      background: #fff;
      color: var(--text);
      border-radius: 999px;
      padding: 10px 14px;
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      transition: 0.2s ease;
    }

    .agent-chip.active {
      background: var(--accent-soft);
      border-color: #bfd0ff;
      color: var(--accent);
    }

    .review-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 16px;
    }

    .review-card {
      border: 1px solid var(--line-2);
      background: #fbfcfe;
      border-radius: 16px;
      padding: 18px;
    }

    .review-card h4 {
      margin: 0 0 14px;
      font-size: 15px;
    }

    .review-list {
      display: grid;
      gap: 10px;
    }

    .review-item {
      display: flex;
      justify-content: space-between;
      gap: 16px;
      padding-bottom: 10px;
      border-bottom: 1px solid var(--line-2);
      font-size: 13px;
    }

    .review-item:last-child {
      border-bottom: none;
      padding-bottom: 0;
    }

    .review-item span:first-child { color: var(--muted); }
    .review-item span:last-child { font-weight: 600; text-align: right; }

    .step-actions {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
      padding-top: 8px;
    }

    .step-actions .right-actions {
      display: flex;
      gap: 12px;
      flex-wrap: wrap;
    }

    .topbar-right.registration-mode .badge,
    .topbar-right.registration-mode .ghost-btn,
    .topbar-right.registration-mode .primary-btn {
      opacity: 0.72;
    }

    .hidden { display: none !important; }

    @media (max-width: 1200px) {
      .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .split-hero, .grid-3, .helper-grid, .review-grid { grid-template-columns: 1fr; }
      .stepper { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    }

    @media (max-width: 960px) {
      .app-shell { grid-template-columns: 1fr; }
      .sidebar { position: static; min-height: auto; }
      .form-grid, .grid-2, .grid-4, .helper-grid, .review-grid, .stepper { grid-template-columns: 1fr; }
      .topbar { flex-direction: column; align-items: flex-start; }
      .registration-topbar-inner { width: min(94%, 100%); flex-direction: column; align-items: flex-start; }
      .main { width: min(94%, 100%); padding: 20px 0 28px; }
    }
  

/* --- Added for split multi-page version --- */
body.public-page {
  min-height: 100vh;
}

.public-shell {
  width: min(1180px, 94%);
  margin: 0 auto;
  padding: 28px 0 40px;
}

.public-main {
  width: min(980px, 100%);
  margin: 28px auto 0;
}

.public-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.public-card .panel-head {
  border-bottom: 1px solid var(--line);
}

.portal-hidden {
  display: none !important;
}

.topbar-actions-cluster {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.logout-btn {
  white-space: nowrap;
}

.sidebar .nav-group a.nav-link {
  cursor: pointer;
}

.page-host:empty {
  min-height: 240px;
}

.loading-card {
  background: var(--panel);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 28px;
  color: var(--muted);
}

.login-page-wrap {
  min-height: calc(100vh - 120px);
  display: grid;
  place-items: center;
}

.login-page-card {
  width: min(520px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.login-page-card h2 {
  margin: 0 0 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 32px;
  letter-spacing: -0.04em;
  color: var(--text);
}

.login-page-card p {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.6;
}

.demo-credentials {
  background: #eef4ff;
  border: 1px solid #d6e4ff;
  border-radius: 16px;
  padding: 14px 16px;
  color: #264272;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 18px;
}

.demo-credentials code {
  font-family: Consolas, Monaco, monospace;
  font-size: 13px;
}

.login-links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.login-links a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

.inline-note {
  color: var(--muted);
  font-size: 13px;
}

.registration-topbar.visible {
  display: block;
}

@media (max-width: 960px) {
  .public-main { width: 100%; }
  .login-page-card { padding: 22px; }
}

.chip-neutral {
  background: #f4f6fb;
  color: var(--text);
}

.checkbox-stack {
  gap: 12px;
}

.checkbox-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
}

.checkbox-row input {
  margin-top: 3px;
}

.checkbox-row strong {
  display: block;
  margin-bottom: 4px;
}

.checkbox-row {
  min-height: 0;
}

@media (max-width: 720px) {
  .modal-backdrop {
    padding: 12px;
  }

  .modal,
  .modal-card {
    width: 100%;
    max-height: calc(100vh - 24px);
    border-radius: 18px;
  }

  .modal-head {
    padding: 16px 52px 14px 16px;
  }

  .modal-body,
  #modal-body {
    padding: 16px;
    max-height: calc(100vh - 130px);
  }
}


.registration-credit-offer {
  margin-bottom: 20px;
}

.registration-credit-offer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border-radius: 22px;
  border: 1px solid rgba(99, 102, 241, 0.18);
  background: linear-gradient(135deg, rgba(31, 94, 255, 0.12) 0%, rgba(99, 102, 241, 0.08) 52%, rgba(255, 255, 255, 0.96) 100%);
  box-shadow: var(--shadow);
}

.registration-credit-copy h3 {
  margin: 0 0 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 26px;
  letter-spacing: -0.03em;
  color: var(--text);
}

.registration-credit-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.registration-credit-eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: rgba(31, 94, 255, 0.10);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.registration-credit-amount {
  flex: 0 0 auto;
  min-width: 120px;
  text-align: center;
  padding: 18px 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 28px;
  font-weight: 700;
  box-shadow: 0 18px 30px rgba(31, 94, 255, 0.24);
}

@media (max-width: 960px) {
  .registration-credit-offer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .registration-credit-amount {
    width: 100%;
  }
}
