/* Derivo Flip — design system (matches derivo.club: navy + green, Inter) */
:root {
  --bg: #0A1020;
  --bg-2: #0F172A;
  --surface: #111a2e;
  --surface-2: #162238;
  --surface-3: #1E293B;
  --border: rgba(148, 163, 184, .14);
  --border-strong: rgba(148, 163, 184, .26);
  --text: #E2E8F0;
  --text-strong: #F8FAFC;
  --muted: #94A3B8;
  --muted-2: #64748B;
  --green: #05AF2D;
  --green-hi: #22C55E;
  --green-dim: rgba(5, 175, 45, .14);
  --gold: #F5B301;
  --red: #EF4444;
  --red-dim: rgba(239, 68, 68, .14);
  --amber: #F59E0B;
  --amber-dim: rgba(245, 158, 11, .14);
  --blue: #3B82F6;
  --blue-dim: rgba(59, 130, 246, .14);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 40px -12px rgba(0, 0, 0, .6);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --sidebar: 256px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; min-height: 100vh;
}
a { color: var(--green-hi); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, textarea, select { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
.hidden { display: none !important; }
.mono { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; word-break: break-all; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- Ambient background ---------- */
.ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.ambient::before, .ambient::after {
  content: ''; position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(90px); opacity: .22;
  animation: drift 26s var(--ease) infinite alternate;
}
.ambient::before { background: radial-gradient(circle, #05AF2D 0%, transparent 60%); top: -25vmax; left: -15vmax; }
.ambient::after { background: radial-gradient(circle, #1d4ed8 0%, transparent 60%); bottom: -30vmax; right: -20vmax; animation-delay: -12s; opacity: .16; }
.ambient .grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(148,163,184,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,184,.05) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 75%);
}
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(8vmax, 6vmax) scale(1.15); } }

/* ---------- Icons ---------- */
.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i.sm { width: 16px; height: 16px; } .i.lg { width: 24px; height: 24px; } .i.xl { width: 32px; height: 32px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; position: relative; overflow: hidden;
  height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent; cursor: pointer;
  font-weight: 600; font-size: 14.5px; letter-spacing: .1px; white-space: nowrap; user-select: none;
  transition: transform .15s var(--ease), background .2s, border-color .2s, box-shadow .2s, opacity .2s;
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: linear-gradient(180deg, #0bc238, #05AF2D); color: #fff; box-shadow: 0 8px 24px -8px rgba(5,175,45,.6), inset 0 1px 0 rgba(255,255,255,.18); }
.btn-primary:hover:not(:disabled) { box-shadow: 0 10px 30px -8px rgba(5,175,45,.8), inset 0 1px 0 rgba(255,255,255,.2); }
.btn-ghost { background: rgba(148,163,184,.08); border-color: var(--border); color: var(--text); }
.btn-ghost:hover:not(:disabled) { background: rgba(148,163,184,.14); border-color: var(--border-strong); }
.btn-danger { background: var(--red-dim); color: #fca5a5; border-color: rgba(239,68,68,.3); }
.btn-danger:hover:not(:disabled) { background: rgba(239,68,68,.24); }
.btn-gold { background: linear-gradient(180deg, #ffc61a, #F5B301); color: #1a1300; box-shadow: 0 8px 24px -8px rgba(245,179,1,.55); }
.btn-block { width: 100%; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn-icon { width: 40px; padding: 0; }
.btn .ripple { position: absolute; border-radius: 50%; transform: scale(0); background: rgba(255,255,255,.35); animation: ripple .6s linear; pointer-events: none; }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }
.btn.loading { color: transparent !important; pointer-events: none; }
.btn.loading::after {
  content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }
.field label .opt { font-weight: 500; color: var(--muted-2); font-size: 12px; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > .i:first-child { position: absolute; left: 14px; color: var(--muted-2); pointer-events: none; transition: color .2s; }
.input, textarea.input, select.input {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 12px; background: rgba(15,23,42,.7);
  border: 1px solid var(--border); color: var(--text-strong); outline: none; transition: border-color .2s, box-shadow .2s, background .2s;
}
.input-wrap > .i:first-child ~ .input { padding-left: 44px; }
textarea.input { height: auto; min-height: 110px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.input::placeholder { color: var(--muted-2); }
.input:focus { border-color: rgba(5,175,45,.7); box-shadow: 0 0 0 4px rgba(5,175,45,.14); background: rgba(15,23,42,.95); }
.input-wrap:focus-within > .i:first-child { color: var(--green-hi); }
.input.valid { border-color: rgba(34,197,94,.6); }
.input.invalid { border-color: rgba(239,68,68,.6); }
.input-suffix { position: absolute; right: 8px; display: flex; gap: 4px; align-items: center; }
.icon-btn { background: transparent; border: 0; color: var(--muted); width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; cursor: pointer; transition: background .2s, color .2s; }
.icon-btn:hover { background: rgba(148,163,184,.12); color: var(--text-strong); }
.hint { font-size: 12.5px; color: var(--muted-2); display: flex; align-items: center; gap: 6px; min-height: 18px; }
.hint.ok { color: var(--green-hi); } .hint.err { color: #f87171; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 14px; margin-bottom: 16px; border: 1px solid; animation: slideDown .35s var(--ease); }
.alert .i { margin-top: 1px; }
.alert-err { background: var(--red-dim); border-color: rgba(239,68,68,.3); color: #fecaca; }
.alert-ok { background: var(--green-dim); border-color: rgba(34,197,94,.3); color: #bbf7d0; }
.alert-info { background: var(--blue-dim); border-color: rgba(59,130,246,.3); color: #bfdbfe; }
.alert-warn { background: var(--amber-dim); border-color: rgba(245,158,11,.3); color: #fde68a; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--green); margin-top: 2px; flex: none; }

/* ---------- Cards, badges ---------- */
.card { background: linear-gradient(180deg, rgba(22,34,56,.85), rgba(17,26,46,.85)); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; backdrop-filter: blur(12px); }
.card-title { font-size: 15px; font-weight: 700; color: var(--text-strong); margin: 0 0 4px; display: flex; align-items: center; gap: 10px; }
.card-sub { color: var(--muted); font-size: 13.5px; margin: 0 0 18px; }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.no-dot::before { display: none; }
.b-green { background: var(--green-dim); color: #4ade80; }
.b-red { background: var(--red-dim); color: #f87171; }
.b-amber { background: var(--amber-dim); color: #fbbf24; }
.b-blue { background: var(--blue-dim); color: #60a5fa; }
.b-gray { background: rgba(148,163,184,.12); color: var(--muted); }
.b-amber::before { animation: pulse 1.6s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* ---------- Animations ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { 0% { transform: scale(.94); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.anim > * { animation: fadeUp .55s var(--ease) both; }
.anim > *:nth-child(2) { animation-delay: .05s; } .anim > *:nth-child(3) { animation-delay: .1s; }
.anim > *:nth-child(4) { animation-delay: .15s; } .anim > *:nth-child(5) { animation-delay: .2s; }
.anim > *:nth-child(6) { animation-delay: .25s; } .anim > *:nth-child(n+7) { animation-delay: .3s; }
.skeleton { background: linear-gradient(90deg, rgba(148,163,184,.08) 0%, rgba(148,163,184,.16) 50%, rgba(148,163,184,.08) 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 10px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* ---------- Toasts ---------- */
.toasts { position: fixed; top: 18px; right: 18px; z-index: 1000; display: flex; flex-direction: column; gap: 10px; max-width: calc(100vw - 36px); }
.toast {
  display: flex; gap: 12px; align-items: flex-start; min-width: 280px; max-width: 400px; padding: 14px 16px; border-radius: 14px;
  background: rgba(17,26,46,.96); border: 1px solid var(--border-strong); box-shadow: var(--shadow); backdrop-filter: blur(12px);
  animation: toastIn .4s var(--ease); font-size: 14px;
}
.toast.out { animation: toastOut .3s var(--ease) forwards; }
.toast .ti { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.toast.ok .ti { background: var(--green-dim); color: #4ade80; } .toast.err .ti { background: var(--red-dim); color: #f87171; } .toast.info .ti { background: var(--blue-dim); color: #60a5fa; }
.toast b { display: block; color: var(--text-strong); margin-bottom: 2px; }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }

/* ---------- Modal ---------- */
.modal-back { position: fixed; inset: 0; z-index: 900; background: rgba(2,6,23,.72); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 16px; animation: fadeIn .25s; }
.modal { width: 100%; max-width: 480px; max-height: calc(100vh - 32px); overflow: auto; background: linear-gradient(180deg, #172540, #111a2e); border: 1px solid var(--border-strong); border-radius: 20px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.8); animation: pop .35s var(--ease); }
.modal.wide { max-width: 640px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 22px 0; }
.modal-head h3 { margin: 0; font-size: 18px; color: var(--text-strong); display: flex; align-items: center; gap: 10px; }
.modal-body { padding: 18px 22px 22px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 0 22px 22px; }
.modal-back.closing { animation: fadeIn .2s reverse forwards; }
@media (max-width: 560px) {
  .modal-back { align-items: flex-end; padding: 0; }
  .modal { border-radius: 22px 22px 0 0; max-height: 92vh; animation: sheetUp .4s var(--ease); }
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }

/* ---------- Brand ---------- */
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 30px; width: auto; }
.brand .tag { font-size: 11px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: var(--green-hi); background: var(--green-dim); padding: 3px 8px; border-radius: 6px; }

/* ---------- Avatar ---------- */
.avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; overflow: hidden; font-weight: 700; font-size: 14px; color: #fff; background: linear-gradient(135deg, #05AF2D, #0f766e); border: 2px solid rgba(255,255,255,.08); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 84px; height: 84px; font-size: 28px; }
.avatar.sm { width: 32px; height: 32px; font-size: 12px; }
.avatar.brand-av { background: #0F172A; border-color: rgba(5,175,45,.5); padding: 6px; }

/* =================== AUTH PAGE =================== */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-hero { position: relative; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; border-right: 1px solid var(--border); background: linear-gradient(160deg, rgba(5,175,45,.08), transparent 50%); }
.auth-hero h1 { font-size: clamp(34px, 3.6vw, 52px); line-height: 1.08; letter-spacing: -1.2px; color: var(--text-strong); margin: 0 0 18px; font-weight: 800; }
.auth-hero h1 span { background: linear-gradient(90deg, #22C55E, #05AF2D 40%, #F5B301); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-hero p.lead { color: var(--muted); font-size: 17px; max-width: 480px; margin: 0 0 30px; }
.feature-list { display: grid; gap: 14px; max-width: 460px; }
.feature { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: rgba(15,23,42,.55); border: 1px solid var(--border); transition: transform .3s var(--ease), border-color .3s; }
.feature:hover { transform: translateX(6px); border-color: rgba(5,175,45,.4); }
.feature .fi { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--green-dim); color: var(--green-hi); flex: none; }
.feature b { color: var(--text-strong); display: block; font-size: 14.5px; }
.feature span { color: var(--muted); font-size: 13.5px; }
.chart-deco { position: absolute; right: -40px; bottom: 90px; width: 70%; opacity: .5; pointer-events: none; }
.chart-deco path.line { stroke: #22C55E; stroke-width: 2.5; fill: none; stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: draw 3.5s var(--ease) forwards .3s; }
.chart-deco path.area { fill: url(#gArea); opacity: 0; animation: fadeIn 1.5s forwards 2s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.auth-foot { color: var(--muted-2); font-size: 13px; display: flex; gap: 18px; align-items: center; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 440px; }
.auth-card h2 { margin: 0 0 6px; font-size: 28px; letter-spacing: -.6px; color: var(--text-strong); }
.auth-card .sub { color: var(--muted); margin: 0 0 26px; }
.tabs-auth { display: grid; grid-template-columns: 1fr 1fr; background: rgba(15,23,42,.7); border: 1px solid var(--border); border-radius: 14px; padding: 5px; margin-bottom: 26px; position: relative; }
.tabs-auth button { position: relative; z-index: 1; background: transparent; border: 0; height: 40px; border-radius: 10px; font-weight: 600; color: var(--muted); cursor: pointer; transition: color .25s; }
.tabs-auth button.on { color: #fff; }
.tabs-auth .slider { position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc(50% - 5px); border-radius: 10px; background: linear-gradient(180deg, #0bc238, #05AF2D); box-shadow: 0 6px 18px -6px rgba(5,175,45,.7); transition: transform .35s var(--ease); }
.tabs-auth.right .slider { transform: translateX(100%); }
.pw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 2px; }
.pw-meter i { height: 4px; border-radius: 4px; background: rgba(148,163,184,.15); transition: background .3s; }
.form-row { display: flex; justify-content: space-between; align-items: center; margin: -4px 0 18px; font-size: 14px; }
.link-btn { background: none; border: 0; color: var(--green-hi); font-weight: 600; cursor: pointer; padding: 0; }
.link-btn:hover { text-decoration: underline; }
.mobile-brand { display: none; margin-bottom: 28px; }
.view { animation: fadeUp .45s var(--ease); }
@media (max-width: 960px) {
  .auth { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .mobile-brand { display: flex; }
  .auth-main { align-items: flex-start; padding-top: 48px; }
}

/* =================== APP SHELL =================== */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); padding: 22px 16px; display: flex; flex-direction: column; gap: 22px;
  background: rgba(10,16,32,.82); border-right: 1px solid var(--border); backdrop-filter: blur(16px); z-index: 50;
}
.sidebar .brand { padding: 4px 10px 8px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-label { font-size: 11px; font-weight: 700; letter-spacing: 1.4px; color: var(--muted-2); text-transform: uppercase; padding: 14px 12px 6px; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: 11px;
  color: var(--muted); font-weight: 500; text-decoration: none; transition: background .2s, color .2s;
}
.nav a:hover { background: rgba(148,163,184,.08); color: var(--text-strong); }
.nav a.on { background: linear-gradient(90deg, rgba(5,175,45,.18), rgba(5,175,45,.04)); color: #fff; }
.nav a.on::before { content: ''; position: absolute; left: -16px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--green); box-shadow: 0 0 12px var(--green); }
.nav a.on .i { color: var(--green-hi); }
.nav .count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--green); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; animation: pop .3s var(--ease); }
.side-user { margin-top: auto; display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: rgba(22,34,56,.7); border: 1px solid var(--border); }
.side-user .meta { min-width: 0; flex: 1; }
.side-user .meta b { display: block; color: var(--text-strong); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user .meta span { display: block; color: var(--muted-2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.main { flex: 1; margin-left: var(--sidebar); min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 14px; height: 72px; padding: 0 32px; background: rgba(10,16,32,.72); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); }
.topbar h1 { font-size: 20px; margin: 0; color: var(--text-strong); letter-spacing: -.3px; }
.topbar .spacer { flex: 1; }
.topbar .mbrand { display: none; }
.bell { position: relative; }
.bell .dot { position: absolute; top: 6px; right: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--red); border: 2px solid var(--bg); animation: pulse 1.8s infinite; }
.content { padding: 28px 32px 60px; max-width: 1240px; }
.bottom-nav { display: none; }
@media (max-width: 960px) {
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .topbar { padding: 0 16px; height: 64px; }
  .topbar h1 { display: none; }
  .topbar .mbrand { display: flex; }
  .content { padding: 18px 16px 110px; }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 60;
    height: 66px; padding: 6px; border-radius: 20px; background: rgba(17,26,46,.92); border: 1px solid var(--border-strong); backdrop-filter: blur(18px); box-shadow: var(--shadow);
  }
  .bottom-nav a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 14px; color: var(--muted-2); font-size: 11px; font-weight: 600; text-decoration: none; transition: color .2s, background .2s; }
  .bottom-nav a.on { color: var(--green-hi); background: rgba(5,175,45,.1); }
  .bottom-nav a .count { position: absolute; top: 4px; right: calc(50% - 20px); min-width: 16px; height: 16px; border-radius: 8px; background: var(--green); color: #fff; font-size: 10px; display: grid; place-items: center; padding: 0 4px; }
}

/* ---------- Dashboard ---------- */
.greet { margin-bottom: 22px; }
.greet h2 { margin: 0; font-size: 26px; letter-spacing: -.6px; color: var(--text-strong); }
.greet p { margin: 4px 0 0; color: var(--muted); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } }
.balance-card {
  position: relative; overflow: hidden; border-radius: 22px; padding: 28px; min-height: 230px; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, rgba(245,179,1,.22) 0%, transparent 45%), linear-gradient(135deg, #067a24 0%, #05AF2D 35%, #0b3d2a 75%, #0F172A 100%);
  box-shadow: 0 24px 60px -24px rgba(5,175,45,.6); isolation: isolate;
}
.balance-card::before {
  content: ''; position: absolute; inset: -50%; z-index: -1;
  background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.14) 50%, transparent 60%);
  animation: sheen 6s ease-in-out infinite;
}
@keyframes sheen { 0% { transform: translateX(-60%); } 60%, 100% { transform: translateX(60%); } }
.balance-card .ring { position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,.14); z-index: -1; }
.balance-card .ring.r1 { width: 320px; height: 320px; right: -90px; top: -130px; }
.balance-card .ring.r2 { width: 220px; height: 220px; right: -40px; top: -80px; }
.bc-top { display: flex; justify-content: space-between; align-items: center; }
.bc-label { font-size: 13.5px; font-weight: 600; opacity: .85; display: flex; align-items: center; gap: 8px; }
.bc-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: rgba(0,0,0,.22); border: 1px solid rgba(255,255,255,.16); }
.bc-amount { font-size: clamp(38px, 5vw, 52px); font-weight: 800; letter-spacing: -1.5px; margin: 14px 0 4px; line-height: 1; display: flex; align-items: baseline; gap: 10px; }
.bc-amount small { font-size: 17px; font-weight: 700; opacity: .75; letter-spacing: 0; }
.bc-eye { background: rgba(0,0,0,.2); border: 1px solid rgba(255,255,255,.16); color: #fff; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; cursor: pointer; }
.bc-meta { display: flex; gap: 26px; margin-top: 18px; flex-wrap: wrap; }
.bc-meta div { font-size: 12.5px; opacity: .8; }
.bc-meta b { display: block; font-size: 16px; opacity: 1; color: #fff; margin-top: 2px; }
.actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.action {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; height: 104px; padding: 12px;
  border-radius: 18px; background: linear-gradient(180deg, rgba(22,34,56,.9), rgba(17,26,46,.9)); border: 1px solid var(--border);
  cursor: pointer; color: var(--text-strong); font-weight: 600; font-size: 14px; transition: transform .25s var(--ease), border-color .25s, box-shadow .25s; overflow: hidden;
}
.action:hover:not(:disabled) { transform: translateY(-4px); border-color: rgba(5,175,45,.45); box-shadow: 0 16px 34px -18px rgba(5,175,45,.7); }
.action:disabled { cursor: not-allowed; opacity: .55; }
.action .ai { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; transition: transform .3s var(--ease); }
.action:hover:not(:disabled) .ai { transform: scale(1.08) rotate(-4deg); }
.action.dep .ai { background: var(--green-dim); color: #4ade80; }
.action.trd .ai { background: rgba(245,179,1,.14); color: var(--gold); }
.action.wd .ai { background: var(--blue-dim); color: #60a5fa; }
.action .tagp { position: absolute; top: 9px; right: 9px; }
.action.glow::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(245,179,1,.5); animation: glow 2.2s ease-in-out infinite; }
@keyframes glow { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
.trade-card { display: flex; gap: 16px; align-items: center; }
.trade-card .tc-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; flex: none; position: relative; }
.trade-card .tc-ic.pending { background: var(--amber-dim); color: #fbbf24; }
.trade-card .tc-ic.pending::after { content: ''; position: absolute; inset: -4px; border-radius: 19px; border: 2px solid rgba(245,158,11,.5); border-top-color: transparent; animation: spin 1.6s linear infinite; }
.trade-card .tc-ic.win { background: var(--green-dim); color: #4ade80; }
.trade-card .tc-ic.loss { background: var(--red-dim); color: #f87171; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-top: 16px; }
.kv div { padding: 12px 14px; border-radius: 12px; background: rgba(15,23,42,.6); border: 1px solid var(--border); }
.kv span { display: block; font-size: 12px; color: var(--muted-2); font-weight: 600; }
.kv b { font-size: 17px; color: var(--text-strong); }
.stack { display: flex; flex-direction: column; gap: 20px; }
.progress { height: 6px; border-radius: 6px; background: rgba(148,163,184,.12); overflow: hidden; margin-top: 14px; }
.progress i { display: block; height: 100%; width: 40%; border-radius: 6px; background: linear-gradient(90deg, transparent, #F59E0B, transparent); animation: indet 1.6s ease-in-out infinite; }
@keyframes indet { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
.prompt-card { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 16px; border: 1px dashed var(--border-strong); background: rgba(15,23,42,.5); }
.prompt-card .pi { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--blue-dim); color: #60a5fa; }
.prompt-card div.t { flex: 1; min-width: 0; }
.prompt-card b { display: block; color: var(--text-strong); font-size: 14.5px; }
.prompt-card span { color: var(--muted); font-size: 13px; }

/* ---------- Activity list ---------- */
.list { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--border); transition: background .2s; }
.row:last-child { border-bottom: 0; }
.row:hover { background: rgba(148,163,184,.04); }
.row .ri { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: none; }
.ri.deposit { background: var(--green-dim); color: #4ade80; }
.ri.trade { background: rgba(245,179,1,.14); color: var(--gold); }
.ri.withdrawal { background: var(--blue-dim); color: #60a5fa; }
.row .rm { flex: 1; min-width: 0; }
.row .rm b { display: block; color: var(--text-strong); font-size: 14.5px; font-weight: 600; }
.row .rm span { display: block; color: var(--muted-2); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .ra { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.row .ra b { font-size: 15px; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.row .ra b.pos { color: #4ade80; } .row .ra b.neg { color: var(--text); }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .ei { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; margin: 0 auto 14px; background: rgba(148,163,184,.08); color: var(--muted); }
.empty b { display: block; color: var(--text-strong); margin-bottom: 4px; }
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(15,23,42,.7); border: 1px solid var(--border); margin-bottom: 16px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; color: var(--muted); height: 34px; padding: 0 14px; border-radius: 9px; font-weight: 600; font-size: 13.5px; cursor: pointer; transition: background .2s, color .2s; }
.seg button.on { background: var(--surface-3); color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.3); }

/* ---------- Deposit modal ---------- */
.amount-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.amount-grid button {
  height: 58px; border-radius: 14px; border: 1px solid var(--border); background: rgba(15,23,42,.6); color: var(--text-strong);
  font-weight: 700; font-size: 18px; cursor: pointer; transition: transform .2s var(--ease), border-color .2s, background .2s; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.amount-grid button small { font-size: 11px; color: var(--muted-2); font-weight: 600; }
.amount-grid button:hover { transform: translateY(-2px); border-color: rgba(5,175,45,.5); }
.amount-grid button.on { border-color: var(--green); background: var(--green-dim); box-shadow: 0 0 0 3px rgba(5,175,45,.18); }
.pay-box { display: grid; grid-template-columns: 180px 1fr; gap: 20px; align-items: center; }
@media (max-width: 560px) { .pay-box { grid-template-columns: 1fr; justify-items: center; text-align: center; } .amount-grid { grid-template-columns: repeat(3, 1fr); } }
.qr { width: 180px; height: 180px; border-radius: 16px; background: #fff; padding: 8px; position: relative; }
.qr img { width: 100%; height: 100%; }
.qr::after { content: ''; position: absolute; left: 8px; right: 8px; height: 2px; top: 8px; background: linear-gradient(90deg, transparent, #05AF2D, transparent); animation: scan 2.4s ease-in-out infinite; }
@keyframes scan { 0%, 100% { top: 8px; } 50% { top: calc(100% - 10px); } }
.due { font-size: 32px; font-weight: 800; color: var(--text-strong); letter-spacing: -1px; }
.due .cents { color: var(--gold); }
.copy-line { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: rgba(15,23,42,.8); border: 1px solid var(--border); margin-top: 8px; }
.copy-line .mono { flex: 1; font-size: 13px; color: var(--text-strong); }
.timer { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--amber); }
.wait-line { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: rgba(15,23,42,.6); border: 1px solid var(--border); color: var(--muted); font-size: 13.5px; margin: 16px 0; }
.dots { display: inline-flex; align-items: center; flex: none; }
.dots i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--green-hi); margin-right: 3px; animation: bounce 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 80%, 100% { transform: scale(.6); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }
.success-anim { display: grid; place-items: center; margin: 10px auto 18px; width: 92px; height: 92px; border-radius: 50%; background: var(--green-dim); color: #4ade80; animation: pop .5s var(--ease); position: relative; }
.success-anim::after { content: ''; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid rgba(34,197,94,.4); animation: ringOut 1.6s ease-out infinite; }
@keyframes ringOut { from { transform: scale(.9); opacity: 1; } to { transform: scale(1.3); opacity: 0; } }

/* ---------- Support chat ---------- */
.chat { display: flex; flex-direction: column; height: calc(100vh - 72px - 56px); min-height: 480px; padding: 0; overflow: hidden; }
@media (max-width: 960px) { .chat { height: calc(100vh - 64px - 36px - 86px); } }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); background: rgba(15,23,42,.5); }
.chat-head .meta b { display: block; color: var(--text-strong); }
.chat-head .meta span { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.online { width: 8px; height: 8px; border-radius: 50%; background: var(--green-hi); box-shadow: 0 0 0 3px rgba(34,197,94,.2); }
.chat-body { flex: 1; overflow-y: auto; padding: 22px 20px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.msg { display: flex; gap: 10px; max-width: 78%; animation: fadeUp .35s var(--ease); }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.bubble { position: relative; padding: 10px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; }
.msg.them .bubble { background: var(--surface-3); border: 1px solid var(--border); border-bottom-left-radius: 5px; color: var(--text); }
.msg.me .bubble { background: linear-gradient(180deg, #0aa531, #058a24); color: #fff; border-bottom-right-radius: 5px; }
.bubble .sig { font-weight: 700; color: var(--gold); margin-left: 4px; }
.bubble img { border-radius: 10px; max-width: 260px; max-height: 260px; object-fit: cover; margin: 2px 0 6px; cursor: zoom-in; }
.bubble .meta { display: flex; align-items: center; gap: 6px; font-size: 11px; opacity: .65; margin-top: 4px; justify-content: flex-end; }
.msg .edit-btn { align-self: center; opacity: 0; transition: opacity .2s; }
.msg.me:hover .edit-btn { opacity: 1; }
@media (hover: none) { .msg .edit-btn { opacity: .7; } }
.sys { align-self: center; display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 6px 14px; border-radius: 999px; background: rgba(148,163,184,.08); border: 1px solid var(--border); animation: fadeIn .4s; }
.sys.join { color: #4ade80; background: var(--green-dim); border-color: rgba(34,197,94,.2); }
.day-sep { align-self: center; font-size: 11.5px; color: var(--muted-2); font-weight: 600; letter-spacing: .5px; text-transform: uppercase; margin: 8px 0; }
.chat-foot { border-top: 1px solid var(--border); padding: 12px 14px; background: rgba(15,23,42,.6); }
.chat-input { display: flex; gap: 8px; align-items: flex-end; }
.chat-input textarea { flex: 1; min-height: 46px; max-height: 140px; height: 46px; resize: none; padding: 12px 14px; border-radius: 14px; background: rgba(15,23,42,.9); border: 1px solid var(--border); outline: none; color: var(--text-strong); line-height: 1.4; overflow-y: hidden; scrollbar-width: thin; }
.chat-input textarea:focus { border-color: rgba(5,175,45,.6); }
.attach-preview { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; background: rgba(22,34,56,.8); border: 1px solid var(--border); margin-bottom: 10px; animation: slideDown .25s; }
.attach-preview img { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; }
.typing { display: inline-flex; gap: 4px; }
.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(2,6,23,.92); display: grid; place-items: center; padding: 24px; animation: fadeIn .2s; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 12px; animation: pop .3s var(--ease); }

/* ---------- Reviews ---------- */
.rev-summary { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: center; }
@media (max-width: 700px) { .rev-summary { grid-template-columns: 1fr; } }
.rev-score { text-align: center; }
.rev-score .big { font-size: 56px; font-weight: 800; color: var(--text-strong); letter-spacing: -2px; line-height: 1; }
.stars { display: inline-flex; gap: 3px; color: var(--gold); }
.stars .i { fill: currentColor; stroke: none; }
.stars .i.off { fill: rgba(148,163,184,.25); }
.dist { display: grid; gap: 8px; }
.dist-row { display: grid; grid-template-columns: 26px 1fr 34px; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); }
.dist-row .bar { height: 8px; border-radius: 8px; background: rgba(148,163,184,.12); overflow: hidden; }
.dist-row .bar i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, #F5B301, #fcd34d); transform-origin: left; animation: grow 1s var(--ease) both; }
@keyframes grow { from { transform: scaleX(0); } }
.review { padding: 20px 0; border-bottom: 1px solid var(--border); }
.review:last-child { border-bottom: 0; }
.rv-head { display: flex; gap: 12px; align-items: center; }
.rv-head .who { flex: 1; min-width: 0; }
.rv-head b { color: var(--text-strong); display: flex; align-items: center; gap: 6px; }
.rv-head span { font-size: 12.5px; color: var(--muted-2); }
.verified { color: var(--green-hi); }
.rv-body { margin: 12px 0 0 52px; color: var(--text); white-space: pre-wrap; }
.rv-reply { margin: 14px 0 0 52px; padding: 14px 16px; border-radius: 14px; background: rgba(5,175,45,.06); border: 1px solid rgba(5,175,45,.2); border-left: 3px solid var(--green); }
.rv-reply .rv-head b { font-size: 14px; }
.rv-reply p { margin: 8px 0 0; white-space: pre-wrap; color: var(--text); font-size: 14px; }
@media (max-width: 560px) { .rv-body, .rv-reply { margin-left: 0; } }
.star-input { display: inline-flex; gap: 6px; }
.star-input button { background: none; border: 0; padding: 2px; cursor: pointer; color: rgba(148,163,184,.35); transition: transform .15s, color .15s; }
.star-input button:hover { transform: scale(1.15); }
.star-input button.on { color: var(--gold); }
.star-input .i { width: 30px; height: 30px; fill: currentColor; stroke: none; }

/* ---------- Settings ---------- */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 1000px) { .settings-grid { grid-template-columns: 1fr; } }
.profile-head { display: flex; gap: 18px; align-items: center; margin-bottom: 20px; }
.av-edit { position: relative; cursor: pointer; }
.av-edit .cam { position: absolute; right: -2px; bottom: -2px; width: 30px; height: 30px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; border: 3px solid var(--surface); transition: transform .2s; }
.av-edit:hover .cam { transform: scale(1.1); }
.tg-status { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 14px; background: rgba(15,23,42,.6); border: 1px solid var(--border); margin-bottom: 16px; }
.tg-status .ti { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(41,169,235,.14); color: #38bdf8; flex: none; }

/* ---------- Notifications panel ---------- */
.notif-panel { position: absolute; top: 62px; right: 20px; width: 360px; max-width: calc(100vw - 24px); max-height: 70vh; overflow: auto; background: rgba(17,26,46,.98); border: 1px solid var(--border-strong); border-radius: 18px; box-shadow: var(--shadow); animation: slideDown .25s var(--ease); z-index: 70; }
.notif-panel .np-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 10px; }
.notif-panel .np-head b { color: var(--text-strong); }
.np-item { display: flex; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--border); }
.np-item .ni { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--green-dim); color: #4ade80; flex: none; }
.np-item b { display: block; font-size: 14px; color: var(--text-strong); }
.np-item p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.np-item time { font-size: 11.5px; color: var(--muted-2); }
.np-item.unread { background: rgba(5,175,45,.05); }

/* ---------- Admin ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat { padding: 18px 20px; border-radius: 16px; background: linear-gradient(180deg, rgba(22,34,56,.85), rgba(17,26,46,.85)); border: 1px solid var(--border); transition: transform .25s var(--ease), border-color .25s; }
.stat:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.stat .sl { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 600; }
.stat .sv { font-size: 26px; font-weight: 800; color: var(--text-strong); margin-top: 8px; letter-spacing: -.5px; }
.stat .ss { font-size: 12.5px; color: var(--muted-2); }
.stat.attn { border-color: rgba(245,158,11,.45); }
.table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--border); }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: left; font-size: 11.5px; letter-spacing: .6px; text-transform: uppercase; color: var(--muted-2); font-weight: 700; padding: 12px 14px; background: rgba(15,23,42,.7); white-space: nowrap; }
table.t td { padding: 12px 14px; border-top: 1px solid var(--border); vertical-align: middle; }
table.t tr:hover td { background: rgba(148,163,184,.04); }
table.t td .user-cell { display: flex; align-items: center; gap: 10px; }
table.t td .user-cell b { display: block; color: var(--text-strong); font-weight: 600; }
table.t td .user-cell span { font-size: 12px; color: var(--muted-2); }
.toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .input { max-width: 320px; height: 42px; }
.sig-list { display: flex; flex-wrap: wrap; gap: 10px; }
.sig-chip { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 6px 0 14px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--border); font-weight: 700; letter-spacing: 1px; color: var(--gold); animation: pop .3s var(--ease); }
.sig-chip.off { color: var(--muted-2); text-decoration: line-through; }
.admin-chat { display: grid; grid-template-columns: 320px 1fr; gap: 0; height: calc(100vh - 72px - 56px); min-height: 520px; padding: 0; overflow: hidden; }
.admin-chat .threads { border-right: 1px solid var(--border); overflow-y: auto; }
.admin-chat .thread { display: flex; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .2s; }
.admin-chat .thread:hover, .admin-chat .thread.on { background: rgba(5,175,45,.07); }
.admin-chat .thread .tm { flex: 1; min-width: 0; }
.admin-chat .thread b { display: flex; justify-content: space-between; color: var(--text-strong); font-size: 14px; }
.admin-chat .thread span { display: block; font-size: 12.5px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 960px) { .admin-chat { grid-template-columns: 1fr; height: auto; } .admin-chat .threads { max-height: 260px; } }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }
