/* ═══════════════════════════════════════════════════════════
   Muhafız — Security Command Center UI
   DM Sans (UI) + JetBrains Mono (data) + Outfit (display)
   Deep tactical dark + threat-level accents
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&display=swap');

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

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  /* Surface — tactical dark */
  --bg-abyss:      #04080F;
  --bg-deep:       #080D16;
  --bg-base:       #0C1321;
  --bg-raised:     #111A2E;
  --bg-surface:    #162035;
  --bg-overlay:    #1C2844;
  --bg-hover:      #223050;

  /* Accent — threat level palette */
  --c-gold:        #C8A84E;
  --c-gold-glow:   rgba(200,168,78,.12);
  --c-gold-border: rgba(200,168,78,.25);

  --c-green:       #22C55E;
  --c-green-bg:    rgba(34,197,94,.1);
  --c-green-bdr:   rgba(34,197,94,.25);

  --c-amber:       #F59E0B;
  --c-amber-bg:    rgba(245,158,11,.1);
  --c-amber-bdr:   rgba(245,158,11,.25);

  --c-red:         #EF4444;
  --c-red-bg:      rgba(239,68,68,.1);
  --c-red-bdr:     rgba(239,68,68,.25);
  --c-red-glow:    0 0 20px rgba(239,68,68,.25);

  --c-blue:        #3B82F6;
  --c-blue-bg:     rgba(59,130,246,.1);

  --c-violet:      #8B5CF6;
  --c-violet-bg:   rgba(139,92,246,.1);

  --c-cyan:        #06B6D4;
  --c-cyan-bg:     rgba(6,182,212,.1);

  /* Text */
  --t1:            #F1F5F9;
  --t2:            #94A3B8;
  --t3:            #64748B;
  --t4:            #475569;
  --t-inv:         #0C1321;

  /* Border */
  --bdr:           rgba(255,255,255,.06);
  --bdr-s:         rgba(255,255,255,.03);
  --bdr-m:         rgba(255,255,255,.1);

  /* Radius */
  --r:     8px;
  --r-lg:  12px;
  --r-xl:  18px;
  --r-pill:9999px;

  /* Shadow */
  --sh-sm: 0 1px 3px rgba(0,0,0,.5);
  --sh-md: 0 4px 16px rgba(0,0,0,.6);
  --sh-lg: 0 8px 40px rgba(0,0,0,.7);
  --sh-glow-red: 0 0 30px rgba(239,68,68,.15);
  --sh-glow-green: 0 0 20px rgba(34,197,94,.12);

  /* Layout */
  --sidebar-w: 250px;
  --topbar-h:  56px;
}

/* ── Light theme ────────────────────────────────────────── */
[data-theme="light"] {
  --bg-abyss:    #F0F2F5;
  --bg-deep:     #F5F7FA;
  --bg-base:     #FFFFFF;
  --bg-raised:   #FFFFFF;
  --bg-surface:  #F1F5F9;
  --bg-overlay:  #E2E8F0;
  --bg-hover:    #DBEAFE;
  --c-gold:      #A17B1A;
  --c-gold-glow: rgba(161,123,26,.08);
  --c-gold-border:rgba(161,123,26,.18);
  --c-green:     #16A34A;
  --c-green-bg:  rgba(22,163,74,.07);
  --c-amber:     #D97706;
  --c-amber-bg:  rgba(217,119,6,.07);
  --c-red:       #DC2626;
  --c-red-bg:    rgba(220,38,38,.06);
  --c-blue:      #2563EB;
  --c-blue-bg:   rgba(37,99,235,.06);
  --c-violet:    #7C3AED;
  --c-violet-bg: rgba(124,58,237,.06);
  --c-cyan:      #0891B2;
  --c-cyan-bg:   rgba(8,145,178,.06);
  --t1: #0F172A;
  --t2: #475569;
  --t3: #94A3B8;
  --t4: #CBD5E1;
  --t-inv: #FFFFFF;
  --bdr: rgba(0,0,0,.08);
  --bdr-s: rgba(0,0,0,.04);
  --bdr-m: rgba(0,0,0,.12);
  --sh-sm: 0 1px 3px rgba(0,0,0,.06);
  --sh-md: 0 4px 12px rgba(0,0,0,.08);
  --sh-lg: 0 8px 24px rgba(0,0,0,.1);
  --sh-glow-red: none;
  --sh-glow-green: none;
}

