@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&display=swap');

/* ── Tokens ── */
:root {
  --bg:          #0d0d12;
  --surface:     #13131a;
  --raised:      #1a1a23;
  --overlay:     #20202b;
  --input-bg:    #0f0f16;

  --line:        rgba(255,255,255,0.07);
  --line-hi:     rgba(255,255,255,0.13);

  --text:        #eaeaf2;
  --text-2:      #8a8aa8;
  --text-3:      #52526a;

  --accent:      #9b4dca;
  --accent-h:    #a855f7;
  --accent-dim:  rgba(155,77,202,0.14);
  --accent-line: rgba(155,77,202,0.28);

  --green:       #22c55e;
  --green-dim:   rgba(34,197,94,0.12);
  --green-line:  rgba(34,197,94,0.25);
  --yellow:      #f59e0b;
  --yellow-dim:  rgba(245,158,11,0.12);
  --yellow-line: rgba(245,158,11,0.25);
  --red:         #ef4444;
  --red-dim:     rgba(239,68,68,0.12);
  --red-line:    rgba(239,68,68,0.25);
  --blue:        #3b82f6;
  --blue-dim:    rgba(59,130,246,0.12);
  --blue-line:   rgba(59,130,246,0.25);

  --font:        'Outfit', system-ui, -apple-system, sans-serif;
  --mono:        'JetBrains Mono', 'Fira Code', monospace;

  --r-sm:   4px;
  --r-md:   6px;
  --r-lg:   10px;
  --r-xl:   14px;
  --r-2xl:  20px;
  --r-full: 9999px;

  --sh-sm: 0 1px 4px rgba(0,0,0,0.5);
  --sh-md: 0 4px 16px rgba(0,0,0,0.55);
  --sh-lg: 0 12px 40px rgba(0,0,0,0.6);

  --fast:   140ms ease;
  --norm:   220ms ease;

  /* ── Legacy aliases (used by inline styles throughout HTML) ── */
  --bg-base:        var(--bg);
  --bg-surface:     var(--surface);
  --bg-elevated:    var(--raised);
  --bg-overlay:     var(--overlay);
  --bg-input:       var(--input-bg);
  --border-subtle:  var(--line);
  --border-default: var(--line-hi);
  --border-strong:  rgba(255,255,255,0.22);
  --text-primary:   var(--text);
  --text-secondary: var(--text-2);
  --text-muted:     var(--text-3);
  --text-disabled:  rgba(255,255,255,0.2);
  --purple-400:     var(--accent);
  --purple-500:     var(--accent);
  --purple-300:     #c084fc;
  --purple-600:     #7c3aed;
  --purple-700:     #6d28d9;
  --purple-800:     #5b21b6;
  --purple-brand:   var(--accent);
  --green-400:      var(--green);
  --green-500:      var(--green);
  --amber-400:      var(--yellow);
  --red-400:        var(--red);
  --rose-400:       var(--red);
  --cyan-400:       var(--blue);
  --dark-950:       var(--bg);
  --dark-900:       var(--surface);
  --dark-800:       var(--raised);
  --dark-700:       var(--overlay);
  --dark-600:       var(--line-hi);
  --dark-500:       rgba(255,255,255,0.22);
  --shadow-sm:      var(--sh-sm);
  --shadow-md:      var(--sh-md);
  --shadow-lg:      var(--sh-lg);
  --shadow-xl:      var(--sh-lg);
  --t-fast:         var(--fast);
  --t-normal:       var(--norm);
  --radius:         var(--r-xl);
  --radius-sm:      var(--r-sm);
  --radius-md:      var(--r-md);
  --radius-lg:      var(--r-lg);
  --radius-xl:      var(--r-xl);
  --radius-2xl:     var(--r-2xl);
  --radius-full:    var(--r-full);
  --font-sans:      var(--font);
  --font-mono:      var(--mono);
  --accent-subtle:  var(--accent-dim);
  --accent-border:  var(--accent-line);
  --green-subtle:   var(--green-dim);
  --green-border:   var(--green-line);
  --yellow-subtle:  var(--yellow-dim);
  --yellow-border:  var(--yellow-line);
  --red-subtle:     var(--red-dim);
  --red-border:     var(--red-line);
  --blue-subtle:    var(--blue-dim);
  --blue-border:    var(--blue-line);
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px;
  --space-12: 48px; --space-16: 64px; --space-20: 80px;
}

