:root {
  --gc-navy: #071b33;
  --gc-dark: #04111f;
  --gc-gold: #c6a24a;
  --gc-gold-light: #d4af6a;
  --gc-muted: #f5f7fa;
  --gc-border: #e3e8ef;
  --gc-text: #1e293b;
  --gc-soft: #64748b;
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --radius-control: 10px;
  --radius-card: 12px;
  --shadow-card: 0 1px 3px rgba(0,0,0,.04), 0 1px 2px rgba(0,0,0,.06);
  --shadow-card-hover: 0 12px 24px rgba(15,23,42,.10), 0 3px 8px rgba(15,23,42,.06);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--gc-muted); color: var(--gc-text); font-family: Inter, "Segoe UI", Arial, sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }

.auth-split { display: flex; min-height: 100vh; }
.auth-story { flex: 1; position: relative; overflow: hidden; padding: 56px 60px; color: #fff; background: linear-gradient(150deg, var(--gc-dark), var(--gc-navy) 60%, #0a2847); }
.auth-story:before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle at 20% 80%, rgba(198,162,74,.08), transparent 45%), linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px); background-size: auto, 60px 60px, 60px 60px; pointer-events: none; }
.auth-story > * { position: relative; }
.auth-logo { width: 200px; margin-bottom: 64px; }
.eyebrow { display: block; color: var(--gc-gold); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.auth-story h1 { max-width: 430px; margin: 12px 0 20px; font-size: 42px; line-height: 1.08; font-weight: 800; }
.auth-story h1 span, .gold-text { color: var(--gc-gold); }
.auth-story p { max-width: 390px; color: #94a3b8; line-height: 1.65; }
.auth-features { display: grid; gap: 12px; max-width: 420px; margin-top: 44px; }
.auth-features article { display: grid; grid-template-columns: 40px 1fr; gap: 2px 14px; padding: 14px 18px; border: 1px solid rgba(255,255,255,.07); border-radius: 12px; background: rgba(255,255,255,.04); }
.auth-features i { grid-row: span 2; align-self: center; color: #fff; font-size: 16px; }
.auth-features small, .compliance { color: #64748b; }
.compliance { display: block; margin-top: 48px; }
.auth-panel { width: 480px; display: grid; place-items: center; padding: 48px; background: #fff; }
.auth-center { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(150deg, var(--gc-dark), var(--gc-navy)); }
.auth-card, .otp-card { width: 100%; max-width: 420px; padding: 44px 48px; border-radius: 24px; background: #fff; box-shadow: 0 24px 64px rgba(4,17,31,.28); }
.auth-card.compact, .otp-card { max-width: 440px; }
.auth-card h2, .otp-card h2 { margin: 0 0 8px; color: var(--gc-navy); font-size: 24px; font-weight: 800; }
.auth-card p, .otp-card p { color: var(--gc-soft); line-height: 1.6; }
label { display: block; margin: 16px 0 6px; color: #374151; font-size: 13px; font-weight: 700; }
.form-input { width: 100%; padding: 11px 14px; border: 1.5px solid var(--gc-border); border-radius: 10px; color: var(--gc-navy); outline: none; background: #fff; }
.form-input:focus { border-color: var(--gc-gold); box-shadow: 0 0 0 3px rgba(198,162,74,.12); }
.password-field { position: relative; }
.password-field .form-input { padding-right: 44px; }
.password-field button { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: #94a3b8; cursor: pointer; }
.form-row { display: flex; justify-content: space-between; align-items: center; margin: 18px 0 24px; }
.check-label { display: flex; align-items: center; gap: 7px; margin: 0; color: #475569; font-weight: 500; }
.btn-gold { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 10px; padding: 10px 20px; background: linear-gradient(135deg, var(--gc-gold), var(--gc-gold-light)); color: #fff; font-weight: 700; cursor: pointer; }
.btn-gold:hover { opacity: .92; transform: translateY(-1px); }
.full { width: 100%; }
.center { text-align: center; }
.auth-help, .quiet-note { margin-top: 24px; padding: 14px 18px; border: 1px solid var(--gc-border); border-radius: 10px; background: #f8fafc; color: var(--gc-soft); font-size: 12px; text-align: center; }
.error-alert, .success-alert { margin: 14px 0; padding: 12px 14px; border-radius: 10px; font-size: 13px; line-height: 1.45; }
.error-alert { border: 1px solid #fecaca; background: #fef2f2; color: #991b1b; }
.success-alert { border: 1px solid #bbf7d0; background: #f0fdf4; color: #166534; }
.validation-text { display: block; margin-top: 5px; color: #991b1b; font-size: 12px; }
.identity-panel { display: grid; grid-template-columns: 110px 1fr; gap: 9px 12px; margin: 18px 0 6px; padding: 14px 16px; border: 1px solid var(--gc-border); border-radius: 10px; background: #f8fafc; }
.identity-panel span { color: #94a3b8; font-size: 12px; font-weight: 800; text-transform: uppercase; }
.identity-panel strong { color: var(--gc-navy); }
.onboarding-card { max-width: 520px; }
.onboarding-submit { margin-top: 20px; }
.auth-help a, .back-link, .card-head a { color: var(--gc-gold); font-weight: 700; }
.auth-card > .back-link { display: block; margin-top: 8px; text-align: center; }
.auth-foot { display: block; margin-top: 24px; color: #94a3b8; text-align: center; }
.mini-logo { display: inline-block; margin-bottom: 24px; padding: 13px 18px; border-radius: 12px; background: linear-gradient(135deg, var(--gc-dark), var(--gc-navy)); }
.mini-logo.left { margin-bottom: 30px; }
.mini-logo img { width: 150px; display: block; }
.otp-card { text-align: center; }
.otp-timer { margin: 8px 0 0; font-size: 13px; }
.otp-timer strong { color: var(--gc-gold); }
.otp-timer strong.expired { color: #991b1b; }
.otp-inputs { display: flex; gap: 10px; justify-content: center; margin: 28px 0; }
.otp-inputs input { width: 52px; height: 58px; border: 1.5px solid var(--gc-border); border-radius: 12px; background: #f8fafc; color: var(--gc-navy); font-size: 22px; font-weight: 800; text-align: center; }
.otp-resend-form { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 2px; }
.link-button { border: 0; background: transparent; cursor: pointer; }
.link-button:disabled,
.link-button.disabled { cursor: not-allowed; opacity: .55; }
.muted { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; color: var(--gc-soft); }
.large-icon { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 14px; background: #f1f5f9; color: var(--gc-navy); }
.large-icon i { font-size: 22px; }
.large-icon.success { background: #dcfce7; color: #166534; }
.password-checks { display: grid; gap: 7px; margin: 20px 0 24px; padding: 14px 16px; border: 1px solid var(--gc-border); border-radius: 10px; background: #f8fafc; }
.password-checks span { color: #9ca3af; font-size: 12px; }
.password-checks span.ok { color: #16a34a; font-weight: 700; }

.portal-shell { display: flex; min-height: 100vh; overflow-x: hidden; }
.sidebar { width: 260px; flex: 0 0 260px; display: flex; flex-direction: column; padding: 28px 16px; background: linear-gradient(180deg, var(--gc-dark), var(--gc-navy)); color: #fff; }
.sidebar-brand { padding: 0 8px 32px; }
.sidebar-brand img { width: 160px; }
.portal-kicker { margin-top: var(--space-3); padding: 10px 12px; border: 1px solid rgba(198,162,74,.26); border-radius: var(--radius-control); background: linear-gradient(135deg, rgba(255,255,255,.08), rgba(198,162,74,.10)); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 10px 24px rgba(0,0,0,.10); backdrop-filter: blur(8px); }
.portal-kicker span, .nav-heading { display: block; color: #64748b; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.portal-kicker strong { color: var(--gc-gold); font-size: 12px; }
.sidebar-nav { flex: 1; }
.nav-heading { padding: 0 14px 8px; }
.sidebar-link { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; margin-bottom: 4px; padding: 12px 14px 12px 18px; border-radius: var(--radius-control); color: #94a3b8; font-size: 14px; font-weight: 650; line-height: 1.2; }
.sidebar-link i { width: 20px; min-width: 20px; font-size: 18px; line-height: 1; text-align: center; }
.sidebar-link:before { content: ""; position: absolute; left: 6px; top: 10px; bottom: 10px; width: 3px; border-radius: 999px; background: transparent; }
.sidebar-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar-link.active { background: rgba(198,162,74,.12); color: var(--gc-gold); }
.sidebar-link.active:before { background: var(--gc-gold); box-shadow: 0 0 0 3px rgba(198,162,74,.10); }
.signout { color: #f87171; }
.sidebar-user, .topbar-user { display: flex; align-items: center; gap: 10px; }
.sidebar-user { border-top: 1px solid rgba(255,255,255,.09); padding: 16px 14px 8px; }
.sidebar-user strong, .topbar-user strong { display: block; font-size: 13px; }
.sidebar-user span, .topbar-user span { display: block; color: #94a3b8; font-size: 11px; }
.powered-by { display: block; margin-top: 10px; padding: 0 14px; color: #64748b; font-size: 11px; line-height: 1.5; }
.powered-by strong { color: var(--gc-gold); }
.powered-by:hover { color: #cbd5e1; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, rgba(198,162,74,.27), rgba(198,162,74,.12)); color: var(--gc-gold); font-weight: 800; }
.avatar.small { background: linear-gradient(135deg, var(--gc-navy), #0d2d55); }
.avatar.xl { width: 80px; height: 80px; margin: auto; font-size: 28px; background: linear-gradient(135deg, var(--gc-navy), #0a2847); }
.portal-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; border-bottom: 1px solid var(--gc-border); background: #fff; }
.topbar h1 { margin: 0; color: var(--gc-navy); font-size: 20px; font-weight: 850; letter-spacing: 0; }
.topbar p { margin: 0; color: var(--gc-soft); font-size: 13px; }
.topbar-actions { display: flex; align-items: center; gap: 16px; }
.icon-button { position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: var(--radius-control); background: #f1f5f9; color: #475569; cursor: pointer; transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease; }
.icon-button i { font-size: 17px; line-height: 1; }
.icon-button:hover { background: #e8eef6; transform: translateY(-1px); }
.icon-button.active { background: #fffbeb; color: var(--gc-gold); box-shadow: inset 0 0 0 1px rgba(198,162,74,.28); }
.balance-hidden { color: #94a3b8 !important; letter-spacing: .03em; }
.notification-dot { position: absolute; top: 8px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--gc-gold); }
.content { flex: 1; min-width: 0; overflow: auto; padding: var(--space-5); }
.dashboard-container { width: 100%; max-width: 1680px; margin: 0 auto; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-4); margin-bottom: var(--space-4); }
.stat-card, .portal-card, .mini-stats article { min-width: 0; border: 1px solid var(--gc-border); border-radius: var(--radius-card); background: #fff; padding: var(--space-4); box-shadow: var(--shadow-card); }
.stat-card { position: relative; overflow: hidden; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; background: linear-gradient(135deg, rgba(var(--stat-rgb, 198,162,74), .13), rgba(255,255,255,.96) 42%, #fff); }
.stat-card:before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; border-radius: var(--radius-card) var(--radius-card) 0 0; background: linear-gradient(90deg, var(--stat-accent, var(--gc-gold)), rgba(var(--stat-rgb, 198,162,74), .30)); }
.stat-card.navy { --stat-accent: #0a2847; --stat-soft: #eef2ff; --stat-text: var(--gc-navy); --stat-rgb: 10,40,71; }
.stat-card.green { --stat-accent: #16a34a; --stat-soft: #dcfce7; --stat-text: #14532d; --stat-rgb: 22,163,74; }
.stat-card.gold { --stat-accent: var(--gc-gold); --stat-soft: #fffbeb; --stat-text: #854d0e; --stat-rgb: 198,162,74; }
.stat-card.violet { --stat-accent: #7c3aed; --stat-soft: #ede9fe; --stat-text: #4c1d95; --stat-rgb: 124,58,237; }
.stat-card.blue { --stat-accent: #1d4ed8; --stat-soft: #eff6ff; --stat-text: #1e3a8a; --stat-rgb: 29,78,216; }
.stat-card:hover { transform: translateY(-2px); border-color: rgba(var(--stat-rgb, 198,162,74), .22); box-shadow: var(--shadow-card-hover); }
.stat-head { display: flex; justify-content: space-between; gap: var(--space-2); margin-bottom: var(--space-3); }
.stat-head span:first-child, .mini-stats span, .totals-row span { color: #94a3b8; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.stat-card strong { position: relative; z-index: 1; display: block; color: var(--gc-navy); font-size: 28px; line-height: 1.1; font-weight: 900; letter-spacing: 0; }
.stat-card small { color: #94a3b8; }
.stat-actions { display: flex; align-items: center; flex: 0 0 auto; gap: 8px; }
.stat-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; }
.stat-icon i { font-size: 17px; }
.stat-icon.navy, .stat-icon.green, .stat-icon.gold, .stat-icon.violet, .stat-icon.blue { background: var(--stat-soft); color: var(--stat-text); }
.tile-balance-toggle { width: 36px; height: 36px; border-radius: 50%; border: 1px solid transparent; background: transparent; color: var(--stat-text); }
.tile-balance-toggle:hover { background: var(--stat-soft); color: var(--stat-accent); }
.tile-balance-toggle.active { border-color: color-mix(in srgb, var(--stat-accent) 36%, transparent); background: #fff; color: var(--stat-accent); }
.status-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; padding: 16px 24px; border: 1px solid rgba(198,162,74,.2); border-radius: 14px; background: linear-gradient(135deg, var(--gc-navy), #0a2847); color: #94a3b8; }
.status-banner div { display: flex; align-items: center; gap: 14px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--space-4); }
.side-stack { display: flex; flex-direction: column; gap: var(--space-4); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.card-head h3, .card-head h4, .portal-card h4, .section-title { margin: 0; color: var(--gc-navy); font-size: 16px; font-weight: 850; }
.card-head p, .portal-card p { margin: 3px 0 0; color: #94a3b8; font-size: 12px; }
.responsive-table { width: 100%; max-width: 100%; overflow-x: auto; overflow-y: hidden; border-radius: 10px; }
.responsive-table::-webkit-scrollbar { height: 10px; }
.responsive-table::-webkit-scrollbar-thumb { border: 3px solid #fff; border-radius: 999px; background: #cbd5e1; }
.data-table { width: 100%; min-width: 920px; border-collapse: collapse; table-layout: auto; }
.data-table th { padding: 10px 16px; border-bottom: 1px solid var(--gc-border); color: #94a3b8; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table th.sortable { cursor: pointer; user-select: none; }
.data-table th.sortable:after { content: "↕"; margin-left: 6px; color: #cbd5e1; font-size: 10px; }
.data-table td { padding: 13px 16px; border-bottom: 1px solid #f1f5f9; color: var(--gc-text); font-size: 14px; vertical-align: middle; overflow-wrap: normal; word-break: normal; }
.clients-table { min-width: 1080px; table-layout: fixed; }
.clients-table th:nth-child(1) { width: 25%; }
.clients-table th:nth-child(2) { width: 10%; }
.clients-table th:nth-child(3) { width: 23%; }
.clients-table th:nth-child(4) { width: 14%; }
.clients-table th:nth-child(5) { width: 11%; }
.clients-table th:nth-child(6) { width: 10%; }
.clients-table th:nth-child(7) { width: 7%; }
.clients-table td:nth-child(4),
.clients-table td:nth-child(5),
.clients-table td:nth-child(6),
.clients-table td:nth-child(7) { white-space: nowrap; }
.clients-table td:nth-child(7) { text-align: right; }
.clients-table .client-cell strong,
.clients-table td:nth-child(3) { overflow-wrap: anywhere; }
.commissions-table { min-width: 1040px; table-layout: fixed; }
.commissions-table th:nth-child(1) { width: 10%; }
.commissions-table th:nth-child(2) { width: 20%; }
.commissions-table th:nth-child(3) { width: 25%; }
.commissions-table th:nth-child(4) { width: 15%; }
.commissions-table th:nth-child(5) { width: 8%; }
.commissions-table th:nth-child(6) { width: 14%; }
.commissions-table th:nth-child(7) { width: 8%; }
.commissions-table td:nth-child(1),
.commissions-table td:nth-child(4),
.commissions-table td:nth-child(5),
.commissions-table td:nth-child(6),
.commissions-table td:nth-child(7) { white-space: nowrap; }
.commissions-table .status-badge { justify-content: center; min-width: 78px; }
.data-table td small { display: block; color: #94a3b8; font-size: 11px; }
.data-table tr:hover td { background: #f8fafc; }
.status-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.status-approved, .status-active, .status-paid { background: #dcfce7; color: #166534; }
.status-pending, .status-processing, .status-pending-review { background: #fef9c3; color: #854d0e; }
.status-suspended, .status-expired { background: #fee2e2; color: #991b1b; }
.status-processed { background: #dbeafe; color: #1e40af; }
.soft-button, .report-link { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--gc-border); border-radius: var(--radius-control); background: #f8fafc; color: #475569; font-size: 12px; font-weight: 800; white-space: nowrap; transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease; }
.soft-button:hover { transform: translateY(-1px); border-color: rgba(198,162,74,.34); background: #fff; color: var(--gc-navy); }
.soft-button.danger { border-color: #fecaca; background: #fef2f2; color: #991b1b; }
.soft-button:disabled { opacity: .5; cursor: not-allowed; }
.table-actions { display: flex; flex-wrap: wrap; gap: 8px; min-width: max-content; }
.data-table-controls, .data-table-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.data-table-pager { margin: 12px 0 0; color: var(--gc-soft); font-size: 12px; }
.data-table-pager div { display: flex; gap: 8px; }
.table-search { max-width: min(360px, 100%); }
.table-size-label { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--gc-soft); font-size: 12px; }
.table-page-size { width: 82px; padding: 8px 10px; }
.link-copy-row { display: grid; grid-template-columns: minmax(0, 1fr) 40px; gap: var(--space-2); align-items: center; margin: 14px 0 10px; }
.link-box { display: block; margin: 0; padding: 11px 12px; border: 1px solid var(--gc-border); border-radius: var(--radius-control); background: #f8fafc; color: #475569; font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace; font-size: 12px; line-height: 1.4; word-break: break-all; }
.copy-icon-button { width: 40px; height: 40px; border: 1px solid var(--gc-border); background: #fff; color: var(--gc-navy); }
.copy-icon-button:hover { border-color: rgba(198,162,74,.42); background: #fffbeb; color: var(--gc-gold); }
.dashboard-cta { min-height: 42px; box-shadow: 0 8px 18px rgba(198,162,74,.20); }
.dashboard-cta:hover { opacity: 1; transform: translateY(-2px); box-shadow: 0 12px 24px rgba(198,162,74,.26); }
.dashboard-cta:active { transform: translateY(0); box-shadow: 0 4px 12px rgba(198,162,74,.20); }
.report-link { width: 100%; justify-content: flex-start; margin-top: 8px; color: var(--gc-text); }
.report-link i:first-child { width: 20px; color: var(--gc-gold); font-size: 16px; }
.report-link span { flex: 1; }
.report-link .report-chevron { color: #cbd5e1; opacity: 0; transform: translateX(-4px); transition: opacity .18s ease, transform .18s ease; }
.report-link:hover { border-color: rgba(198,162,74,.28); background: #fffbeb; color: var(--gc-navy); transform: translateY(-1px); }
.report-link:hover .report-chevron { opacity: 1; transform: translateX(0); }
.empty-state { min-height: 320px; display: grid; place-items: center; align-content: center; gap: var(--space-2); border: 1px dashed #d7dee8; border-radius: var(--radius-card); background: linear-gradient(135deg, #f8fafc, #fff); color: var(--gc-soft); text-align: center; }
.empty-state-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: #fffbeb; color: var(--gc-gold); }
.empty-state-icon i { font-size: 28px; }
.empty-state h3 { margin: 2px 0 0; color: var(--gc-navy); font-size: 18px; font-weight: 850; }
.empty-state p { margin: 0; color: #94a3b8; font-size: 13px; }
.mini-row { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid #f1f5f9; }
.mini-row:last-child { border-bottom: 0; }
.mini-row small { display: block; color: #94a3b8; font-size: 11px; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 22px; }
.mini-stats.two { grid-template-columns: repeat(2, 1fr); margin-bottom: 0; }
.mini-stats.single { grid-template-columns: 1fr; margin: 0; }
.mini-stats strong { display: block; margin-top: 4px; color: var(--gc-navy); font-size: 24px; }
.green-text { color: #166534 !important; }
.amber-text { color: #854d0e !important; }
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.toolbar.inline { margin: 0; }
.toolbar.right { justify-content: flex-end; }
.search-input { flex: 1; }
.select-input, .date-input { width: auto; }
.notice, .notice-pill { padding: 10px 14px; border: 1px solid #fde68a; border-radius: 8px; background: #fffbeb; color: #854d0e; font-size: 12px; font-weight: 700; }
.notice { margin-bottom: 16px; }
.notice i, .btn-gold i, .soft-button i { font-size: 14px; }
.notice-pill { display: inline-block; margin-left: 10px; }
.client-cell, .client-title { display: flex; align-items: center; gap: 10px; }
.initials { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: #f1f5f9; color: var(--gc-navy); font-size: 11px; font-weight: 800; }
.initials.large { width: 56px; height: 56px; border-radius: 16px; background: linear-gradient(135deg, var(--gc-navy), #0a2847); color: var(--gc-gold); font-size: 18px; }
.type-pill { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 6px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.type-pill.corporate { background: #eff6ff; color: #1d4ed8; }
.type-pill.individual { background: #f0fdf4; color: #15803d; }
.portal-back { display: inline-block; margin-bottom: 20px; }
.client-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.client-title h2 { margin: 0; color: var(--gc-navy); font-size: 20px; }
.client-title p { margin: 4px 0 0; color: var(--gc-soft); }
.detail-grid, .profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.profile-grid { grid-template-columns: 280px minmax(0, 1fr); align-items: start; }
.metric-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.metric-balance-toggle { width: 30px; height: 30px; flex: 0 0 auto; border-radius: 50%; }
.amount-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; text-align: right; }
.amount-actions strong { min-width: 0; overflow-wrap: normal; word-break: normal; }
.table-amount-actions { display: inline-flex; flex-direction: row; }
.table-amount-actions .metric-balance-toggle { width: 26px; height: 26px; opacity: .72; }
.data-table tr:hover .table-amount-actions .metric-balance-toggle { opacity: 1; }
.product-row { align-items: center; gap: 16px; }
.product-row > div:first-child { min-width: 0; }
.product-row > div:first-child strong { overflow-wrap: anywhere; }
.timeline-row { display: grid; grid-template-columns: 38px 1fr auto; align-items: start; gap: 12px; padding: 14px 0; border-bottom: 1px solid #f1f5f9; }
.timeline-row > i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #fffbeb; color: var(--gc-gold); }
.timeline-row small { display: block; color: #94a3b8; }
.totals-row { display: flex; justify-content: flex-end; gap: 32px; margin-top: 12px; padding: 14px 16px; border: 1px solid var(--gc-border); border-radius: 10px; background: #f8fafc; text-align: right; }
.table-foot { text-align: center; color: #94a3b8; font-size: 11px; }
.report-period { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.report-period i, .report-card small i { margin-right: 6px; color: var(--gc-gold); }
.report-card { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 16px; }
.report-card p { max-width: 620px; color: var(--gc-soft); line-height: 1.5; }
.report-card small { color: #94a3b8; }
.report-card .btn-gold { min-width: 170px; }
.report-card .large-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: #f1f5f9; color: var(--gc-navy); font-size: 22px; }
.report-card h4 { margin-bottom: 4px; }
.dashboard-grid aside .portal-card .data-table { min-width: 0; }
.report-row .soft-button { flex-shrink: 0; }
.dark-note { margin-top: 14px; background: linear-gradient(135deg, var(--gc-navy), #0a2847); color: var(--gc-gold); border-color: rgba(198,162,74,.2); }
.dark-note p { color: #94a3b8; line-height: 1.6; }
.profile-card { text-align: center; }
.profile-card h3 { margin: 14px 0 4px; color: var(--gc-navy); line-height: 1.25; }
.profile-agent-no { margin: 0 0 8px !important; color: #94a3b8 !important; font-size: 12px !important; }
.readonly-badge { display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin-top: 10px; padding: 7px 11px; border: 1px solid var(--gc-border); border-radius: 999px; background: #f8fafc; color: #475569; font-size: 12px; font-weight: 800; }
.readonly-badge i { color: var(--gc-gold); }
.info-list { display: grid; grid-template-columns: 1fr auto; gap: 10px 12px; margin: 0; }
.info-list dt { color: var(--gc-soft); }
.info-list dd { margin: 0; color: var(--gc-navy); font-weight: 800; }
.profile-info-list { grid-template-columns: minmax(76px, auto) minmax(0, 1fr); }
.profile-info-list dt { min-width: 0; }
.profile-info-list dd { min-width: 0; text-align: right; overflow-wrap: anywhere; }
.tabs { display: flex; gap: 4px; margin-bottom: 24px; border-bottom: 1px solid var(--gc-border); }
.tabs button { border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 10px 16px; background: transparent; color: var(--gc-soft); font-weight: 800; cursor: pointer; }
.tabs button.active { border-color: var(--gc-gold); color: var(--gc-gold); }
.profile-readonly-note { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; padding: 13px 14px; border: 1px solid var(--gc-border); border-radius: var(--radius-control); background: linear-gradient(135deg, #f8fafc, #fff); color: var(--gc-soft); }
.profile-readonly-note i { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 auto; border-radius: 50%; background: #fffbeb; color: var(--gc-gold); }
.profile-readonly-note strong { display: block; color: var(--gc-navy); font-size: 13px; }
.profile-readonly-note span { display: block; margin-top: 2px; font-size: 12px; line-height: 1.5; }
.profile-panel { display: none; }
.profile-panel.active { display: block; }
.readonly-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.readonly-field { min-width: 0; padding: 14px 16px; border: 1px solid var(--gc-border); border-radius: var(--radius-card); background: linear-gradient(135deg, #fff, #f8fafc); box-shadow: 0 1px 2px rgba(15,23,42,.03); }
.readonly-field span { display: block; margin-bottom: 8px; color: #94a3b8; font-size: 11px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.readonly-field strong { display: block; min-height: 18px; color: var(--gc-navy); font-size: 14px; font-weight: 850; line-height: 1.35; overflow-wrap: anywhere; }
.bank-note { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.form-grid label { margin: 0; }
.form-grid input[readonly] { margin-top: 5px; background: #f8fafc; }
.document-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; padding: 14px 16px; border: 1px solid var(--gc-border); border-radius: 10px; background: #f8fafc; }
.document-row small { display: block; color: #94a3b8; }
.document-row > div:last-child { display: flex; align-items: center; gap: 10px; }
.link-hero { background: linear-gradient(135deg, var(--gc-navy), #0a2847); border-color: rgba(198,162,74,.2); color: #fff; }
.link-hero p { color: #94a3b8; }
.link-hero code { display: block; margin: 16px 0; padding: 12px 14px; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; background: rgba(255,255,255,.05); color: #e2e8f0; word-break: break-all; }
.admin-link-card { margin-bottom: 16px; }
.admin-link-card code { display: block; margin: 10px 0 12px; padding: 12px 14px; border: 1px solid var(--gc-border); border-radius: 10px; background: #f8fafc; color: var(--gc-navy); word-break: break-all; }
.button-row { display: flex; gap: 10px; }
.ghost-button { border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 10px 20px; background: rgba(255,255,255,.08); color: #e2e8f0; font-weight: 800; cursor: pointer; }
.steps { margin: 0; padding-left: 22px; color: var(--gc-soft); line-height: 1.6; font-size: 13px; }

.bi { line-height: 1; }

@media (max-width: 1100px) {
  .sidebar { width: 220px; flex-basis: 220px; }
  .sidebar-brand img { width: 140px; }
  .content { padding: 22px; }
  .stat-grid, .mini-stats { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid, .detail-grid { grid-template-columns: 1fr; }
  .card-head { align-items: flex-start; flex-direction: column; }
  .card-head form, .card-head .btn-gold { width: 100%; }
  .card-head .btn-gold { min-height: 44px; }
}
@media (max-width: 820px) {
  .auth-split { display: block; }
  .auth-story { min-height: auto; padding: 36px 24px; }
  .auth-panel { width: auto; padding: 24px; }
  .portal-shell { display: block; }
  .sidebar { width: auto; min-height: auto; padding: 18px; }
  .sidebar-brand { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 0 16px; }
  .sidebar-brand img { width: 132px; }
  .portal-kicker { flex: 1; margin-top: 0; }
  .sidebar-nav { display: flex; gap: 8px; margin: 0 -4px; padding: 6px 4px 10px; overflow-x: auto; }
  .nav-heading, .sidebar-user, .sidebar .signout, .powered-by { display: none; }
  .sidebar-link { flex: 0 0 auto; width: auto; margin: 0; white-space: nowrap; }
  .topbar { height: auto; padding: 18px; align-items: flex-start; gap: 14px; }
  .topbar-actions { gap: 10px; }
  .topbar-user div:last-child { display: none; }
  .content { padding: 18px; }
  .portal-card, .stat-card, .mini-stats article { padding: 18px; border-radius: 12px; }
  .profile-grid, .form-grid, .readonly-grid, .stat-grid, .mini-stats { grid-template-columns: 1fr; }
  .data-table-controls, .data-table-pager { align-items: stretch; flex-direction: column; }
  .data-table-pager div { width: 100%; }
  .data-table-pager .soft-button { flex: 1; min-height: 42px; }
  .table-size-label { justify-content: space-between; width: 100%; }
  .table-page-size { width: 120px; }
  .table-search { max-width: none; }
  .responsive-table { overflow: visible; }
  .data-table, .clients-table, .commissions-table { min-width: 0; table-layout: auto; }
  .data-table thead { display: none; }
  .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .data-table tr { margin-bottom: 12px; border: 1px solid var(--gc-border); border-radius: 12px; background: #fff; overflow: hidden; }
  .data-table tr:hover td { background: transparent; }
  .data-table td { display: grid; grid-template-columns: minmax(110px, 38%) minmax(0, 1fr); gap: 12px; padding: 11px 14px; border-bottom: 1px solid #eef2f7; font-size: 13px; }
  .data-table td:last-child { border-bottom: 0; }
  .clients-table td:nth-child(4),
  .clients-table td:nth-child(5),
  .clients-table td:nth-child(6),
  .clients-table td:nth-child(7) { white-space: normal; }
  .clients-table td:nth-child(7) { text-align: left; }
  .commissions-table td:nth-child(1),
  .commissions-table td:nth-child(4),
  .commissions-table td:nth-child(5),
  .commissions-table td:nth-child(6),
  .commissions-table td:nth-child(7) { white-space: normal; }
  .commissions-table .status-badge { min-width: 0; }
  .data-table td:before { content: attr(data-label); color: #94a3b8; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
  .table-actions { min-width: 0; }
  .table-actions form, .table-actions .soft-button { width: 100%; }
  .toolbar, .report-period, .client-header, .report-card, .status-banner, .totals-row { align-items: stretch; flex-direction: column; display: flex; }
  .timeline-row { grid-template-columns: 34px minmax(0, 1fr); }
  .timeline-row .amount-actions { grid-column: 2; justify-content: flex-start; text-align: left; }
  .product-row, .amount-actions { align-items: flex-start; flex-direction: column; justify-content: flex-start; text-align: left; }
  .button-row { flex-direction: column; }
}
@media (max-width: 520px) {
  .auth-story h1 { font-size: 34px; }
  .auth-card, .otp-card { padding: 32px 24px; border-radius: 18px; }
  .otp-inputs { gap: 6px; }
  .otp-inputs input { width: 44px; height: 52px; }
  .sidebar-brand { align-items: stretch; flex-direction: column; }
  .portal-kicker { width: 100%; }
  .topbar { flex-direction: column; }
  .topbar-actions { width: 100%; justify-content: space-between; }
  .content { padding: 14px; }
  .data-table td { grid-template-columns: 1fr; gap: 4px; }
}
