:root {
  --ink: #0d1b2a;
  --ink-soft: #5a6b7c;
  --ink-faint: #8496a8;
  --line: #e4eaf1;
  --bg: #f4f7fb;
  --card: #ffffff;
  --accent: #0b6cf0;
  --accent-dark: #0a5ed6;
  --accent-soft: #e9f1fe;
  --side: #0b1523;
  --side-soft: #16243a;
  --side-text: #b7c6d8;
  --good: #12b981;
  --warn: #f59e0b;
  --bad: #ef4444;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(13, 27, 42, .05), 0 6px 18px rgba(13, 27, 42, .04);
  --side-w: 236px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; height: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, .kpi-value, .brand-text strong {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  letter-spacing: -.015em;
  margin: 0;
}

a { color: inherit; text-decoration: none; }

/* ---------- shell ---------- */

.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--side-w);
  flex: none;
  background: var(--side);
  color: var(--side-text);
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 18px;
  color: #fff;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(140deg, #0b6cf0, #0a3fa8);
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 18px;
  flex: none;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 14.5px; color: #fff; }
.brand-text small { font-size: 11px; color: #6f8299; }

.side-nav { display: flex; flex-direction: column; gap: 2px; }

.side-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--side-text);
  transition: background .14s ease, color .14s ease;
}

.side-nav a:hover { background: var(--side-soft); color: #fff; }

.side-nav a.active {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.side-nav .nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: .45;
  flex: none;
}

.side-nav a.active .nav-dot { opacity: 1; }

.side-foot {
  margin-top: auto;
  padding: 14px 10px 4px;
  font-size: 11px;
  color: #5d7189;
  border-top: 1px solid #1d2c42;
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 24px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.topbar h1 { font-size: 17px; }

.topbar-spacer { flex: 1; }

.search {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 10px;
  background: #fff;
}

.search input {
  border: 0;
  outline: 0;
  font: inherit;
  font-size: 13px;
  width: 190px;
  background: transparent;
  color: var(--ink);
}

.search button {
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  padding: 2px 4px;
}

.select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 10px;
  font: inherit;
  font-size: 13px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.content {
  padding: 22px 24px 56px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 1400px;
  width: 100%;
}

/* ---------- pills ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.pill-ok { background: #e6f8f1; color: #0a8f66; }
.pill-warn { background: #fef4e3; color: #b1700a; }
.pill-bad { background: #fdecec; color: #c33; }
.pill-muted { background: #eef2f7; color: var(--ink-soft); }

/* ---------- cards & panels ---------- */

.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.kpi {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 15px 17px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.kpi-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-faint);
  font-weight: 600;
}

.kpi-value { font-size: 25px; font-weight: 700; }
.kpi-sub { font-size: 11.5px; color: var(--ink-soft); }

.grid-2 { display: grid; grid-template-columns: 1.55fr 1fr; gap: 14px; }
.grid-2-even { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  min-width: 0;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.panel-head h3 { font-size: 15.5px; }
.panel-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-soft); }

.muted { color: var(--ink-soft); font-size: 12.5px; margin: 2px 0 0; }

.chart-box { min-height: 120px; }
.chart-box svg { display: block; width: 100%; height: auto; }

.donut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.donut-wrap > svg { width: 190px; height: auto; }

.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; color: var(--ink-soft); }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }

/* ---------- buttons ---------- */

button, .btn {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 9px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  transition: background .14s ease, transform .06s ease;
}

button:hover, .btn:hover { background: #f3f7fc; }
button:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 8px; }

/* ---------- tables ---------- */

.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }

th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

th {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-faint);
  font-weight: 600;
  white-space: nowrap;
}

td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