/* ── Base ───────────────────────────────────────────────── */
html, body {
  height: 100%;
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg-abyss);
  color: var(--t1);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,h2,h3,h4,h5,h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.025em;
}

a { color: var(--c-blue); text-decoration: none; }
a:hover { text-decoration: none; }
a:not(.btn):not(.sb-item):not(.l-nav-link):hover { text-decoration: underline; }
.btn:hover, a.btn:hover { text-decoration: none !important; }

code, .mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: .02em;
}

::selection { background: var(--c-red); color: #fff; }

* { scrollbar-width: thin; scrollbar-color: var(--bg-overlay) transparent; }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-overlay); border-radius: 3px; }

/* ── Layout ─────────────────────────────────────────────── */
.app-layout { display: flex; height: 100vh; overflow: hidden; }
.app-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.app-content { flex: 1; overflow-y: auto; padding: 24px 28px; }

/* ── Sidebar ────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-base);
  border-right: 1px solid var(--bdr);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 50;
}

.sb-brand {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 18px;
  border-bottom: 1px solid var(--bdr);
}

.sb-logo {
  width: 34px;
  height: 34px;
  background: var(--c-red);
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--sh-glow-red);
}

.sb-logo svg { width: 17px; height: 17px; color: #fff; }

.sb-brand-text {
  font-family: 'Outfit', sans-serif;
  font-size: 17px;
  font-weight: 800;
  color: var(--t1);
  letter-spacing: -.03em;
}

.sb-brand-text em { font-style: normal; color: var(--c-red); }

.sb-nav {
  flex: 1;
  padding: 14px 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sb-section {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--t4);
  text-transform: uppercase;
  letter-spacing: .14em;
  padding: 18px 10px 5px;
}

.sb-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--r);
  color: var(--t3);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  transition: all .12s ease;
  position: relative;
}

.sb-item svg { width: 17px; height: 17px; flex-shrink: 0; opacity: .55; transition: opacity .12s; }
.sb-item:hover { background: var(--bg-surface); color: var(--t2); }
.sb-item:hover svg { opacity: .8; }

.sb-item.active {
  background: var(--c-red-bg);
  color: var(--c-red);
  font-weight: 600;
}

.sb-item.active svg { opacity: 1; color: var(--c-red); }

.sb-item.active::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  background: var(--c-red);
  border-radius: 3px 0 0 3px;
}

.sb-badge {
  margin-left: auto;
  background: var(--c-red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--r-pill);
  min-width: 18px;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
}

.sb-footer {
  padding: 10px;
  border-top: 1px solid var(--bdr);
}

.sb-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--r);
  cursor: pointer;
  transition: background .12s;
}

.sb-user:hover { background: var(--bg-surface); }

.sb-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--r-pill);
  background: var(--c-red-bg);
  border: 1.5px solid var(--c-red-bdr);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit';
  font-size: 12px;
  font-weight: 700;
  color: var(--c-red);
  flex-shrink: 0;
}

.sb-uname { font-size: 12.5px; font-weight: 600; color: var(--t1); }
.sb-urole { font-size: 10.5px; color: var(--t4); font-family: 'JetBrains Mono'; }

/* ── Topbar ─────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--bg-base);
  border-bottom: 1px solid var(--bdr);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 14px;
  flex-shrink: 0;
}

.topbar-title {
  font-family: 'Outfit';
  font-size: 15px;
  font-weight: 700;
  color: var(--t1);
}

.topbar-spacer { flex: 1; }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 15px;
  border-radius: var(--r);
  border: none;
  font-size: 12.5px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: all .12s ease;
  white-space: nowrap;
  line-height: 1.2;
}

.btn:disabled { opacity: .35; cursor: not-allowed; }
.btn svg { width: 14px; height: 14px; flex-shrink: 0; }

.btn-danger {
  background: var(--c-red);
  color: #fff;
  box-shadow: 0 2px 10px rgba(239,68,68,.3);
}
.btn-danger:hover:not(:disabled) { background: #DC2626; box-shadow: 0 4px 18px rgba(239,68,68,.4); transform: translateY(-1px); }

.btn-primary {
  background: var(--c-blue);
  color: #fff;
  box-shadow: 0 2px 8px rgba(59,130,246,.25);
}
.btn-primary:hover:not(:disabled) { background: #2563EB; transform: translateY(-1px); }

.btn-gold {
  background: var(--c-gold);
  color: var(--t-inv);
  box-shadow: 0 2px 8px rgba(200,168,78,.25);
}
.btn-gold:hover:not(:disabled) { filter: brightness(1.1); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--t2);
  border: 1px solid var(--bdr-m);
}
.btn-outline:hover:not(:disabled) { background: var(--bg-surface); color: var(--t1); }

.btn-ghost {
  background: transparent;
  color: var(--t3);
  padding: 7px 10px;
}
.btn-ghost:hover:not(:disabled) { background: var(--bg-surface); color: var(--t1); }

.btn-sm { padding: 5px 10px; font-size: 11.5px; }
.btn-lg { padding: 10px 22px; font-size: 14px; }

.icon-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: var(--r);
  border: 1px solid var(--bdr);
  background: var(--bg-raised);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--t3);
  transition: all .12s;
}
.icon-btn:hover { background: var(--bg-surface); color: var(--t1); }
.icon-btn svg { width: 15px; height: 15px; }

/* ── Forms ──────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 5px; }

.form-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--t3);
  letter-spacing: .03em;
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
}

.form-input {
  padding: 9px 13px;
  border: 1px solid var(--bdr-m);
  border-radius: var(--r);
  background: var(--bg-deep);
  color: var(--t1);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border .15s, box-shadow .15s;
}

.form-input:focus {
  border-color: var(--c-blue);
  box-shadow: 0 0 0 3px var(--c-blue-bg);
}

.form-input::placeholder { color: var(--t4); }
.form-input.error { border-color: var(--c-red); }
.form-error { font-size: 11px; color: var(--c-red); }

select.form-input {
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Cpath d='M2 3l3 3 3-3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

textarea.form-input { resize: vertical; min-height: 72px; }

/* ── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--bg-raised);
  border: 1px solid var(--bdr);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--sh-sm);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.card-title {
  font-family: 'Outfit';
  font-size: 14px;
  font-weight: 700;
  color: var(--t1);
  display: flex;
  align-items: center;
  gap: 7px;
}

.card-title svg { width: 15px; height: 15px; color: var(--c-red); }

/* ── Stat Cards ─────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.stat-card {
  background: var(--bg-raised);
  border: 1px solid var(--bdr);
  border-radius: var(--r-lg);
  padding: 18px;
  position: relative;
  overflow: hidden;
  transition: border-color .2s;
}

.stat-card:hover { border-color: var(--bdr-m); }

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--stat-color, var(--c-red));
}

.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.stat-icon svg { width: 18px; height: 18px; }
.stat-icon.red    { background: var(--c-red-bg); color: var(--c-red); }
.stat-icon.green  { background: var(--c-green-bg); color: var(--c-green); }
.stat-icon.amber  { background: var(--c-amber-bg); color: var(--c-amber); }
.stat-icon.blue   { background: var(--c-blue-bg); color: var(--c-blue); }
.stat-icon.violet { background: var(--c-violet-bg); color: var(--c-violet); }
.stat-icon.cyan   { background: var(--c-cyan-bg); color: var(--c-cyan); }
.stat-icon.gold   { background: var(--c-gold-glow); color: var(--c-gold); }

.stat-val {
  font-family: 'Outfit';
  font-size: 26px;
  font-weight: 800;
  color: var(--t1);
  letter-spacing: -.03em;
  line-height: 1;
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--t4);
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: .07em;
  font-family: 'JetBrains Mono';
}

/* ── Table ──────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; }

.data-table thead th {
  font-size: 10px;
  font-weight: 700;
  color: var(--t4);
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--bdr);
  font-family: 'JetBrains Mono';
}

.data-table tbody tr { transition: background .1s; }
.data-table tbody tr:hover { background: var(--bg-surface); }
.data-table tbody td {
  padding: 10px 12px;
  font-size: 13px;
  color: var(--t1);
  border-bottom: 1px solid var(--bdr-s);
}

.data-table .empty-row td {
  text-align: center;
  color: var(--t4);
  padding: 36px;
  font-size: 12px;
}

/* ── Badges ─────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-size: 10.5px;
  font-weight: 700;
  font-family: 'JetBrains Mono';
  letter-spacing: .03em;
}

.badge-red    { background: var(--c-red-bg); color: var(--c-red); }
.badge-green  { background: var(--c-green-bg); color: var(--c-green); }
.badge-amber  { background: var(--c-amber-bg); color: var(--c-amber); }
.badge-blue   { background: var(--c-blue-bg); color: var(--c-blue); }
.badge-violet { background: var(--c-violet-bg); color: var(--c-violet); }
.badge-cyan   { background: var(--c-cyan-bg); color: var(--c-cyan); }
.badge-gold   { background: var(--c-gold-glow); color: var(--c-gold); }
.badge-neutral{ background: var(--bg-surface); color: var(--t3); }

.badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.badge-online .badge-dot {
  box-shadow: 0 0 6px currentColor;
  animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

/* Alarm type specific */
.alarm-missing      { background: var(--c-red-bg); color: var(--c-red); }
.alarm-tray_removed { background: var(--c-red-bg); color: var(--c-red); }
.alarm-gun          { background: var(--c-amber-bg); color: var(--c-amber); }
.alarm-knife        { background: var(--c-violet-bg); color: var(--c-violet); }

