:root {
  color-scheme: dark;
  --bg: #050507;
  --blur: 22px;
  --glass: rgba(255, 255, 255, 0.06);
  --glass-strong: rgba(16, 16, 22, 0.72);
  --glass-2: rgba(255, 255, 255, 0.035);
  --glass-hover: rgba(255, 255, 255, 0.09);
  --border: rgba(255, 255, 255, 0.16);
  --border-bright: rgba(255, 255, 255, 0.32);
  --fg: #FAFAFA;
  --fg-muted: #A1A1AA;
  --fg-dim: #71717A;
  --primary: #FFFFFF;
  --primary-fg: #09090B;
  --ok: #4ADE80;
  --warn: #FBBF24;
  --err: #F87171;
  --cyan: #38BDF8;
  --violet: #C084FC;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  --radius-md: 12px;
  --radius-lg: 20px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.55;
  background-color: #020203;
  background-image:
    radial-gradient(ellipse 60% 45% at 20% 12%, rgba(255, 255, 255, 0.055), transparent 65%),
    radial-gradient(ellipse 50% 40% at 85% 85%, rgba(255, 255, 255, 0.04), transparent 65%),
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 48px 48px, 48px 48px;
  background-attachment: fixed;
  color: var(--fg);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }

/* LIQUID GLASS MORPHING BLOBS */
@keyframes liquidMorph {
  0%, 100% {
    border-radius: 42% 58% 64% 36% / 44% 36% 64% 56%;
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
  }
  33% {
    border-radius: 58% 42% 38% 62% / 56% 62% 38% 44%;
    transform: translate3d(24px, -18px, 0) rotate(12deg) scale(1.06);
  }
  66% {
    border-radius: 36% 64% 52% 48% / 38% 52% 48% 62%;
    transform: translate3d(-18px, 20px, 0) rotate(-10deg) scale(0.96);
  }
}

.ambient { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.liquid-blob {
  position: absolute;
  filter: blur(65px);
  opacity: 0.48;
  animation: liquidMorph 16s ease-in-out infinite;
}
.blob-1 {
  width: 420px; height: 400px; top: 5%; right: 10%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(161, 161, 170, 0.06));
}
.blob-2 {
  width: 380px; height: 360px; bottom: 6%; left: 6%;
  background: linear-gradient(135deg, rgba(228, 228, 231, 0.14), rgba(113, 113, 122, 0.05));
  animation-delay: -6s;
}
.blob-3 {
  width: 280px; height: 280px; top: 42%; left: 44%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(82, 82, 91, 0.04));
  animation-delay: -11s;
}

.glass-ring {
  position: absolute; border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 36px rgba(255, 255, 255, 0.08), inset 0 0 36px rgba(255, 255, 255, 0.05);
  animation: liquidMorph 22s ease-in-out infinite reverse;
}
.ring-1 { width: 320px; height: 320px; top: 12%; right: 16%; background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.01)); }
.ring-2 { width: 240px; height: 240px; bottom: 10%; left: 14%; background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.01)); animation-delay: -8s; }

/* SMOKED BLACK GLASS PANEL + CURSOR SPOTLIGHT */
.glass-panel {
  position: relative;
  background:
    radial-gradient(440px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.09), transparent 62%),
    linear-gradient(145deg, rgba(18, 18, 22, 0.78) 0%, rgba(7, 7, 9, 0.88) 100%);
  backdrop-filter: blur(var(--blur)) saturate(120%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(120%);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-top-color: rgba(255, 255, 255, 0.28);
  border-left-color: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2), 0 24px 52px rgba(0, 0, 0, 0.78);
  transition: border-color 180ms ease, transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* Brand */
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--border-bright);
  display: grid; place-items: center; color: var(--fg);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3);
}
.brand-name { display: block; font-weight: 700; font-size: 1rem; letter-spacing: -0.02em; line-height: 1.2; }
.brand-tag { display: block; font-size: 0.72rem; color: var(--fg-muted); }

/* PUBLIC PORTAL (HOME, HARGA, DAFTAR, ADMIN) */
.public-app { position: relative; z-index: 1; min-height: 100vh; }
.public-main { max-width: 1200px; margin: 0 auto; padding: 34px 20px 80px; }

