/* =====================================================
   ShortLink Pro - Design System
   A modern, distinctive SaaS aesthetic
   ===================================================== */

/* ---------- Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&family=Sora:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* ---------- Theme Variables ---------- */
:root {
  /* Brand */
  --brand-50:  #eef2ff;
  --brand-100: #e0e7ff;
  --brand-300: #a5b4fc;
  --brand-500: #6366f1;
  --brand-600: #4f46e5;
  --brand-700: #4338ca;
  --brand-900: #312e81;

  --accent-400: #f59e0b;
  --accent-500: #f97316;
  --accent-600: #ea580c;

  --success: #10b981;
  --danger:  #ef4444;
  --warning: #f59e0b;
  --info:    #06b6d4;

  /* Light mode */
  --bg:        #fafbff;
  --bg-soft:   #f3f4f9;
  --surface:   #ffffff;
  --surface-2: #f8fafc;
  --border:    #e5e7eb;
  --border-soft: #f1f5f9;

  --text:        #0f172a;
  --text-muted:  #64748b;
  --text-soft:   #94a3b8;

  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --shadow-xs: 0 1px 2px 0 rgba(15,23,42,.05);
  --shadow-sm: 0 1px 3px 0 rgba(15,23,42,.07), 0 1px 2px -1px rgba(15,23,42,.05);
  --shadow:    0 4px 12px -2px rgba(15,23,42,.08), 0 2px 4px -2px rgba(15,23,42,.05);
  --shadow-lg: 0 16px 40px -12px rgba(15,23,42,.18), 0 4px 12px -4px rgba(15,23,42,.06);
  --shadow-glow: 0 0 0 1px rgba(99,102,241,.1), 0 8px 32px -8px rgba(99,102,241,.35);

  --font-display: 'Sora', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --font-body:    'Sora', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  --header-h: 72px;
  --sidebar-w: 260px;
}

[dir="rtl"] {
  --font-display: 'IBM Plex Sans Arabic', 'Sora', system-ui, sans-serif;
  --font-body:    'IBM Plex Sans Arabic', 'Sora', system-ui, sans-serif;
}

/* ---------- Dark Mode ---------- */
[data-theme="dark"] {
  --bg:        #0a0e1a;
  --bg-soft:   #0f1424;
  --surface:   #131a2e;
  --surface-2: #1a2238;
  --border:    #1f2945;
  --border-soft: #1a2238;

  --text:        #e2e8f0;
  --text-muted:  #94a3b8;
  --text-soft:   #64748b;

  --shadow-xs: 0 1px 2px 0 rgba(0,0,0,.3);
  --shadow-sm: 0 1px 3px 0 rgba(0,0,0,.4);
  --shadow:    0 4px 12px -2px rgba(0,0,0,.4);
  --shadow-lg: 0 16px 40px -12px rgba(0,0,0,.5);
}

/* ---------- Reset ---------- */
*,*::before,*::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

a { color: var(--brand-600); text-decoration: none; transition: color .15s; }
a:hover { color: var(--brand-700); }

img, svg { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: 0; background: transparent; }
input, textarea, select { font-family: inherit; font-size: inherit; }

h1,h2,h3,h4,h5 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.125rem; }

/* ---------- Layout ---------- */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 720px; margin: 0 auto; padding: 0 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  transition: all .2s cubic-bezier(.4,0,.2,1);
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary {
  background: linear-gradient(135deg, var(--brand-600), var(--brand-700));
  color: #fff;
  box-shadow: var(--shadow-sm), 0 0 0 0 rgba(99,102,241,.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow), 0 0 0 4px rgba(99,102,241,.15); color: #fff; }
.btn-primary:active { transform: translateY(0); }

.btn-accent {
  background: linear-gradient(135deg, var(--accent-500), var(--accent-600));
  color: #fff;
}
.btn-accent:hover { transform: translateY(-1px); box-shadow: var(--shadow); color: #fff; }

.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }

.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-outline:hover { background: var(--surface-2); border-color: var(--brand-300); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; color: #fff; }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #059669; color: #fff; }

.btn-sm  { padding: 6px 12px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-lg  { padding: 14px 28px; font-size: 16px; }
.btn-xl  { padding: 18px 36px; font-size: 17px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-icon { padding: 8px; width: 36px; height: 36px; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block; margin-bottom: 6px;
  font-weight: 500; font-size: 13px;
  color: var(--text);
}
.form-control {
  width: 100%;
  padding: 11px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: all .15s;
  outline: none;
}
.form-control:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}
.form-control::placeholder { color: var(--text-soft); }
textarea.form-control { min-height: 100px; resize: vertical; }

.form-group .help { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-group .err  { font-size: 12px; color: var(--danger); margin-top: 4px; }

.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 14px; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow .2s;
}
.card:hover { box-shadow: var(--shadow-sm); }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--border-soft); }
.card-title { font-size: 18px; font-weight: 700; }
.card-body { }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px; font-weight: 600;
  background: var(--brand-50); color: var(--brand-700);
}
[data-theme="dark"] .badge { background: rgba(99,102,241,.15); color: var(--brand-300); }
.badge-success { background: rgba(16,185,129,.12); color: var(--success); }
.badge-danger  { background: rgba(239,68,68,.12); color: var(--danger); }
.badge-warning { background: rgba(245,158,11,.15); color: var(--accent-600); }
.badge-info    { background: rgba(6,182,212,.12); color: var(--info); }