/* ── Modal ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(3px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn .15s ease;
}

.modal {
  background: var(--bg-raised);
  border: 1px solid var(--bdr-m);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-lg);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp .2s cubic-bezier(.34,1.56,.64,1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--bdr);
}

.modal-title { font-family: 'Outfit'; font-size: 15px; font-weight: 700; }

.modal-close {
  width: 28px; height: 28px;
  border: none; background: var(--bg-surface);
  border-radius: var(--r); cursor: pointer;
  color: var(--t4); display: flex;
  align-items: center; justify-content: center;
  transition: all .12s;
}
.modal-close:hover { background: var(--c-red-bg); color: var(--c-red); }

.modal-body { padding: 18px 22px; }
.modal-footer {
  padding: 14px 22px 18px;
  border-top: 1px solid var(--bdr);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ── Toast ──────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--r);
  background: var(--bg-raised);
  border: 1px solid var(--bdr-m);
  box-shadow: var(--sh-lg);
  font-size: 12.5px;
  color: var(--t1);
  min-width: 260px;
  max-width: 380px;
  animation: toastIn .25s cubic-bezier(.34,1.56,.64,1);
}
.toast.removing { animation: toastOut .15s ease forwards; }
.toast-icon { flex-shrink: 0; }
.toast-icon svg { width: 16px; height: 16px; }
.toast.success .toast-icon { color: var(--c-green); }
.toast.error .toast-icon { color: var(--c-red); }
.toast.warning .toast-icon { color: var(--c-amber); }
.toast-msg { flex: 1; }
.toast-close { border: none; background: none; cursor: pointer; color: var(--t4); padding: 2px; }
.toast-close:hover { color: var(--t1); }

/* ── Auth Pages ─────────────────────────────────────────── */
.auth-layout {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--bg-abyss);
  position: relative;
}

