/* =====================================================================
   IPX Reseller Cloud — Design system (light, premium, mobile-first)
   ===================================================================== */
:root {
  --primary: #5b5bf6; --primary-rgb: 91,91,246;
  --accent: #12b886;  --accent-rgb: 18,184,134;
  --violet: #8b5cf6;
  --bg: #f5f6fb;
  --bg-grad: radial-gradient(1200px 600px at 100% -10%, rgba(var(--primary-rgb), .07), transparent 60%), radial-gradient(900px 500px at -10% 0%, rgba(var(--accent-rgb), .05), transparent 55%);
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --surface-3: #f1f3f9;
  --line: #e8eaf2;
  --line-2: #dfe2ec;
  --ink: #0d1324;
  --ink-2: #344054;
  --muted: #667085;
  --faint: #98a2b3;
  --success: #12b886; --success-bg: #e7f8f2;
  --warning: #f59f00; --warning-bg: #fff5e0;
  --danger:  #f03e3e; --danger-bg:  #ffecec;
  --info:    #228be6; --info-bg:    #e7f3fd;
  --r: 18px;
  --r-sm: calc(var(--r) * .6);
  --r-xs: calc(var(--r) * .42);
  --shadow-xs: 0 1px 2px rgba(16,24,40,.05);
  --shadow-sm: 0 1px 3px rgba(16,24,40,.06), 0 1px 2px rgba(16,24,40,.04);
  --shadow: 0 10px 30px -12px rgba(16,24,40,.14), 0 2px 6px rgba(16,24,40,.04);
  --shadow-lg: 0 24px 60px -20px rgba(16,24,40,.25), 0 8px 20px -8px rgba(16,24,40,.08);
  --shadow-primary: 0 10px 24px -8px rgba(var(--primary-rgb), .55);
  --grad-primary: linear-gradient(135deg, var(--primary) 0%, #7c5cf6 55%, var(--violet) 100%);
  --ease: cubic-bezier(.2,.8,.2,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);
  --dur: .28s;
  --sidebar-w: 268px;
  --topbar-h: 64px;
  --tabbar-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font-display: "Outfit", "Plus Jakarta Sans", "Hind Siliguri", system-ui, sans-serif;
  --font: "Plus Jakarta Sans", "Hind Siliguri", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Bengali", sans-serif;
}

/* ---------- Reset ---------- */
*, *::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.55; color: var(--ink); background: var(--bg); background-image: var(--bg-grad); background-attachment: fixed; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; min-height: 100vh; }
img, svg, video { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.02em; color: var(--ink); }
h1 { font-size: clamp(22px, 2.4vw, 28px); font-weight: 800; }
h2 { font-size: 19px; font-weight: 800; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0; }
small { font-size: 12.5px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
[hidden] { display: none !important; }
::selection { background: rgba(var(--primary-rgb), .18); }
.i { width: 20px; height: 20px; flex: none; }
:focus-visible { outline: 2.5px solid rgba(var(--primary-rgb), .55); outline-offset: 2px; border-radius: 8px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; letter-spacing: 0; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .ink { color: var(--ink); }
.text-success { color: var(--success); } .text-danger { color: var(--danger); } .text-warning { color: #c27c00; } .text-primary { color: var(--primary); }
.fw-7 { font-weight: 700; } .fw-8 { font-weight: 800; }
.nowrap { white-space: nowrap; } .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.center { text-align: center; justify-content: center; }
.sub-money { color: var(--muted); font-weight: 600; font-size: .82em; margin-left: 2px; white-space: nowrap; }

/* ---------- Layout helpers ---------- */
.row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.row-gap { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.grid { display: grid; gap: 16px; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-main { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.span-2 { grid-column: span 2; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 18px; } .mt-4 { margin-top: 26px; }
.mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 18px; }
.w-100 { width: 100%; } .ml-auto { margin-left: auto; }
@media (max-width: 1100px) { .grid-main { grid-template-columns: minmax(0, 1fr); } .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); } .span-2 { grid-column: auto; } .hide-sm { display: none !important; } }
@media (min-width: 641px) { .show-sm { display: none !important; } }

/* =====================================================================
   App shell
   ===================================================================== */
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); background: rgba(255,255,255,.86); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 14px 14px; z-index: 60; }
.main-col { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); min-width: 0; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; background: var(--grad-primary); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 18px; box-shadow: var(--shadow-primary); flex: none; position: relative; overflow: hidden; }
.brand-mark::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%); transform: translateX(-120%); animation: sheen 5s var(--ease) infinite 2s; }
.brand-logo { height: 38px; width: auto; max-width: 150px; object-fit: contain; border-radius: 10px; }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.brand-text b { font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.brand-text small { color: var(--muted); font-size: 11.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar > .brand { padding: 2px 8px 16px; }
.side-nav { flex: 1; overflow-y: auto; margin: 0 -6px; padding: 0 6px; scrollbar-width: thin; }
.side-group { margin-bottom: 14px; }
.side-label { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); padding: 6px 12px; }
.side-link { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--ink-2); font-weight: 600; font-size: 14px; transition: background var(--dur) var(--ease), color var(--dur) var(--ease), transform .2s var(--ease); }
.side-link .i { color: var(--faint); transition: color var(--dur) var(--ease), transform .3s var(--ease-spring); }
.side-link:hover { background: var(--surface-3); color: var(--ink); }
.side-link:hover .i { transform: scale(1.08); color: var(--ink-2); }
.side-link.active { background: rgba(var(--primary-rgb), .09); color: var(--primary); }
.side-link.active .i { color: var(--primary); }
.side-link.active::before { content: ""; position: absolute; left: -6px; top: 9px; bottom: 9px; width: 3.5px; border-radius: 4px; background: var(--primary); animation: growY .35s var(--ease-spring); }
.side-link .count { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 800; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 20px; display: grid; place-items: center; background: var(--danger); color: #fff; box-shadow: 0 4px 10px -3px rgba(240,62,62,.6); }
.side-foot { display: flex; align-items: center; gap: 8px; padding: 12px 6px 0; border-top: 1px solid var(--line); margin-top: 6px; }
.side-user { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: var(--ink); padding: 6px; border-radius: 12px; transition: background var(--dur); }
.side-user:hover { background: var(--surface-3); }
.side-user span { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.side-user b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user small { color: var(--muted); font-size: 11.5px; }

.topbar { position: sticky; top: 0; z-index: 50; height: var(--topbar-h); display: flex; align-items: center; gap: 12px; padding: 0 28px; background: rgba(245,246,251,.78); backdrop-filter: blur(16px) saturate(1.5); -webkit-backdrop-filter: blur(16px) saturate(1.5); border-bottom: 1px solid transparent; transition: border-color var(--dur), box-shadow var(--dur); }
.topbar.scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 20px -16px rgba(16,24,40,.25); }
.topbar-title { font-weight: 800; font-size: 17px; letter-spacing: -.02em; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: 6px; }
.brand-mobile { display: none; }
.top-avatar { margin-left: 4px; border-radius: 50%; transition: transform .25s var(--ease-spring); }
.top-avatar:hover { transform: scale(1.06); }
.btn-icon { position: relative; width: 42px; height: 42px; border-radius: 13px; display: inline-grid; place-items: center; color: var(--ink-2); background: transparent; transition: background .2s, transform .2s var(--ease-spring), color .2s; flex: none; }
.btn-icon:hover { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.btn-icon:active { transform: scale(.92); }
.dot-count { position: absolute; top: 5px; right: 5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 10px; background: var(--danger); color: #fff; font-size: 10.5px; font-style: normal; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--bg); animation: pop .4s var(--ease-spring); }
.bell:hover .i { animation: ring .6s var(--ease); }
.content { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 22px 28px 60px; }
.show-md-only { display: none; }

/* Mobile tab bar */
.tabbar { display: none; }
@media (max-width: 1023px) {
  .sidebar { transform: translateX(-104%); transition: transform .38s var(--ease); box-shadow: var(--shadow-lg); width: min(310px, 86vw); background: #fff; }
  .sidebar.open { transform: none; }
  .main-col { margin-left: 0; }
  .topbar { padding: 0 16px; height: 60px; }
  .brand-mobile { display: flex; }
  .brand-mobile .brand-mark, .brand-mobile .brand-logo { width: 34px; height: 34px; font-size: 16px; border-radius: 11px; }
  .brand-mobile b { font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
  .topbar-title { display: none; }
  .topbar-actions { margin-left: auto; }
  .show-md-only { display: inline-grid; }
  .admin .brand-mobile { display: none; }
  .admin .topbar-title { display: block; font-size: 16px; }
  .content { padding: 14px 16px calc(var(--tabbar-h) + 28px + var(--safe-b)); }
  .tabbar { position: fixed; left: 10px; right: 10px; bottom: calc(10px + var(--safe-b)); height: var(--tabbar-h); z-index: 70; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; background: rgba(255,255,255,.9); backdrop-filter: blur(20px) saturate(1.6); -webkit-backdrop-filter: blur(20px) saturate(1.6); border: 1px solid rgba(232,234,242,.9); border-radius: 24px; box-shadow: 0 18px 40px -16px rgba(16,24,40,.3), 0 2px 8px rgba(16,24,40,.05); padding: 0 6px; animation: slideUp .5s var(--ease) both; }
  .tabbar > a, .tabbar > button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 100%; color: var(--faint); font-size: 10.5px; font-weight: 700; transition: color .25s var(--ease); -webkit-tap-highlight-color: transparent; }
  .tabbar .i { width: 22px; height: 22px; transition: transform .35s var(--ease-spring); }
  .tabbar > .active { color: var(--primary); }
  .tabbar > .active .i { transform: translateY(-2px) scale(1.08); }
  .tabbar > .active:not(.tab-center)::after { content: ""; position: absolute; bottom: 7px; width: 5px; height: 5px; border-radius: 50%; background: var(--primary); animation: pop .35s var(--ease-spring); }
  .tabbar > :active .i { transform: scale(.86); }
  .tab-center .tab-fab { width: 50px; height: 50px; margin-top: -26px; border-radius: 18px; display: grid; place-items: center; color: #fff; background: var(--grad-primary); box-shadow: var(--shadow-primary), 0 0 0 5px rgba(255,255,255,.95); transition: transform .3s var(--ease-spring); }
  .tab-center .tab-fab .i { width: 23px; height: 23px; }
  .tab-center.active .tab-fab { transform: translateY(-3px) rotate(-6deg); }
  .tab-center.active { color: var(--primary); }
  .tabbar .dot { position: absolute; top: 10px; right: calc(50% - 16px); width: 8px; height: 8px; border-radius: 50%; background: var(--danger); border: 2px solid #fff; }
}
.drawer-backdrop { position: fixed; inset: 0; background: rgba(13,19,36,.38); backdrop-filter: blur(3px); z-index: 55; opacity: 0; pointer-events: none; transition: opacity .3s; }
.drawer-backdrop.show { opacity: 1; pointer-events: auto; }

/* Bottom sheet */
.sheet { position: fixed; inset: 0; z-index: 90; pointer-events: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(13,19,36,.42); backdrop-filter: blur(3px); opacity: 0; transition: opacity .32s var(--ease); }
.sheet-panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 88vh; overflow-y: auto; background: #fff; border-radius: 28px 28px 0 0; padding: 10px 18px calc(22px + var(--safe-b)); transform: translateY(105%); transition: transform .42s var(--ease); box-shadow: 0 -20px 50px -20px rgba(16,24,40,.3); overscroll-behavior: contain; }
.sheet.open { pointer-events: auto; }
.sheet.open .sheet-backdrop { opacity: 1; }
.sheet.open .sheet-panel { transform: none; }
.sheet-handle { width: 42px; height: 5px; border-radius: 4px; background: var(--line-2); margin: 2px auto 14px; }
.sheet-user { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 18px; margin-bottom: 8px; }
.sheet-user > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sheet-user small { color: var(--muted); }
.sheet-label { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin: 14px 4px 8px; }
.sheet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sheet-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 14px 6px 12px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); font-size: 12px; font-weight: 700; line-height: 1.25; transition: transform .2s var(--ease-spring), background .2s; }
.sheet-item:active { transform: scale(.94); }
.sheet-item.active { background: rgba(var(--primary-rgb), .08); border-color: rgba(var(--primary-rgb), .25); color: var(--primary); }
.si-icon { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }
.sheet-item .dot { position: absolute; top: 10px; right: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.sheet .sheet-panel > .sheet-label + .sheet-grid > .sheet-item { animation: fadeUp .4s var(--ease) both; }

/* Route progress + page transitions */
.route-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 200; background: linear-gradient(90deg, var(--primary), var(--violet), var(--accent)); box-shadow: 0 0 12px rgba(var(--primary-rgb), .6); border-radius: 0 3px 3px 0; opacity: 0; transition: width .25s var(--ease), opacity .3s; }
.route-progress.run { opacity: 1; }
#app-main.leaving { opacity: .55; transform: translateY(4px); transition: opacity .16s, transform .16s; }
#app-main.entering > * { animation: pageIn .42s var(--ease) both; }
#app-main.entering > *:nth-child(2) { animation-delay: .03s; } #app-main.entering > *:nth-child(3) { animation-delay: .06s; } #app-main.entering > *:nth-child(4) { animation-delay: .09s; } #app-main.entering > *:nth-child(5) { animation-delay: .12s; } #app-main.entering > *:nth-child(n+6) { animation-delay: .15s; }

/* =====================================================================
   Page head / sections
   ===================================================================== */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin: 4px 0 20px; flex-wrap: wrap; }
.page-head-text { flex: 1; min-width: 220px; }
.page-head-text p { color: var(--muted); margin-top: 5px; font-size: 14px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back-btn { background: var(--surface); box-shadow: var(--shadow-sm); align-self: center; }
@media (max-width: 640px) { .page-head { margin-bottom: 16px; align-items: center; } .page-head h1 { font-size: 22px; } .page-actions { width: 100%; } .page-actions > .btn { flex: 1; } .page-head-text { min-width: 0; } }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 26px 0 12px; }
.section-title h2 { font-size: 17px; }
.section-title a { font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 2px; }
.section-title a .i { width: 16px; height: 16px; }

/* =====================================================================
   Cards
   ===================================================================== */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); padding: 20px; min-width: 0; position: relative; }
.card-flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; min-width: 0; }
.card-head h2, .card-head h3 { display: flex; align-items: center; gap: 9px; font-size: 16px; }
.card-head h2 .i, .card-head h3 .i { color: var(--primary); }
.card-head p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.card-flush .card-head { padding: 18px 20px 0; }
.card-foot { border-top: 1px solid var(--line); padding: 14px 20px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; background: var(--surface-2); }
.card-hover { transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); }
.card-soft { background: var(--surface-2); box-shadow: none; }
.card-tint { background: linear-gradient(180deg, rgba(var(--primary-rgb), .06), rgba(var(--primary-rgb), .015)); border-color: rgba(var(--primary-rgb), .16); }
@media (max-width: 640px) { .card { padding: 16px; border-radius: calc(var(--r) - 2px); } .card-flush .card-head { padding: 16px 16px 0; } .card-foot { padding: 12px 16px; } }

/* Stats */
.stat { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow-sm); min-width: 0; transition: transform .3s var(--ease), box-shadow .3s; }
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-icon { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; flex: none; }
.stat-icon .i { width: 22px; height: 22px; }
.stat-body { display: flex; flex-direction: column; min-width: 0; }
.stat-label { font-size: 12.5px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-value { font-size: 21px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-primary .stat-icon { background: rgba(var(--primary-rgb), .1); color: var(--primary); }
.stat-success .stat-icon { background: var(--success-bg); color: var(--success); }
.stat-warning .stat-icon { background: var(--warning-bg); color: #d48806; }
.stat-danger .stat-icon { background: var(--danger-bg); color: var(--danger); }
.stat-info .stat-icon { background: var(--info-bg); color: var(--info); }
.stat-violet .stat-icon { background: #f1ebff; color: var(--violet); }
@media (max-width: 640px) { .stat { padding: 13px; gap: 11px; flex-direction: column; align-items: flex-start; } .stat-icon { width: 38px; height: 38px; border-radius: 12px; } .stat-icon .i { width: 19px; height: 19px; } .stat-value { font-size: 18px; } }

/* Wallet hero card */
.wallet-card { position: relative; overflow: hidden; border-radius: calc(var(--r) + 6px); padding: 24px; color: #fff; background: var(--grad-primary); box-shadow: 0 28px 50px -24px rgba(var(--primary-rgb), .75); isolation: isolate; }
.wallet-card::before { content: ""; position: absolute; width: 340px; height: 340px; right: -120px; top: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.32), transparent 65%); z-index: -1; animation: float 9s ease-in-out infinite; }
.wallet-card::after { content: ""; position: absolute; width: 260px; height: 260px; left: -90px; bottom: -150px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--accent-rgb), .55), transparent 65%); z-index: -1; animation: float 11s ease-in-out infinite reverse; }
.wallet-card .sheen { position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.22) 50%, transparent 65%); transform: translateX(-100%); animation: sheen 6s var(--ease) infinite 1s; pointer-events: none; }
.wc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.wc-label { font-size: 13px; font-weight: 600; opacity: .85; display: flex; align-items: center; gap: 7px; }
.wc-amount { font-size: clamp(32px, 5vw, 42px); font-weight: 800; letter-spacing: -.035em; line-height: 1.1; margin: 8px 0 2px; }
.wc-local { font-size: 14px; opacity: .85; font-weight: 600; }
.wc-chip { padding: 6px 11px; border-radius: 30px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.28); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; backdrop-filter: blur(6px); white-space: nowrap; }
.wc-chip .i { width: 15px; height: 15px; }
.wc-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 22px; }
.wc-action { display: flex; flex-direction: column; align-items: center; gap: 7px; color: #fff; font-size: 12px; font-weight: 700; text-align: center; }
.wc-action span.ic { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: rgba(255,255,255,.17); border: 1px solid rgba(255,255,255,.25); backdrop-filter: blur(8px); transition: transform .3s var(--ease-spring), background .2s; }
.wc-action:hover span.ic { transform: translateY(-3px); background: rgba(255,255,255,.27); }
.wc-action:active span.ic { transform: scale(.9); }
.wc-meta { display: flex; gap: 18px; margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.2); flex-wrap: wrap; }
.wc-meta div { display: flex; flex-direction: column; }
.wc-meta small { opacity: .78; font-weight: 600; font-size: 11.5px; }
.wc-meta b { font-size: 15px; }
@media (max-width: 640px) { .wallet-card { padding: 20px 18px; } .wc-action span.ic { width: 46px; height: 46px; } }

/* =====================================================================
   Buttons
   ===================================================================== */