/* ---------- Alerts ---------- */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 18px;
  font-size: 14px;
}
.alert-success { background: rgba(16,185,129,.08); border-color: rgba(16,185,129,.25); color: var(--success); }
.alert-danger  { background: rgba(239,68,68,.08); border-color: rgba(239,68,68,.25); color: var(--danger); }
.alert-info    { background: rgba(6,182,212,.08); border-color: rgba(6,182,212,.25); color: var(--info); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
.table {
  width: 100%; border-collapse: collapse; background: var(--surface);
}
.table th, .table td {
  padding: 12px 14px;
  text-align: start;
  border-bottom: 1px solid var(--border-soft);
  font-size: 14px;
}
.table th {
  background: var(--surface-2);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }

/* ---------- Top Header (public) ---------- */
.topnav {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(255,255,255,.8);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
}
[data-theme="dark"] .topnav { background: rgba(10,14,26,.8); }
.topnav-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: var(--text); font-family: var(--font-display); }
.brand-logo {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--brand-500), var(--accent-500));
  border-radius: 10px;
  display: grid; place-items: center;
  color: #fff; font-weight: 800;
  box-shadow: 0 4px 12px -2px rgba(99,102,241,.4);
}
.topnav-links { display: flex; align-items: center; gap: 4px; }
.topnav-links a {
  padding: 8px 14px; border-radius: var(--radius-sm);
  color: var(--text-muted); font-size: 14px; font-weight: 500;
}
.topnav-links a:hover { color: var(--text); background: var(--surface-2); }
.topnav-cta { display: flex; align-items: center; gap: 8px; }

.lang-switch {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 20px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--text);
}
.lang-switch:hover { border-color: var(--brand-300); color: var(--text); }

.theme-toggle {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border);
  display: grid; place-items: center;
  color: var(--text);
  transition: all .2s;
}
.theme-toggle:hover { border-color: var(--brand-300); }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun  { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 72px 0 96px;
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(99,102,241,.18), transparent 40%),
    radial-gradient(circle at 85% 30%, rgba(249,115,22,.15), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(99,102,241,.1), transparent 50%);
  pointer-events: none;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(99,102,241,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 60% 60% at 50% 30%, #000 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 30%, #000 30%, transparent 70%);
}
.hero-inner { position: relative; text-align: center; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 13px; color: var(--text-muted); font-weight: 500;
  margin-bottom: 24px;
  box-shadow: var(--shadow-xs);
}
.hero-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(16,185,129,.2);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.5} }

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  margin-bottom: 18px;
  letter-spacing: -.03em;
}
.hero h1 .highlight {
  background: linear-gradient(135deg, var(--brand-500), var(--accent-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p { font-size: clamp(1rem, 2vw, 1.25rem); color: var(--text-muted); max-width: 640px; margin: 0 auto 36px; }

.shorten-box {
  max-width: 720px; margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 12px;
  box-shadow: var(--shadow-lg), 0 0 0 8px rgba(99,102,241,.04);
  display: flex; gap: 8px; flex-wrap: wrap;
}
.shorten-box input {
  flex: 1; min-width: 200px;
  padding: 14px 18px;
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 16px;
  color: var(--text);
}
.shorten-box .btn { padding: 14px 28px; font-size: 15px; }

.shorten-result {
  max-width: 720px; margin: 18px auto 0;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--success);
  border-radius: var(--radius);
  display: none;
  align-items: center; justify-content: space-between; gap: 12px;
}
.shorten-result.show { display: flex; animation: slideIn .3s ease; }
@keyframes slideIn { from{opacity:0;transform:translateY(-10px)} to{opacity:1;transform:translateY(0)} }
.shorten-result .url { font-family: var(--font-mono); color: var(--brand-600); font-size: 16px; font-weight: 600; word-break: break-all; }

/* ---------- Stats Strip ---------- */
.stats-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  margin-top: 60px;
  box-shadow: var(--shadow);
}
.stat-cell { text-align: center; padding: 16px; }
.stat-cell .num { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.75rem, 3vw, 2.5rem); color: var(--text); letter-spacing: -.02em; }
.stat-cell .num .currency { color: var(--accent-500); }
.stat-cell .lbl { color: var(--text-muted); font-size: 13px; margin-top: 4px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }

/* ---------- Features ---------- */
.section { padding: 80px 0; }
.section-head { text-align: center; margin-bottom: 48px; }
.section-head .eyebrow { color: var(--brand-600); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 10px; }
.section-head h2 { margin-bottom: 12px; }
.section-head p { color: var(--text-muted); max-width: 600px; margin: 0 auto; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 22px; }
.feature {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all .25s;
}
.feature:hover { border-color: var(--brand-300); transform: translateY(-2px); box-shadow: var(--shadow); }
.feature-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  color: #fff;
  display: grid; place-items: center;
  margin-bottom: 18px;
  box-shadow: 0 8px 16px -4px rgba(99,102,241,.4);
}
.feature h4 { margin-bottom: 8px; }
.feature p { color: var(--text-muted); font-size: 14px; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; counter-reset: step; }
.step { position: relative; padding: 28px; }
.step::before {
  counter-increment: step;
  content: counter(step,decimal-leading-zero);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 64px;
  color: var(--brand-100);
  line-height: 1;
  display: block; margin-bottom: 12px;
}
[data-theme="dark"] .step::before { color: rgba(99,102,241,.2); }
.step h4 { margin-bottom: 8px; }
.step p { color: var(--text-muted); font-size: 14px; }
@media (max-width: 768px){ .steps { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  margin-top: 80px;
  background: var(--surface);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer h5 { font-size: 14px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: 14px; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 8px; }
.footer ul a { color: var(--text); font-size: 14px; }
.footer ul a:hover { color: var(--brand-600); }
.footer-bottom { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border-soft); text-align: center; color: var(--text-muted); font-size: 13px; }
@media (max-width: 768px){ .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Mobile burger ---------- */
.menu-toggle { display: none; }
@media (max-width: 900px) {
  .topnav-links, .topnav-cta .btn:not(.btn-primary) { display: none; }
  .menu-toggle { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--text); }
  body.menu-open .topnav-links {
    display: flex; flex-direction: column; align-items: stretch;
    position: fixed; top: var(--header-h); left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 16px; gap: 4px; z-index: 49;
  }
  body.menu-open .topnav-links a { padding: 12px; border-radius: var(--radius-sm); }
}

/* ---------- Auth pages ---------- */
.auth-wrap {
  min-height: 100vh;
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--bg);
}
.auth-side {
  background: linear-gradient(135deg, var(--brand-700), var(--brand-900));
  color: #fff;
  padding: 48px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.auth-side::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 30% 70%, rgba(249,115,22,.3), transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,.1), transparent 50%);
}
.auth-side > * { position: relative; }
.auth-side h2 { color: #fff; font-size: 2.25rem; margin-bottom: 14px; }
.auth-side p { opacity: .85; font-size: 1.05rem; line-height: 1.7; }
.auth-side .testimonial { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: var(--radius-lg); padding: 22px; backdrop-filter: blur(10px); }
.auth-side .testimonial p { font-size: 14px; opacity: .9; }
.auth-side .testimonial cite { display: block; margin-top: 10px; font-style: normal; font-weight: 600; font-size: 13px; opacity: .8; }

.auth-form-wrap { display: grid; place-items: center; padding: 40px 24px; }
.auth-form { width: 100%; max-width: 420px; }
.auth-form h1 { font-size: 2rem; margin-bottom: 6px; }
.auth-form .sub { color: var(--text-muted); margin-bottom: 32px; }

.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--text-muted); margin: 22px 0; font-size: 13px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