.auth-layout::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(239,68,68,.04) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(59,130,246,.03) 0%, transparent 50%);
  pointer-events: none;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-raised);
  border: 1px solid var(--bdr-m);
  border-radius: var(--r-xl);
  padding: 32px 28px;
  box-shadow: var(--sh-lg);
  position: relative;
  animation: fadeUp .35s ease;
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
}

.auth-logo-icon {
  width: 40px; height: 40px;
  background: var(--c-red);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--sh-glow-red);
}
.auth-logo-icon svg { width: 20px; height: 20px; color: #fff; }

.auth-logo-text {
  font-family: 'Outfit';
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.03em;
}
.auth-logo-text em { font-style: normal; color: var(--c-red); }

.auth-title { font-size: 18px; text-align: center; margin-bottom: 3px; }
.auth-subtitle { font-size: 12.5px; color: var(--t3); text-align: center; margin-bottom: 22px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form .btn { width: 100%; justify-content: center; padding: 10px; }
.auth-footer { text-align: center; margin-top: 18px; font-size: 12.5px; color: var(--t3); }
.auth-footer a { color: var(--c-red); font-weight: 600; }

/* ── Landing (Professional) ──────────────────────────────── */
.landing { min-height: 100vh; background: var(--bg-abyss); overflow-x: hidden; }

.l-container { max-width: 1100px; margin: 0 auto; padding: 0 32px; }

/* Nav */
.l-nav { position: sticky; top: 0; z-index: 100; background: rgba(4,8,15,.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--bdr); }
.l-nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 32px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.l-nav-brand { display: flex; align-items: center; gap: 10px; }
.l-nav-logo { width: 32px; height: 32px; background: var(--c-red); border-radius: var(--r); display: flex; align-items: center; justify-content: center; box-shadow: var(--sh-glow-red); }
.l-nav-logo svg { width: 16px; height: 16px; color: #fff; }
.l-nav-name { font-family: 'Outfit'; font-size: 17px; font-weight: 800; letter-spacing: -.03em; }
.l-nav-name em { font-style: normal; color: var(--c-red); }
.l-nav-links { display: flex; align-items: center; gap: 6px; }
.l-nav-link { color: var(--t3); font-size: 13px; font-weight: 500; padding: 6px 12px; border-radius: var(--r); transition: color .12s; text-decoration: none; }
.l-nav-link:hover { color: var(--t1); text-decoration: none; }

/* Hero */
.l-hero { position: relative; padding: 80px 0 60px; text-align: center; overflow: hidden; }
.l-hero-bg { position: absolute; inset: 0; pointer-events: none; }

.l-grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.l-glow { position: absolute; border-radius: 50%; filter: blur(80px); }
.l-glow-1 { top: -20%; left: 30%; width: 500px; height: 400px; background: rgba(239,68,68,.07); }
.l-glow-2 { top: 10%; right: 10%; width: 300px; height: 300px; background: rgba(59,130,246,.04); }
.l-glow-3 { bottom: -10%; left: 50%; transform: translateX(-50%); width: 600px; height: 200px; background: rgba(200,168,78,.03); }

.l-hero-content { position: relative; max-width: 720px; margin: 0 auto; padding: 0 32px; }

.l-hero-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; margin-bottom: 24px;
  background: var(--c-red-bg); border: 1px solid var(--c-red-bdr); border-radius: var(--r-pill);
  font-family: 'JetBrains Mono'; font-size: 10px; font-weight: 700;
  color: var(--c-red); text-transform: uppercase; letter-spacing: .08em;
}

.l-pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--c-red); box-shadow: 0 0 8px var(--c-red);
  animation: pulse-dot 1.5s ease-in-out infinite;
}

