/* Nakoda Data Centre — tema Navy profesional */
:root {
  --navy: #0F172A;
  --navy-2: #1E293B;
  --navy-3: #334155;
  --bg: #F8FAFC;
  --card: #FFFFFF;
  --line: #E2E8F0;
  --line-soft: #F1F5F9;
  --ink: #0F172A;
  --muted: #64748B;
  --side-text: #CBD5E1;
  --side-muted: #94A3B8;
  --accent: #2563EB;
  --accent-dark: #1D4ED8;
  --accent-soft: #DBEAFE;
  --warn-bg: #FEF3C7;
  --warn-ink: #92400E;
  --ok-bg: #D1FAE5;
  --ok-ink: #065F46;
  --wa-bg: #ECFDF5;
  --wa-line: #A7F3D0;
  --wa-ink: #065F46;
  --radius: 12px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
button, input { font-family: inherit; }
h1, h2, h3 { letter-spacing: -0.01em; }

/* ---------- Tombol ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px; border-radius: 8px;
  font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-outline { background: #fff; color: var(--ink); border-color: #CBD5E1; font-weight: 500; }
.btn-outline:hover { background: var(--line-soft); color: var(--ink); }
.btn-wa { background: var(--wa-bg); color: var(--wa-ink); border-color: var(--wa-line); }
.btn-wa:hover { background: #D1FAE5; color: var(--wa-ink); }
.btn-wa img { width: 18px; height: 18px; display: block; }
.btn-icon { width: 44px; padding: 0; }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: flex; flex-wrap: wrap; }
.login-hero {
  flex: 1 1 520px; position: relative; overflow: hidden;
  background: var(--navy); color: #fff;
  padding: 56px 64px; display: flex; flex-direction: column; min-height: 420px;
}
.login-hero .dots {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(148,163,184,.14) 1px, transparent 1px);
  background-size: 22px 22px;
}
.login-hero .glow {
  position: absolute; width: 560px; height: 560px; border-radius: 50%;
  left: -160px; top: -180px; background: var(--accent); opacity: .18; filter: blur(90px);
  animation: nkGlow 16s ease-in-out infinite;
}
.login-hero .thread { position: absolute; left: 0; bottom: 0; width: 100%; max-width: 760px; height: auto; }
.login-hero .thread path.sew { stroke-dasharray: 1; animation: nkSew 7s ease-in-out infinite; }
.login-hero .thread .needle { animation: nkNeedle 1.2s ease-in-out infinite; }
.login-hero .content { position: relative; }
.login-hero .logo { width: min(420px, 80%); height: auto; display: block; margin-left: -8px; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .14em; color: var(--side-muted); margin-top: 24px; }
.login-hero .title { font-size: clamp(36px, 5vw, 52px); font-weight: 700; letter-spacing: -.02em; line-height: 1.05; margin: 8px 0 0; }
.login-hero .tagline { font-size: 18px; color: var(--side-text); margin-top: 10px; }
.pills { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 99px;
  background: rgba(255,255,255,.06); border: 1px solid var(--navy-3);
  font-size: 14px; font-weight: 500; color: #E2E8F0; animation: nkFloat 5s ease-in-out infinite;
}
.pill:nth-child(2) { animation-duration: 5.8s; }
.pill:nth-child(3) { animation-duration: 6.6s; }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.login-hero .foot { position: relative; margin-top: auto; padding-top: 32px; font-size: 12px; color: var(--side-muted); }

.login-panel { flex: 1 1 420px; max-width: 560px; display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.login-card {
  position: relative; width: 100%; max-width: 400px; background: #fff;
  border: 1px solid var(--line); border-radius: 16px; padding: 40px 36px;
}
.login-card::before {
  content: ""; position: absolute; inset: 9px; border: 1.5px dashed #BFDBFE; border-radius: 10px; pointer-events: none;
}
.login-card h1 { margin: 0; font-size: 28px; }
.login-card .sub { font-size: 14px; color: var(--muted); margin-top: 6px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-top: 18px; }
.field label { font-size: 13px; font-weight: 600; }
.field input {
  height: 46px; border: 1px solid #CBD5E1; border-radius: 8px; padding: 0 14px; font-size: 15px; background: #fff;
}
.field input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.login-card .btn-primary { width: 100%; margin-top: 22px; min-height: 48px; font-size: 15px; }
.help { font-size: 13px; color: var(--muted); text-align: center; margin-top: 14px; }
.notice {
  font-size: 12px; background: var(--warn-bg); color: var(--warn-ink);
  border-radius: 8px; padding: 8px 12px; margin-top: 16px; line-height: 1.5;
}

@keyframes nkSew { 0% { stroke-dashoffset: 1; opacity: 1 } 55% { stroke-dashoffset: 0; opacity: 1 } 85% { stroke-dashoffset: 0; opacity: 1 } 100% { stroke-dashoffset: 0; opacity: 0 } }
@keyframes nkNeedle { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-10px) } }
@keyframes nkGlow { 0%, 100% { transform: translate(0, 0) } 50% { transform: translate(90px, 60px) } }
@keyframes nkFloat { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-4px) } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; } }

/* ---------- Aplikasi ---------- */
.app { display: flex; min-height: 100vh; }
.side {
  width: 248px; flex-shrink: 0; background: var(--navy); color: var(--side-text);
  display: flex; flex-direction: column; padding: 20px 16px;
  position: sticky; top: 0; height: 100vh;
}
.brand { padding: 0 4px 16px; border-bottom: 1px solid var(--navy-2); }
.brand img { width: 170px; height: auto; display: block; }
.brand .eyebrow { font-size: 11px; letter-spacing: .08em; margin-top: 8px; }
.brand .name { font-size: 18px; font-weight: 700; color: #fff; margin-top: 2px; }
.nav { display: flex; flex-direction: column; gap: 2px; margin-top: 14px; flex: 1; min-height: 0; overflow-y: auto; }
.nav a, .nav button.group {
  display: flex; justify-content: space-between; align-items: center; width: 100%;
  padding: 9px 12px; border-radius: 8px; font-size: 14px; color: var(--side-text);
  text-decoration: none; background: transparent; border: none; cursor: pointer; text-align: left;
}
.nav a:hover, .nav button.group:hover { background: var(--navy-2); color: #fff; }
.nav a.active { background: var(--accent); color: #fff; font-weight: 600; }
.nav .chev { transition: transform .2s; }
.nav .group[aria-expanded="true"] .chev { transform: rotate(180deg); }
.nav .subs { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 6px 14px; border-left: 1px solid var(--navy-2); }
.nav .subs[hidden] { display: none; }
.nav .subs a { font-size: 13px; color: var(--side-muted); padding: 7px 12px 7px 14px; border-radius: 6px; }
.nav .subs a.active { background: var(--navy-2); color: #fff; font-weight: 600; }
.badge { font-size: 11px; background: var(--navy-2); color: var(--side-muted); padding: 2px 8px; border-radius: 99px; }
.user { display: flex; align-items: center; gap: 10px; padding: 14px 4px 0; border-top: 1px solid var(--navy-2); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--navy-2); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; }
.user .who { flex: 1; font-size: 13px; font-weight: 600; color: #fff; }
.user .who small { display: block; font-weight: 400; font-size: 12px; color: var(--side-muted); }
.user a { font-size: 12px; color: var(--side-text); }

.main { flex: 1; min-width: 0; padding: 28px 32px 40px; }
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.top h1 { margin: 0; font-size: 26px; }
.top .crumb { font-size: 13px; color: var(--muted); }
.top .date { font-size: 13px; color: var(--muted); margin-top: 4px; }
.top .actions { display: flex; gap: 8px; flex-wrap: wrap; }

.demo-bar {
  background: var(--warn-bg); color: var(--warn-ink); font-size: 13px;
  border-radius: 8px; padding: 10px 14px; margin-bottom: 18px;
}

.grid { display: grid; gap: 14px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.kpi .tag { font-size: 12px; font-weight: 600; color: var(--muted); }
.kpi .label { font-size: 13px; color: var(--muted); margin-top: 10px; }
.kpi .value { font-size: 24px; font-weight: 700; margin-top: 2px; letter-spacing: -.01em; }
.kpi .sub { font-size: 13px; color: var(--muted); margin-top: 6px; }
.kpi .sub.warn { color: #B45309; }
.kpi.warn { background: var(--warn-bg); border-color: #FDE68A; }
.kpi.warn .label, .kpi.warn .value { color: var(--warn-ink); }
.progress { height: 6px; background: var(--line); border-radius: 99px; margin-top: 10px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }

.split { display: flex; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.split > .wide { flex: 1.6 1 460px; min-width: 0; }
.split > .narrow { flex: 1 1 300px; display: flex; flex-direction: column; gap: 14px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.card-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.card-head .right { display: flex; align-items: center; gap: 12px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); padding: 12px 8px 8px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 8px 11px 0; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
tr:last-child td { border-bottom: none; }
.status { font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 99px; }
.status.warn { background: var(--warn-bg); color: var(--warn-ink); }
.status.ok { background: var(--ok-bg); color: var(--ok-ink); }
.note { font-size: 12px; color: var(--muted); margin-top: 12px; }

.quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.alerts { display: flex; flex-direction: column; gap: 8px; font-size: 13px; margin-top: 6px; }
.alerts div { border-radius: 8px; padding: 10px 12px; background: var(--warn-bg); color: var(--warn-ink); }
.alerts div.info { background: var(--line-soft); color: #334155; }

.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.filters input { flex: 1 1 220px; height: 42px; border: 1px solid #CBD5E1; border-radius: 8px; padding: 0 14px; font-size: 14px; }
.chip { height: 40px; padding: 0 14px; border-radius: 99px; border: 1px solid #CBD5E1; background: #fff; font-size: 13px; cursor: pointer; }
.chip.on { background: var(--accent-soft); color: #1E40AF; border-color: transparent; font-weight: 600; }

.placeholder { text-align: center; padding: 56px 24px; }
.placeholder h2 { margin: 0 0 8px; font-size: 20px; }
.placeholder p { margin: 0 auto; max-width: 460px; color: var(--muted); font-size: 14px; line-height: 1.6; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- HP ---------- */
.mobile-top, .bottom-nav { display: none; }
.menu-list { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.menu-list a, .menu-list button {
  display: flex; justify-content: space-between; align-items: center; width: 100%;
  min-height: 52px; padding: 0 16px; font-size: 15px; font-weight: 600; color: var(--ink);
  text-decoration: none; background: #fff; border: none; border-bottom: 1px solid var(--line-soft); cursor: pointer; text-align: left;
}
.menu-list .subs { background: var(--bg); border-bottom: 1px solid var(--line-soft); padding: 4px 0; }
.menu-list .subs[hidden] { display: none; }
.menu-list .subs a { min-height: 44px; font-size: 14px; font-weight: 400; color: #334155; padding-left: 32px; border-bottom: none; background: transparent; }
.menu-list .group[aria-expanded="true"] .chev { transform: rotate(180deg); }
.menu-list .chev { transition: transform .2s; }

@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .side { display: none; }
  .mobile-top {
    display: flex; align-items: center; gap: 10px; height: 64px; padding: 0 14px;
    background: var(--navy); position: sticky; top: 0; z-index: 5;
  }
  .mobile-top img { width: 96px; height: auto; }
  .mobile-top .t { flex: 1; border-left: 1px solid var(--navy-3); padding-left: 10px; }
  .mobile-top .t small { display: block; font-size: 10px; font-weight: 600; letter-spacing: .08em; color: var(--side-muted); }
  .mobile-top .t b { font-size: 15px; color: #fff; }
  .app { flex-direction: column; }
  .main { padding: 16px 16px 96px; }
  .top h1 { font-size: 22px; }
  .grid-3 { grid-template-columns: 1fr; }
  .kpi .value { font-size: 18px; }
  .card { padding: 12px 14px; }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    position: fixed; left: 0; right: 0; bottom: 0; height: 68px; background: #fff;
    border-top: 1px solid var(--line); z-index: 5;
  }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; color: var(--muted); text-decoration: none; }
  .bottom-nav a.active { color: var(--accent); font-weight: 600; }
  .login-hero { padding: 40px 24px; min-height: 360px; }
  .login-card { padding: 32px 24px; }
}