.pub-nav-item {
  position: relative; z-index: 1;
  border: none; background: transparent; color: var(--fg-muted);
  font-family: inherit; font-size: 0.84rem; font-weight: 600;
  padding: 7px 14px; border-radius: 999px; cursor: pointer;
  white-space: nowrap; transition: color 160ms ease;
}
.pub-nav-item:hover, .pub-nav-item.active { color: #FFFFFF; }

.auth-shell {
  display: grid; grid-template-columns: 1.1fr 0.9fr;
  gap: 44px; align-items: center; padding: 18px 0;
}
@media (max-width: 920px) {
  .auth-shell { grid-template-columns: 1fr; gap: 28px; }
}

.bento-features {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
@media (max-width: 680px) { .bento-features { grid-template-columns: 1fr; } }
.mini-feat { border-radius: var(--radius-md); padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.mini-feat strong { font-size: 0.88rem; }

.pricing-head { text-align: center; max-width: 560px; margin: 10px auto 28px; }
.pricing-head h2 { font-size: 1.8rem; margin: 0 0 6px; letter-spacing: -0.02em; }
.pricing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 380px)); justify-content: center; gap: 22px; }
@media (max-width: 760px) { .pricing-grid { grid-template-columns: 1fr; } }
.pricing-card { display: flex; flex-direction: column; gap: 14px; }
.pricing-card.featured { border-color: rgba(255, 255, 255, 0.34); }
.pricing-card h3 { margin: 4px 0 0; font-size: 1.2rem; }
.price-tag { font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; }
.price-tag span { font-size: 0.9rem; font-weight: 400; color: var(--fg-muted); }
.feat-list { margin: 0; padding: 0 0 0 18px; display: flex; flex-direction: column; gap: 8px; color: var(--fg-muted); font-size: 0.88rem; flex: 1; }