.l-hero-title {
  font-family: 'Outfit'; font-size: clamp(34px, 5vw, 54px); font-weight: 900;
  line-height: 1.08; letter-spacing: -.045em; color: var(--t1); margin-bottom: 18px;
}
.l-hero-title em { font-style: normal; color: var(--c-red); }

.l-hero-desc {
  font-size: 16px; color: var(--t2); line-height: 1.7; margin-bottom: 32px; max-width: 560px; margin-left: auto; margin-right: auto;
}
.l-hero-desc strong { color: var(--t1); font-weight: 600; }

.l-hero-cta { display: flex; gap: 12px; justify-content: center; margin-bottom: 48px; }

.l-hero-stats {
  display: flex; align-items: center; justify-content: center; gap: 0;
  background: var(--bg-raised); border: 1px solid var(--bdr-m); border-radius: var(--r-lg);
  padding: 16px 0; max-width: 480px; margin: 0 auto;
}
.l-hero-stat { flex: 1; text-align: center; }
.l-hero-stat-val { font-family: 'Outfit'; font-size: 22px; font-weight: 800; color: var(--t1); letter-spacing: -.02em; }
.l-hero-stat-label { font-family: 'JetBrains Mono'; font-size: 9.5px; color: var(--t4); text-transform: uppercase; letter-spacing: .08em; margin-top: 2px; }
.l-hero-stat-sep { width: 1px; height: 32px; background: var(--bdr-m); }