tbody tr:hover { background: #fafcfe; }
tbody tr:last-child td { border-bottom: 0; }

.cell-main { display: flex; align-items: center; gap: 10px; }
.cell-main .avatar { width: 30px; height: 30px; font-size: 12px; }

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(140deg, #dbe8fb, #c3d8f7);
  color: #123a6b;
  display: grid;
  place-items: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 16px;
  background-size: cover;
  background-position: center;
  flex: none;
}

.caption {
  display: block;
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
  background: #eef2f7;
  color: var(--ink-soft);
}
.tag-ok { background: #e6f8f1; color: #0a8f66; }
.tag-warn { background: #fef4e3; color: #b1700a; }

/* ---------- skor bar ---------- */

.fair-bars { display: flex; flex-direction: column; gap: 6px; min-width: 130px; }
.fair-row { display: grid; grid-template-columns: 16px 1fr 30px; align-items: center; gap: 8px; font-size: 11.5px; }
.fair-row .letter { font-weight: 700; color: var(--ink-faint); }
.fair-track { height: 6px; background: #eef2f7; border-radius: 99px; overflow: hidden; }
.fair-fill { height: 100%; border-radius: 99px; background: var(--accent); }
.fair-row .val { text-align: right; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

.score-badge {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 15px;
}

/* ---------- profile ---------- */

.profile {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.profile .avatar { width: 58px; height: 58px; font-size: 21px; }
.profile h2 { font-size: 20px; }
.profile .pill { margin-left: auto; }
.profile-actions { display: flex; gap: 8px; }

/* ---------- inbox 3 kolom ---------- */

.inbox {
  display: grid;
  grid-template-columns: 220px 1.1fr 1fr;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-height: 520px;
}

.inbox-col { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.inbox-col:last-child { border-right: 0; }

.inbox-head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-faint);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #fbfcfe;
}

.inbox-list { overflow-y: auto; max-height: 620px; }

.inbox-item {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.inbox-item:hover { background: #f7fafd; }
.inbox-item.selected { background: var(--accent-soft); }
.inbox-item .who { font-weight: 600; }
.inbox-item .what { color: var(--ink-soft); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-item .when { color: var(--ink-faint); font-size: 11px; }

.inbox-detail { padding: 16px 18px; overflow-y: auto; }
.inbox-detail h4 { font-size: 15px; margin-bottom: 4px; }
.inbox-detail .bubble {
  background: #f7fafd;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13.5px;
  margin: 12px 0;
}
.inbox-detail .meta { font-size: 12px; color: var(--ink-soft); }

/* ---------- kalender ---------- */

.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.cal-head h3 { font-size: 15.5px; margin-right: auto; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.cal-dow {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-faint);
  text-align: center;
  font-weight: 600;
  padding-bottom: 4px;
}

.cal-cell {
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 8px;
  background: #fff;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: border-color .14s ease, background .14s ease;
}

.cal-cell:hover { border-color: #c9d6e5; }
.cal-cell.muted-day { background: #fafbfd; color: var(--ink-faint); }
.cal-cell.has-post { background: #f3f8ff; border-color: #cfe1fb; }
.cal-cell.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.cal-date { font-weight: 600; color: var(--ink-soft); }
.cal-cell.has-post .cal-date { color: var(--accent); }
.cal-count { font-size: 11px; color: var(--accent); font-weight: 600; }
.cal-dots { display: flex; gap: 3px; flex-wrap: wrap; }
.cal-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: .7; }

/* ---------- misc ---------- */

.empty { color: var(--ink-soft); font-size: 13px; padding: 14px 0; margin: 0; }

.notice {
  border-left: 3px solid var(--warn);
  background: #fef7ea;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13px;
  color: #6b4a1d;
}
.notice code { background: #f6e7cd; padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.notice-full { grid-column: 1 / -1; }

.archive-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
}
.archive { display: flex; flex-direction: column; gap: 10px; }

.footer {
  padding: 0 24px 34px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--ink-faint);
  font-size: 11.5px;
}

.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.about-card { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: #fff; }
.about-card h4 { font-size: 14px; margin-bottom: 6px; }
.about-card p { margin: 0; font-size: 13px; color: var(--ink-soft); }

.compare-row { display: grid; grid-template-columns: 1fr 130px 1fr; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.compare-row:last-child { border-bottom: 0; }
.compare-row .label { text-align: center; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); font-weight: 600; }
.compare-value { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 15px; }
.compare-value.right { text-align: right; }
.compare-bar { height: 6px; background: #eef2f7; border-radius: 99px; overflow: hidden; margin-top: 5px; }
.compare-bar span { display: block; height: 100%; background: var(--accent); }
.compare-bar.alt span { background: var(--good); }

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .grid-2-even { grid-template-columns: 1fr; }
  .inbox { grid-template-columns: 1fr; }
  .inbox-col { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 820px) {
  .shell { flex-direction: column; }
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    overflow-x: auto;
  }
  .side-brand { padding: 0 8px 0 0; }
  .brand-text { display: none; }
  .side-nav { flex-direction: row; gap: 4px; }
  .side-nav a { white-space: nowrap; padding: 7px 10px; font-size: 12.5px; }
  .side-nav .nav-dot { display: none; }
  .side-foot { display: none; }
  .content { padding: 16px 14px 40px; }
  .topbar { padding: 10px 14px; }
  .search input { width: 130px; }
  .cal-cell { min-height: 58px; padding: 5px; }
  .compare-row { grid-template-columns: 1fr 90px 1fr; }
}