[data-theme="light"] {
  --bg:         #f4f4f8;
  --surface:    #ffffff;
  --raised:     #ebebf2;
  --overlay:    #e2e2ea;
  --input-bg:   #f9f9fc;
  --line:       rgba(0,0,0,0.07);
  --line-hi:    rgba(0,0,0,0.12);
  --text:       #111118;
  --text-2:     #5a5a74;
  --text-3:     #9090a8;
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: var(--font); }

/* ── Background ── */
.bg-grid { display: none; }
.bg-glow { position: fixed; pointer-events: none; z-index: 0; border-radius: 50%; }
.bg-glow-1 {
  width: 600px; height: 600px; top: -200px; left: -150px;
  background: radial-gradient(circle, rgba(155,77,202,0.07) 0%, transparent 65%);
  filter: blur(40px);
}
.bg-glow-2 {
  width: 400px; height: 400px; bottom: 5%; right: -100px;
  background: radial-gradient(circle, rgba(59,130,246,0.05) 0%, transparent 65%);
  filter: blur(40px);
}

/* ── Typography ── */
.font-mono { font-family: var(--mono) !important; }
.section-label {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--accent); margin-bottom: 10px;
}
.section-title {
  font-size: clamp(1.7rem, 4vw, 3rem); font-weight: 800;
  line-height: 1.1; margin-bottom: 14px; letter-spacing: -0.02em;
}
.section-subtitle {
  font-size: 1rem; color: var(--text-2);
  max-width: 540px; line-height: 1.75;
}
.centered { text-align: center; }
.centered .section-subtitle { margin: 0 auto; }
.justify-center { justify-content: center; }

/* Utility */
.mt-1{margin-top:.5rem}.mt-2{margin-top:1rem}.mt-3{margin-top:1.5rem}.mt-4{margin-top:2rem}
.mt-6{margin-top:3rem}.mt-8{margin-top:4rem}.mb-4{margin-bottom:2rem}.mb-6{margin-bottom:3rem}.mb-8{margin-bottom:4rem}
.flex{display:flex}.flex-col{flex-direction:column}.items-center{align-items:center}
.justify-center{justify-content:center}.gap-1{gap:.5rem}.gap-2{gap:1rem}.gap-3{gap:1.5rem}

/* ── Layout ── */
.container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.page-pad { padding: 94px 0 60px; }
section { position: relative; z-index: 1; }

/* ══════════════════════════════════════════
   NAV
   ══════════════════════════════════════════ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 58px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1240px; margin: 0 auto; padding: 0 20px;
  height: 58px; display: flex; align-items: center;
  justify-content: space-between; gap: 16px;
}
.logo {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 0.95rem; flex-shrink: 0;
}
.logo img { height: 28px; border-radius: var(--r-md); }

.nav-links {
  display: flex; align-items: center; gap: 2px;
}
.nav-links a {
  color: var(--text-2); font-size: 0.875rem; font-weight: 500;
  padding: 6px 12px; border-radius: var(--r-md);
  transition: color var(--fast), background var(--fast);
  white-space: nowrap;
}
.nav-links a:hover { color: var(--text); background: var(--line); }
.nav-links a.active { color: var(--text); }
.nav-links > button.mobile-toggle { display: none; }

.nav-avatar {
  width: 30px; height: 30px; border-radius: var(--r-full);
  background: var(--accent-dim); border: 1px solid var(--accent-line);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.75rem; cursor: pointer; color: var(--accent);
}
.nav-cta {
  padding: 7px 16px !important; border-radius: var(--r-lg) !important;
  background: var(--accent) !important; color: #fff !important;
  font-weight: 600 !important; font-size: 0.85rem !important;
  transition: background var(--fast) !important;
}
.nav-cta:hover { background: var(--accent-h) !important; }
.nav-user { display: flex; align-items: center; gap: 12px; }
.nav-right { display: flex; align-items: center; gap: 8px; }

.mobile-toggle {
  display: none; background: none; border: 1px solid var(--line-hi);
  color: var(--text); font-size: 1.2rem; cursor: pointer;
  padding: 6px 9px; border-radius: var(--r-md); line-height: 1;
  transition: background var(--fast);
}
.mobile-toggle:hover { background: var(--line); }

/* ── Mobile nav drawer (lives in <body>, moved by JS on load) ── */
#mobile-nav-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 500;
  width: min(300px, 84vw);
  background: var(--raised);
  border-left: 1px solid var(--line-hi);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.26s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}