.center-card-wrap { display: flex; justify-content: center; padding-top: 24px; }
.center-card-wrap .auth-card { width: 100%; max-width: 440px; }
.link-btn { background: none; border: none; color: #FFFFFF; font-family: inherit; font-size: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; padding: 0; }
.auth-showcase { display: flex; flex-direction: column; gap: 24px; }
.showcase-body { display: flex; flex-direction: column; gap: 14px; }
.pill-live {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  padding: 5px 12px; border-radius: 999px; font-size: 0.76rem; font-weight: 600;
  background: rgba(74, 222, 128, 0.12); border: 1px solid rgba(74, 222, 128, 0.32); color: var(--ok);
}
.dot-live { width: 7px; height: 7px; border-radius: 999px; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.hero-title { margin: 0; font-size: clamp(1.85rem, 3.1vw, 2.5rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; }
.hero-sub { margin: 0; color: var(--fg-muted); font-size: 0.96rem; max-width: 52ch; }

/* 3D Carousel */
.carousel-3d-wrap { margin-top: 8px; display: flex; flex-direction: column; gap: 12px; }
.carousel-3d-stage {
  position: relative;
  height: 215px;
  perspective: 1100px;
  transform-style: preserve-3d;
}
.c3d-card {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 82%;
  max-width: 390px;
  height: 196px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform 520ms cubic-bezier(0.22, 1, 0.36, 1), opacity 420ms ease, filter 420ms ease;
}
.c3d-card.is-center {
  transform: translate3d(0, 0, 40px) rotateY(0deg) scale(1);
  opacity: 1;
  z-index: 3;
  filter: blur(0px);
}
.c3d-card.is-left {
  transform: translate3d(-44%, 8px, -110px) rotateY(26deg) scale(0.84);
  opacity: 0.58;
  z-index: 2;
  filter: blur(1px);
}
.c3d-card.is-right {
  transform: translate3d(44%, 8px, -110px) rotateY(-26deg) scale(0.84);
  opacity: 0.58;
  z-index: 2;
  filter: blur(1px);
}
.c3d-title { font-weight: 600; color: var(--fg); }
.code-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 14px; border-bottom: 1px solid rgba(255,255,255,0.14);
  font-size: 0.76rem; color: var(--fg-muted); background: rgba(0,0,0,0.28);
}
.c3d-card pre { margin: 0; padding: 12px 14px; font-size: 0.76rem; line-height: 1.45; color: #F4F4F5; overflow: hidden; }

.carousel-controls { display: flex; align-items: center; justify-content: center; gap: 14px; }
.c3d-dots { display: flex; gap: 8px; }
.c3d-dot {
  width: 8px; height: 8px; padding: 0; border-radius: 999px; border: none;
  background: rgba(255,255,255,0.25); cursor: pointer; transition: width 220ms ease, background 220ms ease;
}
.c3d-dot.active { width: 24px; background: #FFFFFF; }

.auth-card { border-radius: var(--radius-lg); padding: 26px; }
.auth-card-head { margin-bottom: 18px; }
.auth-card-head h2 { margin: 0; font-size: 1.25rem; }

/* INTERACTIVE GLASS NAVBAR */
.dash-app { position: relative; z-index: 1; }
.glass-navbar-wrap {
  position: sticky; top: 14px; z-index: 45;
  max-width: 1240px; margin: 0 auto; padding: 14px 20px 0;
}
.glass-navbar {
  border-radius: 999px;
  padding: 8px 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.nav-pill-track {
  position: relative;
  display: flex; align-items: center; gap: 2px;
  padding: 3px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow-x: auto;
}
.nav-glider {
  position: absolute;
  top: 3px; left: 3px; height: calc(100% - 6px);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 4px 16px rgba(0, 0, 0, 0.25);
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1), width 280ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  z-index: 0;
}
.nav-item {
  position: relative; z-index: 1;
  border: none; background: transparent; color: var(--fg-muted);
  font-family: inherit; font-size: 0.84rem; font-weight: 600;
  padding: 7px 14px; border-radius: 999px; cursor: pointer;
  white-space: nowrap; transition: color 160ms ease;
}
.nav-item:hover, .nav-item.active { color: #FFFFFF; }

.user-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 3px 10px 3px 4px; border-radius: 999px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14);
}
.avatar-sm {
  width: 24px; height: 24px; border-radius: 999px;
  background: rgba(255,255,255,0.2); display: grid; place-items: center; font-size: 0.74rem; font-weight: 700;
}
.user-pill-name { font-size: 0.8rem; font-weight: 600; }

.workspace {
  max-width: 1240px; margin: 0 auto; padding: 22px 20px 80px;
  display: flex; flex-direction: column; gap: 18px;
}
.ws-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.ws-header h1 { margin: 0; font-size: 1.45rem; font-weight: 700; letter-spacing: -0.025em; }

.card { border-radius: var(--radius-lg); padding: 20px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head h2 { margin: 0; font-size: 1.02rem; font-weight: 600; }
.muted { color: var(--fg-muted); font-size: 0.84rem; margin: 2px 0 0; }

.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-lg { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.between { justify-content: space-between; }

/* KPI & Bento */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 1000px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .kpi-grid { grid-template-columns: 1fr; } }
.kpi-card { border-radius: var(--radius-lg); padding: 18px; display: flex; flex-direction: column; gap: 4px; }
.kpi-label { font-size: 0.72rem; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.kpi-value { font-size: 1.45rem; font-weight: 700; letter-spacing: -0.02em; }
.kpi-sub { font-size: 0.78rem; color: var(--fg-dim); }

.bento-2 { display: grid; grid-template-columns: 1fr 1.2fr; gap: 18px; }
@media (max-width: 900px) { .bento-2 { grid-template-columns: 1fr; } }

.bars-list { display: flex; flex-direction: column; gap: 14px; }
.bar-row { display: flex; flex-direction: column; gap: 6px; }
.bar-meta { display: flex; justify-content: space-between; font-size: 0.84rem; }
.bar-track { height: 8px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; transition: width 350ms ease; }
.fill-saweria { background: linear-gradient(90deg, #FBBF24, #F59E0B); }
.fill-sociabuzz { background: linear-gradient(90deg, #4ADE80, #22C55E); }
.fill-bagibagi { background: linear-gradient(90deg, #38BDF8, #0EA5E9); }

/* Segmented & Forms */
.segmented {
  display: grid; grid-template-columns: 1fr 1fr;
  background: rgba(255, 255, 255, 0.05); padding: 4px;
  border-radius: var(--radius-md); border: 1px solid var(--border); margin-bottom: 18px;
}
.seg-btn {
  min-height: 38px; border: none; border-radius: 8px; background: transparent;
  color: var(--fg-muted); font-family: inherit; font-size: 0.86rem; font-weight: 600; cursor: pointer;
}
.seg-btn.active { background: rgba(255, 255, 255, 0.16); color: var(--fg); }

.grid-form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 600px) { .grid-form { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 0.8rem; font-weight: 500; color: var(--fg-muted); }
.field .hint { font-size: 0.75rem; color: var(--fg-dim); }
.field-error { margin: 0; font-size: 0.84rem; color: var(--err); min-height: 1.2em; }
.inline-code { font-family: var(--font-mono); font-size: 0.76rem; background: rgba(255,255,255,0.1); padding: 2px 6px; border-radius: 5px; }

input, select {
  min-height: 40px; background: rgba(0, 0, 0, 0.36); border: 1px solid var(--border);
  color: var(--fg); border-radius: 10px; padding: 8px 12px; font-family: inherit; font-size: 0.88rem;
}
input:focus-visible, select:focus-visible, button:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; }

/* Buttons, Pills & Badges */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 38px; padding: 7px 14px; border-radius: 10px;
  border: 1px solid var(--border); background: rgba(255, 255, 255, 0.08);
  color: var(--fg); font-family: inherit; font-size: 0.84rem; font-weight: 600; cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, transform 100ms ease;
}
.btn:hover { background: rgba(255, 255, 255, 0.16); border-color: var(--border-bright); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-fg); box-shadow: 0 4px 18px rgba(255,255,255,0.18); }
.btn-primary:hover { background: #E4E4E7; border-color: #E4E4E7; }
.btn-ghost { background: rgba(255, 255, 255, 0.04); }
.btn-danger { background: rgba(239, 68, 68, 0.14); border-color: rgba(239, 68, 68, 0.35); color: #FCA5A5; }
.btn-sm { min-height: 32px; padding: 4px 11px; font-size: 0.78rem; border-radius: 8px; }
.btn-block { width: 100%; }

.f-pill {
  padding: 5px 13px; border-radius: 999px; font-size: 0.76rem; font-weight: 600; font-family: inherit;
  background: rgba(255,255,255,0.06); border: 1px solid var(--border); color: var(--fg-muted);
  cursor: pointer; transition: all 160ms ease;
}
.f-pill:hover { background: rgba(255,255,255,0.14); color: var(--fg); }
.f-pill.active { background: rgba(255,255,255,0.22); color: #FFFFFF; border-color: rgba(255,255,255,0.45); }

.badge {
  display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 600; background: rgba(255,255,255,0.08);
  border: 1px solid var(--border); color: var(--fg-muted);
}
.badge-glass { color: var(--fg); }
.badge-ok { background: rgba(74, 222, 128, 0.16); border-color: rgba(74, 222, 128, 0.35); color: var(--ok); }
.badge-warn { background: rgba(251, 191, 36, 0.16); border-color: rgba(251, 191, 36, 0.35); color: var(--warn); }
.badge-err { background: rgba(248, 113, 113, 0.16); border-color: rgba(248, 113, 113, 0.35); color: var(--err); }
.badge-cyan { background: rgba(56, 189, 248, 0.16); border-color: rgba(56, 189, 248, 0.35); color: var(--cyan); }

.banner { border-radius: var(--radius-lg); padding: 14px 18px; border: 1px solid var(--border); backdrop-filter: blur(var(--blur)); }
.banner-ok { border-color: rgba(74, 222, 128, 0.38); background: rgba(74, 222, 128, 0.08); }
.banner-err { border-color: rgba(248, 113, 113, 0.42); background: rgba(248, 113, 113, 0.1); }

/* Map Cards & Tables */
.map-item { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px; background: var(--glass-2); display: flex; flex-direction: column; gap: 10px; }
.url-grid { display: flex; flex-direction: column; gap: 7px; }
.url-row { display: flex; align-items: center; gap: 10px; font-size: 0.8rem; }
.url-label { width: 74px; flex-shrink: 0; color: var(--fg-muted); font-weight: 500; }
.url-row code {
  flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap;
  font-family: var(--font-mono); font-size: 0.76rem;
  background: rgba(0, 0, 0, 0.42); border: 1px solid var(--border);
  padding: 6px 10px; border-radius: 8px; color: #E4E4E7;
}

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { color: var(--fg-muted); font-weight: 600; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; }
tbody tr:hover { background: var(--glass-hover); }

.events { max-height: 460px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; font-size: 0.82rem; }
.event-line { padding: 9px 12px; border-radius: 10px; background: var(--glass-2); border: 1px solid var(--border); }

/* LIQUID GLASS POPUP MODAL */
@keyframes modalPop {
  from { opacity: 0; transform: scale(0.93) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-backdrop {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: grid; place-items: center; padding: 16px;
}
.modal-card {
  width: 100%; max-width: 520px; border-radius: var(--radius-lg); padding: 22px;
  animation: modalPop 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.toast-region { position: fixed; top: 82px; right: 18px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: rgba(20, 20, 28, 0.78); backdrop-filter: blur(var(--blur)); -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--border-bright); color: var(--fg);
  padding: 10px 14px; border-radius: 12px; font-size: 0.84rem;
  animation: modalPop 200ms ease;
}
.toast-ok { border-color: rgba(74, 222, 128, 0.5); }
.toast-err { border-color: rgba(248, 113, 113, 0.5); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
