:root {
  --navy: #14161f;
  --navy-2: #171923;
  --navy-3: #252836;
  --blue: #dc2626;
  --blue-soft: #fdecec;
  --cyan: #f97316;
  --violet: #dc2626;
  --bg: #f5f6fa;
  --card: #ffffff;
  --line: #e2e8f0;
  --text: #14161f;
  --muted: #64748b;
  --ok: #15803d;
  --ok-bg: #dcfce7;
  --warn: #b45309;
  --warn-bg: #fef3c7;
  --err: #b91c1c;
  --err-bg: #fee2e2;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(15, 31, 61, .05), 0 8px 24px rgba(15, 31, 61, .06);
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); font-size: 16px; line-height: 1.5; }
h1, h2, h3, p { margin: 0; }
a { color: var(--blue); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
.hidden { display: none !important; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon.sm { width: 16px; height: 16px; }
.icon.lg { width: 26px; height: 26px; }

/* ---------- splash ---------- */
.splash { position: fixed; inset: 0; z-index: 100; background: #07080c; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: opacity .45s ease, visibility .45s; overflow: hidden; }
.splash.done { opacity: 0; visibility: hidden; }
.splash-glow { position: absolute; width: 140vmax; height: 140vmax; background: radial-gradient(circle, rgba(220, 38, 38, .30) 0%, rgba(2, 6, 23, 0) 45%); top: 50%; left: 50%; transform: translate(-50%, -55%); pointer-events: none; }
.splash-center { position: relative; display: flex; flex-direction: column; align-items: center; gap: 18px; animation: rise .7s ease both; }
.splash-logo { width: 236px; height: 236px; border-radius: 52px; background: rgba(15, 23, 42, .75); border: 1px solid rgba(220, 38, 38, .35); display: grid; place-items: center; box-shadow: 0 0 80px rgba(220, 38, 38, .35); }
.splash-logo img { width: 174px; height: 174px; border-radius: 40px; object-fit: cover; animation: float 3.2s ease-in-out infinite; }
.splash-name { font-size: 42px; font-weight: 800; color: #fff; letter-spacing: -.5px; }
.splash-name span { color: #ef4444; }
.splash-pill { background: #fdecec; color: #b91c1c; font-weight: 700; font-size: 13px; letter-spacing: 2.4px; padding: 10px 22px; border-radius: 999px; }
.splash-bar { width: 266px; height: 5px; background: rgba(255, 255, 255, .12); border-radius: 99px; overflow: hidden; }
.splash-bar i { display: block; height: 100%; width: 28%; border-radius: 99px; background: linear-gradient(90deg, var(--cyan), #ef4444, var(--violet)); animation: slide 1.15s ease-in-out infinite; }
.splash-foot { position: absolute; bottom: 9vh; color: rgba(255, 255, 255, .4); font-size: 17px; letter-spacing: .3px; }
@keyframes slide { 0% { transform: translateX(-120%); } 100% { transform: translateX(450%); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- auth ---------- */
.auth { min-height: 100vh; min-height: 100dvh; background: linear-gradient(180deg, var(--navy-2) 0, var(--navy-2) 55%, var(--bg) 55%); display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 440px; background: #fff; border-radius: 28px; padding: 28px 24px 24px; box-shadow: 0 24px 60px rgba(2, 6, 23, .35); animation: rise .45s ease both; }
.brand-row { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 14px; }
.brand-row img { width: 60px; height: 60px; border-radius: 16px; }
.brand-row b { font-size: 28px; letter-spacing: -.5px; color: var(--navy); }
.chip { display: inline-flex; align-items: center; gap: 8px; background: var(--blue-soft); color: #b91c1c; font-weight: 700; font-size: 12px; letter-spacing: 1.6px; padding: 7px 14px; border-radius: 999px; text-transform: uppercase; }
.center { text-align: center; }
.auth h1 { font-size: 30px; letter-spacing: -.6px; margin: 14px 0 4px; }
.auth .sub { color: var(--muted); margin-bottom: 22px; }
.assure { display: flex; justify-content: center; margin-top: 18px; }
.assure span { display: inline-flex; gap: 8px; align-items: center; background: #f1f5f9; color: var(--muted); font-size: 14px; padding: 9px 16px; border-radius: 999px; }
.assure .icon { color: var(--ok); }
.divider { border-top: 1px solid var(--line); margin: 20px 0 16px; }

/* ---------- forms ---------- */
.field { margin-bottom: 16px; }
.field > label, .label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 7px; color: var(--text); }
.hint { color: var(--muted); font-size: 13.5px; margin-top: 6px; }
.input { position: relative; display: flex; align-items: center; }
.input > .icon { position: absolute; left: 14px; color: var(--blue); pointer-events: none; }
.input > .eye { left: auto; right: 12px; color: var(--muted); pointer-events: auto; cursor: pointer; background: none; border: 0; padding: 4px; display: grid; place-items: center; }
.input.has-icon input { padding-left: 44px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], select, textarea {
  width: 100%; background: #fff; border: 1px solid #cbd5e1; border-radius: 14px; padding: 13px 14px; outline: none; transition: border-color .15s, box-shadow .15s; min-height: 48px;
}
textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(220, 38, 38, .14); }
input[readonly] { background: #f1f5f9; color: var(--muted); }
input::placeholder, textarea::placeholder { color: #94a3b8; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.check input { width: 20px; height: 20px; accent-color: var(--navy-2); margin: 0; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.switch { position: relative; width: 50px; height: 28px; flex: none; }
.switch input { appearance: none; -webkit-appearance: none; width: 100%; height: 100%; background: #cbd5e1; border-radius: 99px; outline: none; cursor: pointer; transition: background .2s; margin: 0; }
.switch input:checked { background: var(--navy-2); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; pointer-events: none; }
.switch:has(input:checked)::after { transform: translateX(22px); }
.switch-row { display: flex; gap: 12px; align-items: center; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 0 22px; border-radius: 14px; border: 1px solid var(--line); background: #fff; color: var(--text); font-weight: 600; cursor: pointer; transition: transform .08s, background .15s, opacity .15s; text-align: center; }
.btn:active { transform: scale(.985); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--navy-2); border-color: var(--navy-2); color: #fff; box-shadow: 0 6px 16px rgba(20, 22, 31, .28); }
.btn-primary:hover:not(:disabled) { background: #0d0e14; }
.btn-danger { background: var(--err-bg); border-color: #fecaca; color: var(--err); }
.btn-soft { background: var(--blue-soft); border-color: transparent; color: #991b1b; }
.btn-white { background: #fff; color: var(--navy-2); border-color: #fff; }
.btn-block { width: 100%; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
.btn-icon { min-height: 44px; width: 44px; padding: 0; border-radius: 14px; }
.spin { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: rot .7s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }
.link { background: none; border: 0; color: var(--blue); font-weight: 600; cursor: pointer; padding: 0; }

/* ---------- shell ---------- */
.shell { min-height: 100vh; min-height: 100dvh; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #fff; border-bottom: 1px solid var(--line); padding-top: max(12px, env(safe-area-inset-top)); }
.topbar .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--navy); }
.topbar .brand img { width: 46px; height: 46px; border-radius: 12px; }
.topbar .spacer { flex: 1; }
.icon-btn { position: relative; width: 48px; height: 48px; border-radius: 14px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; cursor: pointer; color: var(--navy); }
.badge-dot { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 99px; background: #dc2626; color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, #bbf7d0, #a7f3d0); color: #065f46; font-weight: 800; display: grid; place-items: center; border: 3px solid #e2e8f0; cursor: pointer; font-size: 18px; flex: none; }
.avatar.xl { width: 112px; height: 112px; font-size: 44px; border: 6px solid #fff; box-shadow: var(--shadow); }
.drawer { position: fixed; z-index: 50; top: 0; bottom: 0; left: 0; width: min(86vw, 330px); background: var(--navy-2); color: #fff; transform: translateX(-102%); transition: transform .25s ease; display: flex; flex-direction: column; overflow-y: auto; padding: 22px 20px 20px; }
.drawer.open { transform: none; box-shadow: 0 0 60px rgba(0, 0, 0, .4); }
.overlay { position: fixed; inset: 0; z-index: 40; background: rgba(2, 6, 23, .5); opacity: 0; visibility: hidden; transition: opacity .25s; }
.overlay.show { opacity: 1; visibility: visible; }
.drawer .dbrand { display: flex; align-items: center; gap: 14px; padding-bottom: 18px; border-bottom: 1px solid rgba(255, 255, 255, .12); margin-bottom: 18px; }
.drawer .dbrand img { width: 56px; height: 56px; border-radius: 14px; }
.drawer .dbrand b { font-size: 22px; display: block; line-height: 1.1; }
.drawer .dbrand small { color: #b9bdd0; font-size: 14px; }
.sbox { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .13); border-radius: 18px; padding: 14px 16px; margin-bottom: 8px; }
.sbox .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 600; }
.sbox .pct { background: rgba(255, 255, 255, .13); border-radius: 99px; padding: 3px 12px; font-size: 14px; }
.sbox small { display: block; color: #b9bdd0; margin-top: 8px; font-size: 14px; }
.sbox .bar { height: 7px; border-radius: 99px; background: rgba(255, 255, 255, .15); margin-top: 12px; overflow: hidden; }
.sbox .bar i { display: block; height: 100%; background: #ef4444; border-radius: 99px; min-width: 6px; }
.menu-title { color: #8b90a3; font-size: 12.5px; font-weight: 700; letter-spacing: 1.6px; margin: 20px 0 8px 4px; }
.menu a { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; color: #e8eaf3; font-weight: 600; margin-bottom: 2px; position: relative; }
.menu a:hover { background: rgba(255, 255, 255, .06); }
.menu a.active { background: #3a2a35; color: #fff; }
.menu a.active::before { content: ""; position: absolute; left: -20px; top: 8px; bottom: 8px; width: 4px; background: #f87171; border-radius: 0 4px 4px 0; }
.menu .count { margin-left: auto; background: #dc2626; color: #fff; border-radius: 99px; font-size: 12px; padding: 1px 8px; }
.plan-box { margin-top: 22px; }
.plan-box .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.plan-box b { font-size: 20px; }
.plan-box small { color: #b9bdd0; display: block; margin-top: 8px; font-size: 14.5px; }
.main { padding: 18px 16px 90px; max-width: 980px; margin: 0 auto; }
.announce { background: var(--warn-bg); color: #78350f; border: 1px solid #fde68a; border-radius: 14px; padding: 12px 16px; margin-bottom: 16px; font-size: 15px; }

@media (min-width: 1024px) {
  .drawer { transform: none; width: 292px; box-shadow: none; }
  .overlay { display: none; }
  .shell .topbar { margin-left: 292px; }
  .shell .main { margin-left: 292px; max-width: none; padding: 28px 40px 90px; }
  .shell .main > .wrap { max-width: 980px; margin: 0 auto; }
  #menuBtn { display: none; }
  .menu a.active::before { left: -20px; }
}

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px; }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-head h2 { font-size: 20px; letter-spacing: -.3px; }
.card-body { padding: 18px 20px; }
.page-head { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 20px 20px 26px; margin-bottom: 16px; overflow: hidden; }
.page-head::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--navy-2); border-radius: 18px 0 0 18px; }
.page-head h1 { font-size: 30px; letter-spacing: -.8px; margin: 14px 0 6px; word-break: break-word; }
.page-head p { color: var(--muted); }
.page-head .actions { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
@media (min-width: 640px) { .page-head .actions { flex-direction: row; flex-wrap: wrap; } .page-head .actions .btn { min-width: 150px; } }
.hero { background: var(--navy-2); color: #fff; border-radius: 24px; padding: 28px 26px; margin-bottom: 16px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -60px; top: -80px; width: 280px; height: 280px; border-radius: 50%; background: rgba(255, 255, 255, .05); }
.hero h1 { font-size: 30px; letter-spacing: -.6px; }
.hero p { color: #c9ccda; margin-top: 8px; font-size: 18px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.grid3 { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 760px) { .grid3 { grid-template-columns: repeat(2, 1fr); } .grid4 { grid-template-columns: repeat(4, 1fr) !important; } }
@media (min-width: 1100px) { .grid3 { grid-template-columns: repeat(3, 1fr); } }
.grid4 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.stat { display: flex; align-items: center; gap: 14px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-height: 112px; }
.stat .ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--blue-soft); color: var(--navy-2); flex: none; }
.stat .ico.green { background: #dcfce7; color: var(--ok); }
.stat .ico.amber { background: #fef3c7; color: var(--warn); }
.stat small { color: var(--muted); font-weight: 700; letter-spacing: 1.2px; font-size: 12.5px; text-transform: uppercase; display: block; }
.stat b { font-size: 30px; line-height: 1.15; display: block; letter-spacing: -.5px; }
.stat b.sm { font-size: 26px; }
.stat span { color: var(--muted); font-size: 14.5px; }
.meter { padding: 18px 20px; }
.meter .row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 10px; }
.meter .row b { font-size: 20px; }
.pill { display: inline-block; background: var(--blue-soft); color: #991b1b; font-weight: 700; padding: 5px 14px; border-radius: 99px; font-size: 14.5px; }
.pill.green { background: var(--ok-bg); color: var(--ok); }
.progress { height: 10px; background: #e2e8f0; border-radius: 99px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--blue); border-radius: 99px; min-width: 8px; }
.progress.green i { background: #16a34a; }
.progress.dark { background: rgba(255, 255, 255, .14); }
.progress.dark i { background: #f87171; }
.empty { text-align: center; padding: 38px 20px; }
.empty .ico { width: 84px; height: 84px; border-radius: 24px; background: var(--blue-soft); color: var(--navy-2); display: grid; place-items: center; margin: 0 auto 18px; }
.empty h3 { font-size: 22px; margin-bottom: 8px; }
.empty p { color: var(--muted); max-width: 420px; margin: 0 auto 20px; }
.dashed { border: 2px dashed #cbd5e1; box-shadow: none; }

/* badges and lists */
.badge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 99px; font-size: 14px; font-weight: 600; background: #f1f5f9; color: var(--muted); }
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.err { background: var(--err-bg); color: var(--err); }
.badge.info { background: var(--blue-soft); color: #991b1b; }
.badge.plain::before { display: none; }
.kv { display: grid; gap: 18px; }
.kv .k { color: var(--muted); font-size: 15.5px; }
.kv .v { font-size: 18px; margin-top: 4px; word-break: break-word; }
.kv .v.inline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
@media (min-width: 640px) { .kv.two { grid-template-columns: 1fr 1fr; } }
.list > * { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-top: 1px solid var(--line); }
.list > *:first-child { border-top: 0; }
.list .ico { width: 44px; height: 44px; border-radius: 14px; background: var(--blue-soft); color: var(--navy-2); display: grid; place-items: center; flex: none; }
.list .ico.green { background: var(--ok-bg); color: var(--ok); }
.list .grow { flex: 1; min-width: 0; }
.list .grow b { display: block; word-break: break-word; }
.list .grow small { color: var(--muted); font-size: 14px; }
.list a.row-link { color: inherit; }
.feat { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.feat li { display: flex; gap: 12px; align-items: center; color: #334155; }
.feat .icon { color: #16a34a; width: 22px; height: 22px; }
.plan { padding: 22px; margin-bottom: 0; }
.plan.current, .plan.popular { border: 2px solid var(--blue); }
.plan h3 { font-size: 22px; margin: 6px 0 12px; }
.plan .price { font-size: 44px; font-weight: 800; letter-spacing: -1.5px; line-height: 1.1; }
.plan .price small { font-size: 17px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.plan .limits { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0; padding-bottom: 20px; border-bottom: 2px dashed #cbd5e1; }
.plan .limits div { background: #f8fafc; border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.plan .limits b { font-size: 26px; display: block; line-height: 1.1; }
.plan .limits span { color: var(--muted); font-weight: 700; font-size: 13px; letter-spacing: 1.4px; }
.plan .tag { display: inline-block; background: var(--navy-2); color: #fff; font-size: 13px; font-weight: 800; letter-spacing: 1.2px; padding: 8px 14px; border-radius: 99px; }
.plan .need { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: 14px; padding: 13px 16px; margin-top: 14px; text-align: center; }
.plan .btn { margin-top: 20px; }
.plan-hero { background: var(--navy-2); color: #fff; border-radius: 24px; padding: 24px; margin-bottom: 16px; }
.plan-hero .pill-w { display: inline-block; background: rgba(255, 255, 255, .13); border-radius: 99px; padding: 7px 16px; font-weight: 700; letter-spacing: 1.3px; font-size: 13.5px; }
.plan-hero h2 { font-size: 38px; margin: 10px 0 4px; letter-spacing: -1px; }
.plan-hero .sub { color: #b9bdd0; }
.plan-hero .row { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; align-items: center; }
.plan-hero .bal { border: 1px solid rgba(255, 255, 255, .25); border-radius: 99px; padding: 12px 20px; font-weight: 600; display: inline-flex; gap: 10px; align-items: center; }
.plan-hero .box { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .13); border-radius: 18px; padding: 16px 18px; margin-top: 12px; }
.plan-hero .box .row { margin: 0 0 12px; justify-content: space-between; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.chips button { background: var(--blue-soft); color: #991b1b; border: 0; font-weight: 700; padding: 11px 18px; border-radius: 14px; cursor: pointer; }
.quick { display: flex; gap: 10px; flex-wrap: wrap; }
.note { background: #f8fafc; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; color: #334155; font-size: 15px; }
.method { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; background: #f8fafc; }
.method b { display: block; }
.method code { font-family: var(--mono); font-size: 17px; word-break: break-all; }
code.inline { font-family: var(--mono); background: #eef2ff; color: #1e3a8a; padding: 3px 9px; border-radius: 8px; font-size: .88em; }
.urlbox { display: flex; gap: 10px; }
.urlbox input { font-family: var(--mono); font-size: 14px; background: #f1f5f9; }

/* console / logs */
.console { background: #0e1018; color: #e8eaf3; border-radius: 16px; padding: 16px; font-family: var(--mono); font-size: 14px; line-height: 1.7; max-height: 340px; overflow: auto; word-break: break-word; }
.console .ln { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 1px 0; }
.console .ts { color: #8b90a3; white-space: nowrap; }
.console .lv-info { color: #86efac; }
.console .lv-warn { color: #fcd34d; }
.console .lv-error { color: #fca5a5; }
.console .none { color: #8b90a3; text-align: center; padding: 18px; }

/* editor */
.editor-wrap { display: grid; gap: 12px; }
.editor { width: 100%; min-height: 380px; font-family: var(--mono); font-size: 14px; line-height: 1.6; background: #0e1018; color: #eef0f8; border: 1px solid #0e1018; border-radius: 16px; padding: 16px; tab-size: 2; white-space: pre; overflow: auto; resize: vertical; }
.editor:focus { border-color: #ef4444; box-shadow: 0 0 0 4px rgba(239, 68, 68, .25); }
.warnbox { background: var(--warn-bg); color: #78350f; border-radius: 14px; padding: 12px 16px; font-size: 14.5px; }
.warnbox ul { margin: 6px 0 0; padding-left: 20px; }
.filelist .item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); cursor: pointer; }
.filelist .item:first-child { border-top: 0; }
.filelist .item:hover { background: #f8fafc; }
.filelist .item.sel { background: var(--blue-soft); }
.filelist .item .nm { flex: 1; min-width: 0; word-break: break-all; font-weight: 600; }
.filelist .item small { color: var(--muted); }
.fm-grid { display: grid; gap: 16px; }
@media (min-width: 900px) { .fm-grid { grid-template-columns: 300px 1fr; align-items: start; } }

/* tables */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
.tbl th { text-align: left; color: var(--muted); font-size: 12.5px; letter-spacing: 1.2px; text-transform: uppercase; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.amt-pos { color: var(--ok); font-weight: 700; }
.amt-neg { color: var(--err); font-weight: 700; }
.toolbar { display: grid; gap: 12px; margin-bottom: 16px; }
@media (min-width: 700px) { .toolbar { grid-template-columns: 1fr 220px auto; } }

/* chat / tickets */
.thread { display: grid; gap: 12px; }
.msg { max-width: 88%; padding: 12px 16px; border-radius: 16px; background: #f1f5f9; white-space: pre-wrap; word-break: break-word; }
.msg.me { background: var(--navy-2); color: #fff; justify-self: end; }
.msg small { display: block; opacity: .7; margin-top: 6px; font-size: 12.5px; }

/* notifications */
.notif { display: flex; gap: 14px; padding: 16px 20px; border-top: 1px solid var(--line); align-items: flex-start; }
.notif:first-child { border-top: 0; }
.notif.unread { background: #fff3f3; }
.notif .body { flex: 1; min-width: 0; }
.notif .body b { display: block; }
.notif .body p { color: #475569; margin: 2px 0 4px; word-break: break-word; }
.notif .body small { color: var(--muted); }

/* profile */
.profile-top { height: 110px; background: var(--navy-2); }
.profile-body { padding: 0 20px 20px; }
.profile-body .avatar { margin-top: -56px; }
.profile-body h1 { font-size: 30px; letter-spacing: -.7px; margin: 14px 0 2px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.verified { color: #2563eb; }
.mini { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.mini > div { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.mini > div:nth-child(odd) { border-right: 1px solid var(--line); }
.mini small { color: var(--muted); font-weight: 700; letter-spacing: 1.2px; font-size: 12.5px; display: block; }
.mini b { font-size: 30px; letter-spacing: -.5px; }

/* modal + toast */
.modal-bg { position: fixed; inset: 0; z-index: 80; background: rgba(2, 6, 23, .55); display: grid; place-items: center; padding: 16px; animation: fade .15s ease; }
.modal { background: #fff; border-radius: 22px; width: 100%; max-width: 480px; max-height: 92vh; overflow: auto; padding: 24px; box-shadow: 0 30px 80px rgba(2, 6, 23, .4); }
.modal h3 { font-size: 22px; margin-bottom: 6px; }
.modal .mp { color: var(--muted); margin-bottom: 18px; }
.modal .mactions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.toasts { position: fixed; z-index: 120; left: 0; right: 0; bottom: max(18px, env(safe-area-inset-bottom)); display: grid; justify-items: center; gap: 10px; padding: 0 16px; pointer-events: none; }
.toast { background: #14161f; color: #fff; padding: 13px 20px; border-radius: 14px; box-shadow: 0 12px 30px rgba(2, 6, 23, .35); max-width: 440px; animation: rise .25s ease both; pointer-events: auto; font-weight: 500; }
.toast.err { background: #991b1b; }
.toast.ok { background: #166534; }
.skel { height: 120px; border-radius: var(--radius); background: linear-gradient(90deg, #e8edf5 25%, #f3f6fb 50%, #e8edf5 75%); background-size: 200% 100%; animation: sh 1.2s infinite; margin-bottom: 16px; }
@keyframes sh { to { background-position: -200% 0; } }
.sep-title { font-size: 12.5px; color: var(--muted); letter-spacing: 1.6px; font-weight: 700; margin: 22px 4px 10px; text-transform: uppercase; }
.two-col { display: grid; gap: 16px; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; align-items: start; } }
.right { text-align: right; }
.mt { margin-top: 16px; }
.stack { display: grid; gap: 12px; }
.muted { color: var(--muted); }
.wrapword { word-break: break-all; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* layout safety on narrow screens */
.grid2 > *, .grid4 > *, .grid3 > *, .two-col > * { min-width: 0; }
.stat { padding: 16px 14px; gap: 12px; }
.stat > div:last-child { min-width: 0; }
.stat b { overflow-wrap: anywhere; }
.stat b.sm { font-size: 22px; }
.stat small { letter-spacing: .8px; }
.stat .ico { width: 46px; height: 46px; }

.splash-name { font-size: 38px; letter-spacing: 1px; }
.splash-logo { width: 250px; height: 250px; border-radius: 50%; padding: 0; overflow: hidden; }
.splash-logo img { width: 232px; height: 232px; border-radius: 50%; }
.brand-row img, .drawer .dbrand img, .topbar .brand img { border-radius: 50%; }
.topbar .brand { font-size: 17px; letter-spacing: .3px; }

/* professional polish: red accent circle on hero, bottom tab bar on phones */
.hero::after { background: #dc2626; opacity: .92; right: -70px; top: -90px; width: 230px; height: 230px; }
.hero > * { position: relative; z-index: 1; }
.plan-hero { position: relative; overflow: hidden; }
.plan-hero::after { content: ""; position: absolute; right: -80px; top: -90px; width: 220px; height: 220px; border-radius: 50%; background: #dc2626; opacity: .9; }
.plan-hero > * { position: relative; z-index: 1; }
.tabbar { position: fixed; z-index: 35; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; align-items: flex-end; background: #fff; border-top: 1px solid var(--line); padding: 8px 6px max(10px, env(safe-area-inset-bottom)); box-shadow: 0 -6px 24px rgba(20, 22, 31, .06); }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 600; color: #8b90a3; padding: 4px 0; }
.tabbar a.on { color: var(--blue); }
.tabbar a.fab { flex: none; width: 56px; height: 56px; border-radius: 50%; background: var(--blue); color: #fff; justify-content: center; margin: -26px 8px 0; box-shadow: 0 8px 22px rgba(220, 38, 38, .45); border: 4px solid var(--bg); }
.shell .main { padding-bottom: 110px; }
@media (min-width: 1024px) { .tabbar { display: none; } .shell .main { padding-bottom: 90px; } }
.card, .stat, .page-head { border-radius: 20px; }
.topbar .brand { min-width: 0; } .topbar .brand span { white-space: nowrap; font-size: 15px; overflow: hidden; text-overflow: ellipsis; }
.topbar .brand img { width: 40px; height: 40px; }