#mobile-nav-drawer.open { transform: translateX(0); }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
  font-weight: 700; font-size: 0.95rem; flex-shrink: 0;
}
.drawer-close {
  background: none; border: 1px solid var(--line-hi); color: var(--text-2);
  width: 32px; height: 32px; border-radius: var(--r-md);
  font-size: 1rem; cursor: pointer; display: flex; align-items: center;
  justify-content: center; transition: background var(--fast), color var(--fast);
}
.drawer-close:hover { background: var(--overlay); color: var(--text); }
.drawer-links { display: flex; flex-direction: column; flex: 1; padding: 8px 0; }
.drawer-links a {
  padding: 14px 20px; font-size: 0.95rem; font-weight: 500;
  color: var(--text-2); border-bottom: 1px solid var(--line);
  transition: background var(--fast), color var(--fast);
}
.drawer-links a:hover { background: var(--overlay); color: var(--text); }
.drawer-links a.active { color: var(--accent); background: var(--accent-dim); }
.drawer-auth { padding: 16px 20px; border-top: 1px solid var(--line); }

#nav-backdrop {
  position: fixed; inset: 0; z-index: 490;
  background: rgba(0,0,0,0.6);
  display: none;
}
#nav-backdrop.open { display: block; }

/* ══════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 7px; padding: 0 18px; height: 36px;
  border-radius: var(--r-lg); font-family: var(--font);
  font-weight: 600; font-size: 0.875rem; cursor: pointer;
  transition: background var(--fast), border-color var(--fast),
              transform var(--fast), opacity var(--fast);
  border: 1px solid transparent; text-decoration: none;
  white-space: nowrap; position: relative;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }
.btn-sm  { height: 30px; padding: 0 12px; font-size: 0.8rem; border-radius: var(--r-md); }
.btn-lg  { height: 42px; padding: 0 24px; font-size: 0.9rem; }
.btn-xl  { height: 50px; padding: 0 32px; font-size: 0.95rem; }
.btn-block { width: 100%; }

.btn-primary {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-h); border-color: var(--accent-h);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--raised); border-color: var(--line-hi); color: var(--text);
}
.btn-secondary:hover:not(:disabled) { background: var(--overlay); }

.btn-ghost {
  background: transparent; border-color: var(--line-hi); color: var(--text-2);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--raised); border-color: var(--line-hi); color: var(--text);
}

.btn-danger {
  background: var(--red-dim); border-color: var(--red-line); color: var(--red);
}
.btn-danger:hover:not(:disabled) { background: rgba(239,68,68,0.22); }

@keyframes spin { to { transform: rotate(360deg); } }
.btn .spinner {
  width: 14px; height: 14px; border: 2px solid currentColor;
  border-top-color: transparent; border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ══════════════════════════════════════════
   FORMS
   ══════════════════════════════════════════ */
.form-group { margin-bottom: 16px; }
.form-group label, .form-label {
  display: block; font-size: 0.8rem; font-weight: 600;
  color: var(--text-2); margin-bottom: 5px;
}
.form-hint  { font-size: 0.74rem; color: var(--text-3); margin-top: 4px; }
.form-error { font-size: 0.74rem; color: var(--red);   margin-top: 4px; }
.form-input {
  width: 100%; height: 38px; padding: 0 12px;
  border-radius: var(--r-lg); border: 1px solid var(--line-hi);
  background: var(--input-bg); color: var(--text);
  font-family: var(--font); font-size: 0.875rem; outline: none;
  transition: border-color var(--fast), box-shadow var(--fast);
}
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.form-input.error { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-dim); }
.form-input::placeholder { color: var(--text-3); }
.form-input:disabled { opacity: 0.5; cursor: not-allowed; }
textarea.form-input { height: auto; min-height: 80px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
select.form-input {
  -webkit-appearance: none; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%235a5a74' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px;
}
.form-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.form-row .form-input { flex: 1; min-width: 140px; }

/* ══════════════════════════════════════════
   CARDS
   ══════════════════════════════════════════ */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: 24px;
  transition: border-color var(--norm);
  position: relative; overflow: hidden;
}
.card:hover { border-color: var(--line-hi); }
.card.interactive:hover {
  border-color: var(--accent-line); transform: translateY(-2px);
  box-shadow: var(--sh-md);
}
.card-flat {
  background: var(--raised); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 16px;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line); padding-bottom: 14px;
  margin-bottom: 16px; font-weight: 600; font-size: 0.9rem;
}

.admin-card {
  background: var(--raised); border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: 18px; margin-bottom: 10px;
}
.admin-card h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 4px; }
.admin-meta { font-size: 0.78rem; color: var(--text-3); line-height: 1.6; }
.admin-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }

/* ══════════════════════════════════════════
   BADGES & TAGS
   ══════════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 20px; padding: 0 8px;
  border-radius: var(--r-full); font-size: 0.68rem; font-weight: 700;
  border: 1px solid transparent; white-space: nowrap; text-transform: uppercase; letter-spacing: 0.04em;
}
.badge-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.badge-neutral { background: var(--overlay);  border-color: var(--line-hi);   color: var(--text-2); }
.badge-accent  { background: var(--accent-dim); border-color: var(--accent-line); color: var(--accent); }
.badge-green   { background: var(--green-dim);  border-color: var(--green-line);  color: var(--green); }
.badge-yellow  { background: var(--yellow-dim); border-color: var(--yellow-line); color: var(--yellow); }
.badge-red     { background: var(--red-dim);    border-color: var(--red-line);    color: var(--red); }
.badge-blue    { background: var(--blue-dim);   border-color: var(--blue-line);   color: var(--blue); }

.tag {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; padding: 3px 8px; border-radius: var(--r-sm);
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
}
.tag-green  { background: var(--green-dim);  color: var(--green);  border: 1px solid var(--green-line); }
.tag-purple { background: var(--accent-dim); color: var(--accent); border: 1px solid var(--accent-line); }
.tag-amber  { background: var(--yellow-dim); color: var(--yellow); border: 1px solid var(--yellow-line); }
.tag-red    { background: var(--red-dim);    color: var(--red);    border: 1px solid var(--red-line); }
.tag-cyan   { background: var(--blue-dim);   color: var(--blue);   border: 1px solid var(--blue-line); }

/* ══════════════════════════════════════════
   TABLES
   ══════════════════════════════════════════ */
.table-wrap { border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
thead tr { background: var(--raised); }
thead th {
  padding: 11px 16px; text-align: left; font-size: 0.7rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-3); border-bottom: 1px solid var(--line);
}
tbody tr { border-bottom: 1px solid var(--line); transition: background var(--fast); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--raised); }
tbody td { padding: 12px 16px; font-size: 0.85rem; }

/* ══════════════════════════════════════════
   MODALS
   ══════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,0.7);
  display: none; align-items: center; justify-content: center; padding: 16px;
}
.modal-overlay.open { display: flex; }
.modal, .modal-box {
  background: var(--raised); border: 1px solid var(--line-hi);
  border-radius: var(--r-2xl); padding: 28px;
  max-width: 460px; width: 100%; max-height: 90vh; overflow-y: auto;
  position: relative; box-shadow: var(--sh-lg);
  animation: modal-pop 0.2s ease;
}
@keyframes modal-pop {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}
.modal h2, .modal h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 4px; }
.modal .subtitle { font-size: 0.82rem; color: var(--text-3); margin-bottom: 20px; }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none; color: var(--text-3);
  font-size: 1.2rem; cursor: pointer; padding: 4px 6px;
  border-radius: var(--r-md); line-height: 1;
  transition: color var(--fast), background var(--fast);
}
.modal-close:hover { color: var(--text); background: var(--line); }
.modal-tabs {
  display: flex; gap: 3px; margin-bottom: 20px;
  background: var(--bg); border-radius: var(--r-lg); padding: 3px;
}
.modal-tab {
  flex: 1; padding: 7px; border: none; border-radius: var(--r-md);
  background: transparent; color: var(--text-2); font-family: var(--font);
  font-weight: 600; font-size: 0.82rem; cursor: pointer;
  transition: background var(--fast), color var(--fast);
}
.modal-tab.active { background: var(--accent); color: #fff; }
.modal-tab:hover:not(.active) { background: var(--overlay); color: var(--text); }

/* ══════════════════════════════════════════
   TOASTS
   ══════════════════════════════════════════ */
#toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 400;
  display: flex; flex-direction: column-reverse; gap: 8px; pointer-events: none;
}
.toast {
  background: var(--raised); border: 1px solid var(--line-hi);
  border-left: 3px solid var(--line-hi);
  border-radius: var(--r-lg); padding: 12px 16px;
  font-size: 0.85rem; box-shadow: var(--sh-md);
  transform: translateX(110%); transition: transform 0.28s cubic-bezier(0.16,1,0.3,1);
  max-width: min(340px, calc(100vw - 2rem)); pointer-events: all;
}
.toast.show { transform: translateX(0); }
.toast.success { border-left-color: var(--green); }
.toast.error   { border-left-color: var(--red); }
.toast.warning { border-left-color: var(--yellow); }
.toast.info    { border-left-color: var(--accent); }

