:root {
  --bg: #0d1117;
  --panel: #151b22;
  --panel-2: #1b232c;
  --line: #26313c;
  --line-soft: #1f2831;
  --text: #e9eff5;
  --muted: #8fa0af;
  --accent: #d7ff3e;
  --accent-ink: #101408;
  --danger: #ff6b5e;
  --warn: #ffb84d;
  --ok: #57d68a;
  --radius: 16px;
  --shadow: 0 18px 40px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.02em; }
p { margin: 0; }

/* ---------------------------------------------------------------- layout -- */
.shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 236px;
  padding: 22px 16px;
  background: #0a0e13;
  border-right: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 30;
}

.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 22px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center;
  font-weight: 900; font-size: 18px; letter-spacing: -.05em;
}
.brand-name { font-weight: 750; font-size: 15.5px; letter-spacing: -.01em; }
.brand-sub { font-size: 11px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }

.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px;
  border-radius: 11px;
  color: #a9b8c5;
  font-weight: 550;
  font-size: 14px;
}
.nav-item svg { width: 18px; height: 18px; stroke-width: 1.8; opacity: .85; }
.nav-item:hover { background: #121922; color: var(--text); text-decoration: none; }
.nav-item.active { background: #1a232d; color: var(--text); }
.nav-item.active svg { color: var(--accent); opacity: 1; }

.sidebar-foot { margin-top: auto; border-top: 1px solid var(--line-soft); padding-top: 14px; }
.who { padding: 0 10px 10px; font-size: 12.5px; color: var(--muted); }
.who strong { display: block; color: var(--text); font-size: 13.5px; font-weight: 600; }

.main {
  margin-left: 236px;
  padding: 26px 30px 60px;
  max-width: 1320px;
}

.topbar {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 22px; flex-wrap: wrap;
}
.topbar h1 { font-size: 24px; font-weight: 750; }
.topbar .sub { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.topbar-actions { display: flex; gap: 9px; flex-wrap: wrap; }

.mobilenav { display: none; }

/* ----------------------------------------------------------------- cards -- */
.card {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 18px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2 { font-size: 15px; font-weight: 650; }
.card-head .hint { font-size: 12.5px; color: var(--muted); }

.grid { display: grid; gap: 14px; }
.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; }

.stat { position: relative; overflow: hidden; padding: 17px 18px; }
.stat .label { color: var(--muted); font-size: 12.5px; font-weight: 550; }
.stat .value { font-size: 30px; font-weight: 800; letter-spacing: -.03em; margin-top: 6px; }
.stat .note { font-size: 12px; color: var(--muted); margin-top: 3px; }
.stat.warn .value { color: var(--warn); }
.stat.danger .value { color: var(--danger); }
.stat.accent .value { color: var(--accent); }
.stat::after {
  content: ""; position: absolute; right: -30px; top: -40px;
  width: 110px; height: 110px; border-radius: 50%;
  background: radial-gradient(circle, rgba(215, 255, 62, .10), transparent 70%);
}

/* ----------------------------------------------------------------- table -- */
.table-wrap { overflow-x: auto; margin: 0 -18px -18px; padding: 0 18px 6px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); font-weight: 650; padding: 8px 10px; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td { padding: 12px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #131a21; }
td.num, th.num { text-align: right; white-space: nowrap; }
.cell-name { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: 0 0 32px;
  background: #232d38; color: var(--text);
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
}
.cell-name .meta { font-size: 11.5px; color: var(--muted); }
.mono { font-variant-numeric: tabular-nums; }

/* ----------------------------------------------------------------- badge -- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 650; letter-spacing: .01em;
  background: #232d38; color: #b7c6d3; white-space: nowrap;
}
.badge.ok { background: rgba(87, 214, 138, .13); color: var(--ok); }
.badge.warn { background: rgba(255, 184, 77, .13); color: var(--warn); }
.badge.danger { background: rgba(255, 107, 94, .13); color: var(--danger); }
.badge.accent { background: rgba(215, 255, 62, .12); color: var(--accent); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ------------------------------------------------------------------ form -- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 12.5px; font-weight: 600; color: #b9c7d3; }
.field .help { font-size: 11.5px; color: var(--muted); }
input, select, textarea {
  width: 100%;
  background: #0f151c;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: #4a5c6e; box-shadow: 0 0 0 3px rgba(215, 255, 62, .08); }
textarea { min-height: 96px; resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #8fa0af 50%), linear-gradient(135deg, #8fa0af 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 9px; margin-top: 16px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--line);
  background: #1c252f;
  color: var(--text);
  padding: 9px 15px;
  border-radius: 10px;
  font: inherit; font-size: 13.5px; font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: #232e3a; text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 750; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); border-color: rgba(255, 107, 94, .35); background: rgba(255, 107, 94, .07); }
.btn.small { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn.wa { background: rgba(37, 211, 102, .13); border-color: rgba(37, 211, 102, .3); color: #6ee79a; }
.btn.wa:hover { background: rgba(37, 211, 102, .2); }
.btn.block { width: 100%; }

.alert {
  padding: 11px 14px; border-radius: 11px; margin-bottom: 16px;
  font-size: 13.5px; border: 1px solid transparent;
}
.alert.ok { background: rgba(87, 214, 138, .1); border-color: rgba(87, 214, 138, .25); color: #9ff0bd; }
.alert.bad { background: rgba(255, 107, 94, .1); border-color: rgba(255, 107, 94, .25); color: #ffb3ad; }

.toolbar { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar input[type="search"] { max-width: 300px; }
.toolbar .spacer { flex: 1; }

.tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.tab {
  padding: 7px 13px; border-radius: 999px; font-size: 13px; font-weight: 600;
  color: var(--muted); border: 1px solid transparent;
}
.tab:hover { color: var(--text); text-decoration: none; background: #1a232d; }
.tab.active { background: #1e2833; color: var(--text); border-color: var(--line); }

/* -------------------------------------------------------------- reminders -- */
.reminder { border: 1px solid var(--line-soft); border-radius: 13px; padding: 14px 16px; background: var(--panel-2); }
.reminder + .reminder { margin-top: 10px; }
.reminder-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 7px; }
.reminder-top strong { font-size: 14px; }
.reminder-top .when { font-size: 12px; color: var(--muted); margin-left: auto; }
.reminder pre {
  margin: 0; white-space: pre-wrap; word-break: break-word;
  font-family: inherit; font-size: 13px; color: #c2d0dc;
  background: #0f151c; border: 1px solid var(--line-soft); border-radius: 10px;
  padding: 10px 12px; max-height: 150px; overflow: auto;
}
.reminder-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* ----------------------------------------------------------------- empty -- */
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .icon { font-size: 30px; margin-bottom: 8px; opacity: .6; }
.empty h3 { color: var(--text); font-size: 15px; margin-bottom: 5px; }
.empty p { font-size: 13px; }

/* ---------------------------------------------------------------- detail -- */
.profile { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.profile .avatar { width: 58px; height: 58px; flex-basis: 58px; font-size: 19px; background: var(--accent); color: var(--accent-ink); }
.profile h2 { font-size: 20px; }
.profile .meta { color: var(--muted); font-size: 13px; margin-top: 3px; display: flex; gap: 12px; flex-wrap: wrap; }
.profile-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; font-size: 13px; }
.kv dt { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; }
.kv dd { margin: 2px 0 0; }

details.panel { border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--panel); }
details.panel > summary {
  cursor: pointer; padding: 15px 18px; font-weight: 650; font-size: 14px; list-style: none;
  display: flex; align-items: center; justify-content: space-between;
}
details.panel > summary::-webkit-details-marker { display: none; }
details.panel > summary::after { content: "+"; color: var(--muted); font-size: 18px; }
details.panel[open] > summary::after { content: "–"; }
details.panel .body { padding: 0 18px 18px; }

/* ----------------------------------------------------------------- plans -- */
.plan-row { display: grid; grid-template-columns: 1.2fr .6fr .8fr auto auto; gap: 8px; align-items: center; }
.plan-row input { padding: 8px 10px; font-size: 13px; }

/* ----------------------------------------------------------------- login -- */
.auth {
  min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr;
}
.auth-brand {
  padding: 48px;
  background:
    radial-gradient(900px 500px at 20% 10%, rgba(215, 255, 62, .13), transparent 60%),
    radial-gradient(700px 400px at 90% 90%, rgba(255, 107, 53, .10), transparent 60%),
    #0a0e13;
  display: flex; flex-direction: column; justify-content: space-between;
  border-right: 1px solid var(--line-soft);
}
.auth-brand .big { font-size: clamp(30px, 4vw, 46px); font-weight: 800; letter-spacing: -.035em; line-height: 1.08; max-width: 12ch; }
.auth-brand .big span { color: var(--accent); }
.auth-brand .lead { color: var(--muted); margin-top: 16px; max-width: 42ch; font-size: 14.5px; }
.auth-points { display: grid; gap: 10px; margin-top: 28px; font-size: 13.5px; color: #b9c7d3; }
.auth-points div { display: flex; gap: 10px; align-items: center; }
.auth-points .tick { width: 20px; height: 20px; border-radius: 50%; background: rgba(215, 255, 62, .14); color: var(--accent); display: grid; place-items: center; font-size: 11px; }
.auth-form { display: grid; place-items: center; padding: 32px; }
.auth-form .box { width: 100%; max-width: 360px; }
.auth-form h1 { font-size: 22px; margin-bottom: 6px; }
.auth-form .sub { color: var(--muted); font-size: 13.5px; margin-bottom: 22px; }
.auth-form .field + .field { margin-top: 12px; }
.auth-form .btn { margin-top: 18px; }
.auth-foot { margin-top: 22px; font-size: 12px; color: var(--muted); text-align: center; }

/* -------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 860px) {
  .sidebar { display: none; }
  .main { margin-left: 0; padding: 18px 15px 92px; }
  .topbar { margin-bottom: 16px; }
  .topbar h1 { font-size: 20px; }
  .mobilenav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
    background: rgba(10, 14, 19, .96); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line-soft);
    padding: 7px 6px calc(7px + env(safe-area-inset-bottom));
  }
  .mobilenav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    font-size: 10.5px; color: var(--muted); padding: 5px 2px; border-radius: 9px;
  }
  .mobilenav a.active { color: var(--accent); }
  .mobilenav svg { width: 20px; height: 20px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .auth { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-form { min-height: 100vh; padding: 24px; }
  .plan-row { grid-template-columns: 1fr 1fr; }
  .plan-row .btn { width: 100%; }
  .table-wrap { margin: 0 -18px -18px; }
  table.responsive thead { display: none; }
  table.responsive tr {
    display: grid; grid-template-columns: 1fr auto; gap: 4px 10px;
    padding: 12px 2px; border-bottom: 1px solid var(--line-soft);
  }
  table.responsive td { display: block; padding: 0; border: none; }
  table.responsive td[data-label]::before {
    content: attr(data-label) ": "; color: var(--muted); font-size: 11.5px;
  }
  table.responsive td.primary-cell { grid-column: 1 / -1; }
  table.responsive td.actions { grid-column: 1 / -1; margin-top: 6px; }
}

@media (max-width: 520px) {
  .stats { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 15px; }
  .profile-actions { margin-left: 0; width: 100%; }
  .kv { grid-template-columns: minmax(0, 1fr); }
  .pick-grid { grid-template-columns: 1fr; }
  .tile-icon { width: 54px; height: 54px; border-radius: 15px; }
  .tile-title { font-size: 18px; }
}

/* ------------------------------------------------------- beranda & pilih -- */
.tile-main {
  display: flex; align-items: center; gap: 16px;
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: 22px;
  padding: 22px; margin-bottom: 14px; color: var(--text);
  transition: border-color .15s ease, transform .15s ease;
}
.tile-main:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-1px); }
.tile-icon {
  width: 64px; height: 64px; border-radius: 18px; flex: 0 0 auto;
  background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center;
}
.tile-icon svg { width: 34px; height: 34px; stroke-width: 1.8; }
.tile-body { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.tile-title { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.tile-sub { font-size: 13px; color: var(--muted); }
.tile-go { color: var(--muted); display: grid; place-items: center; }
.tile-go svg { width: 22px; height: 22px; }

.mini-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 14px; color: var(--text); font-size: 14px;
}
.mini:hover { text-decoration: none; border-color: var(--accent); }
.mini b {
  background: var(--warn); color: #1a1205; border-radius: 999px;
  padding: 1px 9px; font-size: 12px;
}

.pick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pick {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 8px; padding: 28px 18px; color: var(--text);
  background: var(--panel); border: 1px solid var(--line); border-radius: 22px;
  transition: border-color .15s ease, transform .15s ease;
}
.pick:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-1px); }
.pick.accent {
  background: linear-gradient(160deg, rgba(215, 255, 62, .13), var(--panel));
  border-color: rgba(215, 255, 62, .45);
}
.pick-icon {
  width: 58px; height: 58px; border-radius: 16px;
  background: var(--panel-2); color: var(--accent);
  display: grid; place-items: center; margin-bottom: 2px;
}
.pick.accent .pick-icon { background: var(--accent); color: var(--accent-ink); }
.pick-icon svg { width: 30px; height: 30px; stroke-width: 1.8; }
.pick-title { font-size: 16px; font-weight: 700; }
.pick-sub { font-size: 12.5px; color: var(--muted); }

.stat-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.stat-strip > div {
  background: var(--panel); border: 1px solid var(--line-soft);
  border-radius: 14px; padding: 12px; text-align: center;
}
.stat-strip b { display: block; font-size: 20px; line-height: 1.2; }
.stat-strip span {
  font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em;
}

.stack { display: flex; flex-direction: column; gap: 14px; }
.stack .field { display: flex; flex-direction: column; gap: 6px; }
.stack input[readonly] { color: var(--accent); font-weight: 600; }

/* ------------------------------------------------------------ login dulu -- */
.auth-sep { display: flex; align-items: center; gap: 10px; margin: 16px 0 12px; color: var(--muted); font-size: 12px; }
.auth-sep::before, .auth-sep::after { content: ""; height: 1px; background: var(--line); flex: 1; }

.btn.google {
  background: #ffffff; color: #1f2328; border-color: #d0d7de;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 600;
}
.btn.google:hover { background: #f5f7f9; text-decoration: none; }