.btn { --b-bg: var(--surface); --b-fg: var(--ink); --b-bd: var(--line-2); position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 13px; font-weight: 700; font-size: 14px; letter-spacing: -.005em; white-space: nowrap; background: var(--b-bg); color: var(--b-fg); border: 1px solid var(--b-bd); box-shadow: var(--shadow-xs); transition: transform .18s var(--ease), box-shadow .25s var(--ease), background .2s, filter .2s, opacity .2s; -webkit-tap-highlight-color: transparent; user-select: none; text-decoration: none; }
.btn .i { width: 18px; height: 18px; }
.btn:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.97); box-shadow: var(--shadow-xs); }
.btn[disabled], .btn.disabled { opacity: .55; pointer-events: none; }
.btn-primary { --b-bg: var(--grad-primary); --b-fg: #fff; --b-bd: transparent; background-size: 160% 160%; box-shadow: var(--shadow-primary); }
.btn-primary:hover { filter: brightness(1.05) saturate(1.05); box-shadow: 0 14px 30px -10px rgba(var(--primary-rgb), .7); background-position: 100% 50%; }
.btn-dark { --b-bg: var(--ink); --b-fg: #fff; --b-bd: var(--ink); }
.btn-dark:hover { --b-bg: #1d2540; }
.btn-success { --b-bg: var(--success); --b-fg: #fff; --b-bd: transparent; box-shadow: 0 10px 22px -10px rgba(18,184,134,.7); }
.btn-danger { --b-bg: var(--danger); --b-fg: #fff; --b-bd: transparent; box-shadow: 0 10px 22px -10px rgba(240,62,62,.6); }
.btn-warning { --b-bg: var(--warning); --b-fg: #fff; --b-bd: transparent; }
.btn-soft { --b-bg: rgba(var(--primary-rgb), .08); --b-fg: var(--primary); --b-bd: transparent; box-shadow: none; }
.btn-soft:hover { --b-bg: rgba(var(--primary-rgb), .13); box-shadow: none; }
.btn-soft-danger { --b-bg: var(--danger-bg); --b-fg: var(--danger); --b-bd: transparent; box-shadow: none; }
.btn-soft-success { --b-bg: var(--success-bg); --b-fg: #0c8a64; --b-bd: transparent; box-shadow: none; }
.btn-ghost { --b-bg: transparent; --b-bd: transparent; box-shadow: none; }
.btn-ghost:hover { --b-bg: var(--surface-3); box-shadow: none; }
.btn-white { --b-bg: #fff; --b-fg: var(--ink); --b-bd: #fff; }
.btn-glass { --b-bg: rgba(255,255,255,.16); --b-fg: #fff; --b-bd: rgba(255,255,255,.3); backdrop-filter: blur(8px); box-shadow: none; }
.btn-sm { height: 36px; padding: 0 13px; font-size: 13px; border-radius: 11px; gap: 6px; }
.btn-sm .i { width: 16px; height: 16px; }
.btn-xs { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 9px; gap: 5px; }
.btn-xs .i { width: 14px; height: 14px; }
.btn-lg { height: 52px; padding: 0 24px; font-size: 15.5px; border-radius: 15px; }
.btn-block { width: 100%; }
.btn.loading { color: transparent !important; pointer-events: none; }
.btn.loading::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-color: rgba(255,255,255,.9) rgba(255,255,255,.9) transparent transparent; animation: spin .7s linear infinite; }
.btn-soft.loading::after, .btn-ghost.loading::after, .btn:not([class*="btn-primary"]):not(.btn-dark):not(.btn-danger):not(.btn-success).loading::after { border-color: var(--primary) var(--primary) transparent transparent; }
.ripple { position: absolute; border-radius: 50%; transform: scale(0); background: currentColor; opacity: .22; animation: ripple .6s var(--ease) forwards; pointer-events: none; }
.btn-primary .ripple, .btn-dark .ripple, .btn-danger .ripple, .btn-success .ripple { background: #fff; opacity: .35; }

/* =====================================================================
   Badges / chips / avatars
   ===================================================================== */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 30px; font-size: 11.5px; font-weight: 700; white-space: nowrap; letter-spacing: .005em; }
.badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-success { background: var(--success-bg); color: #0c8a64; }
.badge-warning { background: var(--warning-bg); color: #b26b00; }
.badge-warning i { animation: pulseDot 1.6s ease-in-out infinite; }
.badge-danger { background: var(--danger-bg); color: #d02828; }
.badge-info { background: var(--info-bg); color: #1971c2; }
.badge-neutral { background: var(--surface-3); color: var(--ink-2); }
.badge-primary { background: rgba(var(--primary-rgb), .1); color: var(--primary); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 30px; font-size: 12px; font-weight: 700; background: var(--surface-3); color: var(--ink-2); }
.pill .i { width: 14px; height: 14px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 15px; border-radius: 30px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-weight: 700; font-size: 13px; transition: all .25s var(--ease); scroll-snap-align: start; white-space: nowrap; }
.chip .i { width: 16px; height: 16px; }
.chip:hover { border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); box-shadow: 0 8px 18px -10px rgba(13,19,36,.7); }
.chip em { font-style: normal; font-size: 11px; opacity: .7; }
.avatar { --h: 240; width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; overflow: hidden; font-weight: 800; font-size: 14px; color: hsl(var(--h) 55% 38%); background: hsl(var(--h) 85% 93%); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-xs { width: 28px; height: 28px; font-size: 11px; }
.avatar-sm { width: 36px; height: 36px; font-size: 13px; }
.avatar-lg { width: 64px; height: 64px; font-size: 22px; }
.avatar-xl { width: 92px; height: 92px; font-size: 30px; border-width: 4px; }
.avatar-stack { display: flex; } .avatar-stack .avatar { margin-left: -10px; } .avatar-stack .avatar:first-child { margin-left: 0; }

/* =====================================================================
   Forms
   ===================================================================== */
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > label, .label { font-size: 13px; font-weight: 700; color: var(--ink-2); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.field > label small { font-weight: 500; color: var(--muted); }
.help { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.field-error { color: var(--danger); font-size: 12.5px; font-weight: 600; }
.input, .select, .textarea { width: 100%; min-width: 0; height: 48px; padding: 0 15px; border-radius: 13px; border: 1.5px solid var(--line-2); background: var(--surface); color: var(--ink); font-size: 15px; font-weight: 500; transition: border-color .2s, box-shadow .2s, background .2s; -webkit-appearance: none; appearance: none; }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:hover, .select:hover, .textarea:hover { border-color: #cfd4e2; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .13); }
.input.is-invalid { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(240,62,62,.1); }
.input-sm, .select.input-sm { height: 38px; font-size: 13.5px; border-radius: 11px; padding: 0 12px; }
.textarea { height: auto; min-height: 110px; padding: 12px 15px; line-height: 1.55; resize: vertical; }
.select { padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; cursor: pointer; }
input[type="color"].input { padding: 5px; width: 64px; cursor: pointer; }
input[type="file"].input { padding: 10px; height: auto; font-size: 13px; }
.input-group { position: relative; display: flex; align-items: stretch; }
.input-group .input { flex: 1; }
.input-group .ig-prefix, .input-group .ig-suffix { display: flex; align-items: center; padding: 0 14px; border: 1.5px solid var(--line-2); background: var(--surface-2); color: var(--muted); font-weight: 700; font-size: 14px; white-space: nowrap; }
.input-group .ig-prefix { border-right: 0; border-radius: 13px 0 0 13px; }
.input-group .ig-prefix + .input { border-radius: 0 13px 13px 0; }
.input-group .input:has(+ .ig-suffix) { border-radius: 13px 0 0 13px; }
.input-group .ig-suffix { border-left: 0; border-radius: 0 13px 13px 0; }
.input-icon { position: relative; }
.input-icon > .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; width: 19px; height: 19px; }
.input-icon .input { padding-left: 44px; }
.input-icon .pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); }
.input-icon .pw-toggle:hover { background: var(--surface-3); }
.input-icon:has(.pw-toggle) .input { padding-right: 48px; }
/* Switch */
.switch { position: relative; display: inline-flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; font-weight: 600; font-size: 14px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 46px; height: 27px; border-radius: 30px; background: #d6dae5; position: relative; flex: none; transition: background .25s var(--ease); }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(16,24,40,.25); transition: transform .32s var(--ease-spring); }
.switch input:checked + .track { background: var(--primary); }
.switch input:checked + .track::after { transform: translateX(19px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .2); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.toggle-row:last-child { border-bottom: 0; }
.toggle-row .tr-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.toggle-row .tr-text b { font-size: 14px; font-weight: 700; }
.toggle-row .tr-text small { color: var(--muted); }
.check { display: inline-flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 14px; line-height: 1.45; }
.check input { width: 19px; height: 19px; margin: 1px 0 0; accent-color: var(--primary); flex: none; cursor: pointer; }
/* Segmented */
.segmented { display: inline-flex; padding: 4px; background: var(--surface-3); border-radius: 14px; gap: 4px; flex-wrap: wrap; }
.segmented label, .segmented a { position: relative; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span, .segmented a { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 15px; border-radius: 11px; font-weight: 700; font-size: 13.5px; color: var(--muted); cursor: pointer; transition: all .25s var(--ease); white-space: nowrap; }
.segmented input:checked + span, .segmented a.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.segmented .i { width: 17px; height: 17px; }
.option-cards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.option-card { position: relative; cursor: pointer; }
.option-card input { position: absolute; opacity: 0; }
.option-card > span { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 15px; border: 1.5px solid var(--line-2); background: #fff; transition: all .25s var(--ease); height: 100%; }
.option-card > span b { font-size: 14px; }
.option-card > span small { color: var(--muted); }
.option-card input:checked + span { border-color: var(--primary); background: rgba(var(--primary-rgb), .05); box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .1); }
.option-card input:checked + span::after { content: ""; position: absolute; top: 12px; right: 12px; width: 20px; height: 20px; border-radius: 50%; background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/12px no-repeat; animation: pop .3s var(--ease-spring); }
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 22px; border: 2px dashed var(--line-2); border-radius: 16px; background: var(--surface-2); text-align: center; color: var(--muted); cursor: pointer; transition: all .2s; position: relative; }
.dropzone:hover, .dropzone.drag { border-color: var(--primary); background: rgba(var(--primary-rgb), .04); color: var(--primary); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone img { max-height: 120px; border-radius: 12px; box-shadow: var(--shadow-sm); }
.img-preview { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; border: 1px solid var(--line); background: var(--surface-2); }

/* Alerts */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 15px; font-size: 14px; line-height: 1.5; border: 1px solid; }
.alert > .i { margin-top: 1px; }
.alert b { display: block; margin-bottom: 1px; }
.alert-info { background: var(--info-bg); border-color: #cfe5fa; color: #145a99; }
.alert-success { background: var(--success-bg); border-color: #c4eedf; color: #086b4d; }
.alert-warning { background: var(--warning-bg); border-color: #ffe3a8; color: #8a5300; }
.alert-danger { background: var(--danger-bg); border-color: #ffcfcf; color: #a61e1e; }

/* =====================================================================
   Tables & lists
   ===================================================================== */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.table th { text-align: left; font-size: 11.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: #fafbfe; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .t-right { text-align: right; }
.table .t-actions { text-align: right; white-space: nowrap; }
.cell-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cell-main > div { display: flex; flex-direction: column; min-width: 0; }
.cell-main b { font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.cell-main small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.thumb { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; background: var(--surface-3); flex: none; border: 1px solid var(--line); }
/* Responsive: tables become cards on phones */
@media (max-width: 760px) {
  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
  .table-cards tr { padding: 14px 16px; border-bottom: 1px solid var(--line); position: relative; }
  .table-cards tbody tr:last-child { border-bottom: 0; }
  .table-cards td { padding: 4px 0; border: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: right; min-width: 0; }
  .table-cards td::before { content: attr(data-label); font-size: 12px; font-weight: 700; color: var(--faint); text-align: left; flex: none; }
  .table-cards td.td-main { display: block; text-align: left; padding-bottom: 8px; }
  .table-cards td.td-main::before { display: none; }
  .table-cards td.t-actions { justify-content: flex-end; padding-top: 10px; }
  .table-cards td.t-actions::before { display: none; }
  .table-cards .cell-main b, .table-cards .cell-main small { max-width: 70vw; }
}
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 13px; padding: 13px 0; border-bottom: 1px solid var(--line); min-width: 0; color: inherit; }
.list-item:last-child { border-bottom: 0; }
a.list-item { transition: background .2s, padding .2s; border-radius: 12px; }
a.list-item:hover { background: var(--surface-2); padding-left: 8px; padding-right: 8px; }
.li-icon { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; flex: none; background: var(--surface-3); color: var(--ink-2); }
.li-icon .i { width: 20px; height: 20px; }
.li-icon.tone-success { background: var(--success-bg); color: var(--success); }
.li-icon.tone-danger { background: var(--danger-bg); color: var(--danger); }
.li-icon.tone-warning { background: var(--warning-bg); color: #d48806; }
.li-icon.tone-info, .li-icon.tone-primary { background: rgba(var(--primary-rgb), .1); color: var(--primary); }
.li-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.li-body b { font-size: 14px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-body small { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-end { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: none; }
.li-end b { font-size: 14.5px; white-space: nowrap; }
.amount-pos { color: var(--success); } .amount-neg { color: var(--ink); }
.kv { display: grid; grid-template-columns: minmax(110px, 40%) 1fr; gap: 10px 16px; font-size: 14px; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }

/* Toolbar (filters) */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .input-icon { flex: 1; min-width: 200px; }
.toolbar .select { width: auto; min-width: 140px; }
@media (max-width: 640px) { .toolbar .select { flex: 1; min-width: 0; } .toolbar .btn { flex: none; } }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 12px 14px; font-weight: 700; font-size: 14px; color: var(--muted); white-space: nowrap; transition: color .2s; }
.tab .i { width: 17px; height: 17px; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--primary); }
.tab.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--primary); animation: growX .3s var(--ease); }
.tab em { font-style: normal; font-size: 11px; background: var(--surface-3); color: var(--ink-2); padding: 1px 7px; border-radius: 10px; }
.tab-panel { display: none; } .tab-panel.active { display: block; animation: fadeUp .35s var(--ease); }

/* Pager */
.pager { display: flex; align-items: center; gap: 6px; padding: 16px 20px; flex-wrap: wrap; }
.pager-btn, .pager-num { min-width: 38px; height: 38px; border-radius: 11px; display: inline-grid; place-items: center; font-weight: 700; font-size: 13.5px; color: var(--ink-2); border: 1px solid var(--line); background: #fff; transition: all .2s; }
.pager-btn .i { width: 17px; height: 17px; }
.pager-num.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.pager-btn.disabled { opacity: .4; }
a.pager-btn:hover, a.pager-num:hover { border-color: var(--primary); color: var(--primary); }
.pager-gap { color: var(--faint); }
.pager-info { margin-left: auto; color: var(--muted); font-size: 13px; font-weight: 600; }

/* Empty state */
.empty { text-align: center; padding: 44px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty-icon { width: 72px; height: 72px; border-radius: 24px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(var(--primary-rgb), .12), rgba(var(--accent-rgb), .1)); color: var(--primary); margin-bottom: 6px; animation: float 5s ease-in-out infinite; }
.empty-icon .i { width: 32px; height: 32px; }
.empty p { color: var(--muted); max-width: 380px; font-size: 14px; }
.empty .btn { margin-top: 10px; }

/* =====================================================================
   Toasts, modals, popovers
   ===================================================================== */
#toasts { position: fixed; z-index: 300; top: 16px; right: 16px; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
@media (max-width: 640px) { #toasts { top: auto; bottom: calc(var(--tabbar-h) + 22px + var(--safe-b)); right: 16px; left: 16px; width: auto; } body[data-layout="public"] #toasts { bottom: 18px; } }
.toast { pointer-events: auto; display: flex; gap: 12px; align-items: flex-start; padding: 14px 14px 14px 16px; border-radius: 17px; background: rgba(13,19,36,.94); color: #fff; box-shadow: 0 20px 40px -14px rgba(13,19,36,.55); backdrop-filter: blur(10px); font-size: 14px; font-weight: 600; line-height: 1.45; animation: toastIn .45s var(--ease-spring) both; position: relative; overflow: hidden; }
.toast.out { animation: toastOut .3s var(--ease) forwards; }
.toast .t-icon { width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.toast .t-icon .i { width: 16px; height: 16px; }
.toast-success .t-icon { background: var(--success); } .toast-error .t-icon, .toast-danger .t-icon { background: var(--danger); } .toast-warning .t-icon { background: var(--warning); } .toast-info .t-icon { background: var(--primary); }
.toast .t-body { flex: 1; padding-top: 2px; }
.toast .t-x { opacity: .6; padding: 2px; } .toast .t-x:hover { opacity: 1; } .toast .t-x .i { width: 16px; height: 16px; }
.toast .t-bar { position: absolute; left: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.35); animation: shrink 4.5s linear forwards; }
.modal { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(13,19,36,.45); backdrop-filter: blur(4px); animation: fadeIn .25s var(--ease); }
.modal-card { position: relative; width: min(520px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: #fff; border-radius: 24px; padding: 24px; box-shadow: var(--shadow-lg); }
.modal-card.wide { width: min(760px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.modal-head h3 { font-size: 18px; font-weight: 800; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }
@media (max-width: 640px) { .modal { align-items: end; padding: 0; } .modal-card { width: 100%; border-radius: 26px 26px 0 0; padding: 20px 18px calc(22px + var(--safe-b)); animation: slideUp .4s var(--ease) both !important; max-height: 90vh; } .modal-foot > .btn { flex: 1; } }
.confirm-icon { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--danger-bg); color: var(--danger); margin-bottom: 14px; }
.confirm-icon .i { width: 26px; height: 26px; }
.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 200px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 40; transform-origin: top right; animation: popMenu .22s var(--ease) both; }
.dropdown-menu[hidden] { display: none; }
.dropdown-menu a, .dropdown-menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 11px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); text-align: left; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--surface-3); color: var(--ink); }
.dropdown-menu .danger { color: var(--danger); }
.dropdown-menu hr { margin: 5px 4px; }
.dropdown-menu .i { width: 17px; height: 17px; }

/* Command palette */
.cmdk { position: fixed; inset: 0; z-index: 250; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.cmdk-backdrop { position: absolute; inset: 0; background: rgba(13,19,36,.42); backdrop-filter: blur(5px); animation: fadeIn .2s; }
.cmdk-panel { position: relative; width: min(620px, 100%); background: #fff; border-radius: 22px; box-shadow: var(--shadow-lg); overflow: hidden; }
.cmdk-input { display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.cmdk-input input { flex: 1; height: 60px; border: 0; outline: 0; font-size: 16px; font-weight: 600; background: transparent; min-width: 0; }
.cmdk-input .i { color: var(--faint); }
kbd { font-family: inherit; font-size: 11px; font-weight: 700; color: var(--muted); background: var(--surface-3); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 7px; padding: 2px 7px; white-space: nowrap; }
.cmdk-results { max-height: 52vh; overflow-y: auto; padding: 8px; }
.cmdk-group { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); padding: 10px 12px 6px; }
.cmdk-item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 13px; color: var(--ink-2); font-weight: 600; font-size: 14px; }
.cmdk-item .i { color: var(--faint); }
.cmdk-item small { margin-left: auto; color: var(--faint); font-weight: 600; font-size: 12px; }
.cmdk-item.sel { background: rgba(var(--primary-rgb), .08); color: var(--primary); }
.cmdk-item.sel .i { color: var(--primary); }
.cmdk-empty { padding: 30px; text-align: center; color: var(--muted); font-size: 14px; }
.cmdk-trigger { display: flex; align-items: center; gap: 10px; width: 100%; height: 42px; padding: 0 12px; margin: 0 0 14px; border-radius: 12px; background: var(--surface-3); color: var(--muted); font-size: 13px; font-weight: 600; transition: background .2s, box-shadow .2s; }
.cmdk-trigger:hover { background: #fff; box-shadow: var(--shadow-sm); }
.cmdk-trigger .i { width: 17px; height: 17px; }
.cmdk-trigger kbd { margin-left: auto; }

/* Skeleton */
.skeleton { background: linear-gradient(90deg, var(--surface-3) 25%, #f9fafd 37%, var(--surface-3) 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: 10px; }

/* Progress / steps / timeline */
.progress { height: 9px; border-radius: 10px; background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 10px; background: var(--grad-primary); width: 0; transition: width 1.1s var(--ease); }
.progress.success > span { background: linear-gradient(90deg, var(--success), #38d9a9); }
.steps { display: flex; flex-direction: column; gap: 0; }
.step { display: flex; gap: 14px; position: relative; padding-bottom: 20px; }
.step:last-child { padding-bottom: 0; }
.step::before { content: ""; position: absolute; left: 17px; top: 38px; bottom: 2px; width: 2px; background: var(--line); }
.step:last-child::before { display: none; }
.step-dot { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--surface-3); color: var(--muted); font-weight: 800; font-size: 14px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); position: relative; z-index: 1; }
.step-dot .i { width: 18px; height: 18px; }
.step.done .step-dot { background: var(--success); color: #fff; box-shadow: 0 6px 14px -6px rgba(18,184,134,.7); }
.step.done::before { background: var(--success); }
.step.current .step-dot { background: var(--primary); color: #fff; box-shadow: 0 0 0 5px rgba(var(--primary-rgb), .15); animation: glow 2s ease-in-out infinite; }
.step-body { flex: 1; min-width: 0; padding-top: 6px; }
.step-body b { display: block; font-size: 14.5px; }
.step-body p, .step-body small { color: var(--muted); font-size: 13px; }
.timeline { display: flex; flex-direction: column; }
.tl-item { display: flex; gap: 12px; position: relative; padding: 0 0 16px; }
.tl-item::before { content: ""; position: absolute; left: 7px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-dot { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--primary); flex: none; margin-top: 3px; position: relative; z-index: 1; }
.tl-dot.tone-success { border-color: var(--success); } .tl-dot.tone-danger { border-color: var(--danger); } .tl-dot.tone-warning { border-color: var(--warning); }
.tl-body { flex: 1; min-width: 0; font-size: 13.5px; }
.tl-body small { color: var(--faint); display: block; margin-top: 2px; font-size: 12px; }
.pipeline { display: flex; align-items: center; gap: 6px; }
.pipeline .pl-step { flex: 1; height: 6px; border-radius: 6px; background: var(--surface-3); position: relative; overflow: hidden; }
.pipeline .pl-step.on { background: var(--grad-primary); }
.pipeline .pl-step.on.now::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent); animation: sheen 1.8s ease-in-out infinite; }

/* =====================================================================
   Product cards, banners, misc widgets
   ===================================================================== */
.products { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
@media (max-width: 560px) { .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.product { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; color: inherit; box-shadow: var(--shadow-sm); transition: transform .4s var(--ease), box-shadow .4s var(--ease); min-width: 0; }
.product:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.product-media { position: relative; aspect-ratio: 16/11; background: linear-gradient(135deg, #eef0ff, #f6f0ff); overflow: hidden; }
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.product:hover .product-media img { transform: scale(1.07); }
.product-media .p-badge { position: absolute; top: 10px; left: 10px; }
.product-media .p-cat { position: absolute; bottom: 10px; left: 10px; padding: 4px 10px; border-radius: 20px; background: rgba(255,255,255,.92); backdrop-filter: blur(6px); font-size: 11px; font-weight: 700; color: var(--ink-2); }
.product-media .p-ph { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(var(--primary-rgb), .45); }
.product-media .p-ph .i { width: 42px; height: 42px; }
.product-body { padding: 14px 15px 15px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-body h3 { font-size: 15px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-body p { color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; }
.price small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
.price b { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.price .per { font-size: 12px; color: var(--muted); font-weight: 600; }
.profit-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 800; color: #0c8a64; background: var(--success-bg); padding: 4px 9px; border-radius: 20px; white-space: nowrap; }
.profit-tag .i { width: 13px; height: 13px; }
.product .go { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--ink); color: #fff; transition: transform .35s var(--ease-spring); flex: none; }
.product:hover .go { transform: rotate(-45deg); }
.product .go .i { width: 18px; height: 18px; }
@media (max-width: 560px) { .product-body { padding: 11px 12px 12px; } .product-body h3 { font-size: 13.5px; } .product-body p { display: none; } .price b { font-size: 15.5px; } .product .go { display: none; } }
/* Fly-in animation for products */
.fly-in { opacity: 0; transform: translateY(26px) scale(.96); }
.fly-in.in { animation: flyIn .7s var(--ease) forwards; }

.carousel { position: relative; border-radius: calc(var(--r) + 2px); overflow: hidden; }
.carousel-track { display: flex; transition: transform .6s var(--ease); touch-action: pan-y; }
.slide { flex: 0 0 100%; min-height: 150px; position: relative; display: flex; align-items: center; padding: 24px; color: #fff; background: var(--grad-primary); overflow: hidden; }
.slide img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(13,19,36,.55), rgba(13,19,36,.05)); }
.slide.no-img::after { background: radial-gradient(400px 200px at 90% 0, rgba(255,255,255,.25), transparent); }
.slide-body { position: relative; z-index: 1; max-width: 560px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.slide-body h3 { color: #fff; font-size: clamp(18px, 2.4vw, 24px); font-weight: 800; }
.slide-body p { opacity: .9; font-size: 14px; }
.carousel-dots { position: absolute; bottom: 12px; right: 16px; display: flex; gap: 6px; z-index: 2; }
.carousel-dots button { width: 7px; height: 7px; border-radius: 10px; background: rgba(255,255,255,.55); transition: all .35s var(--ease); }
.carousel-dots button.on { width: 22px; background: #fff; }

.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (min-width: 900px) { .quick-grid { grid-template-columns: repeat(8, 1fr); } }
.quick { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; color: var(--ink-2); font-size: 12px; font-weight: 700; line-height: 1.25; }
.quick .q-ic { width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); color: var(--primary); transition: transform .35s var(--ease-spring), box-shadow .3s; }
.quick:hover .q-ic { transform: translateY(-4px) rotate(-4deg); box-shadow: var(--shadow); }
.quick:active .q-ic { transform: scale(.9); }
.quick .q-ic .i { width: 23px; height: 23px; }
.q-ic.c1 { color: #5b5bf6; background: #eef0ff; border-color: #e1e4ff; } .q-ic.c2 { color: #12b886; background: #e7f8f2; border-color: #d3f2e7; } .q-ic.c3 { color: #f59f00; background: #fff5e0; border-color: #ffebc2; } .q-ic.c4 { color: #e64980; background: #ffeef5; border-color: #ffdbe9; } .q-ic.c5 { color: #228be6; background: #e7f3fd; border-color: #d0e7fb; } .q-ic.c6 { color: #8b5cf6; background: #f3eeff; border-color: #e7ddff; } .q-ic.c7 { color: #0ca678; background: #e6fcf5; border-color: #c3fae8; } .q-ic.c8 { color: #f76707; background: #fff4e6; border-color: #ffe8cc; }

.verify-bar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 16px; border-radius: 17px; background: linear-gradient(90deg, #fff8e6, #fffdf6); border: 1px solid #ffe3a8; color: #7a4a00; }
.verify-bar span:nth-child(2) { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.verify-bar small { color: #a36a00; }
.verify-bar .vb-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--warning); color: #fff; flex: none; animation: glowWarn 2.4s ease-in-out infinite; }
.imp-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 14px; border-radius: 14px; background: var(--ink); color: #fff; font-size: 13.5px; }
.imp-bar .btn { margin-left: auto; }
.announce { display: flex; align-items: flex-start; gap: 12px; padding: 13px 14px; margin-bottom: 14px; border-radius: 16px; border: 1px solid; font-size: 14px; }
.announce > div { flex: 1; }
.announce.tone-info { background: rgba(var(--primary-rgb), .06); border-color: rgba(var(--primary-rgb), .18); color: #3b3bb0; }
.announce.tone-success { background: var(--success-bg); border-color: #c4eedf; color: #086b4d; }
.announce.tone-warning { background: var(--warning-bg); border-color: #ffe3a8; color: #8a5300; }
.announce.tone-danger { background: var(--danger-bg); border-color: #ffcfcf; color: #a61e1e; }
.announce a { font-weight: 700; color: inherit; text-decoration: underline; }
.announce-x { opacity: .5; } .announce-x:hover { opacity: 1; } .announce-x .i { width: 17px; height: 17px; }
.announce-popup { position: fixed; inset: 0; z-index: 160; display: grid; place-items: center; padding: 16px; background: rgba(13,19,36,.45); backdrop-filter: blur(4px); }
.announce-popup .modal-card { text-align: center; }
.ap-icon { width: 64px; height: 64px; border-radius: 22px; display: grid; place-items: center; margin: 0 auto 14px; background: rgba(var(--primary-rgb), .1); color: var(--primary); }
.ap-icon .i { width: 30px; height: 30px; }
.announce-popup h3 { font-size: 20px; margin-bottom: 6px; }
.announce-popup p { color: var(--muted); }
.ap-actions { display: flex; gap: 10px; justify-content: center; margin-top: 18px; }

.copy-field { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 14px; background: var(--surface-2); border: 1px dashed var(--line-2); min-width: 0; }
.copy-field code, .copy-field span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.share-row { display: flex; gap: 8px; flex-wrap: wrap; }
.share-btn { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #fff; transition: transform .25s var(--ease-spring); }
.share-btn:hover { transform: translateY(-3px); }
.share-btn.wa { background: #25d366; } .share-btn.tg { background: #229ed9; } .share-btn.fb { background: #1877f2; } .share-btn.sh { background: var(--ink); }
.rank-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rank-num { width: 30px; text-align: center; font-weight: 800; color: var(--muted); flex: none; }
.medal { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; color: #fff; flex: none; }
.medal-1 { background: linear-gradient(135deg, #fcc419, #f59f00); box-shadow: 0 8px 16px -8px #f59f00; } .medal-2 { background: linear-gradient(135deg, #ced4da, #868e96); } .medal-3 { background: linear-gradient(135deg, #ffa94d, #d9480f); }
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 10px; align-items: end; }
.podium-col { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.podium-col b { font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-bar { width: 100%; border-radius: 16px 16px 6px 6px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 22px; animation: growY .8s var(--ease) both; transform-origin: bottom; }
.pb-1 { height: 120px; background: linear-gradient(180deg, #fcc419, #f59f00); } .pb-2 { height: 92px; background: linear-gradient(180deg, #ced4da, #868e96); animation-delay: .1s; } .pb-3 { height: 74px; background: linear-gradient(180deg, #ffa94d, #e8590c); animation-delay: .2s; }

/* Charts */
.chart { position: relative; width: 100%; height: 220px; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart .c-grid line { stroke: var(--line); stroke-dasharray: 3 4; }
.chart .c-label { fill: var(--faint); font-size: 10.5px; font-weight: 600; font-family: var(--font); }
.chart .c-line { fill: none; stroke: var(--primary); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.chart .c-line.l2 { stroke: var(--accent); }
.chart .c-area { fill: url(#cg1); opacity: .9; }
.chart .c-area.a2 { fill: url(#cg2); }
.chart .c-bar { fill: var(--primary); rx: 6; transition: opacity .2s; }
.chart .c-bar:hover { opacity: .8; }
.chart .c-dot { fill: #fff; stroke: var(--primary); stroke-width: 2.5; opacity: 0; transition: opacity .15s; }
.chart-tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; padding: 7px 10px; border-radius: 10px; font-size: 12px; font-weight: 700; white-space: nowrap; transform: translate(-50%, calc(-100% - 12px)); box-shadow: var(--shadow); opacity: 0; transition: opacity .15s; z-index: 2; }
.chart-tip small { display: block; opacity: .7; font-weight: 600; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--primary); }
.legend i.l2 { background: var(--accent); }
.donut { --v: 0; width: 120px; height: 120px; border-radius: 50%; background: conic-gradient(var(--primary) calc(var(--v) * 1%), var(--surface-3) 0); display: grid; place-items: center; transition: --v 1s; }
.donut::after { content: attr(data-label); width: 88px; height: 88px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-weight: 800; font-size: 20px; }

/* Tree / network */
.tree-level { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); }
.level-chip { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; color: #fff; flex: none; }
.lv-1 { background: linear-gradient(135deg, #5b5bf6, #8b5cf6); } .lv-2 { background: linear-gradient(135deg, #12b886, #38d9a9); } .lv-3 { background: linear-gradient(135deg, #f59f00, #ffc078); }

/* ID card */
.idcard { width: min(380px, 100%); margin: 0 auto; border-radius: 26px; overflow: hidden; background: #fff; box-shadow: var(--shadow-lg); border: 1px solid var(--line); position: relative; }
.idcard-top { background: var(--grad-primary); padding: 22px 22px 60px; color: #fff; position: relative; overflow: hidden; }
.idcard-top::after { content: ""; position: absolute; width: 240px; height: 240px; border-radius: 50%; right: -80px; top: -110px; background: radial-gradient(circle, rgba(255,255,255,.3), transparent 65%); }
.idcard-body { padding: 0 22px 22px; margin-top: -48px; text-align: center; position: relative; }

/* =====================================================================
   Public site
   ===================================================================== */
.pub-wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.pub-header { position: sticky; top: 0; z-index: 50; transition: background .3s, box-shadow .3s, border-color .3s; border-bottom: 1px solid transparent; }
.pub-header.scrolled { background: rgba(255,255,255,.82); backdrop-filter: blur(16px) saturate(1.5); -webkit-backdrop-filter: blur(16px) saturate(1.5); border-bottom-color: var(--line); box-shadow: 0 8px 30px -20px rgba(16,24,40,.3); }
.pub-header .pub-wrap { height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pub-nav { display: flex; gap: 8px; align-items: center; }
.pub-main { min-height: 60vh; }
.pub-footer { border-top: 1px solid var(--line); background: #fff; padding: 34px 0 calc(28px + var(--safe-b)); margin-top: 40px; }
.pub-footer .pub-wrap { display: flex; flex-direction: column; gap: 18px; }
.pf-brand { display: flex; gap: 12px; align-items: center; }
.pf-brand p { color: var(--muted); font-size: 13.5px; }
.pf-links { display: flex; gap: 6px 20px; flex-wrap: wrap; }
.pf-links a { color: var(--ink-2); font-weight: 600; font-size: 14px; }
.pf-links a:hover { color: var(--primary); }
.pub-footer small { color: var(--faint); }
.hero { position: relative; padding: 54px 0 40px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
@media (max-width: 920px) { .hero-grid { grid-template-columns: 1fr; gap: 34px; } .hero { padding: 26px 0 20px; } }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 8px; border-radius: 40px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); font-size: 13px; font-weight: 700; color: var(--ink-2); }
.hero-badge span { padding: 3px 9px; border-radius: 20px; background: var(--grad-primary); color: #fff; font-size: 11px; }
.hero h1 { font-size: clamp(36px, 6.2vw, 64px); line-height: 1.04; letter-spacing: -.045em; font-weight: 800; margin: 18px 0 16px; }
.hero h1 .grad { background: var(--grad-primary); -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 200% 100%; animation: gradShift 6s ease infinite; }
.hero-sub { font-size: clamp(15.5px, 1.7vw, 18px); color: var(--muted); max-width: 560px; line-height: 1.65; }
.hero-cta { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.hero-trust { display: flex; align-items: center; gap: 12px; margin-top: 26px; color: var(--muted); font-size: 13.5px; font-weight: 600; flex-wrap: wrap; }
.hero-visual { position: relative; padding: 34px 26px 44px 18px; }
@media (max-width: 920px) { .hero-visual { padding: 30px 8px 40px 4px; } }
.hv-card { position: absolute; background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-lg); padding: 14px 16px; z-index: 2; }
.hv-main { position: relative; padding: 0; overflow: hidden; display: flex; flex-direction: column; animation: floatIn 1s var(--ease) both .1s; z-index: 1; }
.hv-main .wallet-card { border-radius: 0; box-shadow: none; flex: none; }
.hv-float1 { right: -6px; top: 0; width: 200px; animation: floatIn 1s var(--ease) both .35s, float 6s ease-in-out infinite 1.4s; }
.hv-float2 { left: -8px; bottom: 0; width: 220px; animation: floatIn 1s var(--ease) both .55s, float 7s ease-in-out infinite 1.6s; }
@media (max-width: 520px) { .hv-float1 { width: 170px; right: -4px; top: 0; } .hv-float2 { left: -4px; width: 190px; } .hv-float1 small { display: none; } }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; pointer-events: none; z-index: -1; animation: float 12s ease-in-out infinite; }
.section { padding: 50px 0; }
@media (max-width: 640px) { .section { padding: 34px 0; } }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 30px; }
.section-head .eyebrow { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); margin-bottom: 10px; }
.section-head h2 { font-size: clamp(26px, 4vw, 38px); letter-spacing: -.035em; }
.section-head p { color: var(--muted); margin-top: 10px; font-size: 16px; }
.how-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: how; }
@media (max-width: 920px) { .how-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .how-grid { grid-template-columns: 1fr; } }
.how { position: relative; padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-sm); counter-increment: how; transition: transform .35s var(--ease), box-shadow .35s; }
.how:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.how::before { content: "0" counter(how); font-size: 13px; font-weight: 800; color: var(--primary); background: rgba(var(--primary-rgb), .1); padding: 5px 10px; border-radius: 20px; display: inline-block; margin-bottom: 14px; }
.how h3 { font-size: 17px; margin-bottom: 6px; }
.how p { color: var(--muted); font-size: 14px; }
.split-card { display: grid; grid-template-columns: 1fr 1fr; gap: 0; overflow: hidden; padding: 0; }
@media (max-width: 760px) { .split-card { grid-template-columns: 1fr; } }
.split-card > div { padding: 28px; }
.earn-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px dashed var(--line-2); font-weight: 600; }
.earn-row:last-child { border-bottom: 0; }
.earn-row b { font-size: 17px; }
.stats-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 760px) { .stats-band { grid-template-columns: repeat(2, 1fr); } }
.stats-band .sb { padding: 20px; border-radius: 20px; background: #fff; border: 1px solid var(--line); text-align: center; }
.stats-band .sb b { display: block; font-size: clamp(24px, 3.6vw, 34px); font-weight: 800; letter-spacing: -.03em; background: var(--grad-primary); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats-band .sb span { color: var(--muted); font-size: 13px; font-weight: 600; }
.faq { border: 1px solid var(--line); border-radius: 18px; background: #fff; overflow: hidden; margin-bottom: 10px; transition: box-shadow .3s; }
.faq[open] { box-shadow: var(--shadow); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 20px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .i { transition: transform .35s var(--ease); color: var(--muted); }
.faq[open] summary .i { transform: rotate(180deg); color: var(--primary); }
.faq .faq-a { padding: 0 20px 18px; color: var(--muted); line-height: 1.65; animation: fadeUp .35s var(--ease); }
.cta-band { position: relative; overflow: hidden; border-radius: 30px; padding: 46px 30px; text-align: center; color: #fff; background: var(--grad-primary); box-shadow: 0 30px 60px -30px rgba(var(--primary-rgb), .8); isolation: isolate; }
.cta-band h2 { color: #fff; font-size: clamp(24px, 4vw, 36px); letter-spacing: -.03em; }
.cta-band p { opacity: .9; margin: 10px 0 22px; }
.cta-band::before { content: ""; position: absolute; width: 500px; height: 500px; border-radius: 50%; right: -200px; top: -260px; background: radial-gradient(circle, rgba(255,255,255,.28), transparent 65%); z-index: -1; animation: float 10s ease-in-out infinite; }

/* Auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 920px) { .auth { grid-template-columns: 1fr; } .auth-side { display: none !important; } }
.auth-side { position: relative; overflow: hidden; background: var(--grad-primary); color: #fff; padding: 44px; display: flex; flex-direction: column; justify-content: space-between; isolation: isolate; }
.auth-side::before { content: ""; position: absolute; width: 600px; height: 600px; right: -250px; top: -250px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.25), transparent 65%); z-index: -1; animation: float 12s ease-in-out infinite; }
.auth-side::after { content: ""; position: absolute; width: 500px; height: 500px; left: -200px; bottom: -260px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--accent-rgb), .5), transparent 65%); z-index: -1; animation: float 14s ease-in-out infinite reverse; }
.auth-side h2 { color: #fff; font-size: clamp(28px, 3vw, 40px); letter-spacing: -.035em; line-height: 1.1; }
.auth-side p { opacity: .88; margin-top: 12px; font-size: 16px; max-width: 440px; }
.auth-points { display: flex; flex-direction: column; gap: 12px; margin-top: 30px; }
.auth-points div { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.auth-points .i { width: 34px; height: 34px; padding: 8px; border-radius: 11px; background: rgba(255,255,255,.18); }
.auth-main { display: flex; flex-direction: column; justify-content: center; padding: 30px 20px; min-height: 100vh; }
.auth-box { width: 100%; max-width: 420px; margin: 0 auto; }
.auth-box .brand { margin-bottom: 30px; }
.auth-box h1 { font-size: 28px; letter-spacing: -.035em; }
.auth-box > p.muted { margin: 6px 0 24px; }
.auth-foot { text-align: center; margin-top: 22px; color: var(--muted); font-size: 14px; }
.auth-foot a { font-weight: 700; }
.ref-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--success-bg); border: 1px solid #c4eedf; margin-bottom: 18px; }
.ref-card small { color: #0c8a64; font-weight: 600; }
.otp-input { letter-spacing: .5em; text-align: center; font-size: 22px !important; font-weight: 800 !important; }
.center-screen { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.state-card { text-align: center; max-width: 460px; background: #fff; border: 1px solid var(--line); border-radius: 28px; padding: 40px 28px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.state-card p { color: var(--muted); margin-bottom: 10px; }
.state-code { font-size: 64px; font-weight: 800; letter-spacing: -.05em; background: var(--grad-primary); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }
.state-icon { width: 76px; height: 76px; border-radius: 26px; display: grid; place-items: center; background: rgba(var(--primary-rgb), .1); color: var(--primary); }
.state-icon .i { width: 36px; height: 36px; }
.state-icon.ok { background: var(--success-bg); color: var(--success); animation: popBig .6s var(--ease-spring); }
.check-anim { width: 84px; height: 84px; border-radius: 50%; background: var(--success); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 10px var(--success-bg), 0 18px 36px -12px rgba(18,184,134,.7); animation: popBig .7s var(--ease-spring) both; }
.check-anim svg { width: 44px; height: 44px; stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .5s var(--ease) forwards .35s; }
.pay-box { max-width: 520px; margin: 0 auto; padding: 24px 16px 40px; }
.pay-amount { text-align: center; padding: 24px 18px; border-radius: 22px; background: var(--grad-primary); color: #fff; position: relative; overflow: hidden; }
.pay-amount b { display: block; font-size: 40px; letter-spacing: -.04em; font-weight: 800; }
.method { display: flex; align-items: center; gap: 12px; }
.method-logo { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; color: #fff; font-size: 13px; flex: none; }
.ml-bkash { background: #e2136e; } .ml-nagad { background: #f6921e; } .ml-manual { background: var(--ink); } .ml-rocket { background: #8c3494; }

/* Store (public storefront) */
.store-hero { position: relative; padding: 36px 0 26px; }
.store-card { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }

/* Prose (pages, training content) */
.prose { line-height: 1.75; color: var(--ink-2); font-size: 15.5px; overflow-wrap: anywhere; }
.prose h2 { margin: 24px 0 10px; font-size: 21px; } .prose h3 { margin: 20px 0 8px; }
.prose p { margin: 0 0 14px; } .prose ul, .prose ol { padding-left: 22px; margin: 0 0 14px; }
.prose img { border-radius: 14px; margin: 12px 0; } .prose a { text-decoration: underline; }
.video { position: relative; aspect-ratio: 16/9; border-radius: 18px; overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 14px; cursor: zoom-in; transition: transform .3s var(--ease); border: 1px solid var(--line); }
.gallery img:hover { transform: scale(1.03); }
.lightbox { position: fixed; inset: 0; z-index: 400; background: rgba(13,19,36,.9); display: grid; place-items: center; padding: 20px; animation: fadeIn .2s; cursor: zoom-out; }
.lightbox img { max-height: 90vh; border-radius: 16px; animation: popIn .35s var(--ease-spring); }
.feature-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.feature-list li { list-style: none; display: flex; gap: 10px; align-items: flex-start; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.feature-list li .i { color: var(--success); width: 18px; height: 18px; margin-top: 2px; }
ul.feature-list { padding: 0; margin: 0; }
.sticky-cta { position: sticky; bottom: calc(var(--tabbar-h) + 18px + var(--safe-b)); z-index: 20; }
@media (min-width: 1024px) { .sticky-cta { position: static; } .sticky-side { position: sticky; top: calc(var(--topbar-h) + 16px); } }
.calc-out { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.calc-out .co { padding: 16px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); }
.calc-out .co small { color: var(--muted); font-weight: 600; display: block; }
.calc-out .co b { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.calc-out .co.hl { background: linear-gradient(135deg, rgba(var(--accent-rgb), .12), rgba(var(--accent-rgb), .04)); border-color: rgba(var(--accent-rgb), .3); }
.calc-out .co.hl b { color: #0c8a64; }
input[type="range"] { width: 100%; accent-color: var(--primary); height: 28px; }
.msg-thread { display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 82%; padding: 12px 14px; border-radius: 18px; font-size: 14px; line-height: 1.55; background: var(--surface-3); align-self: flex-start; border-bottom-left-radius: 6px; animation: fadeUp .35s var(--ease); overflow-wrap: anywhere; }
.msg.me { align-self: flex-end; background: var(--grad-primary); color: #fff; border-bottom-left-radius: 18px; border-bottom-right-radius: 6px; }
.msg small { display: block; margin-top: 4px; opacity: .7; font-size: 11.5px; }
.msg a { color: inherit; text-decoration: underline; }
.notif-item { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); position: relative; color: inherit; transition: background .2s; }
.notif-item:hover { background: var(--surface-2); }
.notif-item.unread { background: rgba(var(--primary-rgb), .035); }
.notif-item.unread::after { content: ""; position: absolute; right: 16px; top: 20px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.notif-item .li-body b { white-space: normal; }
.notif-item .li-body small { white-space: normal; }

/* Settings layout (admin) */
.settings-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; align-items: start; }
.settings-nav { position: sticky; top: calc(var(--topbar-h) + 16px); display: flex; flex-direction: column; gap: 2px; }
.settings-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.settings-nav a:hover { background: var(--surface); }
.settings-nav a.active { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }
.settings-nav .i { width: 18px; height: 18px; color: var(--faint); }
.settings-nav a.active .i { color: var(--primary); }
@media (max-width: 900px) { .settings-layout { grid-template-columns: 1fr; } .settings-nav { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; gap: 6px; padding-bottom: 4px; } .settings-nav::-webkit-scrollbar { display: none; } .settings-nav a { white-space: nowrap; background: #fff; border: 1px solid var(--line); flex: none; } }
.settings-section-title { font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); margin: 22px 0 6px; padding-top: 16px; border-top: 1px solid var(--line); }
.form-grid > .settings-section-title:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.save-bar { position: sticky; bottom: 0; z-index: 20; display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 0 4px; margin-top: 10px; background: linear-gradient(180deg, transparent, var(--bg) 35%); }
@media (max-width: 1023px) { .save-bar { bottom: calc(var(--tabbar-h) + 10px + var(--safe-b)); } }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.perm-grid .check { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: 13.5px; font-weight: 600; }
.kanban { display: grid; grid-template-columns: repeat(5, minmax(240px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.kanban-col { background: var(--surface-3); border-radius: 18px; padding: 12px; min-height: 120px; }
.kanban-col h4 { font-size: 13px; display: flex; justify-content: space-between; padding: 2px 4px 10px; }
.kanban-card { display: block; background: #fff; border-radius: 14px; padding: 12px; margin-bottom: 8px; box-shadow: var(--shadow-xs); border: 1px solid var(--line); color: inherit; transition: transform .2s, box-shadow .2s; }
.kanban-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.health { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.health:last-child { border-bottom: 0; }
.health .hd { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.hd.ok { background: var(--success); box-shadow: 0 0 0 4px var(--success-bg); } .hd.warn { background: var(--warning); box-shadow: 0 0 0 4px var(--warning-bg); } .hd.bad { background: var(--danger); box-shadow: 0 0 0 4px var(--danger-bg); }
.health span { flex: 1; } .health small { color: var(--muted); }
.code-box { background: var(--ink); color: #c9d1ff; border-radius: 14px; padding: 14px 16px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; overflow-x: auto; white-space: pre; line-height: 1.6; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .6s var(--ease), transform .6s var(--ease); }
.pop-in { animation: popIn .45s var(--ease-spring) both; }
.spin-slow { animation: spin 6s linear infinite; }

/* =====================================================================
   Keyframes
   ===================================================================== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pageIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes slideUp { from { transform: translateY(110%); } to { transform: none; } }
@keyframes popIn { from { opacity: 0; transform: scale(.92) translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes popBig { 0% { transform: scale(.3); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
@keyframes popMenu { from { opacity: 0; transform: scale(.94) translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(0); } 70% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes flyIn { 0% { opacity: 0; transform: translateY(30px) scale(.94) rotate(-1deg); } 60% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes floatIn { from { opacity: 0; transform: translateY(40px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes sheen { 0% { transform: translateX(-120%); } 40%, 100% { transform: translateX(120%); } }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ripple { to { transform: scale(2.6); opacity: 0; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(-14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px) scale(.96); } }
@keyframes shrink { from { width: 100%; } to { width: 0; } }
@keyframes ring { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(14deg); } 40% { transform: rotate(-12deg); } 60% { transform: rotate(8deg); } 80% { transform: rotate(-4deg); } }
@keyframes growY { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes growX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes pulseDot { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 5px rgba(var(--primary-rgb), .15); } 50% { box-shadow: 0 0 0 9px rgba(var(--primary-rgb), .06); } }
@keyframes glowWarn { 0%, 100% { box-shadow: 0 0 0 0 rgba(245,159,0,.45); } 50% { box-shadow: 0 0 0 8px rgba(245,159,0,0); } }
@keyframes gradShift { 0%, 100% { background-position: 0 50%; } 50% { background-position: 100% 50%; } }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Motion settings */
.motion-reduced *, .motion-reduced *::before, .motion-reduced *::after { animation-duration: .01s !important; animation-iteration-count: 1 !important; }
.motion-reduced .reveal, .motion-reduced .fly-in { opacity: 1; transform: none; }
.motion-off *, .motion-off *::before, .motion-off *::after { animation: none !important; transition: none !important; }
.motion-off .reveal, .motion-off .fly-in { opacity: 1 !important; transform: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01s !important; animation-iteration-count: 1 !important; transition-duration: .01s !important; } .reveal, .fly-in { opacity: 1; transform: none; } }

@media print { .sidebar, .topbar, .tabbar, .no-print, #toasts, .pub-header, .pub-footer { display: none !important; } .main-col { margin: 0; } .content { padding: 0; } body { background: #fff; } .card { box-shadow: none; } }

/* small fixes */
.show-sm-flex { display: none !important; }
@media (max-width: 920px) { .show-sm-flex { display: flex !important; } }
.auth-foot .i, .inline-i .i, p .i { display: inline-block; vertical-align: -4px; width: 16px; height: 16px; }
.btn .i, .badge .i { display: block; vertical-align: initial; }
.sheet { visibility: hidden; transition: visibility 0s .45s; }
.sheet.open { visibility: visible; transition-delay: 0s; }
.stat-label { white-space: normal; line-height: 1.3; }
.copy-field .method-logo { flex: none; }
.grid-4 .step::before, .grid-3 .step::before { display: none; }
.grid-4 > .step, .grid-3 > .step { padding-bottom: 0; }

/* =====================================================================
   v2.1 — logo, refined auth, polish
   ===================================================================== */
.brand-logo { height: 38px; width: auto; max-width: 170px; object-fit: contain; border-radius: 0; flex: none; }
.brand-logo + .brand-text, .brand-logo + b { display: none; }
.sidebar > .brand { padding: 4px 10px 18px; }
.sidebar .brand-logo { height: 40px; }
.admin-sidebar .brand-logo + .brand-text { display: flex; margin-left: auto; }
.admin-sidebar .brand-logo + .brand-text b { display: none; }
.admin-sidebar .brand-logo + .brand-text small { background: var(--surface-3); color: var(--ink-2); padding: 3px 8px; border-radius: 8px; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.brand-mobile .brand-logo { height: 32px; width: auto; border-radius: 0; }
.pub-header .brand-logo { height: 40px; }
.pf-brand .brand-logo { height: 34px; }

/* Auth — clean split screen with photo */
@media (min-width: 921px) { .auth { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); } }
.auth { background: #fff; }
.auth-main { background: #fff; padding: 36px 24px; }
.auth-box { max-width: 400px; }
.auth-box > .auth-logo { display: inline-flex; margin-bottom: 34px; }
.auth-box > .auth-logo img { height: 46px; width: auto; }
.auth-box h1 { font-size: 30px; }
.auth-side { order: 2; padding: 0; margin: 14px; border-radius: 28px; background: #0d1324 center/cover no-repeat; justify-content: flex-end; min-height: calc(100vh - 28px); }
.auth-side::before { width: auto; height: auto; inset: 0; border-radius: 0; right: 0; top: 0; background: linear-gradient(180deg, rgba(13,19,36,.05) 30%, rgba(13,19,36,.88) 100%); animation: none; z-index: 0; }
.auth-side::after { display: none; }
.auth-side > * { position: relative; z-index: 1; }
.auth-side .as-body { padding: 40px; }
.auth-side h2 { font-size: clamp(26px, 2.6vw, 36px); }
.auth-side p { opacity: .85; }
.auth-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.auth-chips span { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 30px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(10px); font-size: 13px; font-weight: 700; }
.auth-chips .i { width: 16px; height: 16px; }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 12.5px; font-weight: 600; margin: 6px 0; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
@media (max-width: 920px) { .auth-main { padding: 28px 20px; justify-content: flex-start; padding-top: 8vh; } }

/* Calmer colours: fewer competing gradients */
.verify-bar { background: #fff; border: 1px solid var(--line); color: var(--ink); box-shadow: var(--shadow-sm); }
.verify-bar small { color: var(--muted); }
.verify-bar .vb-icon { background: rgba(var(--primary-rgb), .1); color: var(--primary); animation: none; }
.q-ic.c1, .q-ic.c2, .q-ic.c3, .q-ic.c4, .q-ic.c5, .q-ic.c6, .q-ic.c7, .q-ic.c8 { background: #fff; border-color: var(--line); }

/* Quick access strip under the wallet card */
.access-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 640px) { .access-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.access { display: flex; align-items: center; gap: 11px; padding: 12px 13px; border-radius: 16px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); color: var(--ink); min-width: 0; transition: transform .25s var(--ease), box-shadow .25s; position: relative; }
.access:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.access:active { transform: scale(.97); }
.access .ac-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; background: rgba(var(--primary-rgb), .09); color: var(--primary); }
.access .ac-ic .i { width: 19px; height: 19px; }
.access.tg .ac-ic { background: #e8f4fc; color: #229ed9; }
.access.ok .ac-ic { background: var(--success-bg); color: var(--success); }
.access.warn .ac-ic { background: var(--warning-bg); color: #c27c00; }
.access span.t { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.access b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.access small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.access.disabled { opacity: .6; }
.wc-locked { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 5px 10px; border-radius: 20px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.25); font-size: 12px; font-weight: 700; }
.wc-locked .i { width: 14px; height: 14px; }

/* Landing images */
.hero-photo { position: relative; border-radius: 28px; overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 4/3.4; background: var(--surface-3); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo .hv-card { z-index: 2; }
.showcase { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .showcase { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.showcase figure { margin: 0; border-radius: 20px; overflow: hidden; position: relative; aspect-ratio: 4/5; background: var(--surface-3); box-shadow: var(--shadow-sm); }
.showcase img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.showcase figure:hover img { transform: scale(1.06); }
.showcase figcaption { position: absolute; left: 10px; right: 10px; bottom: 10px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); font-weight: 700; font-size: 13px; color: var(--ink); }

/* =====================================================================
   Order chat (Telegram-style)
   ===================================================================== */
.chat { display: flex; flex-direction: column; height: min(68vh, 640px); min-height: 420px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: #eef1f7 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='%235b5bf6' fill-opacity='.035'%3E%3Ccircle cx='10' cy='10' r='3'/%3E%3Ccircle cx='70' cy='40' r='2'/%3E%3Ccircle cx='40' cy='90' r='2.5'/%3E%3Ccircle cx='100' cy='100' r='2'/%3E%3C/g%3E%3C/svg%3E"); }
.chat-scroll { flex: 1; overflow-y: auto; padding: 16px 12px; overscroll-behavior: contain; scroll-behavior: smooth; }
.chat-list { display: flex; flex-direction: column; gap: 4px; }
.chat-loading, .chat-empty { margin: auto; text-align: center; color: var(--muted); font-size: 13.5px; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 10px; }
.chat-empty .i { width: 40px; height: 40px; color: var(--primary); opacity: .5; }
.chat-day { align-self: center; margin: 10px 0 6px; padding: 4px 12px; border-radius: 20px; background: rgba(13,19,36,.35); color: #fff; font-size: 11.5px; font-weight: 700; backdrop-filter: blur(6px); }
.bubble { position: relative; max-width: min(78%, 520px); padding: 8px 11px 6px; border-radius: 16px; background: #fff; box-shadow: 0 1px 1px rgba(16,24,40,.08); align-self: flex-start; border-bottom-left-radius: 5px; font-size: 14.5px; line-height: 1.45; overflow-wrap: anywhere; animation: bubbleIn .28s var(--ease-spring); }
.bubble.me { align-self: flex-end; background: #e3e3ff; border-bottom-left-radius: 16px; border-bottom-right-radius: 5px; }
.bubble.admin-me { background: #dcf5ea; }
.bubble .b-name { display: block; font-size: 12px; font-weight: 800; color: var(--primary); margin-bottom: 2px; }
.bubble .b-text { white-space: pre-wrap; }
.bubble .b-text a { color: var(--primary); text-decoration: underline; }
.bubble .b-meta { display: flex; justify-content: flex-end; align-items: center; gap: 3px; margin-top: 2px; font-size: 11px; color: var(--faint); font-weight: 600; float: right; margin-left: 10px; position: relative; top: 4px; }
.bubble .b-meta .i { width: 15px; height: 15px; }
.bubble .b-meta .read { color: #4f8ef7; }
.bubble.sending { opacity: .65; }
.bubble.failed { box-shadow: 0 0 0 1.5px var(--danger); }
.bubble img.b-img { display: block; max-width: 100%; max-height: 320px; border-radius: 12px; margin: -2px -5px 6px; cursor: zoom-in; min-width: 120px; background: var(--surface-3); }
.bubble video { display: block; max-width: 100%; max-height: 320px; border-radius: 12px; margin: -2px -5px 6px; background: #000; }
.bubble audio { display: block; width: 240px; max-width: 100%; height: 40px; margin: 2px 0 4px; }
.b-file { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 4px; color: var(--ink); min-width: 0; }
.b-file .fi { width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; flex: none; }
.b-file .fi .i { width: 19px; height: 19px; }
.b-file span { display: flex; flex-direction: column; min-width: 0; }
.b-file b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.b-file small { color: var(--muted); font-size: 11.5px; }
.b-progress { height: 3px; border-radius: 3px; background: rgba(var(--primary-rgb), .2); margin-top: 4px; overflow: hidden; }
.b-progress span { display: block; height: 100%; background: var(--primary); width: 0; transition: width .2s; }
.chat-quick { padding: 8px 10px 2px; margin: 0; background: rgba(255,255,255,.7); }
.chat-quick .chip { height: 32px; font-size: 12.5px; }
.chat-composer { display: flex; align-items: flex-end; gap: 6px; padding: 8px; background: #fff; border-top: 1px solid var(--line); }
.chat-input { flex: 1; min-width: 0; background: var(--surface-2); border: 1.5px solid var(--line); border-radius: 22px; padding: 2px 4px 2px 14px; transition: border-color .2s; }
.chat-input:focus-within { border-color: rgba(var(--primary-rgb), .5); background: #fff; }
.chat-input textarea { width: 100%; border: 0; outline: 0; resize: none; background: transparent; font-size: 15px; line-height: 1.4; padding: 9px 0; max-height: 140px; display: block; }
.chat-attach { display: flex; align-items: center; gap: 8px; padding: 8px 8px 0 0; font-size: 13px; font-weight: 600; }
.chat-attach img { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; }
.chat-attach button { margin-left: auto; color: var(--muted); }
.chat-btn, .chat-send { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; color: var(--muted); cursor: pointer; transition: background .2s, transform .2s var(--ease-spring), color .2s; }
.chat-btn:hover { background: var(--surface-3); color: var(--ink); }
.chat-send { background: var(--primary); color: #fff; box-shadow: var(--shadow-primary); }
.chat-send:active, .chat-btn:active { transform: scale(.9); }
.chat-send .i { width: 19px; height: 19px; margin-left: -2px; }
.chat-mic.rec { background: var(--danger); color: #fff; animation: pulseDot 1s infinite; }
.chat-rec { display: flex; align-items: center; gap: 8px; color: var(--danger); font-weight: 700; font-size: 14px; padding: 10px 0; }
.chat-rec i { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: pulseDot 1s infinite; }
@keyframes bubbleIn { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) { .chat { height: calc(100vh - 230px); min-height: 380px; border-radius: 16px; } .bubble { max-width: 86%; } }

/* Order room */
.order-hero { position: relative; overflow: hidden; padding: 22px; border-radius: calc(var(--r) + 4px); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.order-hero .oh-top { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; align-items: flex-start; }
.order-hero h1 { font-size: clamp(22px, 3vw, 28px); overflow-wrap: anywhere; }
.order-hero .oh-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.order-hero .oh-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.oh-progress { margin-top: 18px; }
.oh-progress .row-between { font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.task-list { display: flex; flex-direction: column; }
.task { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.task:last-child { border-bottom: 0; }
.task .tk { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; flex: none; color: #fff; }
.task.done .tk { background: var(--success); border-color: var(--success); }
.task.done .tk .i { width: 15px; height: 15px; }
.task.done b { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.task b { font-size: 14px; font-weight: 600; flex: 1; }
.task small { color: var(--faint); font-size: 12px; }
.pay-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 18px; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow-sm); }
.pay-card.paid { background: var(--surface-2); }
.pay-card .pc-amount { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.pay-locked { text-align: center; padding: 26px 16px; border-radius: 18px; border: 1.5px dashed var(--line-2); background: var(--surface-2); }
.pay-locked .i { width: 34px; height: 34px; color: var(--faint); margin: 0 auto 8px; }
.unread-pill { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 12px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; font-style: normal; }

/* v2.1 — order room extras */
.chip-static { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 20px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--muted); max-width: 100%; }
.chip-static .i { width: 14px; height: 14px; flex: none; }
.success-burst { width: 72px; height: 72px; margin: 6px auto 0; border-radius: 50%; display: grid; place-items: center; background: var(--success); color: #fff; box-shadow: 0 0 0 10px rgba(18,183,106,.14), 0 0 0 22px rgba(18,183,106,.07); animation: burstIn .6s var(--ease-spring); }
.success-burst .i { width: 34px; height: 34px; }
@keyframes burstIn { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
.plan-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.plan-opt { position: relative; cursor: pointer; }
.plan-opt input { position: absolute; opacity: 0; pointer-events: none; }
.plan-opt > span { display: flex; flex-direction: column; gap: 3px; height: 100%; padding: 14px; border-radius: 16px; border: 1.5px solid var(--line); background: #fff; transition: border-color .2s, box-shadow .2s, transform .2s var(--ease-spring); }
.plan-opt > span b { font-size: 15px; }
.plan-opt > span small { color: var(--muted); font-size: 12.5px; }
.plan-opt > span em { align-self: flex-start; margin-top: 4px; font-style: normal; font-size: 11.5px; font-weight: 800; color: var(--success); background: var(--success-bg, #e7f8ef); padding: 2px 8px; border-radius: 12px; }
.plan-opt input:checked + span { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .14); }
.plan-opt:active > span { transform: scale(.98); }
.order-row-actions { display: flex; gap: 6px; align-items: center; }
button.access { text-align: left; font: inherit; cursor: pointer; width: 100%; }
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.topic { width: 100%; display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); font: inherit; font-size: 14px; font-weight: 600; text-align: left; color: var(--ink); cursor: pointer; transition: background .2s, transform .2s var(--ease-spring), border-color .2s; }
.topic:hover { background: #fff; border-color: rgba(var(--primary-rgb), .35); }
.topic:active { transform: scale(.98); }
.topic > span:nth-child(2) { flex: 1; min-width: 0; }
.topic > .i { color: var(--faint); width: 16px; height: 16px; }
.topic .ac-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: rgba(var(--primary-rgb), .09); color: var(--primary); }
.topic .ac-ic .i { width: 17px; height: 17px; }
.topic.hl { background: rgba(var(--primary-rgb), .06); border-color: rgba(var(--primary-rgb), .3); }
.verify-cta { text-align: center; align-items: stretch; padding: 28px 22px; }
.verify-cta h2 { font-size: 22px; margin-bottom: 6px; }
.verify-cta .vc-icon { width: 76px; height: 76px; margin: 0 auto; border-radius: 24px; display: grid; place-items: center; background: var(--primary); color: #fff; box-shadow: var(--shadow-primary); animation: floatY 4s ease-in-out infinite; }
.verify-cta .vc-icon .i { width: 38px; height: 38px; }
.verify-wait { text-align: center; }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.task form { display: contents; }
.task button.tk { background: transparent; padding: 0; }
.task.done button.tk { background: var(--success); }
.chat-inbox { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 16px; align-items: start; }
.chat-inbox .ci-chat { position: sticky; top: 84px; }
.chat-inbox .list-item.is-active { background: rgba(var(--primary-rgb), .07); border-radius: 12px; }
.chat-inbox .li-end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
@media (min-width: 901px) { .hide-lg { display: none !important; } }
@media (max-width: 900px) { .chat-inbox { grid-template-columns: minmax(0, 1fr); } .chat-inbox.has-current .ci-list { display: none; } .chat-inbox .ci-chat { position: static; } }
.tg-setup { padding: 10px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.chip-static { min-width: 0; overflow: hidden; white-space: nowrap; }
.li-body b .i, .li-body small .i { display: inline-block; vertical-align: -3px; width: 15px; height: 15px; }
.ci-chat .card-head { flex-wrap: nowrap; align-items: flex-start; }
.ci-chat .card-head .row-gap { flex-wrap: nowrap; flex: none; }
@media (max-width: 640px) { .chat { height: calc(100dvh - 250px); } .ci-chat .card { padding: 14px; } }

/* v2.2 — profile header fix */
.profile-head { position: relative; z-index: 1; padding: 0 20px 18px; margin-top: -46px; align-items: flex-start; flex-wrap: wrap; gap: 12px; }
.profile-head .ph-name { min-width: 0; padding-top: 54px; }
.profile-head .ph-badges { padding-top: 58px; }
@media (max-width: 640px) { .profile-head .ph-badges { padding-top: 0; width: 100%; } }
.profile-head .avatar { box-shadow: 0 0 0 5px #fff, var(--shadow-sm); }
.profile-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.profile-stats > div { min-width: 0; }
@media (max-width: 640px) { .profile-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* v2.2 — display font only on a few hero headings + premium auth button */
.auth-box h1, .hero h1, .wc-amount, .pc-amount, .idc-name { font-family: var(--font-display); letter-spacing: -.02em; }
.auth-box .btn-primary.btn-lg { height: 54px; border-radius: 16px; font-size: 16px; letter-spacing: .01em; background: linear-gradient(135deg, #5b5bf6 0%, #7c4dff 55%, #9b5cff 100%); box-shadow: 0 12px 28px -12px rgba(91,91,246,.75), inset 0 1px 0 rgba(255,255,255,.25); }
.auth-box .btn-primary.btn-lg:hover { filter: brightness(1.06); transform: translateY(-1px); }
.auth-box .btn-primary.btn-lg:active { transform: translateY(1px) scale(.99); }
.auth-box .field label { font-size: 13.5px; }
/* v2.2 — renewal / expiry / private notes */
.exp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.exp-cell { padding: 10px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.exp-cell small { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.exp-cell b { font-size: 13.5px; line-height: 1.25; }
.exp-cell em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--muted); }
.exp-cell.ok { background: #ecfdf3; border-color: #c6f1d8; } .exp-cell.ok em { color: #039855; }
.exp-cell.warn { background: #fffaeb; border-color: #fde7a8; } .exp-cell.warn em { color: #b54708; }
.exp-cell.bad { background: #fef3f2; border-color: #fdd3cf; } .exp-cell.bad em { color: #d92d20; }
@media (max-width: 420px) { .exp-grid { grid-template-columns: 1fr 1fr; } }
.secret-list { display: flex; flex-direction: column; gap: 8px; }
.secret-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; align-items: center; padding: 8px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.secret-row > input[name="s_label[]"] { grid-column: 1 / -1; font-weight: 700; background: transparent; border-color: transparent; padding-left: 4px; height: 30px; }
.secret-row > input[name="s_label[]"]:focus { background: #fff; border-color: var(--line-2); }
.secret-row .secret-val { position: relative; }
.secret-row .secret-val .input { padding-right: 38px; padding-left: 12px; }
.secret-flag { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; color: var(--faint); }
.secret-flag input { position: absolute; opacity: 0; pointer-events: none; }
.secret-flag:has(input:checked) { background: rgba(var(--primary-rgb), .1); color: var(--primary); border-color: rgba(var(--primary-rgb), .3); }
.secret-flag .i { width: 16px; height: 16px; }
.alert-row { display: flex; align-items: center; gap: 10px; }
.alert-row .ac-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--primary); }
.alert-row .ac-ic .i { width: 17px; height: 17px; }
.alert-row .ar-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.alert-row .ar-body b { font-size: 13px; }
/* v2.2 — product page ordering */
.order-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; background: linear-gradient(135deg, rgba(var(--primary-rgb), .07), rgba(var(--accent-rgb), .06)); border-color: rgba(var(--primary-rgb), .18); }
.order-top .ot-price { display: flex; flex-direction: column; min-width: 0; }
.order-top .ot-price small { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.order-top .ot-price b { font-family: var(--font-display); font-size: 30px; line-height: 1.1; letter-spacing: -.02em; }
.order-top .ot-price span { font-size: 13px; color: var(--muted); font-weight: 600; }
.order-top .ot-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 640px) { .order-top .ot-actions { width: 100%; } .order-top .ot-actions .btn-primary { flex: 1; } }
.renew-list { display: flex; flex-direction: column; gap: 10px; }
.rl-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.rl-item .ac-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; background: rgba(var(--primary-rgb), .09); color: var(--primary); }
.rl-item .ac-ic .i { width: 18px; height: 18px; }
.rl-item b { display: block; font-size: 14px; }
.rl-item small { color: var(--muted); font-size: 13px; }
.rl-item.free { background: #ecfdf3; border-color: #c6f1d8; } .rl-item.free .ac-ic { background: #d1fadf; color: #039855; }
.sticky-order { position: fixed; left: 12px; right: 12px; bottom: calc(88px + env(safe-area-inset-bottom)); z-index: 60; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; border-radius: 18px; background: rgba(255,255,255,.96); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); box-shadow: 0 18px 40px -16px rgba(16,24,40,.35); animation: slideUp .35s var(--ease-spring); }
.sticky-order[hidden] { display: none; }
.sticky-order .so-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sticky-order .so-text b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky-order .so-text small { font-size: 12px; color: var(--muted); font-weight: 600; }
@media (min-width: 1024px) { .sticky-order { left: auto; right: 28px; bottom: 24px; max-width: 420px; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.free-note { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 13px; background: #ecfdf3; border: 1px solid #c6f1d8; color: #039855; min-height: 44px; }
.free-note span { display: flex; flex-direction: column; } .free-note b { color: #05603a; font-size: 14px; } .free-note small { color: #039855; font-size: 12px; }
/* v2.2 — payment hero on the order page */
.pay-hero { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 22px; background: linear-gradient(160deg, #ffffff 0%, #f4f3ff 100%); border: 1.5px solid rgba(var(--primary-rgb), .28); box-shadow: 0 18px 40px -22px rgba(var(--primary-rgb), .55); overflow: hidden; }
.pay-hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--primary-rgb), .12), transparent 70%); pointer-events: none; }
.pay-hero.over { border-color: rgba(217,45,32,.35); background: linear-gradient(160deg, #fff 0%, #fff5f4 100%); box-shadow: 0 18px 40px -22px rgba(217,45,32,.45); }
.pay-hero .ph-top { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.pay-hero .ph-top > div { flex: 1; min-width: 180px; }
.pay-hero .ph-top b { display: block; font-size: 16px; }
.pay-hero .ph-top small { color: var(--muted); font-size: 13px; }
.pay-hero .ph-ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: none; background: var(--primary); color: #fff; }
.pay-hero.over .ph-ic { background: #d92d20; }
.pay-hero .ph-status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 20px; background: #fffaeb; color: #b54708; font-size: 12px; font-weight: 800; }
.pay-hero .ph-status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulseDot 1.4s ease-in-out infinite; }
.pay-hero.over .ph-status { background: #fef3f2; color: #d92d20; }
.pay-hero .ph-amount b { font-family: var(--font-display); font-size: clamp(30px, 6vw, 40px); letter-spacing: -.02em; line-height: 1; }
.pay-hero .ph-amount span { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; font-weight: 600; }
.pay-hero .ph-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 640px) { .pay-hero .ph-actions .btn-lg { flex: 1 1 100%; } .pay-hero .ph-actions .btn:not(.btn-lg) { flex: 1; } }
@keyframes pulseDot { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.tx-details { font-size: 13px; }
/* v2.2 — live updates */
.live-pill { position: fixed; left: 50%; top: calc(74px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 90; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 30px; border: 0; background: var(--ink); color: #fff; font: inherit; font-size: 13.5px; font-weight: 700; box-shadow: 0 14px 30px -12px rgba(16,24,40,.5); cursor: pointer; animation: pillIn .35s var(--ease-spring); }
.live-pill .i { width: 16px; height: 16px; }
@keyframes pillIn { from { opacity: 0; transform: translate(-50%, -12px); } to { opacity: 1; transform: translate(-50%, 0); } }
#app-main.live-swap > * { animation: liveFade .35s ease; }
@keyframes liveFade { from { opacity: .55; } to { opacity: 1; } }
.live-popup .lp-ic { width: 64px; height: 64px; margin: 4px auto 0; border-radius: 20px; display: grid; place-items: center; background: rgba(var(--primary-rgb), .1); color: var(--primary); }
.live-popup .lp-ic .i { width: 30px; height: 30px; }
.live-popup .lp-ic.tone-success { background: #ecfdf3; color: #039855; } .live-popup .lp-ic.tone-warning { background: #fffaeb; color: #b54708; } .live-popup .lp-ic.tone-danger { background: #fef3f2; color: #d92d20; }
.flash-up { animation: flashUp 1.2s ease; }
@keyframes flashUp { 0% { color: #12b76a; transform: scale(1.04); } 100% { transform: none; } }
/* v2.2 — chat polish */
.bubble { position: relative; }
.bubble .b-act { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--muted); display: grid; place-items: center; opacity: 0; transition: opacity .15s; cursor: pointer; box-shadow: var(--shadow-xs); }
.bubble .b-act .i { width: 15px; height: 15px; }
.bubble:not(.me) .b-act { right: -38px; } .bubble.me .b-act { left: -38px; }
.bubble:hover .b-act { opacity: 1; }
@media (hover: none) { .bubble .b-act { opacity: .55; } }
.b-quote { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; text-align: left; margin-bottom: 6px; padding: 6px 10px; border: 0; border-left: 3px solid var(--primary); border-radius: 8px; background: rgba(var(--primary-rgb), .07); font: inherit; cursor: pointer; }
.bubble.me .b-quote { background: rgba(var(--primary-rgb), .1); }
.b-quote b { font-size: 12px; color: var(--primary); }
.b-quote span { font-size: 12.5px; opacity: .85; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bubble.flash { animation: bubbleFlash 1.2s ease; }
@keyframes bubbleFlash { 0%, 100% { box-shadow: none; } 30% { box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .3); } }
.bubble.failed { opacity: .85; cursor: pointer; } .bubble.failed .b-meta { color: #d92d20; font-weight: 700; }
.bubble.sending .b-meta { opacity: .6; }
.b-voice { display: flex; align-items: center; gap: 8px; min-width: 220px; }
.b-voice > .i { width: 18px; height: 18px; flex: none; opacity: .8; }
.b-voice audio { width: 100%; min-width: 0; height: 38px; }
.bubble.is-voice { min-width: min(280px, 78%); }
.b-file.up small em { font-style: normal; font-weight: 800; }
.chat-replybar { display: flex; align-items: center; gap: 10px; margin: 0 10px; padding: 8px 10px; border-radius: 12px 12px 0 0; background: rgba(var(--primary-rgb), .07); border-left: 3px solid var(--primary); font-size: 13px; }
.chat-replybar > .i { color: var(--primary); width: 18px; height: 18px; flex: none; }
.chat-replybar div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chat-replybar b { font-size: 12.5px; color: var(--primary); } .chat-replybar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.chat-replybar button { border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; padding: 4px; }
.chat-typing { display: inline-flex; align-items: center; gap: 4px; margin: 4px 14px 10px; padding: 8px 12px; border-radius: 16px; background: #fff; box-shadow: var(--shadow-xs); font-size: 12px; color: var(--muted); }
.chat-typing[hidden] { display: none; }
.chat-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); animation: typingDot 1.2s infinite ease-in-out; }
.chat-typing i:nth-child(2) { animation-delay: .15s; } .chat-typing i:nth-child(3) { animation-delay: .3s; }
.chat-typing span { margin-left: 6px; }
@keyframes typingDot { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.chat-rec { display: flex; align-items: center; gap: 8px; flex: 1; font-weight: 700; color: #d92d20; }
.chat-rec small { font-weight: 600; color: var(--muted); font-size: 12px; }
.chat-rec i { width: 10px; height: 10px; border-radius: 50%; background: #d92d20; animation: pulseDot 1s infinite; }
.rec-cancel { border: 0; background: #fef3f2; color: #d92d20; border-radius: 10px; width: 32px; height: 32px; display: grid; place-items: center; cursor: pointer; flex: none; }
.rec-cancel .i { width: 16px; height: 16px; }
.chat.recording .chat-mic { background: #12b76a; color: #fff; }
.chat.recording textarea { display: none; }
.chat.drop { outline: 2px dashed rgba(var(--primary-rgb), .5); outline-offset: -6px; }
.id-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.id-grid > div { padding: 10px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.id-grid small { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.id-grid b { font-size: 14px; overflow-wrap: anywhere; }
.id-grid em { font-style: normal; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }

/* ================================================================ v2.3 — Messenger-style full-screen chat */
.chat-screen { display: flex; flex-direction: column; height: calc(100dvh - 120px); min-height: 480px; border-radius: 22px; overflow: hidden; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); animation: csIn .35s var(--ease-spring); }
@keyframes csIn { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.cs-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: rgba(255,255,255,.96); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); z-index: 2; }
.cs-back { flex: none; }
.cs-avatar { position: relative; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff; background: linear-gradient(135deg, #5b5bf6, #9b5cff); box-shadow: 0 6px 16px -8px rgba(91,91,246,.8); }
.cs-avatar.live { background: linear-gradient(135deg, #12b76a, #0ba5ec); }
.cs-avatar.order { background: linear-gradient(135deg, #f79009, #f04438); }
.cs-avatar .i { width: 21px; height: 21px; }
.cs-online { position: absolute; right: 0; bottom: 1px; width: 11px; height: 11px; border-radius: 50%; background: #12b76a; box-shadow: 0 0 0 2px #fff; }
.cs-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cs-title b { font-size: 15.5px; line-height: 1.2; }
.cs-title small { font-size: 12px; color: var(--muted); font-weight: 600; }
.cs-actions { display: flex; align-items: center; gap: 4px; flex: none; }
.cs-live { border-radius: 20px; }
@media (max-width: 520px) { .cs-live span { display: none; } .cs-live { width: 38px; padding: 0; justify-content: center; } }
.chat.chat-full { flex: 1; height: auto; min-height: 0; border: 0; border-radius: 0; }
.chat.chat-full .chat-scroll { padding: 14px 12px 8px; }
.chat .chat-loading .dots { display: inline-flex; gap: 4px; }
.chat .chat-loading .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); animation: typingDot 1.1s infinite ease-in-out; }
.chat .chat-loading .dots i:nth-child(2) { animation-delay: .15s; } .chat .chat-loading .dots i:nth-child(3) { animation-delay: .3s; }
/* composer: send replaces mic when there is text (Messenger style) */
.chat-composer { padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); gap: 4px; align-items: flex-end; }
.chat-btn { width: 40px; height: 40px; color: var(--primary); }
.chat-btn .i { width: 21px; height: 21px; }
.chat .chat-send { width: 42px; height: 42px; transform: scale(0); width: 0; margin-left: -4px; overflow: hidden; transition: transform .25s var(--ease-spring), width .2s; }
.chat.has-text .chat-send, .chat.recording .chat-send { transform: scale(1); width: 42px; margin-left: 0; }
.chat.has-text .chat-mic, .chat.has-text .chat-cam { display: none; }
.chat.recording .chat-send { display: none; }
.chat-input { border-radius: 22px; }
/* bubbles */
.bubble { box-shadow: 0 1px 1.5px rgba(16,24,40,.1); }
.bubble.me { background: linear-gradient(135deg, #5b5bf6, #7c4dff); color: #fff; }
.bubble.me .b-meta { color: rgba(255,255,255,.75); }
.bubble.me .b-meta .read { color: #b9f6ca; }
.bubble.me .b-text a { color: #fff; }
.bubble.me .b-quote { background: rgba(255,255,255,.18); border-left-color: rgba(255,255,255,.8); }
.bubble.me .b-quote b { color: #fff; }
.bubble.me .b-file { background: rgba(255,255,255,.16); color: #fff; }
.bubble.me .b-file small { color: rgba(255,255,255,.8); }
.bubble.admin-me { background: linear-gradient(135deg, #12b76a, #0e9f6e); }
.bubble.is-bot { background: #fff; border: 1px solid rgba(var(--primary-rgb), .18); }
.bubble.is-bot .b-name { display: flex; align-items: center; gap: 4px; }
.bubble.is-bot .b-name .i { width: 14px; height: 14px; }
.b-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px; clear: both; }
.b-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 18px; border: 1.5px solid rgba(var(--primary-rgb), .35); background: rgba(var(--primary-rgb), .06); color: var(--primary); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; text-decoration: none; transition: transform .15s var(--ease-spring), background .2s; }
.b-btn:hover { background: rgba(var(--primary-rgb), .12); }
.b-btn:active { transform: scale(.95); }
.b-btn.live { border-color: rgba(18,183,106,.45); background: #ecfdf3; color: #039855; }
.b-btn[disabled] { opacity: .5; pointer-events: none; }
@media (max-width: 900px) {
  body.chat-mode .tabbar, body.chat-mode .topbar { display: none; }
  body.chat-mode .content { padding: 0 !important; }
  .chat-screen { position: fixed; inset: 0; height: auto; min-height: 0; border-radius: 0; border: 0; z-index: 80; }
}
/* support hub */
.support-hero { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 22px; color: inherit; background: linear-gradient(135deg, rgba(var(--primary-rgb), .1), rgba(155,92,255,.08)); border: 1px solid rgba(var(--primary-rgb), .2); transition: transform .2s var(--ease-spring), box-shadow .2s; }
.support-hero:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.support-hero .sh-avatar { position: relative; width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #5b5bf6, #9b5cff); flex: none; }
.support-hero .sh-avatar .i { width: 26px; height: 26px; }
.support-hero .sh-avatar i { position: absolute; right: -2px; bottom: -2px; width: 14px; height: 14px; border-radius: 50%; background: #12b76a; box-shadow: 0 0 0 3px #fff; }
.support-hero .sh-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.support-hero .sh-body b { font-size: 16px; } .support-hero .sh-body small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 520px) { .support-hero .btn { display: none; } }
.support-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.sc-card { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 18px; background: #fff; border: 1px solid var(--line); color: inherit; transition: transform .2s var(--ease-spring), border-color .2s; }
.sc-card:hover { transform: translateY(-2px); border-color: rgba(var(--primary-rgb), .35); }
.sc-card b { font-size: 14.5px; } .sc-card small { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.sc-ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; color: #fff; margin-bottom: 6px; }
.sc-ic .i { width: 20px; height: 20px; }
.sc-ic.bot { background: linear-gradient(135deg, #5b5bf6, #9b5cff); } .sc-ic.live { background: linear-gradient(135deg, #12b76a, #0ba5ec); }
.admin-chat { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.admin-chat-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 84px; }
@media (max-width: 1100px) { .admin-chat { grid-template-columns: minmax(0, 1fr); } .admin-chat-side { display: none; } }
.inbox-list { padding: 0 10px 10px; }
.inbox-list .list-item { padding: 12px 10px; border-radius: 14px; }
.inbox-list .list-item.is-unread { background: rgba(var(--primary-rgb), .05); }
.inbox-list .list-item.is-unread b { color: var(--ink); }
.inbox-list .li-end { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.inbox-tag { display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 10px; font-size: 11px; font-weight: 800; vertical-align: 1px; background: var(--surface-3); color: var(--muted); }
.inbox-tag.order { background: #fff4e5; color: #b54708; } .inbox-tag.ticket { background: #eef4ff; color: #3538cd; }

/* ===== v2.3 verification by code ===== */
.btn-tg { background: linear-gradient(135deg, #2AABEE, #229ED9); color: #fff; box-shadow: 0 10px 24px -10px rgba(34,158,217,.7); }
.btn-tg:hover { filter: brightness(1.05); color: #fff; }
.btn-link { background: none; border: 0; padding: 4px 6px; cursor: pointer; font: inherit; font-size: 13.5px; color: var(--primary); display: inline-flex; align-items: center; gap: 6px; }
.btn-link.muted { color: var(--text-3, #8a8fa3); }
.btn-link .i { width: 15px; height: 15px; }
.check-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2, #5b6075); }
.vrf-card { display: flex; flex-direction: column; gap: 14px; overflow: hidden; }
.vrf-top { display: flex; align-items: center; gap: 14px; }
.vrf-badge { width: 54px; height: 54px; flex: none; border-radius: 18px; display: grid; place-items: center; background: var(--primary); color: #fff; box-shadow: var(--shadow-primary); animation: floatY 4s ease-in-out infinite; }
.vrf-badge .i { width: 28px; height: 28px; }
.vrf-id { display: inline-flex; align-items: center; gap: 8px; margin-top: 2px; border: 1.5px dashed var(--primary); background: color-mix(in srgb, var(--primary) 7%, transparent); color: var(--primary); border-radius: 12px; padding: 6px 12px; font: 800 20px/1.1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .06em; cursor: pointer; }
.vrf-id .i { width: 16px; height: 16px; }
.vrf-steps { margin: 0; }
.vrf-code-form { display: flex; flex-direction: column; gap: 6px; }
.vrf-code-form .field-label { font-size: 13px; font-weight: 700; }
.vrf-code-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.vrf-code-row .input { min-width: 0; width: 100%; }
.vrf-admin { display: grid; gap: 10px; padding: 12px; margin: -4px -4px 12px; border-radius: 14px; background: color-mix(in srgb, var(--primary) 6%, transparent); border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent); }
.vrf-admin b.mono { font-size: 18px; display: block; }
.vrf-admin > div { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.vrf-admin form { flex-wrap: wrap; align-items: center; }
.pulse-ring { animation: pulseRing 1.6s ease-out infinite; }
@keyframes pulseRing { 0% { box-shadow: 0 0 0 0 rgba(34,158,217,.55); } 80%, 100% { box-shadow: 0 0 0 16px rgba(34,158,217,0); } }
.bubble .b-name { display: flex; align-items: center; gap: 4px; margin-bottom: 3px; }

/* ===== v2.3 billing: countdown bar, pay ahead, schedule, lock ===== */
.due-bar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 12px; border-radius: 18px; background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 10%, var(--surface)), var(--surface)); border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent); box-shadow: var(--shadow-sm, 0 4px 14px rgba(20,20,60,.06)); position: sticky; top: calc(var(--topbar-h, 60px) + 6px); z-index: 20; }
.due-bar .db-ic { width: 40px; height: 40px; flex: none; border-radius: 13px; display: grid; place-items: center; background: var(--primary); color: #fff; }
.due-bar .db-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.due-bar .db-body small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-timer { font: 800 20px/1.1 'Outfit', var(--font, system-ui), sans-serif; letter-spacing: .01em; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 2px; }
.db-timer i { font-style: normal; font-size: 11px; font-weight: 700; color: var(--muted); margin-right: 4px; }
.db-timer span { display: inline-block; min-width: 1.25em; text-align: center; }
.db-timer span.flip { animation: tFlip .35s ease; }
@keyframes tFlip { 0% { transform: translateY(-40%); opacity: .2; } 100% { transform: none; opacity: 1; } }
.due-bar.over { background: linear-gradient(135deg, color-mix(in srgb, var(--danger) 12%, var(--surface)), var(--surface)); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.due-bar.over .db-ic { background: var(--danger); animation: shakeX 2.4s ease-in-out infinite; }
.due-bar.over .db-timer { color: var(--danger); }
.due-bar.over .db-timer::before { content: '−'; margin-right: 2px; }
@keyframes shakeX { 0%, 88%, 100% { transform: none; } 92% { transform: rotate(-10deg); } 96% { transform: rotate(10deg); } }
.ahead-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.ahead-opt { cursor: pointer; }
.ahead-opt input { position: absolute; opacity: 0; pointer-events: none; }
.ahead-opt span { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--surface); transition: transform .15s, border-color .15s, background .15s; }
.ahead-opt span b { font-size: 16px; }
.ahead-opt span small { font-size: 12px; color: var(--muted); }
.ahead-opt input:checked + span { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 9%, var(--surface)); transform: translateY(-2px); box-shadow: 0 8px 18px -10px var(--primary); }
.ahead-opt input:checked + span small { color: var(--primary); font-weight: 700; }
.sched { padding: 0 16px 12px; }
.sched-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.sched-row:first-child { border-top: 0; }
.sr-dot { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line-2); font-weight: 800; font-size: 13px; }
.sr-dot .i { width: 14px; height: 14px; }
.sr-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sr-body b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-body small, .sr-end small { font-size: 12px; color: var(--muted); }
.sr-end { text-align: right; display: flex; flex-direction: column; }
.sched-row.is-paid .sr-dot { background: var(--success); border-color: var(--success); color: #fff; }
.sched-row.is-paid .sr-end small { color: var(--success); font-weight: 700; }
.sched-row.is-due .sr-dot { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 15%, transparent); }
.sched-row.is-due .sr-end small { color: var(--primary); font-weight: 700; }
.sched-row.is-overdue .sr-dot { background: var(--danger); border-color: var(--danger); color: #fff; }
.sched-row.is-overdue .sr-end small { color: var(--danger); font-weight: 700; }
.sched-row.is-upcoming { opacity: .75; }
.lock-wall { border: 1.5px dashed color-mix(in srgb, var(--danger) 35%, transparent); }
.lock-wall > .i { color: var(--danger); }

/* ===== v2.3 NID-style partner card ===== */
.nid-wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; max-width: 1100px; margin: 0 auto; }
.nid-side { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.nid-side small { font-weight: 700; color: var(--muted); font-size: 12.5px; }
.nid-canvas { width: 100%; height: auto; aspect-ratio: 1012 / 638; border-radius: 16px; box-shadow: 0 18px 40px -18px rgba(11,110,58,.45), 0 2px 6px rgba(0,0,0,.06); background: #f6fbf7; animation: nidIn .7s cubic-bezier(.2,.8,.2,1) both; }
.nid-side:nth-child(2) .nid-canvas { animation-delay: .12s; }
@keyframes nidIn { from { opacity: 0; transform: perspective(900px) rotateY(-14deg) translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }

/* ===== v2.3 Play-Store style app page ===== */
.ps-page { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.ps-head { display: flex; gap: 18px; align-items: center; }
.ps-icon { width: 92px; height: 92px; border-radius: 22px; box-shadow: 0 10px 26px -10px rgba(30,30,80,.45), 0 0 0 1px rgba(0,0,0,.05); background: #fff; object-fit: cover; animation: psPop .6s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes psPop { from { transform: scale(.6) rotate(-8deg); opacity: 0; } to { transform: none; opacity: 1; } }
.ps-title h1 { font-size: 24px; line-height: 1.15; margin: 0; }
.ps-dev { display: block; color: #01875f; font-weight: 700; font-size: 14px; margin-top: 4px; }
.ps-title small { color: var(--muted); font-size: 12.5px; }
.ps-stats { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; }
.ps-stats > div { padding: 2px 4px; display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--line); }
.ps-stats > div:first-child { border-left: 0; }
.ps-stats b { font-size: 15px; }
.ps-stats small { color: var(--muted); font-size: 12px; }
.btn-ps { background: #01875f; color: #fff; border-radius: 12px; position: relative; overflow: hidden; height: 48px; font-size: 15px; }
.btn-ps:hover { background: #016e4e; color: #fff; }
.btn-ps .ps-btn-label { display: inline-flex; align-items: center; gap: 8px; position: relative; z-index: 1; }
.btn-ps .ps-progress { position: absolute; left: 0; bottom: 0; height: 4px; width: 0; background: rgba(255,255,255,.75); }
.btn-ps.busy .ps-progress { animation: psProg 1.8s ease-in-out; }
@keyframes psProg { 0% { width: 0; } 70% { width: 85%; } 100% { width: 100%; opacity: 0; } }
.ps-note { text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 8px; display: flex; gap: 6px; justify-content: center; align-items: center; flex-wrap: wrap; }
.ps-note .i { width: 14px; height: 14px; color: #01875f; }
.ps-shots { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 12px; scrollbar-width: none; }
.ps-shots::-webkit-scrollbar { display: none; }
.ps-shot { flex: 0 0 150px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 4px; animation: psUp .6s cubic-bezier(.2,.8,.2,1) both; }
@keyframes psUp { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.ps-shot b { font-size: 13.5px; margin-top: 4px; }
.ps-shot small { font-size: 12px; color: var(--muted); }
.ps-phone { aspect-ratio: 9 / 17; border-radius: 20px; background: linear-gradient(160deg, var(--c1), var(--c2)); position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 18px; box-shadow: 0 14px 28px -16px var(--c1); overflow: hidden; }
.ps-phone::after { content: ''; position: absolute; inset: -40% -40% auto auto; width: 120%; height: 80%; background: radial-gradient(circle, rgba(255,255,255,.35), transparent 60%); }
.ps-notch { position: absolute; top: 8px; width: 40px; height: 6px; border-radius: 6px; background: rgba(0,0,0,.25); }
.ps-shot-ic { width: 56px; height: 56px; border-radius: 18px; background: rgba(255,255,255,.22); display: grid; place-items: center; color: #fff; backdrop-filter: blur(4px); animation: floatY 3.6s ease-in-out infinite; }
.ps-shot-ic .i { width: 28px; height: 28px; }
.ps-phone i { display: block; width: 80%; height: 8px; border-radius: 6px; background: rgba(255,255,255,.35); }
.ps-phone i.short { width: 50%; }
.ps-sec h2 { font-size: 18px; display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ps-sec h2 .i { width: 18px; height: 18px; color: var(--muted); }
.ps-sec p { color: var(--text-2, #4b5163); font-size: 14.5px; line-height: 1.6; }
.ps-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.ps-tags span { border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 600; }
.ps-feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.ps-feat { display: flex; gap: 12px; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.ps-feat > span { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; background: #e6f4ee; color: #01875f; }
.ps-feat b { display: block; font-size: 14px; }
.ps-feat small { color: var(--muted); font-size: 12.5px; }
.ps-new { padding-left: 18px; display: grid; gap: 6px; font-size: 14px; color: var(--text-2, #4b5163); }
.ps-how { display: grid; gap: 10px; }
.ps-how > div { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); display: flex; flex-direction: column; gap: 3px; }
.ps-how b { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.ps-how small { color: var(--muted); font-size: 13px; }
.ps-how em { font-style: normal; font-weight: 700; color: var(--text); }
.ps-safety { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: grid; gap: 10px; }
.ps-safety > div { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.ps-safety .i { color: var(--muted); }

/* ===== v2.3 motion: slow loader, refresh wipe, fly-in buttons ===== */
#slow-loader { position: fixed; inset: 0; z-index: 9998; display: none; place-items: center; background: rgba(245,246,251,.55); backdrop-filter: blur(6px) saturate(1.4); -webkit-backdrop-filter: blur(6px) saturate(1.4); }
#slow-loader.on { display: grid; animation: fadeIn .25s ease both; }
#slow-loader.out { animation: fadeOut .3s ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; } }
.sl-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 34px; border-radius: 24px; background: var(--surface); box-shadow: 0 30px 60px -24px rgba(40,30,120,.35); animation: slPop .45s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes slPop { from { transform: scale(.8) translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.sl-card b { margin-top: 10px; font-size: 15px; }
.sl-card small { color: var(--muted); font-size: 12.5px; }
.sl-ring { position: relative; width: 74px; height: 74px; display: grid; place-items: center; }
.sl-ring img { width: 40px; height: 40px; border-radius: 12px; animation: slBeat 1.2s ease-in-out infinite; }
.sl-ring i { position: absolute; inset: 0; border-radius: 50%; border: 3px solid transparent; border-top-color: var(--primary); animation: spin 1s linear infinite; }
.sl-ring i:nth-child(2) { inset: 7px; border-top-color: #22d3ee; animation-duration: 1.4s; animation-direction: reverse; }
.sl-ring i:nth-child(3) { inset: 14px; border-top-color: #f59e0b; animation-duration: 1.8s; }
@keyframes slBeat { 50% { transform: scale(.88); } }
@keyframes spin { to { transform: rotate(360deg); } }
#refresh-fx { position: fixed; inset: 0; z-index: 9997; pointer-events: none; display: none; }
#refresh-fx.in { display: block; }
#refresh-fx span { position: absolute; left: 0; right: 0; height: 34%; transform: scaleX(0); transform-origin: left; background: linear-gradient(90deg, var(--primary), #8b7cff); }
#refresh-fx span:nth-child(1) { top: 0; }
#refresh-fx span:nth-child(2) { top: 33%; background: linear-gradient(90deg, #8b7cff, #22d3ee); }
#refresh-fx span:nth-child(3) { top: 66%; background: linear-gradient(90deg, #22d3ee, var(--primary)); }
#refresh-fx.in span { animation: rfIn .45s cubic-bezier(.7,0,.3,1) both; }
#refresh-fx.in span:nth-child(2) { animation-delay: .06s; }
#refresh-fx.in span:nth-child(3) { animation-delay: .12s; }
#refresh-fx.out span { animation: rfOut .5s cubic-bezier(.7,0,.3,1) both; transform-origin: right; }
#refresh-fx.out span:nth-child(2) { animation-delay: .06s; }
#refresh-fx.out span:nth-child(3) { animation-delay: .12s; }
@keyframes rfIn { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes rfOut { from { transform: scaleX(1); } to { transform: scaleX(0); } }
#refresh-fx .rf-ic { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: #fff; color: var(--primary); display: grid; place-items: center; box-shadow: 0 16px 40px -10px rgba(0,0,0,.35); opacity: 0; }
#refresh-fx.in .rf-ic { animation: rfIc .9s .2s cubic-bezier(.2,1.2,.4,1) both; }
#refresh-fx.out .rf-ic { animation: fadeOut .2s both; }
#refresh-fx .rf-ic .i { width: 30px; height: 30px; animation: spin .8s linear infinite; }
@keyframes rfIc { from { opacity: 0; transform: scale(.4) rotate(-90deg); } to { opacity: 1; transform: none; } }
.tb-refresh.spinning .i { animation: spin .7s linear infinite; }
#app-main.entering .btn:not(.btn-icon), #app-main.entering .access, #app-main.entering .sc-card { animation: btnFly .55s cubic-bezier(.2,1.25,.4,1) both; }
#app-main.entering .btn:nth-of-type(2) { animation-delay: .05s; }
#app-main.entering .btn:nth-of-type(3) { animation-delay: .1s; }
@keyframes btnFly { from { opacity: 0; transform: translateY(16px) scale(.92); } to { opacity: 1; transform: none; } }
.btn:not(.btn-icon):active { animation: btnPress .28s ease; }
@keyframes btnPress { 40% { transform: scale(.94); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { #refresh-fx, #slow-loader.on .sl-card, #app-main.entering .btn { animation: none !important; } }