#toast {
  position: fixed; bottom: 80px; right: 16px; z-index: 300;
  background: var(--raised); border: 1px solid var(--line-hi);
  border-left: 3px solid var(--line-hi); border-radius: var(--r-lg);
  padding: 12px 16px; font-size: 0.85rem; box-shadow: var(--sh-md);
  transform: translateX(110%); transition: transform 0.28s cubic-bezier(0.16,1,0.3,1);
  max-width: min(340px, calc(100vw - 2rem));
}
#toast.show    { transform: translateX(0); }
#toast.success { border-left-color: var(--green); }
#toast.error   { border-left-color: var(--red); }
#toast.warning { border-left-color: var(--yellow); }

/* ══════════════════════════════════════════
   STATUS DOTS
   ══════════════════════════════════════════ */
.status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.status-dot.online       { background: var(--green); box-shadow: 0 0 5px var(--green); }
.status-dot.offline      { background: var(--text-3); }
.status-dot.error        { background: var(--red); box-shadow: 0 0 5px var(--red); }
.status-dot.provisioning { background: var(--blue); animation: pulse-dot 1.4s infinite; }
.status-dot.sleeping     { background: var(--yellow); }
@keyframes pulse-dot { 0%,100%{opacity:1}50%{opacity:0.3} }

/* ══════════════════════════════════════════
   PRICING CARDS
   ══════════════════════════════════════════ */
.p-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-2xl); padding: 28px;
  position: relative; transition: border-color var(--norm), transform var(--norm), box-shadow var(--norm);
}
.p-card:hover { transform: translateY(-3px); box-shadow: var(--sh-md); border-color: var(--line-hi); }
.p-card.featured {
  border-color: var(--accent-line);
  background: linear-gradient(160deg, rgba(155,77,202,0.05), var(--surface));
}
.p-badge {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--accent); padding: 4px 16px; border-radius: var(--r-full);
  font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.5px; color: #fff; white-space: nowrap;
}
.p-tier  { font-size: 0.72rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 2px; margin-bottom: 4px; }
.p-name  { font-size: 1.2rem; font-weight: 800; margin-bottom: 5px; }
.p-desc  { font-size: 0.82rem; color: var(--text-2); margin-bottom: 20px; line-height: 1.65; }
.p-price-row { display: flex; align-items: baseline; gap: 3px; margin-bottom: 20px; }
.p-dollar { font-size: 1rem; font-weight: 700; color: var(--text-2); align-self: flex-start; margin-top: 8px; }
.p-amount { font-size: 2.6rem; font-weight: 900; line-height: 1; }
.p-period { font-size: 0.78rem; color: var(--text-3); }
.p-free-tag  { font-size: 2.4rem; font-weight: 900; color: var(--green); margin-bottom: 20px; }
.p-talk-tag  { font-size: 1.5rem; font-weight: 900; color: var(--accent); margin-bottom: 20px; }
.p-divider   { height: 1px; background: var(--line); margin-bottom: 16px; }
.p-features  { list-style: none; margin-bottom: 20px; }
.p-features li { display: flex; align-items: flex-start; gap: 9px; padding: 4px 0; font-size: 0.82rem; color: var(--text-2); }
.p-features .ck { flex-shrink: 0; width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.55rem; margin-top: 2px; }
.ck-g { background: var(--green-dim); color: var(--green); }
.ck-p { background: var(--accent-dim); color: var(--accent); }
.ck-m { background: var(--overlay); color: var(--text-3); }
.sleep-box { display: flex; align-items: center; gap: 8px; background: var(--yellow-dim); border: 1px solid var(--yellow-line); border-radius: var(--r-lg); padding: 10px 14px; margin-bottom: 16px; font-size: 0.75rem; color: var(--yellow); line-height: 1.5; }

/* ══════════════════════════════════════════
   UPLOAD
   ══════════════════════════════════════════ */
.upload-zone {
  border: 2px dashed var(--line-hi); border-radius: var(--r-xl);
  padding: 32px 24px; text-align: center;
  background: var(--surface); transition: all var(--fast); cursor: pointer;
}
.upload-zone:hover, .upload-zone.drag-over { border-color: var(--accent); background: var(--accent-dim); }
.upload-zone .icon { font-size: 2rem; margin-bottom: 8px; }
.upload-zone h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 4px; }
.upload-zone p  { font-size: 0.82rem; color: var(--text-2); margin-bottom: 10px; }
.upload-formats { display: flex; gap: 5px; justify-content: center; flex-wrap: wrap; }
.upload-formats span { font-family: var(--mono); font-size: 0.62rem; background: var(--raised); color: var(--text-3); padding: 3px 8px; border-radius: var(--r-sm); }
.progress-bar  { height: 4px; border-radius: var(--r-full); background: var(--overlay); overflow: hidden; margin-top: 16px; }
.progress-fill { height: 100%; border-radius: var(--r-full); background: var(--accent); transition: width 0.3s; }

/* ══════════════════════════════════════════
   TERMINAL / CODE
   ══════════════════════════════════════════ */
.terminal { background: var(--raised); border: 1px solid var(--line-hi); border-radius: var(--r-xl); overflow: hidden; }
.terminal-bar { height: 36px; background: var(--overlay); display: flex; align-items: center; padding: 0 14px; gap: 6px; border-bottom: 1px solid var(--line); }
.terminal-dot { width: 10px; height: 10px; border-radius: 50%; }
.terminal-dot.r{background:#ff5f57}.terminal-dot.y{background:#febc2e}.terminal-dot.g{background:#28c840}
.terminal-title { flex: 1; text-align: center; font-family: var(--mono); font-size: 0.68rem; color: var(--text-3); }
.terminal-body  { padding: 16px 18px; font-family: var(--mono); font-size: 0.75rem; line-height: 2; overflow-x: auto; }
.t-p{color:var(--accent)}.t-c{color:var(--green)}.t-f{color:var(--yellow)}.t-s{color:var(--blue)}.t-m{color:var(--text-3)}.t-ok{color:var(--green)}

/* ══════════════════════════════════════════
   DASHBOARD
   ══════════════════════════════════════════ */
.dash-layout {
  display: grid; grid-template-columns: 210px 1fr;
  min-height: calc(100vh - 58px); margin-top: 58px;
}
.dash-sidebar {
  background: var(--surface); border-right: 1px solid var(--line);
  padding: 16px 10px;
  position: sticky; top: 58px; height: calc(100vh - 58px); overflow-y: auto;
}
.dash-sidebar-section { margin-bottom: 20px; }
.dash-sidebar-label {
  font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text-3);
  padding: 0 10px; margin-bottom: 4px;
}
.dash-nav-item {
  display: flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 10px; border-radius: var(--r-md);
  font-size: 0.84rem; color: var(--text-2);
  cursor: pointer; transition: background var(--fast), color var(--fast);
  text-decoration: none; margin-bottom: 2px; position: relative;
}
.dash-nav-item .icon { font-size: 0.9rem; flex-shrink: 0; width: 18px; text-align: center; }
.dash-nav-item:hover { background: var(--line); color: var(--text); }
.dash-nav-item.active { background: var(--accent-dim); color: var(--text); }
.dash-nav-item .nav-badge {
  margin-left: auto; min-width: 16px; height: 16px; border-radius: var(--r-full);
  background: var(--red); color: #fff; font-size: 0.6rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 4px;
}
.dash-nav-divider { height: 1px; background: var(--line); margin: 8px 0; }

.dash-main { padding: 24px; overflow-y: auto; min-width: 0; }
.dash-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
.dash-title  { font-size: 1.2rem; font-weight: 700; }
.dash-stats  { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 20px; }
.dash-stat   { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 16px; }
.dash-stat-label { font-size: 0.68rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.dash-stat-value { font-size: 1.3rem; font-weight: 800; }

/* Mobile bottom nav (dashboard) */
.dash-mobile-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: var(--surface); border-top: 1px solid var(--line);
  padding: 6px 0 env(safe-area-inset-bottom, 6px);
}
.dash-mobile-nav-inner { display: flex; justify-content: space-around; align-items: center; }
.dash-mobile-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 4px; font-size: 0.6rem; color: var(--text-3);
  text-decoration: none; min-width: 50px; cursor: pointer;
}
.dash-mobile-nav a.active { color: var(--accent); }
.dash-mobile-nav a span:first-child { font-size: 1.2rem; }

