/* ═══════════════════════════════════════════════════════════════
   Hydra Jaga Jakarta — style.css
   Tema: Ruang kontrol pengawasan — navy gelap + teal accent
   Typeface: Space Grotesk (display) · Inter (body) · JetBrains Mono (data)
   ═══════════════════════════════════════════════════════════════ */

/* ── Logo Images ───────────────────────────────────────────────────────────── */
/* Nav landing page */
.nav-logo-img {
  height: 32px;
  width: 32px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

/* Dashboard header */
.header-logo-img {
  height: 34px;
  width: 34px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

/* Auth brand panel (login/register) */
.auth-brand-logo-img {
  height: 72px;
  width: 72px;
  object-fit: cover;
  border-radius: 12px;
  flex-shrink: 0;
}

/* ── Variables ──────────────────────────────────────────────────────────── */
:root {
  --bg:          #080E1C;
  --bg-2:        #0C1525;
  --sidebar-bg:  #0A1528;
  --panel:       #0F2040;
  --panel-2:     #122444;
  --border:      #162C4A;
  --border-2:    #1D3A60;
  --accent:      #00C9A7;
  --accent-dim:  rgba(0,201,167,0.12);
  --accent-glow: rgba(0,201,167,0.25);
  --blue:        #1A6EE0;
  --text:        #DDE8F5;
  --text-dim:    #6B8CAE;
  --text-muted:  #3D5A7A;
  --error:       #FF4D6A;
  --warn:        #FFB700;
  --success:     #00C9A7;

  --header-h:    54px;
  --sidebar-w:   290px;
  --info-h:      110px;

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;

  --radius-sm:   4px;
  --radius:      8px;
  --radius-lg:   12px;
  --t:           180ms ease;
}

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

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, textarea, select { font: inherit; }
img, svg { display: block; }

/* ── Flash Messages ─────────────────────────────────────────────────────── */
.flash-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  max-width: 360px;
}
.flash {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .75rem 1rem;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 500;
  animation: slideIn .25s ease;
  border-left: 3px solid;
}
.flash--error   { background:#2A0F15; border-color:var(--error);   color:#FFA0B0; }
.flash--success { background:#0A2A20; border-color:var(--accent);  color:#6FEFDB; }
.flash--info    { background:#0D1F3A; border-color:var(--blue);    color:#88B8F0; }
.flash--warning { background:#2A1F00; border-color:var(--warn);    color:#FFD766; }
.flash-close {
  flex-shrink: 0;
  opacity: .5;
  font-size: 1rem;
  line-height: 1;
  padding: 0 .25rem;
  transition: opacity var(--t);
}
.flash-close:hover { opacity: 1; }
@keyframes slideIn {
  from { opacity: 0; transform: translateX(1rem); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Shared Buttons ─────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem 1.25rem;
  background: var(--accent);
  color: #05120E;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .875rem;
  border-radius: var(--radius);
  transition: filter var(--t), transform var(--t);
  white-space: nowrap;
}
.btn-primary:hover { filter: brightness(1.12); transform: translateY(-1px); text-decoration: none; }
.btn-primary.btn-lg { padding: .7rem 1.6rem; font-size: .95rem; }
.btn-primary.btn-full { width: 100%; justify-content: center; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem 1.25rem;
  border: 1px solid var(--border-2);
  color: var(--text-dim);
  font-size: .875rem;
  border-radius: var(--radius);
  transition: border-color var(--t), color var(--t);
  white-space: nowrap;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.btn-ghost.btn-lg { padding: .7rem 1.6rem; font-size: .95rem; }

/* ═══════════════════════════════════════════════════════════════
   LANDING PAGE
   ═══════════════════════════════════════════════════════════════ */
.landing-body { background: var(--bg); }
.landing { display: flex; flex-direction: column; min-height: 100vh; }

/* Nav */
.landing-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .875rem 2rem;
  background: rgba(8,14,28,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .95rem;
  color: var(--text);
  letter-spacing: .04em;
  text-decoration: none;
}
.nav-logo:hover { color: var(--accent); }
.nav-actions { display: flex; align-items: center; gap: .75rem; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: 6rem 2rem 5rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  position: relative;
}
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: .3;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 0%, transparent 100%);
}
.hero-content { position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem .85rem;
  background: var(--accent-dim);
  border: 1px solid rgba(0,201,167,.3);
  border-radius: 99px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: .06em;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}
.badge-dot {
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse-dot 1.8s ease infinite;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--text);
  margin-bottom: 1.25rem;
}
.hero-title .accent { color: var(--accent); }
.hero-desc {
  font-size: 1.05rem;
  color: var(--text-dim);
  max-width: 480px;
  margin-bottom: 2rem;
  line-height: 1.7;
}
.hero-cta { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.hero-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.stat { display: flex; flex-direction: column; gap: .15rem; }
.stat-num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.stat-label { font-size: .75rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .05em; }
.stat-divider { width: 1px; height: 2.5rem; background: var(--border); }

/* Dashboard Mockup */
.hero-mockup {
  position: relative;
  z-index: 1;
}
.mockup-window {
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 0 60px rgba(0,201,167,.08), 0 30px 60px rgba(0,0,0,.4);
}
.mockup-bar {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1rem;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red    { background: #FF5F57; }
.dot.yellow { background: #FFBD2E; }
.dot.green  { background: #28C840; }
.mockup-title {
  flex: 1;
  text-align: center;
  font-size: .72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.mockup-body {
  display: flex;
  height: 240px;
}
.mockup-sidebar {
  width: 90px;
  border-right: 1px solid var(--border);
  padding: .75rem .5rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.ms-search {
  height: 18px;
  background: var(--panel);
  border-radius: 4px;
}
.ms-filter {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.mf-chip {
  height: 14px;
  width: 24px;
  background: var(--border);
  border-radius: 3px;
}
.mf-chip.active { background: var(--accent-dim); border: 1px solid var(--accent); }
.ms-items { display: flex; flex-direction: column; gap: 5px; flex: 1; }
.mi {
  height: 22px;
  background: var(--panel);
  border-radius: 3px;
  border-left: 2px solid var(--border-2);
}
.mi.active { border-left-color: var(--accent); background: var(--accent-dim); }
.mockup-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.mm-viewer {
  flex: 1;
  background: #020508;
  position: relative;
  overflow: hidden;
}
.mm-overlay {
  position: absolute;
  top: .5rem; left: .5rem;
}
.live-tag {
  display: flex;
  align-items: center;
  gap: .3rem;
  padding: .2rem .5rem;
  background: rgba(255,0,0,.8);
  border-radius: 3px;
  font-size: .6rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: white;
  letter-spacing: .08em;
}
.live-dot-sm {
  width: 5px; height: 5px;
  background: white;
  border-radius: 50%;
  animation: pulse-dot 1.2s ease infinite;
}
.mm-scanline {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 3px,
    rgba(0,201,167,.03) 3px,
    rgba(0,201,167,.03) 4px
  );
  pointer-events: none;
}
.mm-info {
  height: 40px;
  padding: .5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mm-info-row {
  height: 10px;
  background: var(--border);
  border-radius: 2px;
}
.mm-info-row.short { width: 60%; }

/* Features */
.features {
  padding: 5rem 2rem;
  background: linear-gradient(to bottom, transparent, var(--bg-2) 30%, var(--bg-2) 70%, transparent);
}
.features-inner { max-width: 1100px; margin: 0 auto; }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--text);
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.25rem;
}
.feature-card {
  padding: 1.5rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--t), transform var(--t);
}
.feature-card:hover {
  border-color: rgba(0,201,167,.4);
  transform: translateY(-2px);
}
.fc-icon {
  width: 44px; height: 44px;
  background: var(--accent-dim);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.feature-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: .5rem;
}
.feature-card p { font-size: .875rem; color: var(--text-dim); line-height: 1.65; }

/* How it works */
.how-it-works { padding: 4rem 2rem; }
.hiw-inner { max-width: 860px; margin: 0 auto; }
.hiw-steps {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2.5rem;
}
.hiw-step {
  flex: 1;
  min-width: 180px;
  max-width: 240px;
  text-align: center;
}
.step-num {
  width: 44px; height: 44px;
  background: var(--accent-dim);
  border: 1px solid rgba(0,201,167,.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
}
.hiw-step h4 {
  font-family: var(--font-display);
  font-weight: 600;
  margin-bottom: .4rem;
}
.hiw-step p { font-size: .85rem; color: var(--text-dim); }
.hiw-arrow {
  color: var(--text-muted);
  font-size: 1.5rem;
  padding-top: .75rem;
  flex-shrink: 0;
}

/* CTA Section */
.cta-section {
  text-align: center;
  padding: 5rem 2rem;
  background: radial-gradient(ellipse 60% 50% at 50% 100%, var(--accent-dim) 0%, transparent 100%);
}
.cta-section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  margin-bottom: .75rem;
}
.cta-section p { color: var(--text-dim); margin-bottom: 2rem; }

/* Footer */
.landing-footer {
  background: #050A14;
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem 1.25rem;
}
.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 1rem;
  margin-bottom: .85rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
  flex-wrap: wrap;
}
.footer-brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .95rem;
  color: var(--text);
  letter-spacing: .01em;
}
.footer-nav {
  display: flex;
  gap: 1.75rem;
  flex-wrap: wrap;
}
.footer-nav a {
  font-size: .85rem;
  color: var(--text-dim);
  text-decoration: none;
  transition: color var(--t);
}
.footer-nav a:hover { color: var(--text); }
.footer-bottom {
  font-size: .78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ═══════════════════════════════════════════════════════════════
   AUTH PAGES (Login & Register)
   ═══════════════════════════════════════════════════════════════ */
.auth-body { background: var(--bg); }
.auth-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  min-height: 100vh;
}

/* Brand Panel */
.auth-brand {
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
  overflow: hidden;
}
.auth-brand::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 300px;
  background: radial-gradient(ellipse at 50% 100%, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}
.auth-brand-logo {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .9rem;
  color: var(--text);
  letter-spacing: .04em;
  line-height: 1.2;
}
.brand-tagline { font-size: .72rem; color: var(--text-dim); }
.auth-brand-text { flex: 1; }
.auth-brand-text h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .75rem;
  line-height: 1.25;
}
.auth-brand-text p { font-size: .9rem; color: var(--text-dim); line-height: 1.65; }
.auth-brand-dots {
  display: flex;
  gap: .5rem;
  position: relative;
  z-index: 1;
}
.auth-brand-dots span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--border-2);
}
.auth-brand-dots span:first-child { background: var(--accent); }

/* Form Panel */
.auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.auth-card {
  width: 100%;
  max-width: 420px;
}
.auth-card-header { margin-bottom: 2rem; }
.auth-card-header h1 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: .4rem;
}
.auth-card-header p { font-size: .875rem; color: var(--text-dim); }
.auth-card-header a { color: var(--accent); }

/* Form Fields */
.auth-form { display: flex; flex-direction: column; gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field label {
  font-size: .8rem;
  font-weight: 500;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: space-between;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.toggle-pw {
  font-size: .75rem;
  font-weight: 400;
  color: var(--accent);
  text-transform: none;
  letter-spacing: 0;
}
.toggle-pw:hover { text-decoration: underline; }
.field input[type="text"],
.field input[type="email"],
.field input[type="password"] {
  width: 100%;
  padding: .65rem .9rem;
  background: var(--panel);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  color: var(--text);
  font-size: .9rem;
  transition: border-color var(--t), box-shadow var(--t);
  outline: none;
}
.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.field--check .check-label {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  cursor: pointer;
  font-size: .83rem;
  color: var(--text-dim);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
.field--check input[type="checkbox"] {
  flex-shrink: 0;
  width: 16px; height: 16px;
  margin-top: 2px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* Password Strength */
.pw-strength { margin-top: .3rem; }
.pw-bar-track {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-bottom: .25rem;
  overflow: hidden;
}
.pw-bar-fill { height: 100%; border-radius: 2px; transition: width .3s ease; }

.auth-footer-note {
  margin-top: 1.5rem;
  font-size: .75rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD
   ═══════════════════════════════════════════════════════════════ */
.dashboard-body { overflow: hidden; }

.app-layout {
  display: grid;
  grid-template-rows: var(--header-h) 1fr;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-areas:
    "header header"
    "sidebar main";
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* Header */
.app-header {
  grid-area: header;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  background: var(--sidebar-bg);
  border-bottom: 1px solid var(--border);
  gap: 1rem;
  z-index: 50;
}
.header-left { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.sidebar-toggle {
  display: none;
  width: 34px; height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  flex-shrink: 0;
  transition: background var(--t), color var(--t);
}
.sidebar-toggle:hover { background: var(--panel); color: var(--text); }
.header-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  flex-shrink: 0;
}
.header-logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.hl-main {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .82rem;
  color: var(--text);
  letter-spacing: .06em;
}
.hl-sub { font-size: .65rem; color: var(--text-dim); letter-spacing: .1em; }
.header-center {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  justify-content: center;
}
.live-badge {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .2rem .65rem;
  background: rgba(255,40,40,.12);
  border: 1px solid rgba(255,40,40,.3);
  border-radius: 99px;
  font-size: .7rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: #FF6666;
  letter-spacing: .1em;
}
.live-dot-pulse {
  width: 7px; height: 7px;
  background: #FF4444;
  border-radius: 50%;
  animation: pulse-dot 1.4s ease infinite;
}
.live-dot-pulse.sm { width: 5px; height: 5px; }
.cache-note {
  font-size: .75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.header-right { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }
.user-chip {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .3rem .7rem .3rem .3rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 99px;
}
.user-avatar {
  width: 26px; height: 26px;
  background: var(--accent);
  color: #05120E;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .8rem;
}
.user-name { font-size: .82rem; color: var(--text-dim); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-logout {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .75rem;
  color: var(--text-dim);
  font-size: .8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: color var(--t), border-color var(--t);
  text-decoration: none;
}
.btn-logout:hover { color: var(--error); border-color: var(--error); text-decoration: none; }

/* Sidebar */
.app-sidebar {
  grid-area: sidebar;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-search {
  position: relative;
  padding: .75rem .75rem .5rem;
  flex-shrink: 0;
}
.search-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  margin-top: 2px;
  color: var(--text-muted);
  pointer-events: none;
}
#search-input {
  width: 100%;
  padding: .55rem .75rem .55rem 2.1rem;
  background: var(--panel);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  color: var(--text);
  font-size: .85rem;
  outline: none;
  transition: border-color var(--t);
}
#search-input:focus { border-color: var(--accent); }
#search-input::placeholder { color: var(--text-muted); }

.sidebar-section {
  padding: .5rem .75rem;
  flex-shrink: 0;
}
.section-label {
  font-size: .65rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: .5rem;
}
.wilayah-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}
.wpill {
  padding: .28rem .6rem;
  font-size: .75rem;
  font-weight: 500;
  border: 1px solid var(--border-2);
  border-radius: 99px;
  color: var(--text-dim);
  white-space: nowrap;
  transition: border-color var(--t), color var(--t), background var(--t);
}
.wpill:hover { border-color: var(--accent); color: var(--accent); }
.wpill.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.sidebar-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .4rem .75rem .5rem;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}
.count-badge {
  font-size: .75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}
.btn-refresh {
  display: flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem .55rem;
  font-size: .72rem;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: color var(--t), border-color var(--t);
}
.btn-refresh:hover { color: var(--accent); border-color: var(--accent); }
.btn-refresh:disabled { opacity: .5; cursor: default; }

/* CCTV List */
.cctv-list-wrap { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
.cctv-list {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.cctv-list::-webkit-scrollbar { width: 4px; }
.cctv-list::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 2px; }

.cctv-item {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .55rem .75rem;
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: background var(--t), border-color var(--t);
}
.cctv-item:hover { background: var(--panel); border-left-color: var(--border-2); }
.cctv-item.selected {
  background: var(--accent-dim);
  border-left-color: var(--accent);
}
.cctv-item-icon {
  font-size: .9rem;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
  opacity: .7;
}
.cctv-item.selected .cctv-item-icon { opacity: 1; }
.cctv-item-info { min-width: 0; flex: 1; }
.cctv-item-name {
  font-size: .8rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.cctv-item.selected .cctv-item-name { color: var(--accent); }
.cctv-item-loc {
  font-size: .7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Skeleton Loading */
.list-skeleton { padding: .25rem 0; }
.skel-item {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .55rem .75rem;
}
.skel-icon { width: 24px; height: 20px; background: var(--panel); border-radius: 3px; flex-shrink: 0; animation: shimmer 1.5s infinite; }
.skel-text { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.skel-line { height: 10px; background: var(--panel); border-radius: 2px; animation: shimmer 1.5s infinite; }
.skel-line.short { width: 60%; }

@keyframes shimmer {
  0%, 100% { opacity: .5; }
  50% { opacity: 1; }
}

/* List Empty / Error */
.list-empty, .list-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
  text-align: center;
  gap: .5rem;
}
.empty-icon { font-size: 2rem; opacity: .3; }
.list-empty p { font-size: .8rem; color: var(--text-muted); }
.list-error { color: var(--error); font-size: .8rem; }

/* Pagination */
.sidebar-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  padding: .6rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--sidebar-bg);
  position: sticky;
  bottom: 0;
  z-index: 5;
}
.sidebar-pagination--top {
  border-top: none;
  border-bottom: 1px solid var(--border);
  position: static;
}
.pg-btn {
  min-width: 40px; height: 34px;
  padding: 0 .5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 1.3rem;
  transition: color var(--t), border-color var(--t);
}
.pg-btn:hover:not(:disabled) { color: var(--accent); border-color: var(--accent); }
.pg-btn:active:not(:disabled) { background: var(--accent-dim); }
.pg-btn:disabled { opacity: .35; cursor: default; }
.pg-info { font-size: .8rem; color: var(--text); font-family: var(--font-mono); min-width: 60px; text-align: center; }

/* Main Area */
.app-main {
  grid-area: main;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.viewer-layout {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Viewer */
.viewer-wrap {
  flex: 1;
  position: relative;
  background: #020508;
  overflow: hidden;
  min-height: 0;
}

.viewer-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: center;
  padding: 2rem;
}
.viewer-placeholder svg { margin-bottom: .5rem; opacity: .4; }
.viewer-placeholder h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dim);
}
.viewer-placeholder p { font-size: .85rem; color: var(--text-muted); max-width: 300px; }

.viewer-loading {
  position: absolute;
  inset: 0;
  background: rgba(8,14,28,.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  z-index: 10;
}
.viewer-loading span { font-size: .85rem; color: var(--text-dim); }
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border-2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.viewer-error {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: rgba(8,14,28,.9);
  z-index: 10;
}
.viewer-error p { font-size: .9rem; color: var(--text-dim); }

/* Viewer Topbar — nama kamera + tombol Tampilkan */
.viewer-topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .4rem .65rem;
  background: rgba(4,8,18,.82);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255,255,255,.06);
  z-index: 6;
  gap: .75rem;
}
.vtb-left {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-width: 0;
  flex: 1;
}
.vtb-live {
  display: flex;
  align-items: center;
  gap: .3rem;
  padding: .15rem .45rem;
  background: rgba(255,40,40,.85);
  border-radius: 3px;
  font-size: .62rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: white;
  letter-spacing: .1em;
  flex-shrink: 0;
}
.vtb-name {
  font-size: .78rem;
  font-weight: 500;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vtb-btn-tampilkan {
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: .28rem .7rem;
  background: var(--accent);
  color: #041A13;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .72rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  text-decoration: none;
  letter-spacing: .02em;
  flex-shrink: 0;
  transition: filter var(--t);
}
.vtb-btn-tampilkan:hover { filter: brightness(1.1); text-decoration: none; }

/* Live badge overlay (lama) — sembunyikan jika topbar aktif */
.viewer-badge { display: none !important; }

/* Banner hint di bawah viewer — info kamera terproteksi */
.viewer-hint {
  position: absolute;
  bottom: .75rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: .5rem;
  max-width: calc(100% - 1.5rem);
  padding: .55rem .85rem;
  background: rgba(10,20,40,.92);
  border: 1px solid var(--border-2);
  backdrop-filter: blur(8px);
  border-radius: var(--radius);
  font-size: .78rem;
  color: var(--text-dim);
  line-height: 1.4;
  z-index: 4;
}
.viewer-hint svg { flex-shrink: 0; color: var(--warn); }
.viewer-hint a { color: var(--accent); font-weight: 500; }

/* Viewer Placeholder */
.info-panel {
  height: var(--info-h);
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: .75rem 1rem;
  flex-shrink: 0;
  overflow: hidden;
}
.info-placeholder {
  font-size: .8rem;
  color: var(--text-muted);
  width: 100%;
  text-align: center;
}
.info-detail { width: 100%; display: flex; align-items: center; gap: 1.5rem; }
.info-grid {
  display: flex;
  gap: 1.5rem;
  flex: 1;
  overflow: hidden;
  flex-wrap: wrap;
  align-content: flex-start;
}
.ig-item { display: flex; flex-direction: column; gap: .1rem; min-width: 80px; }
.ig-label {
  font-size: .63rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.ig-value {
  font-size: .82rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
.ig-mono { font-family: var(--font-mono); font-size: .75rem; }
.info-actions { display: flex; gap: .5rem; flex-shrink: 0; }

.btn-maps, .btn-direct, .btn-open-tab {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .7rem;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  font-size: .75rem;
  color: var(--text-dim);
  transition: color var(--t), border-color var(--t);
  white-space: nowrap;
  text-decoration: none;
}
.btn-maps:hover, .btn-direct:hover, .btn-open-tab:hover {
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}
.btn-open-tab {
  font-size: .85rem;
  padding: .5rem 1rem;
}

/* Mobile Sidebar Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 40;
}

/* Animations */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .6; transform: scale(.85); }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-form-panel { padding: 1.5rem; min-height: 100vh; }
  .auth-card { max-width: 100%; }
}

@media (max-width: 768px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding: 3rem 1.25rem; }
  .hero-desc { margin: 0 auto 1.5rem; }
  .hero-cta { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-mockup { display: none; }
  .features { padding: 3rem 1.25rem; }
  .feature-grid { grid-template-columns: 1fr; }
  .hiw-steps { flex-direction: column; align-items: center; }
  .hiw-arrow { transform: rotate(90deg); }
  .landing-nav { padding: .75rem 1rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; }

  /* Dashboard mobile */
  .app-layout {
    grid-template-columns: 1fr;
    grid-template-rows: var(--header-h) 1fr;
    grid-template-areas:
      "header"
      "main";
  }
  .sidebar-toggle { display: flex; }
  .app-sidebar {
    position: fixed;
    top: var(--header-h);
    left: 0;
    bottom: 0;
    width: var(--sidebar-w);
    z-index: 45;
    transform: translateX(-100%);
    transition: transform .25s ease;
  }
  .app-sidebar.open { transform: translateX(0); }
  .sidebar-overlay.visible { display: block; }
  .cache-note { display: none; }
  .user-name { display: none; }
}

@media (max-width: 480px) {
  .info-grid { gap: .75rem; }
  .info-actions { flex-direction: column; }
}