@media (max-width: 900px){ .auth-wrap { grid-template-columns: 1fr; } .auth-side { display: none; } }

/* ---------- Dashboard Layout ---------- */
.app-shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar {
  background: var(--surface);
  border-inline-end: 1px solid var(--border);
  padding: 16px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 10px; margin-bottom: 8px; }
.sidebar-section { margin-top: 18px; }
.sidebar-section h6 {
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-soft); padding: 0 10px; margin-bottom: 8px; font-weight: 700;
}
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted); font-size: 14px; font-weight: 500;
  margin-bottom: 2px;
}
.sidebar-link:hover { background: var(--surface-2); color: var(--text); }
.sidebar-link.active {
  background: var(--brand-50); color: var(--brand-700);
}
[data-theme="dark"] .sidebar-link.active { background: rgba(99,102,241,.15); color: var(--brand-300); }
.sidebar-link svg { width: 18px; height: 18px; flex-shrink: 0; }

.app-main { display: flex; flex-direction: column; min-width: 0; }
.app-header {
  height: 64px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 30;
}
.app-content { padding: 28px; flex: 1; }

.page-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-title { font-size: 24px; font-weight: 700; }
.page-sub { color: var(--text-muted); font-size: 14px; margin-top: 4px; }

/* Stat cards */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  position: relative; overflow: hidden;
}
.stat-card .stat-label { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; font-weight: 500; }
.stat-card .stat-value { font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--text); letter-spacing: -.02em; }
.stat-card .stat-icon {
  position: absolute; top: 18px; inset-inline-end: 18px;
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--brand-50); color: var(--brand-700);
}
[data-theme="dark"] .stat-card .stat-icon { background: rgba(99,102,241,.15); color: var(--brand-300); }
.stat-card.success .stat-icon { background: rgba(16,185,129,.12); color: var(--success); }
.stat-card.warn .stat-icon { background: rgba(245,158,11,.15); color: var(--accent-600); }
.stat-card.info .stat-icon { background: rgba(6,182,212,.12); color: var(--info); }

.user-menu { position: relative; display: inline-block; }
.user-trigger {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px 6px 6px;
  border-radius: 30px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
}
.user-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--brand-500), var(--accent-500)); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.user-name { font-size: 13px; font-weight: 600; }

.dropdown {
  position: absolute; top: calc(100% + 6px); inset-inline-end: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  padding: 6px;
  display: none;
  z-index: 60;
}
.dropdown.show { display: block; animation: slideIn .15s ease; }
.dropdown a, .dropdown button {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  text-align: start;
}
.dropdown a:hover, .dropdown button:hover { background: var(--surface-2); }

/* Mobile sidebar */
.sidebar-toggle { display: none; }
@media (max-width: 1000px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; top: 0; bottom: 0; inset-inline-start: 0;
    width: var(--sidebar-w);
    z-index: 100;
    transform: translateX(-100%);
    transition: transform .25s;
  }
  [dir="rtl"] .sidebar { transform: translateX(100%); }
  body.sidebar-open .sidebar { transform: translateX(0); }
  body.sidebar-open::after { content:''; position:fixed; inset:0; background: rgba(0,0,0,.4); z-index: 99; }
  .sidebar-toggle { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--text); }
}

/* ---------- Misc ---------- */
.skeleton { background: linear-gradient(90deg, var(--surface-2) 0%, var(--border-soft) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: skel 1.5s infinite; border-radius: var(--radius-sm); }
@keyframes skel { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

.empty-state { padding: 48px 24px; text-align: center; color: var(--text-muted); }
.empty-state svg { width: 48px; height: 48px; opacity: .4; margin: 0 auto 12px; }

.copy-btn { font-size: 12px; padding: 4px 10px; }

/* Pagination */
.pagination { display: flex; gap: 4px; justify-content: center; margin-top: 24px; }
.pagination a, .pagination span {
  padding: 7px 12px; border-radius: var(--radius-sm); font-size: 13px;
  border: 1px solid var(--border); color: var(--text);
}
.pagination .current { background: var(--brand-600); color: #fff; border-color: var(--brand-600); }
.pagination a:hover { background: var(--surface-2); }

/* Interstitial */
.interstitial-page {
  min-height: 100vh;
  display: grid; place-items: center;
  background: var(--bg);
  padding: 24px;
}
.interstitial-card {
  max-width: 600px; width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.countdown-circle {
  width: 120px; height: 120px;
  margin: 0 auto 24px;
  position: relative;
}
.countdown-circle svg { transform: rotate(-90deg); }
.countdown-circle .ring-track { stroke: var(--border); }
.countdown-circle .ring-progress { stroke: var(--brand-500); transition: stroke-dashoffset 1s linear; }
.countdown-num {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 800; font-size: 44px; color: var(--text);
}

/* Print */
@media print { .topnav, .footer, .sidebar { display: none; } }

/* Utility */
.text-muted { color: var(--text-muted); }
.text-soft  { color: var(--text-soft); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 32px; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; } .gap-3 { gap: 24px; }
.w-full { width: 100%; }
.font-mono { font-family: var(--font-mono); }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* =====================================================
   Additional components used by views
   ===================================================== */

/* ---------- Layout helpers ---------- */
.hidden { display: none !important; }
.text-end { text-align: end; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.muted-sm { color: var(--text-muted); font-size: 13px; }
.link-mono { font-family: var(--font-mono, 'JetBrains Mono', monospace); font-size: 13px; color: var(--brand-600); text-decoration: none; }
.link-mono:hover { text-decoration: underline; }
.link-muted { color: var(--text-muted); text-decoration: none; font-size: 14px; }
.link-muted:hover { color: var(--brand-600); }

.grad-text {
  background: linear-gradient(120deg, var(--brand-500), var(--accent-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Top nav extras ---------- */
.topnav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.85); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--border); }
[data-theme="dark"] .topnav { background: rgba(15,23,42,.78); }
.topnav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.topnav-links { display: flex; gap: 24px; align-items: center; }
.topnav-links a { color: var(--text-muted); text-decoration: none; font-weight: 500; font-size: 14px; transition: color .15s; }
.topnav-links a:hover { color: var(--text); }
.topnav-actions { display: flex; align-items: center; gap: 8px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; background: linear-gradient(135deg, var(--brand-500), var(--brand-700)); color: #fff; font-size: 13px; font-weight: 800; letter-spacing: -.5px; box-shadow: var(--shadow-sm); }
.brand-mark-admin { background: linear-gradient(135deg, var(--accent-500), var(--accent-600)); }
.brand-name { font-family: 'Sora', system-ui, sans-serif; font-size: 16px; }
.btn-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; position: relative; transition: all .15s; }
.btn-icon:hover { background: var(--bg-soft); border-color: var(--brand-300); }
.btn-icon .icon-moon { display: none; }
[data-theme="dark"] .btn-icon .icon-sun { display: none; }
[data-theme="dark"] .btn-icon .icon-moon { display: inline; }
.lang-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.lang-switch a { padding: 7px 12px; font-size: 12px; font-weight: 600; color: var(--text-muted); text-decoration: none; transition: all .15s; }
.lang-switch a.active { background: var(--brand-600); color: #fff; }
.lang-switch a:not(.active):hover { background: var(--bg-soft); color: var(--text); }
.dot-pulse { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-500); box-shadow: 0 0 0 0 rgba(249,115,22,.7); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(249,115,22,.7); } 70% { box-shadow: 0 0 0 8px rgba(249,115,22,0); } 100% { box-shadow: 0 0 0 0 rgba(249,115,22,0); } }
.mobile-only { display: none; }
@media (max-width: 768px) {
  .topnav-links { display: none; }
  .mobile-only { display: inline-flex; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: 80px 0 60px; overflow: hidden; }
.hero-bg-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(99,102,241,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(99,102,241,.06) 1px, transparent 1px); background-size: 40px 40px; mask-image: radial-gradient(ellipse at top, #000 30%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at top, #000 30%, transparent 75%); }
.hero-bg-glow { position: absolute; top: -20%; left: 50%; transform: translateX(-50%); width: 800px; height: 600px; background: radial-gradient(ellipse at center, rgba(99,102,241,.18), transparent 60%); pointer-events: none; }
.hero-inner { position: relative; text-align: center; max-width: 880px; margin: 0 auto; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; font-size: 13px; color: var(--text-muted); margin-bottom: 22px; box-shadow: var(--shadow-xs); }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 0 rgba(16,185,129,.7); animation: pulse-green 2s infinite; }
@keyframes pulse-green { 0% { box-shadow: 0 0 0 0 rgba(16,185,129,.7); } 70% { box-shadow: 0 0 0 6px rgba(16,185,129,0); } 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); } }
.hero-title { font-family: 'Sora', system-ui, sans-serif; font-size: clamp(32px, 5vw, 56px); font-weight: 800; line-height: 1.1; letter-spacing: -1.5px; margin: 0 0 18px; }
.hero-sub { font-size: clamp(15px, 2vw, 18px); color: var(--text-muted); max-width: 620px; margin: 0 auto 32px; line-height: 1.6; }
.hero-trust { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 36px; flex-wrap: wrap; color: var(--text-muted); font-size: 13px; }
.trust-logos { display: flex; gap: 22px; flex-wrap: wrap; }
.trust-logo { font-weight: 700; opacity: .7; font-size: 14px; }

/* Shorten card */
.shorten-card { max-width: 760px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px; box-shadow: var(--shadow-lg); }
.shorten-row { display: flex; gap: 8px; align-items: stretch; }
.shorten-input-wrap { position: relative; flex: 1; }
.shorten-icon { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-start: 14px; color: var(--text-soft); pointer-events: none; }
.shorten-input-wrap input { width: 100%; padding: 14px 14px 14px 42px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 15px; background: var(--surface-2); color: var(--text); }
[dir="rtl"] .shorten-input-wrap input { padding: 14px 42px 14px 14px; }
.shorten-input-wrap input:focus { outline: none; border-color: var(--brand-500); background: var(--surface); box-shadow: 0 0 0 3px rgba(99,102,241,.1); }
.shorten-alias-wrap { position: relative; flex: 0 0 220px; display: flex; align-items: center; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 0 14px; }
.alias-prefix { color: var(--text-soft); font-size: 13px; font-family: var(--font-mono, monospace); white-space: nowrap; }
.shorten-alias-wrap input { flex: 1; border: none; background: transparent; padding: 14px 6px; font-size: 14px; color: var(--text); outline: none; min-width: 0; }
.shorten-help { padding: 10px 4px 0; font-size: 12px; color: var(--text-soft); text-align: center; }
.shorten-result { max-width: 760px; margin: 18px auto 0; padding: 18px; background: var(--surface); border: 1px solid var(--success); border-radius: var(--radius); box-shadow: var(--shadow); }
.shorten-result.error { border-color: var(--danger); }
.btn-spinner { display: none; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.btn.loading .btn-label { opacity: 0; }
.btn.loading .btn-spinner { display: inline-block; position: absolute; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn { position: relative; }

@media (max-width: 720px) {
  .shorten-row { flex-direction: column; }
  .shorten-alias-wrap { flex: 1; }
}

/* ---------- Stats strip ---------- */
.stats-strip { padding: 24px 0; border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); background: var(--surface-2); }
.stats-strip-inner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; text-align: center; }
.stat-pill-num { font-family: 'Sora', sans-serif; font-size: 28px; font-weight: 800; color: var(--text); }
.stat-pill-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
@media (max-width: 720px) { .stats-strip-inner { grid-template-columns: repeat(2, 1fr); gap: 20px; } }

/* ---------- Section ---------- */
.section { padding: 70px 0; }
.section-alt { background: var(--surface-2); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 50px; }
.section-eyebrow { display: inline-block; padding: 4px 12px; background: var(--brand-50); color: var(--brand-700); border-radius: 999px; font-size: 12px; font-weight: 600; margin-bottom: 14px; letter-spacing: .3px; text-transform: uppercase; }
[data-theme="dark"] .section-eyebrow { background: rgba(99,102,241,.15); color: var(--brand-300); }
.section-title { font-family: 'Sora', sans-serif; font-size: clamp(26px, 3.5vw, 38px); font-weight: 700; letter-spacing: -.8px; margin: 0 0 12px; }
.section-sub { color: var(--text-muted); font-size: 16px; line-height: 1.6; }

/* ---------- Features ---------- */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature-card { padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); transition: all .25s; }
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--brand-300); }
.feature-icon { width: 48px; height: 48px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.feature-icon-1 { background: linear-gradient(135deg, #eef2ff, #c7d2fe); color: var(--brand-700); }
.feature-icon-2 { background: linear-gradient(135deg, #fef3c7, #fcd34d); color: #b45309; }
.feature-icon-3 { background: linear-gradient(135deg, #d1fae5, #6ee7b7); color: #047857; }
.feature-icon-4 { background: linear-gradient(135deg, #fce7f3, #f9a8d4); color: #be185d; }
.feature-icon-5 { background: linear-gradient(135deg, #cffafe, #67e8f9); color: #0e7490; }
.feature-icon-6 { background: linear-gradient(135deg, #ede9fe, #c4b5fd); color: #6d28d9; }
.feature-card h3 { font-size: 18px; font-weight: 700; margin: 0 0 8px; }
.feature-card p { color: var(--text-muted); line-height: 1.6; margin: 0; font-size: 14px; }
@media (max-width: 900px) { .features-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .features-grid { grid-template-columns: 1fr; } }

/* ---------- Steps ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.step { padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); position: relative; }
.step-num { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-family: 'Sora', sans-serif; background: var(--brand-600); color: #fff; margin-bottom: 14px; }
.step h3 { font-size: 17px; font-weight: 700; margin: 0 0 8px; }
.step p { color: var(--text-muted); font-size: 14px; line-height: 1.6; margin: 0; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.pricing-card { padding: 32px 26px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); position: relative; }
.pricing-card-featured { border-color: var(--brand-500); box-shadow: var(--shadow-glow); transform: scale(1.02); }
.pricing-badge { position: absolute; top: -12px; inset-inline-start: 50%; transform: translateX(-50%); padding: 4px 14px; background: var(--brand-600); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; }
[dir="rtl"] .pricing-badge { transform: translateX(50%); }
.pricing-card h3 { font-size: 18px; font-weight: 700; margin: 0 0 4px; }
.pricing-rate { font-family: 'Sora', sans-serif; font-size: 36px; font-weight: 800; color: var(--text); margin: 12px 0; }
.pricing-rate span { font-size: 14px; font-weight: 500; color: var(--text-muted); margin-inline-start: 4px; }
.pricing-desc { color: var(--text-muted); margin: 0 0 18px; font-size: 14px; }
.pricing-features { list-style: none; padding: 0; margin: 0 0 22px; }
.pricing-features li { padding: 8px 0; padding-inline-start: 26px; position: relative; font-size: 14px; color: var(--text); }
.pricing-features li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: var(--success); font-weight: 700; }
@media (max-width: 900px) { .pricing-grid { grid-template-columns: 1fr; } .pricing-card-featured { transform: none; } }

/* ---------- CTA Band ---------- */
.cta-band { padding: 70px 0; background: linear-gradient(135deg, var(--brand-700), var(--brand-900)); color: #fff; text-align: center; }
.cta-band h2 { font-family: 'Sora', sans-serif; font-size: clamp(26px, 3.5vw, 38px); font-weight: 800; margin: 0 0 12px; letter-spacing: -.8px; }
.cta-band p { color: rgba(255,255,255,.85); max-width: 620px; margin: 0 auto 28px; font-size: 16px; }
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta-band .btn-ghost { color: #fff; border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.06); }
.cta-band .btn-ghost:hover { background: rgba(255,255,255,.12); }

/* ---------- Footer ---------- */
.site-footer { padding: 50px 0 28px; border-top: 1px solid var(--border); background: var(--surface-2); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 32px; }
.footer-tagline { color: var(--text-muted); font-size: 14px; line-height: 1.6; max-width: 320px; margin-top: 14px; }
.footer-col h4 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin: 0 0 14px; }
.footer-col a { display: block; color: var(--text); text-decoration: none; font-size: 14px; padding: 5px 0; transition: color .15s; }
.footer-col a:hover { color: var(--brand-600); }
.footer-bottom { padding-top: 22px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 13px; text-align: center; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }

/* ---------- Forms ---------- */
.form .field, .field { display: flex; flex-direction: column; margin-bottom: 14px; }
.field-label { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.field input:not([type="checkbox"]), .field select, .field textarea, .form input:not([type="checkbox"]), .form select, .form textarea {
  padding: 11px 13px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font-size: 14px; font-family: inherit; transition: all .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(99,102,241,.12); }
.field input:disabled { background: var(--bg-soft); color: var(--text-soft); cursor: not-allowed; }
.field-hint { font-size: 12px; color: var(--text-soft); margin-top: 5px; }
.field-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.checkbox { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--brand-600); }
.form-section { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin: 22px 0 12px; padding-top: 18px; border-top: 1px solid var(--border-soft); }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .form-grid-2 { grid-template-columns: 1fr; } }
.form-inline-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-inline-grid .span-2 { grid-column: span 2; }
.form-actions { display: flex; gap: 10px; margin-top: 4px; }
@media (max-width: 720px) { .form-inline-grid { grid-template-columns: 1fr; } .form-inline-grid .span-2 { grid-column: span 1; } }

/* ---------- Auth ---------- */
.auth-body { min-height: 100vh; }
.auth-wrap { display: grid; grid-template-columns: 460px 1fr; min-height: 100vh; }
.auth-side { background: linear-gradient(135deg, var(--brand-700), var(--brand-900)); color: #fff; padding: 40px; position: relative; overflow: hidden; }
.auth-side-inner { position: relative; height: 100%; display: flex; flex-direction: column; z-index: 2; }
.auth-side-decor { position: absolute; top: -100px; right: -100px; width: 500px; height: 500px; border-radius: 50%; background: radial-gradient(circle, rgba(249,115,22,.18) 0%, transparent 60%); pointer-events: none; }
.brand-light { color: #fff; }
.brand-light .brand-mark { background: rgba(255,255,255,.18); }
.auth-pitch { margin-top: auto; }
.auth-pitch h1 { font-family: 'Sora', sans-serif; font-size: 32px; font-weight: 800; line-height: 1.15; margin: 0 0 14px; letter-spacing: -.5px; }
.auth-pitch p { color: rgba(255,255,255,.8); font-size: 15px; line-height: 1.6; margin: 0 0 22px; }
.auth-points { list-style: none; padding: 0; margin: 0; }
.auth-points li { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; color: rgba(255,255,255,.92); font-size: 14px; }
.auth-points .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-500); margin-top: 7px; flex-shrink: 0; }
.auth-main { padding: 32px 40px; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.auth-topbar { width: 100%; max-width: 440px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.auth-home-link { color: var(--text-muted); text-decoration: none; font-size: 13px; font-weight: 500; }
.auth-topbar-actions { display: flex; gap: 8px; align-items: center; }
.auth-card { width: 100%; max-width: 440px; }
.auth-title { font-family: 'Sora', sans-serif; font-size: 26px; font-weight: 800; margin: 0 0 8px; letter-spacing: -.4px; }
.auth-sub { color: var(--text-muted); font-size: 14px; margin: 0 0 24px; }
.auth-foot { text-align: center; margin: 18px 0 0; font-size: 14px; color: var(--text-muted); }
.auth-foot a { color: var(--brand-600); font-weight: 600; text-decoration: none; }
.btn-google { color: var(--text); display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
@media (max-width: 900px) { .auth-wrap { grid-template-columns: 1fr; } .auth-side { display: none; } }

/* ---------- App shell (dashboard/admin) ---------- */
.app-body { background: var(--bg); }
.app-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar { background: var(--surface); border-inline-end: 1px solid var(--border); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 30; }
.sidebar-header { padding: 18px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.sidebar-nav { padding: 16px 12px; flex: 1; overflow-y: auto; }
.sidebar-section { padding: 8px 12px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--text-soft); }
.sidebar-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--text-muted); text-decoration: none; font-size: 14px; font-weight: 500; transition: all .15s; margin-bottom: 2px; }
.sidebar-link:hover { background: var(--bg-soft); color: var(--text); }
.sidebar-link.active { background: var(--brand-50); color: var(--brand-700); font-weight: 600; }
[data-theme="dark"] .sidebar-link.active { background: rgba(99,102,241,.15); color: var(--brand-300); }
.sidebar-icon { display: inline-flex; align-items: center; justify-content: center; }
.sidebar-link .badge-dot { margin-inline-start: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent-500); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.sidebar-footer { padding: 14px; border-top: 1px solid var(--border); }
.user-mini { display: flex; align-items: center; gap: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--brand-500), var(--brand-700)); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.avatar-admin { background: linear-gradient(135deg, var(--accent-500), var(--accent-600)); }
.avatar-sm { width: 30px; height: 30px; font-size: 12px; border-radius: 8px; }
.avatar-link { background: linear-gradient(135deg, #06b6d4, #0e7490); }
.user-mini-info { min-width: 0; flex: 1; }
.user-mini-name { font-weight: 600; font-size: 14px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-mini-balance { font-size: 12px; color: var(--text-muted); }

.app-main { display: flex; flex-direction: column; min-width: 0; }
.app-topbar { display: flex; align-items: center; gap: 14px; padding: 14px 26px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.topbar-title { font-family: 'Sora', sans-serif; font-size: 18px; font-weight: 700; margin: 0; flex: 1; }
.topbar-actions { display: flex; gap: 8px; align-items: center; }
.app-content { padding: 26px; max-width: 1280px; width: 100%; }

.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 25; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.sidebar-overlay.active { display: block; }
@media (max-width: 1024px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset-inline-start: 0; top: 0; width: 280px; transform: translateX(-100%); transition: transform .3s; }
  [dir="rtl"] .sidebar { transform: translateX(100%); }
  .sidebar.open { transform: translateX(0); }
}

/* ---------- Page head ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; gap: 16px; flex-wrap: wrap; }
.page-title { font-family: 'Sora', sans-serif; font-size: 26px; font-weight: 800; margin: 0 0 4px; letter-spacing: -.4px; }
.welcome-row { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; gap: 16px; flex-wrap: wrap; }
.welcome-greeting { font-family: 'Sora', sans-serif; font-size: 26px; font-weight: 800; margin: 0; letter-spacing: -.4px; }
.welcome-sub { color: var(--text-muted); margin: 4px 0 0; font-size: 14px; }

/* ---------- Stat cards ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.stat-card { padding: 18px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: all .2s; }
.stat-card:hover { border-color: var(--brand-300); box-shadow: var(--shadow-sm); }
.stat-card-accent { background: linear-gradient(135deg, var(--brand-50), var(--surface)); border-color: var(--brand-300); }
[data-theme="dark"] .stat-card-accent { background: linear-gradient(135deg, rgba(99,102,241,.12), var(--surface)); }
.stat-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.stat-card-label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }
.stat-card-icon { color: var(--text-soft); }
.stat-card-value { font-family: 'Sora', sans-serif; font-size: 26px; font-weight: 800; color: var(--text); letter-spacing: -.5px; }
.stat-card-meta { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.stat-card-link { display: inline-block; margin-top: 6px; font-size: 13px; color: var(--brand-600); text-decoration: none; font-weight: 600; }
.stat-card-link:hover { text-decoration: underline; }
@media (max-width: 1024px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .stat-grid { grid-template-columns: 1fr; } }

/* ---------- Grids ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-2-asym { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .grid-2, .grid-2-asym, .grid-3 { grid-template-columns: 1fr; } }

/* ---------- Card head ---------- */
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border-soft); }
.card-head .card-title { font-size: 15px; font-weight: 700; margin: 0; }
.card-body { padding: 18px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { text-align: start; padding: 12px 16px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); border-bottom: 1px solid var(--border); background: var(--surface-2); }
.data-table td { padding: 14px 16px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover { background: var(--bg-soft); }
.alias-cell { display: inline-flex; align-items: center; gap: 6px; }
.icon-btn-mini { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text-muted); cursor: pointer; transition: all .15s; }
.icon-btn-mini:hover { color: var(--brand-600); border-color: var(--brand-300); }
.cell-user { display: inline-flex; align-items: center; gap: 10px; }
.action-row { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; }
.badge-soft { background: var(--bg-soft); color: var(--text-muted); }
.badge-success { background: rgba(16,185,129,.12); color: #047857; }
.badge-danger { background: rgba(239,68,68,.12); color: #b91c1c; }
.badge-warn { background: rgba(245,158,11,.14); color: #b45309; }
.badge-info { background: rgba(6,182,212,.12); color: #0e7490; }
[data-theme="dark"] .badge-success { color: #6ee7b7; }
[data-theme="dark"] .badge-danger { color: #fca5a5; }
[data-theme="dark"] .badge-warn { color: #fcd34d; }

/* ---------- Empty states ---------- */
.empty-state { padding: 50px 20px; text-align: center; color: var(--text-muted); }
.empty-state p { margin: 0 0 16px; }
.empty-state-sm { padding: 30px 20px; text-align: center; color: var(--text-muted); font-size: 13px; }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 6px; padding: 16px; justify-content: center; flex-wrap: wrap; }
.pagination a { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; color: var(--text); text-decoration: none; font-size: 13px; font-weight: 600; transition: all .15s; }
.pagination a:hover { border-color: var(--brand-300); color: var(--brand-600); }
.pagination a.active { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }

/* ---------- Search/filter ---------- */
.search-inline input { padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font-size: 13px; min-width: 200px; }
.filter-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filter-bar input, .filter-bar select { padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font-size: 13px; }

/* ---------- Copy row ---------- */
.copy-row { display: flex; gap: 6px; align-items: center; }
.copy-row input { flex: 1; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--text); font-size: 13px; font-family: var(--font-mono, monospace); }

/* ---------- Bar list (analytics) ---------- */
.bar-list { list-style: none; padding: 18px; margin: 0; }
.bar-list li { margin-bottom: 12px; }
.bar-list li:last-child { margin-bottom: 0; }
.bar-label { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 5px; color: var(--text); }
.bar-label span:last-child { color: var(--text-muted); font-weight: 600; }
.bar { height: 6px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--brand-500), var(--brand-700)); border-radius: 999px; transition: width .4s; }
.bar-fill-2 { background: linear-gradient(90deg, var(--accent-500), var(--accent-600)); }
.bar-fill-3 { background: linear-gradient(90deg, #06b6d4, #0e7490); }

/* ---------- Mini list (admin overview) ---------- */
.mini-list { list-style: none; padding: 0; margin: 0; }
.mini-list li { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--border-soft); }
.mini-list li:last-child { border-bottom: none; }
.mini-list-body { flex: 1; min-width: 0; }
.mini-list-title { font-weight: 600; font-size: 14px; color: var(--text); }

/* ---------- Notifications list ---------- */
.notif-list { list-style: none; padding: 0; margin: 0; }
.notif-item { display: flex; align-items: flex-start; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--border-soft); }
.notif-item:last-child { border-bottom: none; }
.notif-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; margin-top: 6px; background: var(--brand-500); }
.notif-dot-success { background: var(--success); }
.notif-dot-warning { background: var(--warning); }
.notif-dot-error { background: var(--danger); }
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-weight: 600; font-size: 14px; color: var(--text); }
.notif-msg { font-size: 13px; color: var(--text-muted); margin-top: 3px; }
.notif-time { white-space: nowrap; flex-shrink: 0; }

/* ---------- Info list (settings) ---------- */
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border-soft); font-size: 14px; }
.info-list li:last-child { border-bottom: none; }
.info-list span { color: var(--text-muted); }

/* ---------- Withdraw / balance pill ---------- */
.balance-pill { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; background: linear-gradient(135deg, var(--brand-50), var(--accent-100, #ffedd5)); border: 1px solid var(--brand-300); border-radius: var(--radius); }
[data-theme="dark"] .balance-pill { background: linear-gradient(135deg, rgba(99,102,241,.12), rgba(249,115,22,.08)); }
.balance-pill span { color: var(--text-muted); font-size: 13px; font-weight: 500; }
.balance-pill strong { font-family: 'Sora', sans-serif; font-size: 22px; font-weight: 800; color: var(--text); }

/* ---------- Reference panel ---------- */
.ref-stats { display: flex; gap: 12px; }
.ref-stat { padding: 10px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; }
.ref-stat-label { display: block; font-size: 11px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 3px; }
.ref-stat-value { font-family: var(--font-mono, monospace); font-weight: 700; color: var(--brand-600); }

/* ---------- Interstitial ---------- */
.interstitial-body { background: var(--bg); }
.topnav-compact { padding: 0; }
.interstitial { padding: 30px 0 60px; min-height: calc(100vh - 64px); }
.ad-slot { background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); padding: 20px; margin: 18px 0; text-align: center; min-height: 100px; display: flex; align-items: center; justify-content: center; }
.ad-slot-placeholder { color: var(--text-soft); font-size: 13px; font-style: italic; min-height: 90px; }
.inter-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 36px; box-shadow: var(--shadow-lg); margin: 18px 0; }
.inter-head { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 24px; flex-wrap: wrap; }
.inter-title { font-family: 'Sora', sans-serif; font-size: 26px; font-weight: 800; margin: 8px 0 6px; letter-spacing: -.4px; }
.inter-sub { color: var(--text-muted); margin: 0; font-size: 14px; }
.countdown-wrap { position: relative; width: 120px; height: 120px; flex-shrink: 0; }
.countdown-track { stroke: var(--border); }
.countdown-bar { stroke: var(--brand-500); stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.countdown-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: 'Sora', sans-serif; font-size: 36px; font-weight: 800; color: var(--text); }
.inter-target { padding: 16px 18px; background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: var(--radius); margin-bottom: 20px; }
.inter-target-label { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--text-muted); letter-spacing: .5px; margin-bottom: 6px; }
.inter-target-url { font-size: 14px; color: var(--text); word-break: break-all; font-family: var(--font-mono, monospace); }
.inter-actions { text-align: center; }
.inter-hint { margin-top: 10px; }
.inter-info { margin-top: 30px; padding: 30px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.inter-info h2 { font-family: 'Sora', sans-serif; font-size: 20px; font-weight: 700; margin: 0 0 8px; }
.inter-info > p { color: var(--text-muted); margin: 0 0 22px; font-size: 14px; }
.inter-info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.inter-info-card { padding: 18px; background: var(--surface-2); border-radius: var(--radius); }
.inter-info-icon { font-size: 24px; margin-bottom: 8px; }
.inter-info-card h4 { font-size: 14px; font-weight: 700; margin: 0 0 4px; }
.inter-info-card p { margin: 0; font-size: 13px; color: var(--text-muted); line-height: 1.5; }
@media (max-width: 720px) { .inter-info-grid { grid-template-columns: 1fr; } .inter-card { padding: 24px; } }

/* ---------- Error pages ---------- */
.error-page { padding: 80px 0; text-align: center; }
.error-inner { max-width: 480px; margin: 0 auto; }
.error-code { font-family: 'Sora', sans-serif; font-size: 88px; font-weight: 800; line-height: 1; background: linear-gradient(135deg, var(--brand-500), var(--accent-500)); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 12px; letter-spacing: -3px; }
.error-icon { margin-bottom: 18px; }
.error-title { font-family: 'Sora', sans-serif; font-size: 26px; font-weight: 800; margin: 0 0 12px; }
.error-text { color: var(--text-muted); font-size: 15px; line-height: 1.6; margin: 0 0 24px; }

/* ---------- Auth divider ---------- */
.auth-divider { position: relative; text-align: center; margin: 22px 0; }
.auth-divider::before { content: ""; position: absolute; top: 50%; inset-inline-start: 0; inset-inline-end: 0; height: 1px; background: var(--border); }
.auth-divider span { position: relative; padding: 0 14px; background: var(--surface); color: var(--text-muted); font-size: 12px; }