/* ── Admin panel helpers ── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-bottom: 20px; }
.stat-card { background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 16px; text-align: center; }
.stat-card .num { font-size: 1.6rem; font-weight: 800; font-family: var(--mono); }
.stat-card .lbl { font-size: 0.68rem; color: var(--text-3); margin-top: 4px; }

.tab-bar { display: flex; gap: 3px; margin-bottom: 18px; background: var(--raised); padding: 4px; border-radius: var(--r-xl); overflow-x: auto; }
.tab-btn { padding: 7px 14px; border-radius: var(--r-lg); background: transparent; border: none; color: var(--text-2); font-size: 0.8rem; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background var(--fast), color var(--fast); font-family: var(--font); }
.tab-btn:hover  { color: var(--text); background: var(--overlay); }
.tab-btn.active { background: var(--accent); color: #fff; }

.pending-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 17px; height: 17px; border-radius: var(--r-full); background: var(--red); color: #fff; font-size: 0.6rem; font-weight: 700; margin-left: 4px; padding: 0 4px; }

.sys-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.sys-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 16px; }
.sys-card .val { font-size: 1.3rem; font-weight: 800; font-family: var(--mono); color: var(--accent); }
.sys-card .key { font-size: 0.7rem; color: var(--text-3); margin-top: 4px; }
.bar-wrap { background: var(--overlay); border-radius: 4px; height: 6px; margin-top: 6px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; background: var(--accent); transition: width 0.6s; }

.revenue-chart { display: flex; align-items: flex-end; gap: 4px; height: 100px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.rev-bar { flex: 1; background: var(--accent); border-radius: 2px 2px 0 0; min-height: 2px; cursor: default; position: relative; opacity: 0.75; transition: opacity var(--fast); }
.rev-bar:hover { opacity: 1; }
.rev-bar:hover::after { content: attr(title); position: absolute; bottom: 105%; left: 50%; transform: translateX(-50%); background: var(--overlay); padding: 3px 8px; border-radius: var(--r-md); font-size: 0.7rem; white-space: nowrap; z-index: 10; border: 1px solid var(--line-hi); }

.maint-banner { background: var(--yellow-dim); border: 1px solid var(--yellow-line); border-radius: var(--r-lg); padding: 12px 18px; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; font-size: 0.85rem; color: var(--yellow); }
.receipt-img  { max-width: 300px; max-height: 200px; border-radius: var(--r-lg); border: 1px solid var(--line-hi); cursor: pointer; margin-top: 8px; }

/* ── Editor ── */
.editor-wrap { display: grid; grid-template-columns: 200px 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; height: 70vh; margin-top: 16px; }
.file-tree { background: var(--raised); border-right: 1px solid var(--line); padding: 8px; overflow-y: auto; }
.file-tree-item { padding: 6px 10px; font-size: 0.78rem; font-family: var(--mono); color: var(--text-2); cursor: pointer; border-radius: var(--r-md); display: flex; align-items: center; gap: 6px; }
.file-tree-item:hover { background: var(--accent-dim); }
.file-tree-item.active { background: var(--accent-dim); color: var(--accent); }
.code-area { background: var(--bg); overflow: hidden; display: flex; flex-direction: column; }
.code-area textarea { flex: 1; background: transparent; color: var(--text); border: none; padding: 14px; font-family: var(--mono); font-size: 0.82rem; line-height: 1.7; resize: none; outline: none; tab-size: 2; }
.code-bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: var(--raised); border-bottom: 1px solid var(--line); font-size: 0.75rem; color: var(--text-3); }
.preview-frame { background: white; border: none; width: 100%; height: 100%; }

/* ── AI box ── */
.ai-box { background: var(--accent-dim); border: 1px solid var(--accent-line); border-radius: var(--r-xl); padding: 20px; margin-top: 16px; }
.ai-box textarea { width: 100%; min-height: 80px; background: var(--input-bg); border: 1px solid var(--line-hi); border-radius: var(--r-lg); color: var(--text); font-family: var(--font); font-size: 0.88rem; padding: 10px 12px; outline: none; resize: vertical; }
.ai-box textarea:focus { border-color: var(--accent); }

/* ══════════════════════════════════════════
   FAQ
   ══════════════════════════════════════════ */
.faq-list { display: flex; flex-direction: column; gap: 6px; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; }
.faq-q { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; cursor: pointer; font-size: 0.88rem; font-weight: 600; transition: color var(--fast); }
.faq-q:hover { color: var(--accent); }
.faq-icon { font-size: 1rem; color: var(--accent); transition: transform 0.3s; flex-shrink: 0; margin-left: 12px; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
.faq-item.open .faq-a { max-height: 400px; }
.faq-a-inner { padding: 0 20px 16px; font-size: 0.82rem; color: var(--text-2); line-height: 1.75; border-top: 1px solid var(--line); padding-top: 12px; }

/* ══════════════════════════════════════════
   SCROLL REVEAL
   ══════════════════════════════════════════ */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1{transition-delay:.08s}.reveal-d2{transition-delay:.16s}.reveal-d3{transition-delay:.24s}

/* ══════════════════════════════════════════
   SKELETON
   ══════════════════════════════════════════ */
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--raised) 50%, var(--surface) 75%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite;
  border-radius: var(--r-lg);
}
.skeleton-row  { height: 52px; margin-bottom: 8px; }
.skeleton-stat { height: 70px; }
.skeleton-text { height: 14px; margin-bottom: 8px; border-radius: var(--r-sm); }
.skeleton-text.w-3\/4 { width: 75%; }
.skeleton-text.w-1\/2 { width: 50%; }