/* Sections */
.l-section { padding: 80px 0; }
.l-section-label { font-family: 'JetBrains Mono'; font-size: 10px; font-weight: 700; color: var(--c-red); text-transform: uppercase; letter-spacing: .14em; text-align: center; margin-bottom: 10px; }
.l-section-title { font-family: 'Outfit'; font-size: clamp(24px, 3vw, 34px); font-weight: 800; text-align: center; letter-spacing: -.03em; margin-bottom: 12px; line-height: 1.15; }
.l-section-title em { font-style: normal; color: var(--c-red); }
.l-section-desc { font-size: 15px; color: var(--t2); text-align: center; max-width: 520px; margin: 0 auto 40px; line-height: 1.6; }

/* Problem */
.l-problem { background: var(--bg-deep); }
.l-problem-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; max-width: 900px; margin: 40px auto 0; }
.l-problem-card { background: var(--bg-raised); border: 1px solid var(--bdr); border-radius: var(--r-lg); padding: 24px; }
.l-problem-card h3 { font-family: 'Outfit'; font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.l-problem-card p { font-size: 13px; color: var(--t2); line-height: 1.6; }
.l-problem-card p strong { color: var(--t1); }
.l-problem-icon { width: 40px; height: 40px; border-radius: var(--r); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.l-problem-icon svg { width: 20px; height: 20px; }

/* Features */
.l-features-grid { display: flex; flex-direction: column; gap: 14px; max-width: 680px; margin: 0 auto; }
.l-feature {
  display: flex; gap: 18px; align-items: flex-start;
  background: var(--bg-raised); border: 1px solid var(--bdr); border-radius: var(--r-lg);
  padding: 22px; transition: border-color .2s, box-shadow .2s;
}
.l-feature:hover { border-color: var(--bdr-m); box-shadow: var(--sh-md); }
.l-feature-icon { width: 44px; height: 44px; border-radius: var(--r); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.l-feature-icon svg { width: 22px; height: 22px; }
.l-feature-body { flex: 1; }
.l-feature-body h3 { font-family: 'Outfit'; font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.l-feature-body p { font-size: 13px; color: var(--t2); line-height: 1.6; margin-bottom: 8px; }
.l-feature-body p strong { color: var(--c-red); font-weight: 700; }
.l-feature-tag { margin-top: 4px; }

/* How it works — steps */
.l-how { background: var(--bg-deep); }
.l-steps { display: flex; align-items: flex-start; justify-content: center; gap: 0; max-width: 800px; margin: 40px auto 0; }
.l-step { flex: 1; text-align: center; padding: 0 20px; }
.l-step-num { font-family: 'Outfit'; font-size: 36px; font-weight: 900; color: var(--c-red); opacity: .3; margin-bottom: 8px; }
.l-step h3 { font-family: 'Outfit'; font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.l-step p { font-size: 13px; color: var(--t2); line-height: 1.55; }
.l-step-line { width: 60px; height: 2px; background: var(--bdr-m); margin-top: 28px; flex-shrink: 0; }

/* CTA */
.l-cta { padding: 80px 0; position: relative; }
.l-cta::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(239,68,68,.04) 0%, transparent 60%); pointer-events: none; }
.l-cta-title { font-family: 'Outfit'; font-size: clamp(24px, 3vw, 32px); font-weight: 800; margin-bottom: 10px; position: relative; }
.l-cta-title em { font-style: normal; color: var(--c-red); }
.l-cta-desc { font-size: 15px; color: var(--t2); margin-bottom: 24px; position: relative; }

/* Footer */
.l-footer { border-top: 1px solid var(--bdr); padding: 20px 0; }
.l-footer-inner { display: flex; align-items: center; justify-content: space-between; }
.l-footer-brand { display: flex; align-items: center; gap: 8px; }
.l-footer-copy { font-size: 12px; color: var(--t4); }

.feature-card {
  background: var(--bg-raised);
  border: 1px solid var(--bdr);
  border-radius: var(--r-lg);
  padding: 24px;
  transition: all .2s ease;
}

.feature-card:hover {
  border-color: var(--c-red-bdr);
  box-shadow: var(--sh-glow-red);
}

.feature-icon {
  width: 40px; height: 40px;
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.feature-icon svg { width: 20px; height: 20px; }

.feature-title { font-family: 'Outfit'; font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.feature-desc { font-size: 13px; color: var(--t2); line-height: 1.55; }

/* ── Plan Cards ─────────────────────────────────────────── */
.plans-section { max-width: 1140px; margin: 0 auto; padding: 36px; }
.plans-title { font-size: 26px; font-weight: 800; text-align: center; margin-bottom: 6px; }
.plans-subtitle { font-size: 14px; color: var(--t2); text-align: center; margin-bottom: 36px; }

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  max-width: 880px;
  margin: 0 auto;
}

.plan-card {
  background: var(--bg-raised);
  border: 1px solid var(--bdr);
  border-radius: var(--r-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all .2s;
}

.plan-card.featured { border-color: var(--c-red-bdr); box-shadow: var(--sh-glow-red); }
.plan-card.featured::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--c-red); border-radius: var(--r-lg) var(--r-lg) 0 0; }

.plan-featured-tag {
  position: absolute; top: -9px; right: 18px;
  background: var(--c-red); color: #fff;
  font-size: 9px; font-weight: 800;
  padding: 3px 10px; border-radius: var(--r-pill);
  text-transform: uppercase; letter-spacing: .08em;
  font-family: 'JetBrains Mono';
}

.plan-name { font-family: 'Outfit'; font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.plan-price { display: flex; align-items: baseline; gap: 3px; margin-bottom: 3px; }
.plan-price-val { font-family: 'Outfit'; font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.plan-price-cur { font-size: 13px; color: var(--t3); font-weight: 600; }
.plan-price-per { font-size: 12px; color: var(--t4); }
.plan-setup { font-size: 11px; color: var(--t4); margin-bottom: 18px; }

.plan-modules { flex: 1; display: flex; flex-direction: column; gap: 7px; margin-bottom: 20px; }

.plan-mod-item { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--t2); }
.plan-mod-check {
  width: 15px; height: 15px;
  border-radius: var(--r-pill);
  background: var(--c-green-bg);
  color: var(--c-green);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.plan-mod-check svg { width: 9px; height: 9px; }
.plan-card .btn { width: 100%; justify-content: center; }

/* ── Download / Release Cards ───────────────────────────── */
.release-card {
  background: var(--bg-raised);
  border: 1px solid var(--bdr);
  border-radius: var(--r-lg);
  padding: 22px;
  margin-bottom: 14px;
}

.release-card.latest { border-color: var(--c-green-bdr); }
.release-card.latest::before {
  content: ''; display: block;
  position: relative;
  height: 2px;
  background: var(--c-green);
  margin: -22px -22px 18px;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}

.release-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.release-ver {
  font-family: 'JetBrains Mono';
  font-size: 16px;
  font-weight: 700;
  color: var(--t1);
}

.release-tag {
  font-family: 'JetBrains Mono';
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.release-changelog {
  font-size: 13px;
  color: var(--t2);
  line-height: 1.6;
  margin-bottom: 16px;
  padding-left: 14px;
  border-left: 2px solid var(--bdr-m);
}

.release-files { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.release-file {
  background: var(--bg-deep);
  border: 1px solid var(--bdr);
  border-radius: var(--r);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.release-file-platform {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  font-size: 13px;
}
.release-file-platform svg { width: 18px; height: 18px; }

.release-hash {
  font-family: 'JetBrains Mono';
  font-size: 10px;
  color: var(--t4);
  word-break: break-all;
  background: var(--bg-surface);
  padding: 6px 8px;
  border-radius: 4px;
  border: 1px solid var(--bdr-s);
}

.release-hash-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--t4);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 2px;
}

.release-size { font-size: 11px; color: var(--t4); }

/* ── License Key Display ────────────────────────────────── */
.license-key {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--bg-deep);
  border: 1px solid var(--bdr);
  border-radius: var(--r);
  font-family: 'JetBrains Mono';
  font-size: 12px;
  color: var(--t2);
}

.license-key button {
  background: none; border: none;
  cursor: pointer; color: var(--t4);
  padding: 2px; transition: color .12s;
}
.license-key button:hover { color: var(--c-blue); }

/* ── Page Layout ────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.page-header-left { display: flex; flex-direction: column; gap: 2px; }
.page-title { font-size: 20px; font-weight: 800; }
.page-subtitle { font-size: 12px; color: var(--t3); }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.detail-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--t4);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 3px;
  font-family: 'JetBrains Mono';
}

.detail-value { font-size: 13.5px; color: var(--t1); }

.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.filter-bar .form-input { padding: 6px 10px; font-size: 12px; }

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 12px;
  color: var(--t3);
  font-family: 'JetBrains Mono';
}

.pagination-btns { display: flex; gap: 4px; }

/* ── Settings ───────────────────────────────────────────── */
.settings-section { max-width: 560px; }

.settings-card {
  background: var(--bg-raised);
  border: 1px solid var(--bdr);
  border-radius: var(--r-lg);
  padding: 22px;
  margin-bottom: 14px;
}

.settings-card-title {
  font-family: 'Outfit';
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--bdr);
}

.settings-form { display: flex; flex-direction: column; gap: 14px; }
.settings-actions { display: flex; gap: 8px; margin-top: 6px; }

/* ── Toggle ─────────────────────────────────────────────── */
.toggle { position: relative; display: inline-block; width: 38px; height: 20px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-track {
  position: absolute; inset: 0;
  background: var(--bg-overlay);
  border-radius: 20px;
  cursor: pointer;
  transition: background .2s;
}

.toggle-track::before {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.4);
}

.toggle input:checked + .toggle-track { background: var(--c-green); }
.toggle input:checked + .toggle-track::before { transform: translateX(18px); }

/* ── Status dots ────────────────────────────────────────── */
.store-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.store-dot.online {
  background: var(--c-green);
  box-shadow: 0 0 6px rgba(34,197,94,.5);
  animation: pulse-dot 1.5s ease-in-out infinite;
}

.store-dot.offline { background: var(--t4); }

/* ── Empty State ────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 20px;
  text-align: center;
}

.empty-state-icon {
  width: 56px; height: 56px;
  border-radius: var(--r-lg);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.empty-state-icon svg { width: 24px; height: 24px; color: var(--t4); }
.empty-state-title { font-family: 'Outfit'; font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.empty-state-desc { font-size: 12.5px; color: var(--t3); max-width: 300px; margin-bottom: 16px; }

/* ── Animations ─────────────────────────────────────────── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateX(30px); } }

.stagger-in { animation: fadeUp .25s ease backwards; }
.stagger-in:nth-child(1) { animation-delay: .04s; }
.stagger-in:nth-child(2) { animation-delay: .08s; }
.stagger-in:nth-child(3) { animation-delay: .12s; }
.stagger-in:nth-child(4) { animation-delay: .16s; }
.stagger-in:nth-child(5) { animation-delay: .2s; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .app-layout { flex-direction: column; }
  .sidebar {
    width: 100%; height: auto;
    border-right: none; border-bottom: 1px solid var(--bdr);
    flex-direction: row; overflow-x: auto;
  }
  .sb-brand { display: none; }
  .sb-nav { flex-direction: row; padding: 6px 8px; gap: 2px; }
  .sb-section { display: none; }
  .sb-item { padding: 7px 12px; font-size: 11.5px; white-space: nowrap; }
  .sb-item.active::after { display: none; }
  .sb-footer { display: none; }
  .app-content { padding: 14px; }
  .topbar { padding: 0 14px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
  .release-files { grid-template-columns: 1fr; }
  .plans-grid { grid-template-columns: 1fr; }
  .l-nav-link { display: none; }
  .l-hero { padding: 48px 0 36px; }
  .l-hero-stats { flex-direction: column; gap: 12px; }
  .l-hero-stat-sep { width: 40px; height: 1px; }
  .l-problem-grid { grid-template-columns: 1fr; }
  .l-steps { flex-direction: column; gap: 20px; }
  .l-step-line { width: 2px; height: 30px; margin: 0 auto; }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
  .l-hero-cta { flex-direction: column; align-items: center; }
}

/* ── Utility ────────────────────────────────────────────── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.text-center { text-align: center; }
.text-sm { font-size: 12px; }
.text-muted { color: var(--t3); }
.w-full { width: 100%; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }
