/* =====================================================================
   MSC INVEST – design system (white + blue fintech theme)
   Light/dark themes via CSS variables on <html data-theme="...">.
   ===================================================================== */
:root {
  --primary: #0D6EFD;
  --primary-dark: #0B5ED7;
  --primary-soft: #E7F0FF;
  --bg: #F5F9FF;
  --surface: #FFFFFF;
  --surface-2: #F8FBFF;
  --text: #172033;
  --text-muted: #5B6B86;
  --border: #E3ECFB;
  --success: #12A150;
  --success-soft: #E5F7EE;
  --warning: #B7791F;
  --warning-soft: #FFF6E0;
  --danger: #DC3545;
  --danger-soft: #FDECEE;
  --info: #0B7285;
  --info-soft: #E3F6FA;
  --shadow-sm: 0 1px 2px rgba(23, 32, 51, .06);
  --shadow: 0 6px 24px rgba(13, 110, 253, .08);
  --shadow-lg: 0 18px 48px rgba(13, 110, 253, .14);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --gradient: linear-gradient(135deg, #0D6EFD 0%, #0B5ED7 55%, #0948B3 100%);
  --sidebar-w: 260px;
  --topbar-h: 64px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
[data-theme="dark"] {
  --primary: #3D8BFD;
  --primary-dark: #2B7BF0;
  --primary-soft: #16264A;
  --bg: #0E1626;
  --surface: #152034;
  --surface-2: #1A2740;
  --text: #E6EDF8;
  --text-muted: #9BAAC4;
  --border: #24344F;
  --success-soft: #11321F;
  --warning-soft: #3A2E12;
  --danger-soft: #3D1A1F;
  --info-soft: #0F2F36;
  --shadow: 0 6px 24px rgba(0, 0, 0, .35);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.6; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); text-decoration: underline; }
h1, h2, h3, h4, h5 { margin: 0 0 .5em; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 3.5vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.5rem 0; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: .92em; }
:focus-visible { outline: 3px solid rgba(13, 110, 253, .45); outline-offset: 2px; border-radius: 6px; }
.d-none, [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--primary); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 1000; }
.skip-link:focus { left: 8px; }

.icon { width: 1.15em; height: 1.15em; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; flex-shrink: 0; }
.icon-lg { width: 1.6em; height: 1.6em; }
.icon-xl { width: 2.2em; height: 2.2em; }