/* ══════════════════════════════════════════
   EMPTY STATES
   ══════════════════════════════════════════ */
.empty-state { text-align: center; padding: 64px 24px; color: var(--text-3); }
.empty-state .empty-icon { font-size: 2.5rem; margin-bottom: 16px; opacity: 0.4; }
.empty-state h3 { font-size: 1rem; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.empty-state p  { font-size: 0.85rem; margin-bottom: 20px; }

/* ══════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════ */
footer {
  border-top: 1px solid var(--line); padding: 52px 0 28px;
  position: relative; z-index: 1; background: var(--bg);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.footer-brand p { font-size: 0.82rem; color: var(--text-2); line-height: 1.7; margin-top: 10px; max-width: 260px; }
.footer-col h4  { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-3); margin-bottom: 10px; }
.footer-col a   { display: block; color: var(--text-2); font-size: 0.85rem; padding: 3px 0; transition: color var(--fast); }
.footer-col a:hover { color: var(--text); }
.footer-bottom  { border-top: 1px solid var(--line); padding-top: 20px; display: flex; justify-content: space-between; align-items: center; font-size: 0.78rem; color: var(--text-3); flex-wrap: wrap; gap: 8px; }
.footer-status  { display: flex; align-items: center; gap: 6px; }

/* ══════════════════════════════════════════
   MISC
   ══════════════════════════════════════════ */
#page-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; background: var(--accent); z-index: 9999; transform-origin: left; transform: scaleX(0); transition: transform 0.3s ease; pointer-events: none; }

#back-to-top {
  position: fixed; bottom: 88px; right: 20px; z-index: 98;
  width: 36px; height: 36px; border-radius: var(--r-full);
  background: var(--raised); border: 1px solid var(--line-hi);
  color: var(--text-2); font-size: 0.9rem; cursor: pointer;
  display: none; align-items: center; justify-content: center;
  transition: all var(--fast); box-shadow: var(--sh-sm);
}
#back-to-top.visible { display: flex; }
#back-to-top:hover   { background: var(--overlay); color: var(--text); }

#cookie-banner {
  position: fixed; bottom: 14px; left: 14px; right: 14px; max-width: 520px; z-index: 390;
  background: var(--raised); border: 1px solid var(--line-hi);
  border-radius: var(--r-xl); padding: 16px 20px; box-shadow: var(--sh-lg);
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
#cookie-banner p { font-size: 0.82rem; color: var(--text-2); flex: 1; min-width: 180px; }
#cookie-banner .actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */
@media(max-width:1024px) {
  .dash-layout { grid-template-columns: 1fr; }
  .dash-sidebar { display: none; }
  .dash-mobile-nav { display: block; }
  .dash-main { padding: 16px; padding-bottom: 80px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media(max-width:768px) {
  .nav-inner { padding: 0 16px; height: 58px; }
  .mobile-toggle { display: flex; align-items: center; justify-content: center; }
  .nav-links { display: none !important; } /* hidden on mobile — drawer used instead */

  .container { padding: 0 16px; }
  .page-pad { padding: 84px 0 48px; }
  .section-title { letter-spacing: -0.01em; }
  .p-card { padding: 22px; }
  .p-amount { font-size: 2.2rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .editor-wrap { grid-template-columns: 1fr !important; height: auto !important; }
  .file-tree { max-height: 140px !important; border-right: none !important; border-bottom: 1px solid var(--line); }
  .code-area { min-height: 250px; }
  .stat-grid { grid-template-columns: repeat(2,1fr); }
  #toast, .toast { left: 12px; right: 12px; max-width: none; }
  #back-to-top { bottom: 78px; }
  #toast-container { left: 12px; right: 12px; bottom: 16px; }
}

@media(max-width:380px) {
  .container { padding: 0 12px; }
  .dash-stats { grid-template-columns: 1fr; }
  .btn { padding: 0 12px; font-size: 0.82rem; }
  .stat-grid { grid-template-columns: repeat(2,1fr); }
}