/* ---------- layout helpers ---------- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 760px; }
.section { padding: 72px 0; }
.section-sm { padding: 40px 0; }
.section-alt { background: var(--surface); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 40px; }
.section-head p { color: var(--text-muted); }
.grid { display: grid; gap: 20px; }
.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)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 6px; } .gap-2 { gap: 12px; } .gap-3 { gap: 20px; }
.stack > * + * { margin-top: 16px; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 40px; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.text-center { text-align: center; } .text-right { text-align: right; }
.text-muted { color: var(--text-muted); } .text-success { color: var(--success); } .text-danger { color: var(--danger); } .text-warning { color: var(--warning); }
.text-sm { font-size: .875rem; } .text-xs { font-size: .78rem; } .text-lg { font-size: 1.1rem; }
.fw-600 { font-weight: 600; } .fw-700 { font-weight: 700; }
.nowrap { white-space: nowrap; }
.break { word-break: break-all; }
.w-100 { width: 100%; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 600; font-size: .95rem; line-height: 1.2; cursor: pointer; text-decoration: none !important; transition: background .15s, box-shadow .15s, transform .05s, color .15s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.disabled { opacity: .6; cursor: not-allowed; pointer-events: none; }
.btn-primary { background: var(--gradient); color: #fff; box-shadow: 0 6px 16px rgba(13, 110, 253, .25); }
.btn-primary:hover { color: #fff; box-shadow: 0 8px 22px rgba(13, 110, 253, .35); }
.btn-outline { background: transparent; border-color: var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary-soft); color: var(--primary-dark); }
.btn-light { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-light:hover { background: var(--surface-2); color: var(--text); }
.btn-white { background: #fff; color: var(--primary); }
.btn-white:hover { color: var(--primary-dark); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { color: #fff; filter: brightness(.95); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { color: #fff; filter: brightness(.95); }
.btn-warning { background: #F0AD4E; color: #2B1D00; }
.btn-link { background: none; border: 0; color: var(--primary); padding: 0; font-weight: 600; }
.btn-sm { padding: 6px 12px; font-size: .84rem; border-radius: 8px; }
.btn-lg { padding: 14px 26px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-icon { padding: 8px; border-radius: 10px; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-body { padding: 22px; }
.card-header { padding: 16px 22px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-header h2, .card-header h3 { margin: 0; font-size: 1.05rem; }
.card-footer { padding: 14px 22px; border-top: 1px solid var(--border); }
.card-hover { transition: transform .2s, box-shadow .2s; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat-card { padding: 20px; display: flex; gap: 16px; align-items: flex-start; }
.stat-card .stat-icon { width: 46px; height: 46px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; flex-shrink: 0; }
.stat-card .stat-label { color: var(--text-muted); font-size: .85rem; margin: 0; }
.stat-card .stat-value { font-size: 1.45rem; font-weight: 700; margin: 2px 0 0; word-break: break-word; }
.stat-card.primary { background: var(--gradient); color: #fff; border: 0; }
.stat-card.primary .stat-label { color: rgba(255, 255, 255, .85); }
.stat-card.primary .stat-icon { background: rgba(255, 255, 255, .18); color: #fff; }

/* ---------- badges & alerts ---------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-muted { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }
.badge-primary { background: var(--primary-soft); color: var(--primary); }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid transparent; margin-bottom: 16px; }
.alert .icon { margin-top: 2px; }
.alert-success { background: var(--success-soft); border-color: rgba(18, 161, 80, .25); color: var(--success); }
.alert-error, .alert-danger { background: var(--danger-soft); border-color: rgba(220, 53, 69, .25); color: var(--danger); }
.alert-warning { background: var(--warning-soft); border-color: rgba(183, 121, 31, .25); color: var(--warning); }
.alert-info { background: var(--info-soft); border-color: rgba(11, 114, 133, .2); color: var(--info); }
.alert > div { flex: 1; }
.alert p:last-child { margin-bottom: 0; }
.alert-close { background: none; border: 0; color: inherit; cursor: pointer; opacity: .7; padding: 0; }
.risk-box { border: 1px solid rgba(183, 121, 31, .35); background: var(--warning-soft); color: var(--text); border-radius: var(--radius-sm); padding: 14px 16px; font-size: .9rem; display: flex; gap: 12px; }
.risk-box .icon { color: var(--warning); margin-top: 2px; }
.risk-box strong { color: var(--warning); }

/* ---------- forms ---------- */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .92rem; }
.form-label .req { color: var(--danger); }
.form-control, .form-select, textarea.form-control { width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; transition: border-color .15s, box-shadow .15s; }
.form-control:focus, .form-select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(13, 110, 253, .12); }
.form-control::placeholder, textarea.form-control::placeholder { color: #8A9BB5; opacity: .72; font-weight: 400; }
[data-theme="dark"] .form-control::placeholder, [data-theme="dark"] textarea.form-control::placeholder { color: #7E8DA8; }
.form-control[readonly] { background: var(--surface-2); }
textarea.form-control { min-height: 120px; resize: vertical; }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B6B86' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 38px; }
.form-hint { font-size: .82rem; color: var(--text-muted); margin-top: 5px; }
.form-check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; font-size: .92rem; }
.form-check input { margin-top: 4px; width: 17px; height: 17px; accent-color: var(--primary); flex-shrink: 0; }
.input-group { display: flex; }
.input-group .form-control { border-radius: 10px 0 0 10px; }
.input-group .btn, .input-group .input-addon { border-radius: 0 10px 10px 0; }
.input-addon { display: flex; align-items: center; padding: 0 14px; background: var(--surface-2); border: 1px solid var(--border); border-left: 0; color: var(--text-muted); }
.input-prefix { border-radius: 10px 0 0 10px !important; border-right: 0 !important; border-left: 1px solid var(--border) !important; }
.input-group .input-prefix + .form-control { border-radius: 0 10px 10px 0; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 18px; }
.password-meter { height: 6px; border-radius: 6px; background: var(--border); overflow: hidden; margin-top: 8px; }
.password-meter span { display: block; height: 100%; width: 0; background: var(--danger); transition: width .2s, background .2s; }
.otp-input { letter-spacing: .5em; font-size: 1.4rem; text-align: center; font-family: ui-monospace, monospace; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
fieldset { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 18px; margin: 0 0 18px; }
legend { font-weight: 700; padding: 0 6px; }

/* ---------- tables ---------- */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-weight: 600; color: var(--text-muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-compact td, .table-compact th { padding: 8px 12px; }
.sort-link { color: inherit; }
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.empty-state .icon { width: 42px; height: 42px; color: var(--primary); opacity: .55; margin-bottom: 10px; }
.kv { display: grid; grid-template-columns: minmax(130px, 38%) 1fr; gap: 10px 16px; margin: 0; }
.kv dt { color: var(--text-muted); font-size: .9rem; }
.kv dd { margin: 0; font-weight: 600; word-break: break-word; }
.amount-pos { color: var(--success); font-weight: 600; }
.amount-neg { color: var(--danger); font-weight: 600; }

/* ---------- pagination / tabs / filters ---------- */
.pagination { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: space-between; padding: 14px 22px; border-top: 1px solid var(--border); font-size: .88rem; color: var(--text-muted); }
.pagination .pages { display: flex; gap: 4px; flex-wrap: wrap; }
.pagination a, .pagination span.cur { min-width: 34px; height: 34px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid var(--border); color: var(--text); background: var(--surface); text-decoration: none; }
.pagination span.cur { background: var(--primary); color: #fff; border-color: var(--primary); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; }
.tabs a { padding: 10px 16px; color: var(--text-muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; text-decoration: none; }
.tabs a.active, .tabs a:hover { color: var(--primary); border-color: var(--primary); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding: 16px 22px; border-bottom: 1px solid var(--border); }
.filters .form-group { margin: 0; min-width: 140px; flex: 1; }
.filters .form-control, .filters .form-select { padding: 8px 12px; font-size: .88rem; }
.filters .form-label { font-size: .78rem; margin-bottom: 4px; color: var(--text-muted); }

/* ---------- public navbar ---------- */
.announcement-bar { background: var(--text); color: #fff; text-align: center; font-size: .88rem; padding: 8px 16px; }
[data-theme="dark"] .announcement-bar { background: #0A1220; }
.announcement-bar a { color: #9EC5FE; }
.navbar { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--border); }
[data-theme="dark"] .navbar { background: rgba(14, 22, 38, .9); }
.navbar .container { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; letter-spacing: .04em; color: var(--text); text-decoration: none !important; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; flex: none; }
.logo-mark { width: 36px; height: 36px; display: block; overflow: visible; filter: drop-shadow(0 6px 14px rgba(13, 110, 253, .35)); }
.logo-mark__dot { transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: no-preference) {
  .logo-mark__line, .logo-mark__arrow { stroke-dasharray: 90; stroke-dashoffset: 90; animation: logoDraw 1.15s cubic-bezier(.2,.7,.2,1) forwards; }
  .logo-mark__arrow { animation-delay: .4s; }
  .logo-mark__dot { transform: scale(0); animation: logoPop .35s ease .9s forwards; }
  .brand-mark, .install-pop__logo { animation: logoPulse 2.8s ease-in-out 1.2s infinite; }
}
@keyframes logoDraw { to { stroke-dashoffset: 0; } }
@keyframes logoPop { to { transform: scale(1); } }
@keyframes logoPulse {
  0%, 100% { filter: drop-shadow(0 6px 12px rgba(13, 110, 253, .28)); }
  50% { filter: drop-shadow(0 8px 18px rgba(13, 110, 253, .55)); }
}
.brand .accent { color: var(--primary); }
.brand img { height: 36px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a { padding: 8px 12px; border-radius: 8px; color: var(--text); font-weight: 500; text-decoration: none; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); background: var(--primary-soft); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-toggle { display: none; }
.theme-toggle { background: none; border: 1px solid var(--border); color: var(--text); width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; cursor: pointer; }
[data-theme-toggle] .i-sun { display: none; }
[data-theme="dark"] [data-theme-toggle] .i-sun { display: inline-block; }
[data-theme="dark"] [data-theme-toggle] .i-moon { display: none; }

/* ---------- hero / banners ---------- */
.hero { position: relative; background: var(--gradient); color: #fff; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 85% 20%, rgba(255, 255, 255, .18), transparent 45%), radial-gradient(circle at 10% 90%, rgba(255, 255, 255, .1), transparent 40%); pointer-events: none; }
.hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding-top: 80px; padding-bottom: 80px; }
.hero h1 { color: #fff; font-size: clamp(2rem, 4.5vw, 3.2rem); }
.hero p.lead { font-size: 1.12rem; color: rgba(255, 255, 255, .9); max-width: 560px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero-card { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25); border-radius: var(--radius-lg); padding: 26px; backdrop-filter: blur(6px); }
.hero-card .row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .15); }
.hero-card .row:last-child { border-bottom: 0; }
.hero-note { font-size: .82rem; color: rgba(255, 255, 255, .8); margin-top: 18px; }
.earn-hero { background: linear-gradient(145deg, #042047 0%, #0d6efd 46%, #0b7a45 100%); }
.earn-badge { background: rgba(255, 255, 255, .16); color: #fff; }
.btn-earn { background: #12a150; border-color: #12a150; color: #fff; }
.btn-earn:hover { background: #0e8642; border-color: #0e8642; color: #fff; text-decoration: none; }
.earn-points { display: flex; flex-wrap: wrap; gap: 8px 16px; list-style: none; margin: 18px 0 0; padding: 0; color: rgba(255, 255, 255, .92); font-weight: 600; }
.earn-points li { display: flex; align-items: center; gap: 6px; }
.earn-board { background: #fff; color: var(--text); border-radius: 22px; padding: 18px 18px 12px; box-shadow: 0 22px 50px rgba(0, 0, 0, .22); }
.earn-board__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.earn-board__top strong { display: flex; align-items: center; gap: 8px; }
.earn-board .badge { background: #e5f7ee; color: #0f7b3d; }
.earn-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.earn-kpi { background: #f3fbf6; border: 1px solid #d7f0e2; border-radius: 14px; padding: 12px; }
.earn-kpi span { display: block; font-size: .75rem; color: #5b6b86; }
.earn-kpi strong { color: #0f7b3d; font-size: 1.15rem; }
.earn-bars { display: flex; align-items: flex-end; gap: 8px; height: 72px; margin: 14px 0 4px; }
.earn-bars span { flex: 1; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, #3dcc7a, #0d6efd); }
.earn-bars span:nth-child(1) { height: 35%; } .earn-bars span:nth-child(2) { height: 48%; }
.earn-bars span:nth-child(3) { height: 42%; } .earn-bars span:nth-child(4) { height: 62%; }
.earn-bars span:nth-child(5) { height: 55%; } .earn-bars span:nth-child(6) { height: 78%; }
.earn-bars span:nth-child(7) { height: 92%; }
.earn-line { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid #e8eef8; font-size: .92rem; }
.earn-up { color: #0f7b3d; font-weight: 700; }
.earn-sample { margin: 8px 0 0; font-size: .75rem; color: #5b6b86; }
.cta-box .hero-actions { justify-content: center; }
.banner-slider { position: relative; overflow: hidden; background: #0b1e46; aspect-ratio: 16 / 7; width: 100%; max-width: 100%; touch-action: pan-y; box-shadow: 0 18px 40px rgba(8, 18, 40, .18); }
.banner-slider--member { margin: 0 0 8px; border-radius: 16px; border: 1px solid color-mix(in srgb, #fff 55%, var(--primary)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28), 0 14px 32px rgba(8, 18, 40, .16); }
.banner-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; z-index: 0; pointer-events: none; transition: opacity .7s ease; }
.banner-slide.active { opacity: 1; visibility: visible; z-index: 1; pointer-events: auto; }
.banner-slider.is-advancing::after { content: ""; position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: 3px; transform: scaleX(0); transform-origin: left center; background: linear-gradient(90deg, rgba(255,255,255,.35), #fff); animation: bannerWait var(--banner-wait, 5s) linear; pointer-events: none; }
.banner-link, .banner-slide picture { display: block; width: 100%; height: 100%; }
.banner-slide img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.banner-frame { position: relative; aspect-ratio: 16 / 7; overflow: hidden; border-radius: 12px; background: #0b1e46; }
.banner-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@keyframes bannerWait { to { transform: scaleX(1); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.feature { padding: 24px; }
.feature .feature-icon { width: 50px; height: 50px; border-radius: 14px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; margin-bottom: 14px; }
.feature p { color: var(--text-muted); margin: 0; }
.step-num { width: 34px; height: 34px; border-radius: 50%; background: var(--gradient); color: #fff; font-weight: 700; display: grid; place-items: center; margin-bottom: 12px; }
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat-strip .value { font-size: 1.8rem; font-weight: 800; color: var(--primary); }
.stat-strip .label { color: var(--text-muted); font-size: .9rem; }
.cta-box { background: var(--gradient); color: #fff; border-radius: var(--radius-lg); padding: 48px; text-align: center; box-shadow: var(--shadow-lg); }
.cta-box h2 { color: #fff; }
.cta-box p { color: rgba(255, 255, 255, .9); }
.testimonial { padding: 24px; }
.testimonial .stars { color: #F5B301; display: flex; gap: 2px; margin-bottom: 10px; }
.testimonial .stars .icon { fill: currentColor; }
.testimonial .who { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 700; overflow: hidden; flex-shrink: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- plan cards ---------- */
.plan-card { display: flex; flex-direction: column; padding: 26px; position: relative; --plan-accent: var(--primary); }
.plan-card.featured { border: 2px solid var(--plan-accent); box-shadow: var(--shadow-lg); }
.plan-card .ribbon { position: absolute; top: 16px; right: 16px; }
.plan-card .plan-rate { font-size: 2rem; font-weight: 800; color: var(--plan-accent); line-height: 1.1; margin: 10px 0 2px; }
.plan-card .plan-rate small { font-size: .9rem; color: var(--text-muted); font-weight: 600; }
.plan-card ul { list-style: none; padding: 0; margin: 18px 0; flex: 1; }
.plan-card li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: .9rem; }
.plan-card li span:first-child { color: var(--text-muted); }
.plan-card .plan-risk { font-size: .8rem; color: var(--warning); display: flex; gap: 6px; align-items: flex-start; margin-bottom: 14px; }

/* ---------- FAQ (details/summary) ---------- */
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); margin-bottom: 10px; }
.faq-item summary { cursor: pointer; padding: 16px 20px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .icon { transition: transform .2s; }
.faq-item[open] summary .icon { transform: rotate(180deg); }
.faq-item .faq-body { padding: 0 20px 18px; color: var(--text-muted); }

/* ---------- prose (CMS pages) ---------- */
.prose { max-width: 820px; }
.prose h2 { margin-top: 1.6em; font-size: 1.35rem; }
.prose h3 { margin-top: 1.3em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose table { border-collapse: collapse; width: 100%; margin: 1em 0; }
.prose td, .prose th { border: 1px solid var(--border); padding: 8px 10px; }
.page-hero { background: var(--gradient); color: #fff; padding: 56px 0 48px; }
.page-hero h1 { color: #fff; margin: 0; }
.page-hero p { color: rgba(255, 255, 255, .88); margin: 8px 0 0; }
.breadcrumb { font-size: .85rem; color: rgba(255, 255, 255, .8); margin-bottom: 8px; }
.breadcrumb a { color: #fff; }

/* ---------- footer ---------- */
.footer { background: #0F1A2E; color: #B9C6DD; padding: 56px 0 24px; font-size: .92rem; }
.footer a { color: #DCE6F7; }
.footer h4 { color: #fff; font-size: .95rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 8px; }
.footer .brand { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 32px; }
.footer-risk { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 36px; padding-top: 20px; font-size: .8rem; color: #8C9AB5; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; font-size: .82rem; }
.social { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.social a { padding: 6px 10px; border: 1px solid rgba(255, 255, 255, .15); border-radius: 8px; font-size: .8rem; }

/* ---------- auth pages ---------- */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: var(--gradient); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side::after { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%; background: rgba(255, 255, 255, .08); right: -120px; bottom: -120px; }
.auth-side h2 { color: #fff; font-size: 2rem; }
.auth-side .brand { color: #fff; }
.auth-side ul { list-style: none; padding: 0; }
.auth-side li { display: flex; gap: 10px; margin-bottom: 12px; color: rgba(255, 255, 255, .92); }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 28px 16px; }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 22px 22px 16px; box-shadow: var(--shadow-lg); }
.auth-card.wide { max-width: 480px; }
.auth-card h1 { font-size: 1.28rem; margin-bottom: 2px; }
.auth-compact .form-group { margin-bottom: 10px; }
.auth-compact .form-label { margin-bottom: 3px; font-size: .82rem; }
.auth-compact .form-control, .auth-compact .form-select { padding: 8px 12px; }
.auth-compact .form-check { margin-bottom: 8px; font-size: .84rem; }
.auth-compact .btn { min-height: 40px; }
.auth-compact + .auth-compact { margin-top: 8px; }
.auth-lead { font-size: .88rem; margin-bottom: 14px; }
.auth-foot { text-align: center; margin-top: 14px; font-size: .88rem; color: var(--text-muted); }

/* ---------- application shell (user + admin) ---------- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); background: var(--surface); border-right: 1px solid var(--border); position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; z-index: 60; transition: transform .25s ease; }
.sidebar-head { height: var(--topbar-h); display: flex; align-items: center; padding: 0 20px; border-bottom: 1px solid var(--border); justify-content: space-between; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 14px 12px 24px; }
.sidebar-nav .nav-title { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); padding: 14px 12px 6px; font-weight: 700; }
.sidebar-nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--text); font-weight: 500; text-decoration: none; margin-bottom: 2px; font-size: .93rem; }
.sidebar-nav a:hover { background: var(--surface-2); color: var(--primary); }
.sidebar-nav a.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.sidebar-nav a .count { margin-left: auto; background: var(--danger); color: #fff; border-radius: 999px; font-size: .7rem; padding: 1px 7px; font-weight: 700; }
.sidebar-foot { padding: 14px 16px; border-top: 1px solid var(--border); font-size: .8rem; color: var(--text-muted); }
.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }
.topbar { height: var(--topbar-h); background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; position: sticky; top: 0; z-index: 40; gap: 12px; }
.topbar-title { font-weight: 700; font-size: 1.05rem; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.content { padding: 24px; flex: 1; width: 100%; max-width: 1400px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: 1.5rem; margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--text-muted); }
.sidebar-backdrop { display: none; }
.menu-btn { display: none; }
.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); min-width: 240px; padding: 8px; display: none; z-index: 80; }
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a, .dropdown-menu button { display: flex; width: 100%; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 8px; color: var(--text); text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; text-align: left; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--surface-2); }
.notif-btn { position: relative; }
.notif-dot { position: absolute; top: -4px; right: -4px; background: var(--danger); color: #fff; font-size: .65rem; font-weight: 700; border-radius: 999px; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 4px; }
.notif-list { max-height: 360px; overflow-y: auto; width: 320px; }
.notif-list .notif { display: block; padding: 10px 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: .86rem; }
.notif-list .notif.unread { background: var(--primary-soft); }
.notif-list .notif small { color: var(--text-muted); display: block; }
.user-chip { display: flex; align-items: center; gap: 10px; background: none; border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px 4px 4px; cursor: pointer; color: var(--text); font: inherit; }
.user-chip .avatar { width: 32px; height: 32px; font-size: .8rem; }
.bottom-nav { display: none; }
.verify-banner { background: var(--warning-soft); color: var(--warning); padding: 10px 24px; font-size: .9rem; display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; border-bottom: 1px solid rgba(183, 121, 31, .2); }
.chart-box { position: relative; height: 280px; }
.chart-box canvas { width: 100% !important; height: 100% !important; }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .82rem; color: var(--text-muted); margin-top: 10px; }
.chart-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--c); margin-right: 6px; vertical-align: -1px; }
.progress { height: 8px; background: var(--surface-2); border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.progress > span { display: block; height: 100%; background: var(--gradient); border-radius: 8px; }
.copy-box { display: flex; gap: 8px; align-items: center; background: var(--surface-2); border: 1px dashed var(--border); border-radius: 10px; padding: 10px 12px; }
.copy-box code { flex: 1; overflow-x: auto; white-space: nowrap; }
.tree ul { list-style: none; padding-left: 22px; border-left: 2px solid var(--border); margin: 6px 0 6px 8px; }
.tree > ul { border: 0; padding-left: 0; margin-left: 0; }
.tree li { padding: 5px 0; }
.ticket-msg { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 12px; background: var(--surface); }
.ticket-msg.from-admin { border-color: rgba(13, 110, 253, .35); background: var(--primary-soft); }
.ticket-msg.internal { border-style: dashed; border-color: var(--warning); background: var(--warning-soft); }
.ticket-msg .meta { font-size: .8rem; color: var(--text-muted); margin-bottom: 6px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ticket-msg .body { white-space: pre-wrap; word-break: break-word; }
.qr-box { background: #fff; display: inline-block; padding: 8px; border-radius: 12px; border: 1px solid var(--border); }
.code-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; font-family: ui-monospace, monospace; }
.code-list span { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 8px; text-align: center; }
dialog { border: 0; border-radius: var(--radius); padding: 0; max-width: 520px; width: calc(100% - 32px); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
dialog::backdrop { background: rgba(10, 20, 40, .55); }
dialog .card-body { padding: 24px; }
.admin-badge { background: #172033; color: #fff; font-size: .7rem; padding: 3px 8px; border-radius: 6px; letter-spacing: .06em; }
.preview-frame { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.thumb { width: 96px; height: 54px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); background: var(--surface-2); }
.list-plain { list-style: none; padding: 0; margin: 0; }
.list-plain li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.list-plain li:last-child { border-bottom: 0; }
.inline-form { display: inline; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.check-ok { color: var(--success); } .check-bad { color: var(--danger); }
.fade-in { animation: fadeIn .4s ease both; }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- error pages ---------- */
.error-page { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 24px; background: var(--bg); }
.error-code { font-size: clamp(4rem, 14vw, 7rem); font-weight: 800; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--surface); flex-direction: column; align-items: stretch; padding: 12px 20px 20px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: grid; }
  .nav-actions .btn-hide-sm { display: none; }
  .hero .container { grid-template-columns: 1fr; padding-top: 56px; padding-bottom: 56px; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .sidebar-backdrop.open { display: block; position: fixed; inset: 0; background: rgba(10, 20, 40, .45); z-index: 55; }
  .main { margin-left: 0; }
  .menu-btn { display: grid; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  body { font-size: 14.5px; }
  .section { padding: 52px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-4.keep-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .content { padding: 16px 14px 90px; }
  .topbar { padding: 0 14px; }
  .card-body { padding: 18px; }
  .cta-box { padding: 32px 20px; }
  .footer-grid { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 8px; }
  .user-chip .name { display: none; }
  .notif-list { width: 280px; }
  .bottom-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: var(--surface); border-top: 1px solid var(--border); z-index: 45; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .68rem; color: var(--text-muted); text-decoration: none; padding: 4px 6px; border-radius: 8px; min-width: 56px; }
  .bottom-nav a.active { color: var(--primary); }
  .bottom-nav .icon { width: 22px; height: 22px; }
  .table-responsive-stack thead { display: none; }
  .table-responsive-stack tr { display: block; border-bottom: 1px solid var(--border); padding: 8px 0; }
  .table-responsive-stack td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 6px 16px; text-align: right; }
  .table-responsive-stack td::before { content: attr(data-label); color: var(--text-muted); font-size: .8rem; text-align: left; font-weight: 600; }
  .table-responsive-stack td.num { text-align: right; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
/* ---------- AI chat widget (FAB only until opened; draggable) ---------- */
.chat-widget { position: fixed; top: calc(var(--topbar-h, 56px) + 6px); right: 10px; bottom: auto; left: auto; z-index: 90; display: flex; flex-direction: column; align-items: flex-end; gap: 0; }
.chat-fab { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--gradient); color: #fff; box-shadow: 0 8px 18px rgba(13, 110, 253, .32); cursor: grab; display: grid; place-items: center; touch-action: none; user-select: none; }
.chat-widget.is-dragging .chat-fab { cursor: grabbing; }
.chat-fab .icon { width: 18px; height: 18px; pointer-events: none; }
.chat-panel { display: none; width: 100%; height: 100%; min-height: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 18px 18px 12px 12px; box-shadow: 0 16px 40px rgba(8, 18, 40, .22); flex-direction: column; overflow: hidden; }
.chat-widget.is-open { align-items: stretch; z-index: 120; }
.chat-widget.is-open .chat-panel { display: flex !important; }
.chat-widget.is-open .chat-fab { display: none !important; }
.chat-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--border); background: var(--surface-2); flex: none; }
.chat-head strong { font-size: .88rem; }
.chat-head .btn-icon { width: 34px; height: 34px; min-height: 34px; }
.chat-log { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.chat-bubble { max-width: 88%; padding: 7px 10px; border-radius: 12px; font-size: .82rem; line-height: 1.35; white-space: pre-wrap; word-break: break-word; }
.chat-bubble.user { align-self: flex-end; background: var(--gradient); color: #fff; }
.chat-bubble.assistant { align-self: flex-start; background: var(--primary-soft); color: var(--text); }
.chat-bubble.pending { opacity: .7; }
.chat-bubble.err { background: var(--danger-soft); color: var(--danger); }
.chat-wa { display: grid; gap: 6px; margin-top: 8px; white-space: normal; }
.chat-wa__btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; }
.chat-wa__num { font-weight: 700; letter-spacing: .02em; }
.chat-form { display: flex; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--border); flex: none; background: var(--surface); align-items: flex-end; position: relative; z-index: 2; }
.chat-input { flex: 1; min-height: 44px; max-height: 96px; height: auto; font-size: 16px; line-height: 1.35; color: var(--text); background: #fff; caret-color: var(--primary); resize: none; padding: 10px 12px; }
[data-theme="dark"] .chat-input { background: var(--surface-2); color: var(--text); }
.chat-send { min-height: 44px; height: 44px; padding: 0 14px; flex: none; touch-action: manipulation; }
@media (min-width: 721px) {
  .chat-widget.is-open .chat-panel { border-radius: 16px; }
}

@media print {
  .sidebar, .topbar, .bottom-nav, .navbar, .footer, .no-print, .btn, .chat-widget { display: none !important; }
  .main { margin: 0; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; border-color: #ccc; }
}

/* ---------- compact mobile (user + admin) ---------- */
@media (max-width: 960px) {
  .hide-sm { display: none !important; }
}
@media (max-width: 720px) {
  :root { --topbar-h: 56px; }
  .page-head { margin-bottom: 14px; gap: 8px; }
  .page-head h1 { font-size: 1.25rem; }
  .card-header { padding: 12px 14px; }
  .card-body { padding: 14px; }
  .stat-card { padding: 12px; gap: 10px; }
  .stat-card .stat-icon { width: 36px; height: 36px; border-radius: 10px; }
  .stat-card .stat-value { font-size: 1.12rem; }
  .stat-card .stat-label { font-size: .75rem; }
  .grid { gap: 10px; }
  .section { padding: 36px 0; }
  .section-head { margin-bottom: 22px; }
  .filters, .toolbar { flex-direction: column; align-items: stretch; }
  .table-wrap { margin: 0 -14px; border-radius: 0; border-left: 0; border-right: 0; }
  .table { font-size: .82rem; }
  .table th, .table td { padding: 8px 10px; }
  .tabs { gap: 0; }
  .tabs a { padding: 8px 12px; font-size: .82rem; }
  .form-group { margin-bottom: 12px; }
  .btn { min-height: 42px; }
  .btn-sm { min-height: 34px; }
  .actions { width: 100%; }
  .actions .btn { flex: 1; }
  .admin .content { padding-bottom: 90px; }
  .chat-widget:not(.is-open) { top: calc(var(--topbar-h, 56px) + 6px); right: 10px; bottom: auto; }
}
@media (max-width: 420px) {
  .grid-4.keep-2 { gap: 8px; }
  .stat-card { flex-direction: column; align-items: flex-start; }
}

/* ---------- login method tabs ---------- */
.auth-method { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; margin: 10px 0 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; }
.auth-method label { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 10px; font-weight: 700; font-size: .92rem; cursor: pointer; color: var(--text-muted); transition: background .2s, color .2s, box-shadow .2s, transform .2s; }
.auth-method label input { position: absolute; opacity: 0; pointer-events: none; }
.auth-method label.active, .auth-method label:has(input:checked) { background: var(--gradient); color: #fff; box-shadow: 0 8px 18px rgba(13, 110, 253, .28); }
.auth-method label:not(.active):hover { background: var(--surface); color: var(--primary); }
.login-form:has([name="login_method"][value="otp"]:checked) [data-panel="password"] { display: none; }
.login-form:has([name="login_method"][value="otp"]:checked) [data-hint-password] { display: none; }
.login-form:has([name="login_method"][value="otp"]:checked) [data-hint-otp] { display: block !important; }
.auth-card .form-hint { margin: 6px 0 0; font-size: .8rem; color: var(--text-muted); }

/* ---------- compact + premium user area ---------- */
.user-app { --sidebar-w: 208px; --topbar-h: 48px; }
.user-app .content { padding: 16px 18px 32px; max-width: 1280px; }
.user-app .page-head { margin-bottom: 14px; }
.user-app .page-head h1 { font-size: 1.28rem; }
.user-app .page-head p { font-size: .88rem; }
.user-app .card-body { padding: 16px; }
.user-app .card-header { padding: 12px 16px; }
.user-app .card-header h2 { font-size: .98rem; }
.user-app .stat-card { padding: 14px; gap: 12px; }
.user-app .stat-card .stat-icon { width: 40px; height: 40px; }
.user-app .stat-card .stat-value { font-size: 1.22rem; }
.user-app .grid { gap: 12px; }
.user-app .sidebar-nav a { padding: 7px 10px; font-size: .88rem; }
.user-app .sidebar-nav .nav-title { padding: 10px 10px 4px; }
.user-app .topbar { padding: 0 16px; }
.user-app .table th, .user-app .table td { padding: 9px 12px; }
.user-app .empty-state { padding: 32px 16px; }
.user-app .card { transition: box-shadow .28s ease, border-color .28s ease; }
.user-app .stat-card { transition: transform .28s cubic-bezier(.2,.7,.2,1), box-shadow .28s ease, border-color .28s ease; }
.user-app .stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: rgba(13, 110, 253, .28); }
.user-app .stat-card.primary { background-size: 180% 180%; animation: gradientShift 9s ease infinite; }
.user-app .stat-card .stat-icon { transition: transform .25s ease; }
.user-app .stat-card:hover .stat-icon { transform: scale(1.08) rotate(-6deg); }
.user-app .btn-primary { transition: transform .2s ease, box-shadow .2s ease; }
.user-app .btn-primary:hover { transform: translateY(-1px); }
.user-app .sidebar-nav a { position: relative; transition: background .2s, color .2s, transform .2s; }
.user-app .sidebar-nav a.active { box-shadow: inset 3px 0 0 var(--primary); }
.user-app .content > .page-head,
.user-app .content > .alert,
.user-app .content > .grid,
.user-app .content > .card { animation: riseIn .5s cubic-bezier(.2,.7,.2,1) both; }
.user-app .content > .grid { animation-delay: .06s; }
.user-app .content > .card { animation-delay: .1s; }
.user-app fieldset { background: var(--surface-2); border-color: transparent; }
.user-app .empty-state { background: radial-gradient(circle at top, var(--primary-soft), transparent 70%); border-radius: var(--radius); }
.user-app .copy-box { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; }
.user-app .form-control, .user-app .form-select { background: var(--surface-2); }
.user-app .form-control:focus, .user-app .form-select:focus { background: var(--surface); }
.user-app .content { padding: 8px 12px 16px; }
.user-app .page-head { margin-bottom: 6px; gap: 8px; }
.user-app .page-head h1 { font-size: 1.02rem; letter-spacing: -.02em; }
.user-app .page-head p { font-size: .74rem; margin-top: 1px; }
.user-app .card { border-radius: 12px; box-shadow: 0 8px 20px rgba(15, 35, 70, .05); }
.user-app .card-body { padding: 8px 10px; }
.user-app .card-header { padding: 7px 10px; }
.user-app .card-header h2 { font-size: .84rem; }
.user-app .grid { gap: 8px; }
.user-app .stack > * + * { margin-top: 8px; }
.user-app .mb-2 { margin-bottom: 8px; }
.user-app .mb-3 { margin-bottom: 8px; }
.user-app .form-group { margin-bottom: 8px; }
.user-app .form-label { font-size: .72rem; margin-bottom: 3px; }
.user-app .form-control, .user-app .form-select, .user-app textarea.form-control { padding: 6px 10px; min-height: 34px; }
.user-app fieldset { padding: 8px 10px; margin-bottom: 8px; }
.user-app .stat-card { padding: 8px 10px; border-radius: 12px; gap: 8px; }
.user-app .stat-card .stat-icon { width: 32px; height: 32px; }
.user-app .stat-card .stat-value { font-size: .98rem; }
.user-app .table th, .user-app .table td { padding: 6px 8px; font-size: .78rem; }
.user-app .hist th, .user-app .hist td { padding: 3px 6px; font-size: .7rem; line-height: 1.2; }
.user-app .hist code { font-size: .64rem; }
.user-app .hist .btn-sm { padding: 1px 6px; min-height: 22px; }
.user-app .hist tbody tr:nth-child(odd) { background: rgba(13, 110, 253, .06); }
.user-app .hist tbody tr:nth-child(even) { background: rgba(18, 161, 80, .06); }
.user-app .hist td:first-child { box-shadow: inset 3px 0 0 #0d6efd; }
.user-app {
  background:
    radial-gradient(860px 380px at 110% -10%, rgba(13, 110, 253, .22), transparent 58%),
    radial-gradient(680px 340px at -14% 12%, rgba(18, 161, 80, .16), transparent 54%),
    radial-gradient(520px 280px at 78% 108%, rgba(255, 140, 40, .14), transparent 52%),
    #f3f7ff;
}
.user-app .sidebar {
  background: linear-gradient(185deg, #071633 0%, #0a4db8 52%, #0b8a52 100%);
  border-right: 0;
  box-shadow: 10px 0 28px rgba(7, 22, 51, .18);
}
.user-app .sidebar-head { border-bottom-color: rgba(255, 255, 255, .14); }
.user-app .sidebar .brand { color: #fff; }
.user-app .sidebar .brand .accent { color: #ffd56a; }
.user-app .sidebar-nav .nav-title { color: rgba(255, 255, 255, .62); }
.user-app .sidebar-nav a { color: rgba(255, 255, 255, .9); }
.user-app .sidebar-nav a:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.user-app .sidebar-nav a.active { background: linear-gradient(90deg, #ffe08a, #fff); color: #0a2a6b; box-shadow: none; }
.user-app .topbar {
  background: linear-gradient(90deg, #ffffff, #eef5ff 42%, #fff6e8);
  border-bottom: 0;
  box-shadow: 0 8px 22px rgba(13, 110, 253, .1);
}
.user-app .page-head h1 {
  background: linear-gradient(90deg, #084298, #0d6efd 46%, #0b7a45);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.user-app .card {
  border: 1px solid color-mix(in srgb, #0d6efd 18%, #fff);
  background: linear-gradient(180deg, #fff 0%, #f6fbff 100%);
  box-shadow: 0 10px 26px rgba(13, 70, 160, .08);
}
.user-app .card-header {
  background: linear-gradient(90deg, rgba(13, 110, 253, .12), rgba(18, 161, 80, .1) 58%, rgba(255, 184, 77, .16));
}
.user-app .btn-primary {
  background: linear-gradient(135deg, #0b5ed7, #12a150);
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(13, 110, 253, .22);
}
.user-app .card,
.user-app .btn,
.user-app .sidebar-nav a,
.user-app .hist tbody tr,
.user-app .page-head {
  transition: transform .28s cubic-bezier(.2,.7,.2,1), box-shadow .28s ease, background .28s ease, border-color .28s ease, opacity .28s ease;
}
.user-app .content > .card:hover,
.user-app .content .grid > .card:hover { box-shadow: 0 14px 28px rgba(13, 70, 160, .14); }
.user-app .stat-card { border: 1px solid color-mix(in srgb, #0d6efd 20%, transparent); }
.user-app .bottom-nav {
  background: linear-gradient(90deg, #071633, #0a4db8 55%, #0b8a52);
  border-top: 0;
}
.user-app .bottom-nav a { color: rgba(255, 255, 255, .82); }
.user-app .bottom-nav a.active { color: #ffe08a; }
[data-theme="dark"] .user-app {
  background:
    radial-gradient(860px 380px at 110% -10%, rgba(13, 110, 253, .28), transparent 58%),
    radial-gradient(680px 340px at -14% 12%, rgba(18, 161, 80, .18), transparent 54%),
    #0b1220;
}
[data-theme="dark"] .user-app .page-head h1 { color: #fff; background: none; -webkit-text-fill-color: #fff; }
.user-app .filters { padding: 8px; gap: 6px; }
[data-theme="dark"] .user-app .card { background: linear-gradient(180deg, #152033, #10192b); border-color: rgba(90, 166, 255, .28); }
[data-theme="dark"] .user-app .card-header { background: linear-gradient(90deg, rgba(13, 110, 253, .22), rgba(18, 161, 80, .16)); }
[data-theme="dark"] .user-app .topbar { background: linear-gradient(90deg, #121a2b, #17284a 50%, #1a2436); }
[data-theme="dark"] .user-app .hist tbody tr:nth-child(odd) { background: rgba(13, 110, 253, .12); }
[data-theme="dark"] .user-app .hist tbody tr:nth-child(even) { background: rgba(18, 161, 80, .1); }
.pm-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.pm-tab { padding: 7px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; font-size: .82rem; font-weight: 700; }
.pm-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pm-status-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.pm-status-card { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); text-decoration: none; color: inherit; }
.pm-status-card.active { border-color: #12A150; }
.pm-status-card span { font-size: .75rem; color: var(--text-muted); }
.user-app .btn { border-radius: 9px; }
.user-app .btn-sm { padding: 4px 8px; font-size: .75rem; min-height: 30px; }
.user-app .alert { padding: 8px 10px; margin-bottom: 8px; gap: 8px; font-size: .82rem; }
.user-app .chart-box { height: 168px; }
.user-app .empty-state { padding: 16px 10px; }
.user-app .dash-rail { margin-bottom: 8px; padding: 6px; border-radius: 14px; }
.user-app .dash-metric { padding: 6px 8px; border-radius: 10px; gap: 6px; }
.user-app .dash-metric__icon { width: 24px; height: 24px; }
.user-app .sidebar-nav a { padding: 5px 8px; font-size: .8rem; }
.user-app .sidebar-nav .nav-title { padding: 8px 8px 2px; font-size: .68rem; }
.user-app .topbar { box-shadow: 0 1px 0 var(--border); padding: 0 10px; }
.user-app .topbar-title { font-size: .88rem; }
.user-app .payout-card { padding: 8px 10px; border-radius: 12px; gap: 8px; }
.user-app .ref-hero { padding: 10px; gap: 10px; border-radius: 14px; }
.user-app .ref-hero h1 { font-size: 1.05rem; }
.user-app .wd-process { margin-bottom: 0; }
.rise-in { animation: riseIn .55s cubic-bezier(.2,.7,.2,1) both; }

@keyframes riseIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-18px, 12px); }
}

.auth-app .auth-card { animation: riseIn .5s ease both; }
.auth-app .auth-card h1 { font-size: 1.32rem; }
.auth-app .auth-main { padding: 20px 14px; }
.auth-app .form-group { margin-bottom: 12px; }
.auth-app .form-label { font-size: .8rem; margin-bottom: 4px; }
.auth-app .form-control, .auth-app .form-select { padding: 10px 12px; }
.auth-app .form-check { font-size: .82rem; margin-bottom: 10px; }
.auth-app .btn-block { min-height: 44px; }
.auth-app .auth-side::after { animation: floatOrb 10s ease-in-out infinite; }
.auth-app .btn-primary { transition: transform .2s ease, box-shadow .2s ease; }
.auth-app .btn-primary:hover { transform: translateY(-1px); }

.pay-method-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pay-method-card { display: block; cursor: pointer; margin: 0; position: relative; }
.pay-method-card input { position: absolute; opacity: 0; pointer-events: none; }
.pay-method-card__body { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1.5px solid var(--border); border-radius: 14px; background: var(--surface); min-height: 100%; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.pay-method-card input:checked + .pay-method-card__body { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 4px rgba(13, 110, 253, .12); }
.pay-method-card__icon { width: 40px; height: 40px; border-radius: 12px; background: #fff; color: var(--primary); display: grid; place-items: center; flex-shrink: 0; border: 1px solid rgba(13, 110, 253, .18); }
.pay-method-card__icon .icon { width: 20px; height: 20px; }
.pay-method-card__meta, .pay-method-card__hint { display: block; font-size: .75rem; color: var(--text-muted); margin-top: 2px; }
.pay-details-preview { display: grid; gap: 8px; margin-bottom: 12px; }
.pay-detail-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; background: var(--surface-2, var(--primary-soft)); border-radius: 10px; border: 1px solid var(--border); }
.pay-detail-row__label { font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); min-width: 110px; }
.pay-detail-row__value { font-weight: 600; word-break: break-all; flex: 1; }
.pay-qr-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 14px; box-shadow: 0 12px 32px rgba(15, 35, 70, .06); }
.pay-exact { margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--primary-soft, rgba(13, 110, 253, .06)); }
.pay-countdown strong { font-variant-numeric: tabular-nums; }
.pay-qr-frame { max-width: 340px; margin: 0 auto; padding: 16px 14px 12px; border: 3px solid var(--primary); border-radius: 20px; background: #fff; color: #0b1b33; text-align: center; box-shadow: 0 0 0 7px #07111f, 0 0 0 10px #c9a227, 0 16px 36px rgba(7, 17, 31, .16); }
.pay-qr-brand { font-size: 1.02rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); }
.pay-qr-url { font-size: .75rem; color: #3d5a80; word-break: break-all; margin: 4px 0 8px; }
.pay-qr-amount { font-size: 1.4rem; font-weight: 800; color: #0b1b33; letter-spacing: -.02em; }
.pay-qr-amount span { font-size: .75rem; font-weight: 700; color: var(--primary); letter-spacing: .04em; }
.pay-qr-svg { display: grid; place-items: center; margin: 10px auto; padding: 8px; background: #fff; border: 3px solid var(--primary); border-radius: 14px; width: fit-content; }
.pay-qr-svg svg { display: block; width: 232px; height: 232px; }
.pay-qr-hint { font-size: .8rem; color: #4b5d78; margin: 8px 0 0; }
.pay-qr-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 14px; }

.grid .plan-card:nth-child(1) { animation-delay: .04s; }
.grid .plan-card:nth-child(2) { animation-delay: .1s; }
.grid .plan-card:nth-child(3) { animation-delay: .16s; }
.grid .plan-card:nth-child(4) { animation-delay: .22s; }
.grid .plan-card:nth-child(5) { animation-delay: .28s; }
.grid .plan-card:nth-child(6) { animation-delay: .34s; }
.plan-card::before { content: ""; position: absolute; inset: 0 auto auto 0; width: 100%; height: 4px; background: var(--plan-accent); transform: scaleX(.2); transform-origin: left; transition: transform .45s cubic-bezier(.2,.7,.2,1); }
.plan-card:hover::before { transform: scaleX(1); }
.plan-card-top { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; padding-right: 72px; }
.plan-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--primary-soft); color: var(--plan-accent); display: grid; place-items: center; overflow: hidden; flex-shrink: 0; box-shadow: 0 8px 20px rgba(13, 110, 253, .18); animation: planIconFloat 4.5s ease-in-out infinite; }
.plan-icon img, .plan-icon .tier-mark { width: 100%; height: 100%; object-fit: contain; }
.plan-icon .icon { width: 26px; height: 26px; }
.plan-tagline { margin: 4px 0 0; font-size: .86rem; color: var(--text-muted); }
.plan-badge { display: inline-flex; align-items: center; background: var(--plan-accent); color: #fff; font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 4px 8px; border-radius: 999px; margin-bottom: 8px; width: fit-content; }
.plan-card .ribbon + .plan-badge { margin-right: 88px; }
.plan-highlight { color: var(--plan-accent); }
.plan-highlight span:last-child { color: var(--plan-accent); }
.plan-highlight .icon { width: 16px; height: 16px; }
.plan-list-name { display: flex; align-items: center; gap: 10px; }
.plan-thumb { width: 44px; height: 44px; border-radius: 12px; object-fit: contain; border: 0; flex: none; overflow: hidden; }
.plan-thumb img, .plan-thumb .tier-mark { width: 100%; height: 100%; object-fit: contain; }
.plan-icon-editor { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.plan-icon-preview { width: 96px; height: 96px; border-radius: 22px; border: 1px dashed var(--border); background: var(--primary-soft); display: grid; place-items: center; overflow: hidden; flex-shrink: 0; position: relative; }
.plan-icon-preview img, .plan-icon-preview .tier-mark { width: 100%; height: 100%; object-fit: contain; }
.plan-icon-preview:has(img[data-live]:not([hidden])) > img:not([data-live]),
.plan-icon-preview:has(img[data-live]:not([hidden])) > .tier-fallback,
.plan-icon-preview:has(img:not([data-live]):not([hidden])) > .tier-fallback { display: none; }
input[type="file"].form-control { padding: 8px 10px; }
.plan-icon-fallback { color: var(--primary); }
.plan-icon-fallback .icon { width: 32px; height: 32px; }
.plan-confirm-head { display: flex; gap: 14px; align-items: center; }
.plan-confirm-icon { width: 64px; height: 64px; border-radius: 18px; overflow: hidden; display: grid; place-items: center; flex: none; box-shadow: var(--shadow); }
.plan-confirm-icon img, .plan-confirm-icon .tier-mark { width: 100%; height: 100%; object-fit: contain; }

.wd-balance { background: var(--gradient); color: #fff; border-radius: 16px; padding: 12px 18px; min-width: 160px; text-align: right; box-shadow: var(--shadow); animation: gradientShift 9s ease infinite; background-size: 180% 180%; }
.wd-balance__label { display: block; font-size: .75rem; opacity: .85; }
.wd-balance strong { font-size: 1.25rem; }
.wd-card { animation: riseIn .55s both; }
.wd-panels { display: grid; grid-template-columns: 1.2fr .8fr; gap: 14px; margin: 12px 0 8px; }
.wd-panel { border: 1px solid var(--border); border-radius: 16px; padding: 16px; background: linear-gradient(180deg, var(--primary-soft), var(--surface)); animation: riseIn .6s both; }
.wd-panel h3 { display: flex; align-items: center; gap: 8px; font-size: 1rem; margin: 0 0 6px; }
.wd-drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 180px; border: 1.5px dashed rgba(13, 110, 253, .45); border-radius: 16px; background: #fff; cursor: pointer; text-align: center; padding: 16px; transition: border-color .2s, transform .2s, box-shadow .2s; }
.wd-drop:hover { transform: translateY(-2px); border-color: var(--primary); box-shadow: 0 10px 24px rgba(13, 110, 253, .12); }
.wd-drop input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.wd-drop__icon { width: 44px; height: 44px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; }
.wd-drop__preview { max-width: 140px; max-height: 140px; border-radius: 12px; border: 4px solid var(--primary); background: #fff; }
.wd-drop:has(img:not([hidden])) .wd-drop__icon { display: none; }
.payout-add { margin-top: 8px; }
.payout-list { display: grid; gap: 10px; }
.payout-card { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; background: var(--surface); }
.payout-card__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.payout-card__body strong, .payout-card__body span { overflow-wrap: anywhere; }
.payout-deleted { opacity: .55; }
.payout-add .form-control::placeholder { color: #8A9BB5; opacity: .55; font-weight: 400; }
.wd-admin-qr img { max-width: 220px; border: 4px solid var(--primary); border-radius: 14px; background: #fff; padding: 8px; }
.ifsc-ok { color: #0f7b3d !important; }
.ifsc-err { color: var(--danger, #c0392b) !important; }
.ifsc-busy { color: var(--primary) !important; }

@keyframes planIconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@media (max-width: 720px) {
  .wd-panels { grid-template-columns: 1fr; }
  .wd-balance { text-align: left; width: 100%; }
  .plan-card-top { padding-right: 0; }
}

@media (max-width: 720px) {
  .pay-method-grid { grid-template-columns: 1fr; }
  .grid > [style*="grid-column: span"] { grid-column: 1 / -1; }
  .user-app .content { padding: 8px 10px calc(108px + env(safe-area-inset-bottom)); }
  .user-app .page-head h1 { font-size: 1rem; }
  .user-app .stat-card { padding: 8px 10px; }
  .user-app .form-control, .user-app .form-select, .user-app textarea.form-control { font-size: 16px; }
  .user-app .banner-slider--member { border-radius: 14px; margin-bottom: 8px; }
  .user-app .stat-card:hover,
  .user-app .card:hover { transform: none; }
  .auth-app .auth-card h1 { font-size: 1.28rem; }
  .auth-method label { font-size: .84rem; padding: 9px 8px; }
}

/* ---------- phone layout ---------- */
@media (max-width: 720px) {
  .container { padding-left: 14px; padding-right: 14px; }
  .navbar .container { height: 58px; gap: 8px; }
  .brand { font-size: .95rem; min-width: 0; }
  .brand img { height: 30px; width: auto; max-width: 120px; }
  .nav-actions { gap: 6px; flex-shrink: 0; }
  .nav-actions .btn { padding: 8px 10px; font-size: .82rem; min-height: 38px; }
  .nav-links { top: 58px; }
  .page-head { align-items: stretch; }
  .page-head > div:first-child { min-width: 0; }
  .actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
  .actions .btn { min-width: 0; white-space: nowrap; }
  .input-group { flex-wrap: wrap; }
  .input-group .form-control { min-width: 0; flex: 1 1 140px; }
  .form-control, .form-select, textarea.form-control { font-size: 16px; }
  .filters .form-group { min-width: 0; width: 100%; }
  .table-responsive-stack td { align-items: flex-start; overflow-wrap: anywhere; }
  .table-responsive-stack .nowrap { white-space: normal; }
  .dropdown-menu, .notif-list { max-width: calc(100dvw - 20px); }
  .sidebar { width: min(86vw, 300px); }
  .bottom-nav a { min-width: 0; flex: 1; }
  .auth-main { align-items: flex-start; padding: 16px 12px calc(16px + env(safe-area-inset-bottom)); }
  .auth-card, .auth-card.wide { max-width: 100%; padding: 16px 14px 12px; border-radius: 16px; }
  .chat-widget:not(.is-open) { top: calc(var(--topbar-h, 56px) + 4px); right: 10px; bottom: auto; }
  .public-site .chat-widget:not(.is-open) { top: 54px; }
  .plan-card { padding: 18px; }
  .plan-card .plan-rate { font-size: 1.55rem; }
  .wd-balance { min-width: 0; }
  .pay-qr-svg svg { width: min(220px, 70vw); height: auto; }
  .hero-actions .btn { flex: 1 1 140px; }
  .nav-actions .btn-label { display: none; }
  .wallet-chip span { display: none; }
  .user-app .topbar { height: 56px; min-height: 56px; max-height: 56px; padding-top: 0; padding-bottom: 0; flex-wrap: nowrap; overflow: visible; }
}

/* ---------- iPhone liquid glass bars ---------- */
.navbar, .topbar {
  background: linear-gradient(180deg, rgba(255, 255, 255, .62), rgba(255, 255, 255, .28));
  backdrop-filter: blur(40px) saturate(1.85);
  -webkit-backdrop-filter: blur(40px) saturate(1.85);
  border-bottom: 1px solid rgba(255, 255, 255, .55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), inset 0 -1px 0 rgba(255, 255, 255, .18), 0 10px 28px rgba(15, 23, 42, .06);
}
[data-theme="dark"] .navbar, [data-theme="dark"] .topbar {
  background: linear-gradient(180deg, rgba(36, 48, 72, .55), rgba(14, 22, 38, .34));
  border-bottom-color: rgba(255, 255, 255, .14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 12px 30px rgba(0, 0, 0, .35);
}
.lang-switch, .wallet-chip {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--text);
  background: linear-gradient(180deg, rgba(255, 255, 255, .62), rgba(255, 255, 255, .28));
  border: 1px solid rgba(255, 255, 255, .62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), 0 6px 16px rgba(15, 23, 42, .06);
  backdrop-filter: blur(18px) saturate(1.6);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
}
.lang-switch { padding: 3px; border-radius: 999px; gap: 2px; }
.lang-switch a { padding: 4px 9px; border-radius: 999px; font-size: .72rem; font-weight: 800; letter-spacing: .04em; color: var(--text-muted); text-decoration: none; }
.lang-switch a.is-on { background: rgba(255, 255, 255, .88); color: var(--primary); box-shadow: 0 2px 8px rgba(15, 23, 42, .08); }
.wallet-chip { border-radius: 999px; padding: 6px 12px 6px 8px; font-weight: 700; font-size: .84rem; min-height: 38px; }
.wallet-chip .icon { width: 18px; height: 18px; color: var(--primary); }
.wallet-chip span { font-weight: 600; color: var(--text-muted); font-size: .75rem; }
.wallet-chip strong { font-variant-numeric: tabular-nums; }
[data-theme="dark"] .lang-switch, [data-theme="dark"] .wallet-chip {
  background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .06));
  border-color: rgba(255, 255, 255, .16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2);
}
[data-theme="dark"] .lang-switch a.is-on { background: rgba(255, 255, 255, .16); color: #fff; }
@media (max-width: 960px) {
  .nav-links { background: linear-gradient(180deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .5)); backdrop-filter: blur(28px) saturate(1.6); -webkit-backdrop-filter: blur(28px) saturate(1.6); }
  [data-theme="dark"] .nav-links { background: linear-gradient(180deg, rgba(20, 28, 44, .88), rgba(14, 22, 38, .72)); }
}
@media (max-width: 720px) {
  .bottom-nav {
    left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom));
    border-radius: 28px; border: 1px solid rgba(255, 255, 255, .55); border-top: 1px solid rgba(255, 255, 255, .7);
    background: linear-gradient(180deg, rgba(255, 255, 255, .58), rgba(255, 255, 255, .26));
    backdrop-filter: blur(40px) saturate(1.9);
    -webkit-backdrop-filter: blur(40px) saturate(1.9);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), 0 16px 40px rgba(15, 23, 42, .16);
    padding: 8px 6px;
  }
  [data-theme="dark"] .bottom-nav {
    background: linear-gradient(180deg, rgba(40, 52, 78, .62), rgba(14, 22, 38, .4));
    border-color: rgba(255, 255, 255, .16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 16px 40px rgba(0, 0, 0, .4);
  }
  .bottom-nav a.active { background: rgba(13, 110, 253, .16); color: var(--primary); }
}
.wd-process__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.wd-track { padding: 2px 0 0; }
.wd-track__bar { height: 12px; border-radius: 999px; background: rgba(13, 110, 253, .12); overflow: hidden; box-shadow: inset 0 1px 2px rgba(15, 23, 42, .08); }
.wd-track__bar > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #0B5ED7, #7CC4FF, #0D6EFD); background-size: 200% 100%; animation: wdShimmer 2.8s linear infinite; box-shadow: 0 0 16px rgba(13, 110, 253, .35); }
.wd-track__line { margin: 12px 0 0; font-weight: 700; font-size: .95rem; line-height: 1.45; }
.wd-track__extra { margin: 6px 0 0; color: var(--primary); font-weight: 650; font-size: .88rem; line-height: 1.45; }
.wd-collect { display: grid; gap: 8px; margin-top: 12px; }
@keyframes wdShimmer { from { background-position: 0 0; } to { background-position: 200% 0; } }
.tg-form { display: grid; gap: 14px; }
.tg-switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border-radius: 18px; cursor: pointer; border: 1px solid rgba(255,255,255,.55); background: linear-gradient(180deg, rgba(255,255,255,.62), rgba(255,255,255,.28)); box-shadow: inset 0 1px 0 rgba(255,255,255,.8); }
.tg-switch span { display: flex; flex-direction: column; gap: 2px; }
.tg-switch small { color: var(--text-muted); font-size: .8rem; }
.tg-switch input { width: 22px; height: 22px; accent-color: var(--primary); flex-shrink: 0; }
[data-theme="dark"] .tg-switch { background: linear-gradient(180deg, rgba(40,52,78,.55), rgba(14,22,38,.35)); border-color: rgba(255,255,255,.14); }
.pay-copy-list { display: grid; gap: 8px; }
.pay-copy { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); }
.pay-copy span { font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.pay-copy code { overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .pay-copy { grid-template-columns: 1fr auto; }
  .pay-copy span { grid-column: 1 / -1; }
}
.plan-category { margin-bottom: 28px; }
.plan-category__banner { width: 100%; height: 72px; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); margin-bottom: 8px; background: var(--surface-2); }
.plan-category__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.plan-category__head h2 { margin: 0; font-size: 1.25rem; }
.plan-category__preview, .cat-tile__banner, .cat-tile__ph { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; border-radius: 14px; background: var(--surface-2); }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; padding: 16px; }
.cat-tile { display: grid; gap: 10px; padding: 12px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); }
.cat-tile__top { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.cat-tile__ph { display: grid; place-items: center; color: var(--text-muted); }
.cat-tile .pack-mark, .cat-tile .pack-mark img, .cat-tile .pack-mark .tier-mark { aspect-ratio: 1; width: 56px; height: 56px; object-fit: contain; }
.cat-basis label .pack-mark { width: 48px; height: 48px; flex: none; }
.cat-basis { display: grid; gap: 8px; }
.cat-basis label { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); cursor: pointer; }
.cat-basis span { display: flex; flex-direction: column; gap: 2px; }
.cat-basis small { color: var(--text-muted); }
.dash-rail { position: relative; margin: 0 0 14px; padding: 8px; border-radius: 18px; overflow: hidden; isolation: isolate; min-width: 0; max-width: 100%; border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--border)); background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 78%, transparent), color-mix(in srgb, var(--surface) 94%, #fff)); box-shadow: 0 14px 36px rgba(13, 110, 253, .1); }
.dash-rail::before { content: ""; position: absolute; inset: -40% -20%; background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,.28) 50%, transparent 62%); transform: translateX(-40%); animation: dashSheen 6.5s ease-in-out infinite; pointer-events: none; z-index: 0; }
.dash-rail__kyc { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; margin: 0 0 8px; padding: 7px 10px; border-radius: 12px; text-decoration: none; color: #7a4e0c; background: linear-gradient(90deg, rgba(255, 214, 120, .45), rgba(255, 244, 214, .2)); font-size: .78rem; font-weight: 700; }
.dash-rail__kyc .icon { width: 16px; height: 16px; flex: none; }
.dash-rail__row { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.dash-rail__metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; min-width: 0; max-width: 100%; }
.dash-metric { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; padding: 8px 10px; border-radius: 14px; text-decoration: none; color: inherit; background: color-mix(in srgb, var(--primary) 7%, var(--surface)); border: 1px solid color-mix(in srgb, var(--primary) 10%, transparent); animation: dashIn .4s cubic-bezier(.2,.7,.2,1) both; transition: box-shadow .25s ease, border-color .25s ease; }
.dash-metric:hover { border-color: color-mix(in srgb, var(--primary) 35%, transparent); box-shadow: 0 8px 18px rgba(13, 110, 253, .16); }
.dash-metric__icon { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--primary-soft); color: var(--primary); animation: dashBob 3.4s ease-in-out infinite; }
.dash-metric__icon .icon { width: 15px; height: 15px; }
.dash-metric__copy { min-width: 0; display: flex; flex-direction: column; }
.dash-metric__label { font-size: .6rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-metric strong { display: block; font-size: clamp(.74rem, 1.5vw, .92rem); font-weight: 800; line-height: 1.15; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-metric.is-live { color: #fff; background: linear-gradient(135deg, #084298, #0D6EFD 46%, #5aa6ff); background-size: 180% 180%; animation: dashIn .45s cubic-bezier(.2,.7,.2,1) both, gradientShift 8s ease infinite; box-shadow: 0 8px 18px rgba(13, 110, 253, .28); }
.dash-metric.is-live .dash-metric__label { color: rgba(255,255,255,.82); }
.dash-metric.is-live .dash-metric__icon { background: rgba(255,255,255,.18); color: #fff; }
.dash-rail__actions { display: flex; flex-direction: row; flex-wrap: wrap; gap: 6px; }
.dash-rail__actions .btn { padding: 6px 10px; font-size: .75rem; white-space: nowrap; }
.dash-rail__actions .icon { width: 14px; height: 14px; }
[data-theme="dark"] .dash-rail { background: linear-gradient(180deg, rgba(22, 32, 52, .88), rgba(12, 18, 32, .92)); box-shadow: 0 14px 36px rgba(0, 0, 0, .28); }
[data-theme="dark"] .dash-rail__kyc { color: #ffe7a3; background: linear-gradient(90deg, rgba(184, 115, 51, .35), rgba(255, 214, 120, .08)); }
@keyframes dashSheen { 0%, 55% { transform: translateX(-55%); } 100% { transform: translateX(55%); } }
@keyframes dashBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
@keyframes dashIn { from { transform: translateY(8px); } to { transform: none; } }
@media (max-width: 1100px) {
  .dash-rail__metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .dash-rail { padding: 8px; border-radius: 16px; }
  .dash-rail__metrics { display: flex; width: 100%; overflow-x: auto; scroll-snap-type: x mandatory; gap: 8px; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
  .dash-rail__metrics::-webkit-scrollbar { height: 0; }
  .dash-metric { min-width: 168px; scroll-snap-align: start; flex: none; }
  .dash-metric strong { font-size: .88rem; text-overflow: clip; }
}
@media (prefers-reduced-motion: reduce) {
  .dash-rail::before, .dash-metric, .dash-metric.is-live, .dash-metric__icon { animation: none; }
}
.my-plans { display: grid; gap: 12px; }
.my-plan { display: block; text-decoration: none; color: inherit; padding: 14px; border-radius: 18px; border: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: blur(16px); box-shadow: 0 10px 28px rgba(13, 110, 253, .06); }
.my-plan__top { display: flex; align-items: center; gap: 10px; }
.my-plan__icon { width: 42px; height: 42px; border-radius: 12px; overflow: hidden; flex: none; display: grid; place-items: center; background: color-mix(in srgb, var(--accent, var(--primary)) 14%, var(--surface)); color: var(--accent, var(--primary)); }
.my-plan__icon img, .my-plan__icon .tier-mark { width: 100%; height: 100%; object-fit: contain; }
.my-plan__id { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.my-plan__id strong { font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.my-plan__id span, .my-plan__end, .my-plan__meta { color: var(--text-muted); font-size: .75rem; }
.my-plan__bar { height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--primary) 14%, var(--surface-2)); overflow: hidden; margin: 12px 0 6px; }
.my-plan__bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent, var(--primary)), color-mix(in srgb, var(--accent, var(--primary)) 55%, #fff)); }
.my-plan__meta { display: flex; justify-content: space-between; gap: 8px; }
.my-plan__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.my-plan__stats div { padding: 8px 10px; border-radius: 12px; background: color-mix(in srgb, var(--primary) 7%, var(--surface)); }
.my-plan__stats span { display: block; font-size: .68rem; color: var(--text-muted); }
.my-plan__stats strong { font-size: .88rem; }
.my-plan__end { margin: 8px 0 0; }
.install-pop { position: fixed; inset: 0; z-index: 200; display: grid; place-items: end center; padding: 18px 18px calc(24px + env(safe-area-inset-bottom)); background: rgba(8, 18, 40, .45); }
.install-pop__card { width: min(420px, 100%); position: relative; padding: 22px 18px 18px; border-radius: 22px; border: 1px solid rgba(255,255,255,.55); background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(22px); box-shadow: 0 24px 60px rgba(8, 18, 40, .28); text-align: center; }
.install-pop__card h2 { margin: 10px 0 6px; font-size: 1.15rem; }
.install-pop__card p { margin: 0 0 14px; color: var(--text-muted); font-size: .9rem; }
.install-pop__logo { display: inline-grid; }
.install-pop__logo .logo-mark { width: 64px; height: 64px; }
.install-pop__close { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border: 0; border-radius: 12px; background: color-mix(in srgb, var(--primary) 8%, var(--surface)); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.install-pop__steps { text-align: left; margin: 0 0 14px; padding-left: 1.2em; color: var(--text); font-size: .9rem; }
.install-pop__steps li + li { margin-top: 6px; }
.install-pop__note { font-size: .8rem !important; }
[data-theme="dark"] .install-pop__card { border-color: rgba(255,255,255,.14); }
@media (max-width: 720px) {
  .my-plan { padding: 12px; }
  .my-plan__stats strong { font-size: .8rem; }
}

/* Phone header: logo on the left, menu button on the right. Extra controls live in the menu. */
.navbar { position: sticky; }
.nav-drawer-tools { display: none; }
.nav-desktop-tools { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.navbar .container { flex-wrap: nowrap; align-items: center; max-width: 1360px; }
.navbar .nav-links a { white-space: nowrap; padding: 8px 8px; font-size: .92rem; }
.navbar .brand { position: relative; z-index: 2; flex-shrink: 0; }
.sidebar-tools { display: none; align-items: center; gap: 8px; padding: 10px 16px 0; }
@media (max-width: 1200px) {
  .navbar .container { height: 54px; min-height: 54px; max-height: 54px; overflow: visible; }
  .navbar .brand { flex: 1 1 auto; min-width: 0; overflow: hidden; }
  .navbar .brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .navbar .nav-desktop-tools { display: none !important; }
  .navbar .nav-actions { margin-left: auto; flex: 0 0 auto; gap: 6px; }
  .navbar .nav-actions .wallet-chip { display: inline-flex; }
  .navbar .nav-toggle { display: grid; }
  .navbar .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 80;
    flex-direction: column; align-items: stretch; margin: 0; padding: 10px 14px 14px;
    border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
    background: var(--surface);
  }
  .navbar .nav-links.open { display: flex; }
  .navbar .nav-links.open .nav-drawer-tools {
    display: flex; flex-direction: column; align-items: stretch; gap: 8px;
    margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--border);
  }
  .nav-drawer-tools .btn { width: 100%; justify-content: center; }
  .nav-drawer-tools .lang-switch, .nav-drawer-tools .theme-toggle { align-self: flex-start; }
}
@media (max-width: 960px) {
  .user-app .topbar { flex-wrap: nowrap; height: 52px; min-height: 52px; max-height: 52px; overflow: visible; }
  .user-app .topbar .lang-switch,
  .user-app .topbar-actions > [data-theme-toggle] { display: none; }
  .user-app .topbar .wallet-chip { display: inline-flex; flex: 0 1 auto; max-width: 46vw; }
  .user-app .topbar .wallet-chip span { display: none; }
  .sidebar-tools { display: flex; }
}
.ref-board { display: flex; flex-direction: column; gap: 12px; }
.ref-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 16px; padding: 16px; border-radius: 22px; border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent); background: linear-gradient(145deg, color-mix(in srgb, var(--primary) 14%, var(--surface)), color-mix(in srgb, var(--surface) 92%, #fff)); box-shadow: 0 16px 40px rgba(13, 110, 253, .08); }
.ref-kicker { margin: 0 0 4px; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 750; color: var(--primary); }
.ref-hero h1 { margin: 0; font-size: 1.45rem; }
.ref-lead, .ref-qualify, .ref-note { margin: 6px 0 0; color: var(--text-muted); font-size: .82rem; line-height: 1.45; }
.ref-share label { display: block; margin: 0 0 4px; font-size: .72rem; color: var(--text-muted); }
.ref-share__row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.ref-share__row:last-child { margin-bottom: 0; }
.ref-share input, .ref-share code { flex: 1; min-width: 0; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent); background: color-mix(in srgb, var(--surface) 84%, #fff); padding: 8px 10px; font-size: .8rem; }
.ref-ladder { display: grid; grid-template-columns: repeat(auto-fit, minmax(108px, 1fr)); gap: 8px; }
.ref-layer { padding: 12px 8px 10px; border-radius: 18px; text-align: center; border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent); background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(18px); }
.ref-layer__n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 99px; background: var(--primary); color: #fff; font-size: .72rem; font-weight: 750; }
.ref-layer__rate { display: block; margin-top: 6px; font-size: 1.15rem; color: var(--primary); }
.ref-layer__name, .ref-layer__meta { display: block; color: var(--text-muted); }
.ref-layer__name { font-size: .75rem; }
.ref-layer__meta { font-size: .68rem; }
.ref-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ref-metric { padding: 10px 12px; border-radius: 16px; background: color-mix(in srgb, var(--primary) 7%, var(--surface)); border: 1px solid color-mix(in srgb, var(--primary) 12%, transparent); }
.ref-metric span { display: block; font-size: .68rem; color: var(--text-muted); }
.ref-metric strong { font-size: 1.02rem; }
.ref-split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 12px; align-items: start; }
.ref-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ref-person { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 14px; background: color-mix(in srgb, var(--primary) 6%, var(--surface)); }
.ref-person strong { display: block; font-size: .9rem; }
.ref-person span, .ref-person li { color: var(--text-muted); font-size: .75rem; }
.ref-person ul { margin: 4px 0 0; padding-left: 14px; }
.ref-admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.ref-admin-row { padding: 10px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--primary) 16%, transparent); background: color-mix(in srgb, var(--primary) 5%, var(--surface)); }
.ref-admin-row strong { display: block; margin-bottom: 6px; }
.ref-admin-row label { display: block; font-size: .75rem; color: var(--text-muted); }
.ref-promos__head h2 { margin: 0; font-size: 1rem; }
.ref-promos__head p { margin: 2px 0 8px; color: var(--text-muted); font-size: .78rem; }
.ref-promos__row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 420px); gap: 12px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.ref-shot { position: relative; aspect-ratio: 16 / 7; overflow: hidden; border-radius: 12px; background: #0b1e46; }
.ref-shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.ref-poster { scroll-snap-align: start; border-radius: 16px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent); background: color-mix(in srgb, var(--surface) 90%, #fff); box-shadow: 0 12px 28px rgba(8, 18, 40, .08); }
.ref-poster__bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px; }
.ref-poster__bar strong { min-width: 0; font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ref-poster__bar .btn { flex: none; }
.ref-admin-upload { display: grid; gap: 12px; max-width: 640px; }
.ref-admin-upload .ref-shot { max-width: 420px; }
.ref-admin-upload .ref-shot:not(:has(img:not([hidden]))) { display: none; }
.ref-admin-posters { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-top: 16px; }
.ref-admin-poster { margin: 0; padding: 8px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--primary) 16%, transparent); }
.ref-admin-poster figcaption { margin: 8px 0 6px; font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 720px) {
  .ref-hero, .ref-split { grid-template-columns: 1fr; }
  .ref-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ref-hero { padding: 14px; }
  .ref-share input { font-size: 16px; }
  .ref-promos__row { grid-auto-columns: minmax(86%, 1fr); }
  .ref-admin-upload { max-width: none; }
}

/* Compact premium public pages. Wallet balance stays in the header bar. */
.public-site {
  background:
    radial-gradient(880px 380px at 100% -8%, rgba(13, 110, 253, .09), transparent 58%),
    radial-gradient(640px 320px at -8% 18%, rgba(18, 161, 80, .06), transparent 52%),
    var(--bg);
}
.public-site .navbar .container { height: 56px; min-height: 56px; max-height: 56px; gap: 10px; }
.public-site .brand { font-size: 1.02rem; gap: 8px; }
.public-site .brand-mark, .public-site .logo-mark { width: 32px; height: 32px; }
.public-site .navbar .nav-links > li:not(.nav-drawer-tools) > a {
  padding: 5px 9px; font-size: .8rem; font-weight: 650; letter-spacing: -.01em; border-radius: 999px;
}
.public-site .nav-desktop-tools .btn { padding: 7px 12px; font-size: .82rem; min-height: 34px; }
.public-site .nav-actions { gap: 6px; min-width: 0; }
.public-site .nav-actions .wallet-chip {
  display: inline-flex; min-height: 34px; padding: 4px 10px 4px 7px; font-size: .78rem;
  max-width: min(220px, 46vw); flex: 0 1 auto;
}
.public-site .nav-actions .wallet-chip strong {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.public-site .section { padding: 34px 0; }
.public-site .section-sm { padding: 16px 0; }
.public-site .section-head { margin: 0 auto 16px; }
.public-site .section-head h2 { font-size: clamp(1.15rem, 2vw, 1.45rem); }
.public-site .section-head p { font-size: .88rem; margin: 0; }
.public-site .hero .container { padding-top: 28px; padding-bottom: 28px; gap: 20px; }
.public-site .hero h1 { font-size: clamp(1.4rem, 2.8vw, 2.05rem); letter-spacing: -.03em; margin-bottom: .25em; }
.public-site .hero p.lead { font-size: .94rem; line-height: 1.5; margin-bottom: 0; }
.public-site .hero-actions { margin-top: 12px; gap: 8px; }
.public-site .hero-actions .btn-lg { padding: 10px 16px; font-size: .9rem; }
.public-site .hero-note { margin-top: 10px; font-size: .75rem; }
.public-site .earn-points { margin-top: 10px; gap: 4px 12px; font-size: .82rem; }
.public-site .earn-board { border-radius: 16px; padding: 12px 12px 8px; box-shadow: 0 16px 36px rgba(4, 16, 40, .22); }
.public-site .earn-kpis { gap: 8px; }
.public-site .earn-kpi { padding: 8px 10px; border-radius: 12px; }
.public-site .earn-kpi strong { font-size: 1rem; }
.public-site .earn-bars { height: 48px; margin: 8px 0 2px; gap: 6px; }
.public-site .earn-line { padding: 6px 0; font-size: .84rem; }
.public-site .page-hero {
  padding: 20px 0 16px;
  background: linear-gradient(135deg, #071833 0%, #0d6efd 62%, #0b6b3e 140%);
}
.public-site .page-hero h1 { font-size: clamp(1.2rem, 2.1vw, 1.6rem); letter-spacing: -.02em; }
.public-site .page-hero p { font-size: .88rem; margin-top: 4px; }
.public-site .breadcrumb { margin-bottom: 4px; font-size: .75rem; }
.public-site .feature, .public-site .testimonial { padding: 14px 16px; }
.public-site .feature h3 { font-size: .98rem; margin-bottom: 4px; }
.public-site .feature .feature-icon { width: 38px; height: 38px; margin-bottom: 8px; border-radius: 12px; }
.public-site .feature p { font-size: .86rem; }
.public-site .plan-card, .public-site .pack-card { padding: 12px 13px 13px; }
.public-site .plan-card .plan-rate, .public-site .pack-card .plan-rate { font-size: 1.22rem; margin: 0; }
.public-site .plan-card ul, .public-site .pack-card ul { margin: 8px 0 10px; }
.public-site .plan-card li, .public-site .pack-card li { padding: 4px 0; font-size: .8rem; }
.public-site .pack-tier { margin-bottom: 14px; padding: 10px 8px 8px; }
.public-site .pack-grid { gap: 8px; }
.public-site .cta-box { padding: 22px 18px; border-radius: 16px; }
.public-site .cta-box h2 { font-size: 1.25rem; }
.public-site .stat-strip { gap: 8px; }
.public-site .stat-strip .value { font-size: 1.2rem; }
.public-site .stat-strip .label { font-size: .75rem; }
.public-site .grid { gap: 12px; }
.public-site .faq-item summary { padding: 11px 14px; font-size: .9rem; }
.public-site .faq-item .faq-body { padding: 0 14px 12px; font-size: .88rem; }
.public-site .card { border-radius: 14px; }
.public-site .card-body { padding: 14px 16px; }
.public-site .footer { padding: 24px 0 12px; font-size: .82rem; }
.public-site .footer-grid { gap: 16px 20px; }
.public-site .footer h4 { margin-bottom: 8px; font-size: .72rem; }
.public-site .footer li { margin-bottom: 4px; }
.public-site .footer-risk { margin-top: 14px; padding-top: 10px; }
.public-site .footer-bottom { margin-top: 10px; }
.public-site .banner-slider { aspect-ratio: 16 / 7; }
.user-app .topbar .wallet-chip { display: inline-flex; flex: 0 1 auto; max-width: min(240px, 48vw); }
.user-app .topbar .wallet-chip strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 720px) {
  .public-site .section { padding: 22px 0; }
  .public-site .hero .container { padding-top: 18px; padding-bottom: 18px; }
  .public-site .page-hero { padding: 14px 0 12px; }
  .public-site .footer { padding: 18px 0 10px; }
  .public-site .nav-actions .wallet-chip span { display: none; }
  .public-site .banner-slider { aspect-ratio: 16 / 7; }
  .public-site .navbar .container { height: 52px; min-height: 52px; max-height: none; }
}

/* Phone layout: nothing wider than the screen, headers stay one row, menus stay on screen. */
@media (max-width: 720px) {
  img, video, iframe, canvas { max-width: 100%; }
  .app-shell, .main, .content, .container, .card, .grid > *, .prose, .table-wrap, .copy-box, .copy-box code, .footer .container {
    min-width: 0; max-width: 100%;
  }
  .prose, .alert, .stat-value, .kv dd, .page-head h1, .page-head p, .footer, .breadcrumb {
    overflow-wrap: anywhere;
  }
  .prose table { display: block; overflow-x: auto; }
  .copy-box code { overflow-x: auto; }

  .public-site .navbar .container,
  .user-app .topbar,
  .admin .topbar {
    height: auto;
    min-height: 52px;
    max-height: none;
    padding-top: env(safe-area-inset-top);
    align-items: center;
  }
  .topbar > .flex { flex: 1 1 auto; min-width: 0; }
  .topbar-actions { flex: 0 1 auto; min-width: 0; gap: 4px; }
  .user-app .topbar-title, .admin .topbar-title { font-size: .9rem; max-width: 28vw; }
  .admin .admin-badge, .user-chip > .icon { display: none; }
  .user-chip { padding: 2px; gap: 0; }
  .theme-toggle, .notif-btn, .menu-btn { width: 36px; height: 36px; }
  .user-app .topbar .wallet-chip,
  .public-site .nav-actions .wallet-chip {
    max-width: 34vw; min-height: 32px; padding: 3px 8px 3px 6px; font-size: .75rem;
  }
  .public-site .navbar .brand span { max-width: 38vw; }

  .navbar .nav-links.open {
    max-height: calc(100dvh - 64px - env(safe-area-inset-top));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .dropdown.open .dropdown-menu {
    position: fixed;
    top: calc(56px + env(safe-area-inset-top));
    right: 8px;
    left: 8px;
    width: auto;
    min-width: 0;
    max-width: none;
    max-height: min(70dvh, 440px);
    overflow: auto;
  }
  .notif-list { width: auto; max-width: none; max-height: 46dvh; }

  .page-head { flex-direction: column; align-items: stretch; }
  .page-head .actions, .actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    width: 100%;
  }
  .actions .btn { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 8px; padding-right: 8px; }
  .form-row, .form-row-3 { display: grid; grid-template-columns: minmax(0, 1fr); }
  .input-group { min-width: 0; }
  .filters .form-control, .filters .form-select, .card .form-control { max-width: 100%; }
  .table-wrap { margin: 0; max-width: 100%; }
  .table-responsive-stack td { min-width: 0 !important; }
  .table-responsive-stack td::before { flex: 0 1 46%; overflow-wrap: anywhere; }
  .stat-card .stat-value { font-size: .98rem; }
  .chart-box { height: 220px; overflow: hidden; }
  .tabs { max-width: 100%; }
  .auth-card > .flex { flex-wrap: wrap; gap: 8px; }
  .auth-card, .auth-main { max-width: 100%; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .bottom-nav a { font-size: .62rem; line-height: 1.15; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .user-app .content { padding-bottom: calc(124px + env(safe-area-inset-bottom)); }
  .sidebar { max-width: min(86vw, 300px); }
  .pay-copy, .ref-share__row, .wd-panels, .plan-confirm-head { min-width: 0; }
  .ref-share input, .ref-share code { font-size: 16px; }
}

/* ---------- container pack tiers ---------- */
.pack-tier { position: relative; margin: 0 0 16px; padding: 12px 10px 10px; border-radius: 20px; overflow: hidden; isolation: isolate; }
.pack-tier + .pack-tier { margin-top: 0; }
.pack-tier__head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; position: relative; z-index: 1; }
.pack-tier__head h2 { margin: 0; font-size: 1.12rem; letter-spacing: -.02em; line-height: 1.2; }
.pack-tier__kicker { margin: 0; font-size: .62rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; opacity: .72; }
.pack-tier__sub { margin: 2px 0 0; color: var(--text-muted); font-size: .78rem; }
.pack-tier__head .badge { margin-left: auto; font-size: .68rem; }
.pack-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; position: relative; z-index: 1; }
.pack-mark { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; flex: none; overflow: hidden; position: relative; box-shadow: inset 0 1px 0 rgba(255,255,255,.65); }
.pack-mark img, .pack-mark .tier-mark { width: 100%; height: 100%; object-fit: contain; display: block; }
.pack-mark .icon { width: 18px; height: 18px; }
.pack-mark::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 32%, rgba(255,255,255,.72) 48%, transparent 64%); transform: translateX(-130%); animation: tier-sheen 3.4s ease-in-out infinite; pointer-events: none; }
.tier-fallback { display: block; width: 100%; height: 100%; }
.tier-fallback[hidden] { display: none !important; }
.tier-mark__sc { font-family: "Arial Black", Impact, "Segoe UI", sans-serif; font-size: 30px; font-weight: 800; letter-spacing: .5px; }
.tier-mark__wave { transform-box: fill-box; transform-origin: center; animation: tier-wave 2.6s ease-in-out infinite; }
.pack-card { position: relative; display: flex; flex-direction: column; padding: 12px 12px 12px; border-radius: 16px; overflow: hidden; min-width: 0; --plan-accent: var(--primary); --badge-bg: var(--plan-accent); --badge-fg: #fff; --rate-color: var(--plan-accent); }
.pack-card::after { content: ""; position: absolute; inset: 0 auto auto 0; height: 3px; width: 100%; background: var(--plan-accent); opacity: .9; }
.pack-card .plan-card-top { gap: 10px; margin: 2px 0 0; padding-right: 92px; }
.pack-card .plan-card-top h3 { font-size: .95rem; letter-spacing: -.02em; }
.pack-card__chips { position: absolute; top: 10px; right: 10px; z-index: 2; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.pack-card__featured { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px; font-size: .58rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; background: var(--featured-bg, var(--primary)); color: var(--featured-fg, #fff); box-shadow: 0 4px 10px rgba(15, 35, 70, .16); }
.pack-card .plan-badge { margin: 0; padding: 3px 9px; font-size: .6rem; background: var(--badge-bg); color: var(--badge-fg); box-shadow: 0 4px 10px rgba(15, 35, 70, .12); }
.pack-card__hero { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.pack-card .plan-rate { font-size: 1.28rem; font-weight: 800; color: var(--rate-color); line-height: 1.1; margin: 0; }
.pack-card .plan-rate small { font-size: .7rem; color: var(--rate-muted, color-mix(in srgb, var(--rate-color) 62%, #6b7c93)); font-weight: 700; }
.pack-card ul { list-style: none; padding: 0; margin: 8px 0 10px; flex: 1; }
.pack-card li { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px dashed color-mix(in srgb, var(--plan-accent) 22%, var(--border)); font-size: .8rem; }
.pack-card li:last-child { border-bottom: 0; }
.pack-card li span:first-child { color: var(--text-muted); }
.pack-card__price { font-size: 1.05rem; font-weight: 800; margin: 0; line-height: 1.15; }
.pack-card__price small { display: block; font-size: .7rem; font-weight: 600; color: var(--text-muted); }
.pack-card__shine { pointer-events: none; position: absolute; inset: -40% -60%; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.45) 48%, transparent 62%); transform: translateX(-40%); animation: pack-shine 5.5s ease-in-out infinite; }
.pack-card.is-featured { transform: translateY(-2px); }
.pack-card__cta { position: relative; z-index: 1; padding: 8px 12px; font-size: .82rem; }
.plan-icon.pack-mark { width: 56px; height: 56px; }
.plan-icon-preview.pack-mark { width: 96px; height: 96px; border-radius: 22px; }
.plan-thumb.pack-mark { width: 44px; height: 44px; border-radius: 12px; }
.my-plan__icon.pack-mark { width: 42px; height: 42px; border-radius: 12px; }
.plan-confirm-icon.pack-mark { width: 64px; height: 64px; border-radius: 18px; }

.pack-tier--bronze, .pack-tier--starter { background: linear-gradient(155deg, #fff6ec 0%, #e7b56a 42%, #8d4e24 100%); border: 1px solid rgba(184, 115, 51, .55); box-shadow: 0 22px 46px rgba(120, 62, 24, .2); color: #3e2412; }
.pack-tier--bronze::before, .pack-tier--starter::before { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 18%, rgba(255,255,255,.38) 48%, transparent 78%); animation: pack-metal 7s linear infinite; pointer-events: none; }
.pack-tier--bronze .pack-mark--bronze, .pack-tier--starter .pack-mark--starter, .pack-mark--bronze { background: linear-gradient(160deg, #fff4e6, #d08a45 55%, #6b3a16); color: #fff6ec; box-shadow: 0 8px 18px rgba(107, 58, 22, .28); }
.pack-card--bronze, .pack-card--starter { background: linear-gradient(180deg, rgba(255, 246, 236, .94), rgba(224, 164, 96, .84)); border: 1px solid rgba(110, 58, 24, .28); box-shadow: 0 14px 32px rgba(120, 62, 24, .16), inset 0 1px 0 rgba(255,255,255,.65); --plan-accent: #7a3f16; --badge-bg: #7a3f16; --badge-fg: #fff6ec; --rate-color: #6a3814; --rate-muted: #8d5a32; --featured-bg: #b87333; --featured-fg: #fffaf3; color: #3e2412; }
.pack-card--bronze:hover, .pack-card--starter:hover { transform: translateY(-2px); box-shadow: 0 18px 34px rgba(120, 62, 24, .24); }
.pack-card--bronze .pack-card__cta, .pack-card--starter .pack-card__cta { background: linear-gradient(90deg, #6b3a16, #d08a45, #6b3a16); background-size: 160% 100%; animation: pack-cta 3.6s linear infinite; border: 0; color: #fffaf3; }

.pack-tier--silver { background: linear-gradient(155deg, #f7f8fb 0%, #cfd6df 42%, #9ea8b5 100%); border: 1px solid rgba(150, 162, 176, .55); box-shadow: 0 22px 46px rgba(70, 80, 95, .18); }
.pack-tier--silver::before { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 20%, rgba(255,255,255,.35) 50%, transparent 80%); animation: pack-metal 8s linear infinite; pointer-events: none; }
.pack-tier--silver .pack-mark--silver { background: linear-gradient(160deg, #fff, #9aa3af 55%, #eceff3); color: #2f3844; }
.pack-card--silver { background: linear-gradient(180deg, rgba(255,255,255,.86), rgba(196, 204, 214, .78)); border: 1px solid rgba(47, 56, 68, .2); box-shadow: 0 14px 32px rgba(60, 70, 85, .16), inset 0 1px 0 rgba(255,255,255,.7); --plan-accent: #2f3844; --badge-bg: #2f3844; --badge-fg: #f4f6f8; --rate-color: #2a313c; --rate-muted: #5c6775; --featured-bg: #4b5563; --featured-fg: #fff; }
.pack-card--silver:hover { transform: translateY(-2px); box-shadow: 0 16px 30px rgba(60, 70, 85, .18); }

.pack-tier--gold { background: radial-gradient(120% 90% at 10% 0%, #fff6d6 0%, #e8c36a 38%, #b8860b 78%, #7a5410 100%); border: 1px solid rgba(232, 195, 106, .7); box-shadow: 0 24px 50px rgba(122, 84, 16, .28); color: #3b2a08; }
.pack-tier--gold::after { content: ""; position: absolute; width: 140px; height: 140px; right: -20px; top: -30px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.55), transparent 68%); animation: pack-glow 4.2s ease-in-out infinite; pointer-events: none; }
.pack-tier--gold .pack-tier__sub, .pack-tier--gold .pack-tier__kicker { color: rgba(59, 42, 8, .75); }
.pack-tier--gold .pack-mark--gold { background: linear-gradient(160deg, #fff3c4, #d4a017 55%, #8a5a10); color: #fff8e4; box-shadow: 0 0 18px rgba(255, 214, 90, .55); }
.pack-card--gold { background: linear-gradient(180deg, rgba(255, 248, 220, .92), rgba(232, 195, 106, .82)); border: 1px solid rgba(122, 84, 16, .35); box-shadow: 0 16px 36px rgba(122, 84, 16, .22), 0 0 0 1px rgba(255,255,255,.25) inset; --plan-accent: #7a4e0c; --badge-bg: #7a4e0c; --badge-fg: #fff8e4; --rate-color: #6a4208; --rate-muted: #8a5a10; --featured-bg: #b8860b; --featured-fg: #fffdf4; color: #3b2a08; }
.pack-card--gold:hover { transform: translateY(-3px); box-shadow: 0 20px 36px rgba(122, 84, 16, .28), 0 0 22px rgba(255, 214, 90, .28); }
.pack-card--gold .pack-card__cta { background: linear-gradient(90deg, #8a5a10, #d4a017, #8a5a10); background-size: 160% 100%; animation: pack-cta 3.6s linear infinite; border: 0; color: #fff; }

@keyframes pack-shine { 0%, 55% { transform: translateX(-50%); } 80%, 100% { transform: translateX(50%); } }
@keyframes pack-metal { 0% { transform: translateX(-30%); } 100% { transform: translateX(30%); } }
@keyframes pack-glow { 0%, 100% { opacity: .45; transform: scale(1); } 50% { opacity: .9; transform: scale(1.12); } }
@keyframes pack-cta { 0% { background-position: 0 50%; } 100% { background-position: 160% 50%; } }
@keyframes tier-sheen { 0%, 42% { transform: translateX(-130%); } 100% { transform: translateX(130%); } }
@keyframes tier-wave { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(2.5px); } }

[data-theme="dark"] .pack-tier--bronze, [data-theme="dark"] .pack-tier--starter { background: linear-gradient(155deg, #4a2e1c, #24160e 62%, #140e0a); color: #fff1e0; }
[data-theme="dark"] .pack-card--bronze, [data-theme="dark"] .pack-card--starter, [data-theme="dark"] .pack-card--silver { background: linear-gradient(180deg, rgba(30,38,52,.9), rgba(18,24,36,.88)); color: inherit; }
[data-theme="dark"] .pack-card--bronze, [data-theme="dark"] .pack-card--starter { --plan-accent: #f0c08a; --badge-bg: #c4783a; --badge-fg: #1c120c; --rate-color: #f6d7b4; --rate-muted: #d7b08a; --featured-bg: #c4783a; --featured-fg: #1c120c; }
[data-theme="dark"] .pack-card--silver { --plan-accent: #d5dde6; --badge-bg: #d5dde6; --badge-fg: #1c2430; --rate-color: #e8edf3; --rate-muted: #b7c0cc; --featured-bg: #9aa3af; --featured-fg: #121820; }
[data-theme="dark"] .pack-tier--silver { background: linear-gradient(155deg, #3a4454, #1c2430 60%, #121820); }
[data-theme="dark"] .pack-tier--gold { color: #fff6d6; }
[data-theme="dark"] .pack-tier--gold .pack-tier__sub, [data-theme="dark"] .pack-tier--gold .pack-tier__kicker { color: rgba(255, 246, 214, .78); }
[data-theme="dark"] .pack-card--gold { color: #3b2a08; }

@media (max-width: 900px) {
  .pack-grid { grid-template-columns: 1fr; gap: 8px; }
  .pack-tier { padding: 10px 8px; border-radius: 16px; margin-bottom: 12px; }
  .pack-card.is-featured { transform: none; }
  .pack-card .plan-card-top { padding-right: 88px; }
}
@media (prefers-reduced-motion: reduce) {
  .pack-card__shine, .pack-tier--bronze::before, .pack-tier--starter::before, .pack-tier--silver::before, .pack-tier--gold::after, .pack-card--bronze .pack-card__cta, .pack-card--starter .pack-card__cta, .pack-card--gold .pack-card__cta, .pack-mark::after, .tier-mark__wave { animation: none; }
  .inv-live, .inv-cycle i, .my-plan.is-live .my-plan__bar > span, .inv-steps .is-live .inv-steps__dot { animation: none; }
}

.inv-sheet { border-radius: 18px; border: 1px solid color-mix(in srgb, var(--accent, var(--primary)) 28%, var(--border)); background: linear-gradient(180deg, color-mix(in srgb, var(--accent, var(--primary)) 10%, var(--surface)), var(--surface) 42%); box-shadow: 0 16px 36px rgba(13, 110, 253, .08); padding: 14px; margin-bottom: 12px; }
.inv-sheet__head { display: flex; align-items: center; gap: 10px; }
.inv-sheet__back { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); color: inherit; flex: none; }
.inv-sheet__back .icon { width: 16px; height: 16px; }
.inv-sheet__icon { width: 46px; height: 46px; border-radius: 14px; }
.inv-sheet__id { min-width: 0; flex: 1; }
.inv-sheet__id h1 { margin: 0; font-size: 1.05rem; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inv-sheet__id p { margin: 2px 0 0; color: var(--text-muted); font-size: .75rem; }
.inv-sheet__id code { font-size: .72rem; }
.inv-sheet__meter { height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--accent, var(--primary)) 14%, var(--surface-2)); overflow: hidden; margin: 12px 0 6px; }
.inv-sheet__meter > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent, var(--primary)), color-mix(in srgb, var(--accent, var(--primary)) 40%, #fff)); }
.inv-sheet__meter-meta { display: flex; justify-content: space-between; gap: 8px; margin: 0 0 12px; color: var(--text-muted); font-size: .7rem; }
.inv-process { border-radius: 14px; padding: 10px 12px; background: color-mix(in srgb, var(--surface) 82%, transparent); border: 1px solid color-mix(in srgb, var(--accent, var(--primary)) 16%, var(--border)); }
.inv-process__title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; font-size: .82rem; }
.inv-live { display: inline-flex; align-items: center; gap: 6px; font-size: .68rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #0a7a32; }
.inv-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #12b34a; box-shadow: 0 0 0 0 rgba(18, 179, 74, .6); animation: inv-pulse 1.6s ease-out infinite; }
.inv-live.is-paused { color: var(--warning); }
.inv-live.is-paused::before { background: var(--warning); animation: none; box-shadow: none; }
.inv-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.inv-steps li { display: grid; grid-template-columns: 16px 1fr; gap: 8px; position: relative; padding-bottom: 10px; }
.inv-steps li:last-child { padding-bottom: 0; }
.inv-steps li:not(:last-child)::before { content: ""; position: absolute; left: 7px; top: 14px; bottom: 0; width: 2px; background: color-mix(in srgb, var(--accent, var(--primary)) 22%, var(--border)); }
.inv-steps__dot { width: 16px; height: 16px; border-radius: 50%; margin-top: 2px; background: var(--surface-2); border: 2px solid var(--border); position: relative; z-index: 1; }
.inv-steps .is-done .inv-steps__dot { background: var(--accent, var(--primary)); border-color: var(--accent, var(--primary)); }
.inv-steps .is-live .inv-steps__dot { background: #12b34a; border-color: #12b34a; animation: inv-pulse 1.6s ease-out infinite; }
.inv-steps strong { display: block; font-size: .82rem; }
.inv-steps span { display: block; color: var(--text-muted); font-size: .72rem; line-height: 1.35; }
.inv-steps b { color: var(--text); font-variant-numeric: tabular-nums; }
.inv-cycle { display: block; height: 5px; border-radius: 99px; margin-top: 6px; background: color-mix(in srgb, #12b34a 16%, var(--surface-2)); overflow: hidden; }
.inv-cycle i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #0a7a32, #3dde7a); position: relative; overflow: hidden; }
.inv-cycle i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent); animation: inv-sheen 1.8s linear infinite; }
.inv-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 12px 0 0; }
.inv-facts div { padding: 8px 10px; border-radius: 12px; background: color-mix(in srgb, var(--accent, var(--primary)) 7%, var(--surface)); }
.inv-facts dt { font-size: .66rem; color: var(--text-muted); font-weight: 600; }
.inv-facts dd { margin: 2px 0 0; font-size: .82rem; font-weight: 700; }
.inv-note, .inv-docs { margin: 8px 2px 0; color: var(--text-muted); font-size: .72rem; }
.inv-docs span { margin-right: 10px; }
.inv-side, .inv-history { margin-top: 12px; }
.inv-side h3 { margin: 0 0 6px; font-size: .95rem; }
.invest-flow { align-items: start; }
.invest-flow > .card { position: sticky; top: 12px; }
.invest-start { margin: 10px 0; padding: 8px 10px; border-radius: 12px; background: color-mix(in srgb, var(--primary) 8%, var(--surface)); color: var(--text-muted); font-size: .78rem; }
.my-plan.is-live .my-plan__bar > span { position: relative; overflow: hidden; }
.my-plan.is-live .my-plan__bar > span::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent); animation: inv-sheen 2.2s linear infinite; }
@keyframes inv-pulse { 0% { box-shadow: 0 0 0 0 rgba(18, 179, 74, .55); } 100% { box-shadow: 0 0 0 8px rgba(18, 179, 74, 0); } }
@keyframes inv-sheen { 0% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
@media (max-width: 800px) {
  .inv-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .invest-flow > .card { position: static; }
}
[data-theme="dark"] .inv-sheet { box-shadow: none; }
[data-theme="dark"] .inv-live { color: #7dffa8; }
