/* ============================================================
   Admin Gereja HKBP Sibuluan — UI layar (screen). Cetak → print.css
   Dashboard profesional: sidebar + konten + toast.
   ============================================================ */
:root {
  --indigo: #243b7a;
  --indigo-dark: #16244d;
  --indigo-700: #1d2f63;
  --gold: #c9952e;
  --ink: #1a1c22;
  --muted: #6b7080;
  --line: #e6e9f2;
  --surface: #eef1f8;
  --card: #ffffff;
  --danger: #b3261e;
  --ok: #1e7a4d;
  --shadow-sm: none;
  --shadow: none;
  --radius: 14px;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
#print-area { display: none; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}
.muted { color: var(--muted); }
.error { color: var(--danger); min-height: 1.2em; margin: 8px 0 0; font-size: 14px; }

button {
  font: inherit;
  cursor: pointer;
  border-radius: 9px;
  border: 1px solid transparent;
  padding: 9px 15px;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s, transform 0.05s;
}
button:active { transform: translateY(1px); }
button.primary { background: var(--indigo); color: #fff; }
button.primary:hover { background: var(--indigo-dark); }
button.ghost { background: #fff; border-color: var(--line); color: var(--ink); }
button.ghost:hover { background: #f3f5fb; border-color: #cdd4e8; }
button.block { width: 100%; }
button:disabled { opacity: 0.5; cursor: default; }

input, select, textarea {
  font: inherit;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 11px;
  background: #fff;
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(36, 59, 122, 0.13);
}

/* ---------------------- Login ---------------------- */
.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(1200px 600px at 50% -10%, #2f4a93 0%, var(--indigo-dark) 60%);
}
.login-card {
  width: 100%;
  max-width: 370px;
  background: var(--card);
  border-radius: 18px;
  padding: 34px 32px;
  display: grid;
  gap: 14px;
  text-align: center;
}
.login-logo {
  font-size: 40px;
  width: 72px; height: 72px;
  margin: 0 auto 4px;
  display: grid; place-items: center;
  background: var(--surface);
  border-radius: 20px;
}
.login-card h1 { margin: 0; font-size: 24px; color: var(--indigo); }
.login-card > p { margin: -6px 0 8px; }
.login-card label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; text-align: left; }
.login-card button { background: var(--indigo); color: #fff; padding: 12px; }
.login-card button:hover { background: var(--indigo-dark); }

/* ---------------------- App shell (sidebar + content) ------------ */
.app-view { display: flex; min-height: 100vh; }

.sidebar {
  width: 256px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  transition: width 0.18s ease;
}
.sidebar.collapsed { width: 76px; }

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 16px;
  min-height: 66px;
  border-bottom: 1px solid var(--line);
}
.brand-logo { width: 30px; height: 30px; object-fit: contain; flex-shrink: 0; }
.brand-text { flex: 1; min-width: 0; overflow: hidden; }
.brand-text strong { display: block; font-size: 15px; color: var(--ink); white-space: nowrap; }
.brand-text .muted { font-size: 11.5px; white-space: nowrap; }
.sidebar.collapsed .brand { justify-content: center; padding: 0; cursor: pointer; }
.sidebar.collapsed .brand-text,
.sidebar.collapsed #collapse-btn { display: none; }

.icon-btn {
  background: transparent; border: none; color: var(--muted);
  padding: 6px; border-radius: 8px; display: grid; place-items: center;
  flex-shrink: 0; cursor: pointer;
}
.icon-btn:hover { background: var(--surface); color: var(--ink); }

.nav { flex: 1; overflow-y: auto; padding: 10px 10px; }
.nav-group { margin-bottom: 2px; }
.nav-group-title {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 14px 12px 6px;
  font-weight: 700;
}
.sidebar.collapsed .nav-group-title { display: none; }
.sidebar.collapsed .nav-group { border-top: 1px solid var(--line); margin: 0; padding-top: 4px; }
.sidebar.collapsed .nav-group:first-child { border-top: none; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: #3a3f4d;
  padding: 11px 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14.5px;
  white-space: nowrap;
}
.nav-item .ico { width: 22px; height: 22px; flex-shrink: 0; display: grid; place-items: center; color: #626778; }
.nav-item .ico svg { width: 20px; height: 20px; }
.nav-item:hover { background: var(--surface); }
.nav-item.active { background: var(--surface); color: var(--indigo); font-weight: 700; }
.nav-item.active .ico { color: var(--indigo); }
.sidebar.collapsed .nav-item { justify-content: center; padding: 11px 0; }
.sidebar.collapsed .nav-item .lbl { display: none; }

.sidebar-foot { padding: 12px; border-top: 1px solid var(--line); }
.user { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; padding: 0 4px; }
.user .avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--indigo); color: #fff;
  display: grid; place-items: center; font-weight: 700; flex-shrink: 0;
}
.user .muted { font-size: 12px; word-break: break-all; }
.sidebar.collapsed .user { justify-content: center; }
.sidebar.collapsed .user .muted { display: none; }

.signout {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: transparent; border: none; color: var(--danger);
  padding: 11px 12px; border-radius: 10px; font-weight: 700; font-size: 14.5px;
  cursor: pointer;
}
.signout .ico { width: 22px; display: grid; place-items: center; }
.signout:hover { background: #fdecea; }
.sidebar.collapsed .signout { justify-content: center; padding: 11px 0; }
.sidebar.collapsed .signout .lbl { display: none; }


/* Konten */
.content { flex: 1; min-width: 0; padding: 24px 28px 48px; max-width: 1400px; }
.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.topbar h2 { margin: 0; font-size: 26px; font-weight: 800; color: var(--indigo-dark); letter-spacing: -0.01em; }
.status { margin: 5px 0 0; font-size: 14px; color: var(--muted); min-height: 1.3em; }
.status.ok { color: var(--ok); }
.status.err { color: var(--danger); }
.toolbar-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding-top: 4px; }
.toolbar-actions #search-box { width: 200px; }

.card-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

/* ---------------------- Grid (spreadsheet) ---------------------- */
.grid-wrap { overflow: auto; }
table#grid { border-collapse: collapse; width: 100%; min-width: 720px; }
#grid thead th {
  background: #f8f9fd;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: left;
  padding: 11px 12px;
  position: sticky; top: 0;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
#grid tbody td { padding: 6px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 14px; }
#grid tbody tr:hover { background: #fafbff; }
#grid tbody tr.dirty { background: #fff8ec; }
#grid input, #grid select, #grid textarea { border-color: transparent; background: transparent; padding: 6px 8px; font-size: 14px; }
#grid input:hover, #grid select:hover, #grid textarea:hover { border-color: var(--line); background: #fff; }
#grid input:focus, #grid select:focus, #grid textarea:focus { background: #fff; }

td.row-actions { white-space: nowrap; width: 1%; }
td.row-actions button { padding: 5px 10px; font-size: 12.5px; margin-right: 4px; }
button.save { background: var(--ok); color: #fff; }
button.save:hover { filter: brightness(0.94); }
button.del { background: #fff; color: var(--danger); border-color: var(--line); }
button.del:hover { background: #fdecea; }
.empty { padding: 48px 24px; text-align: center; color: var(--muted); font-size: 15px; }

/* ---------------------- Toast ---------------------- */
.toast-container {
  position: fixed;
  right: 20px; bottom: 20px;
  display: flex; flex-direction: column; gap: 10px;
  z-index: 1000;
}
.toast {
  min-width: 240px; max-width: 360px;
  background: var(--ink); color: #fff;
  padding: 12px 16px; border-radius: 11px;
  font-size: 14px; font-weight: 500;
  display: flex; align-items: center; gap: 11px;
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 1; transform: translateY(0); }
/* Status ditandai lewat ikon bulat berwarna, bukan garis aksen samping. */
.toast::before {
  flex-shrink: 0;
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 14px; font-weight: 800; color: #06281b;
}
.toast.ok::before { content: "✓"; background: #34d399; }
.toast.err::before { content: "!"; background: #f87171; color: #2a0606; }

/* ---------------------- Keuangan ---------------------- */
.kg-section-lbl {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--muted); margin-bottom: 12px;
}
.kg-section-meta { font-weight: 400; text-transform: none; letter-spacing: 0; margin-left: 6px; }

.kg-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 12px;
  margin-bottom: 4px;
}
.kg-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.kg-card .lbl { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); }
.kg-card .val { font-size: 20px; font-weight: 800; margin-top: 8px; letter-spacing: -0.02em; color: var(--indigo-dark); }
.kg-card.total { background: var(--indigo-dark); color: #fff; border: none; border-radius: var(--radius); }
.kg-card.total .lbl { color: rgba(255,255,255,0.6); }
.kg-card.total .val { color: #fff; }

.kg-report {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 10px;
}
.kg-report-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 2px; }
.kg-report-date-main { font-size: 15px; font-weight: 700; color: var(--indigo-dark); }

table.kg-table { border-collapse: collapse; width: 100%; margin-top: 14px; font-size: 13.5px; }
table.kg-table th, table.kg-table td { border: 1px solid var(--line); padding: 8px 11px; text-align: right; }
table.kg-table th:first-child, table.kg-table td:first-child { text-align: left; }
table.kg-table thead th { background: #f8f9fd; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
table.kg-table tfoot td, table.kg-table .saldo-ini td { font-weight: 800; background: #fbfcff; color: var(--indigo-dark); }
table.kg-table input { text-align: right; }

.kg-form { background: var(--card); border: 1.5px solid var(--indigo); border-radius: var(--radius); padding: 20px; margin-bottom: 22px; }
.kg-form-row { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; margin-bottom: 8px; }
.kg-form-row label { font-size: 13px; font-weight: 600; display: grid; gap: 5px; }
.kg-form-actions { display: flex; gap: 10px; margin-top: 16px; }

/* ---------------------- Partangiangan ---------------------- */
.pt-page { padding: 0; }
.pt-page-hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.pt-page-title { margin: 0; font-size: 26px; font-weight: 800; color: var(--indigo-dark); letter-spacing: -0.01em; }
.pt-page-sub { margin: 5px 0 0; color: var(--muted); font-size: 14px; }

.pt-week-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.pt-week-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1.5px solid var(--line); border-radius: 24px;
  padding: 8px 16px; font-size: 14.5px; font-weight: 600; color: var(--ink);
  cursor: pointer; position: relative; user-select: none;
}
.pt-week-pill:hover { border-color: #b0b8d4; }
.pt-date-overlay { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.pt-jam-badge {
  font-size: 12px; font-weight: 700; background: var(--surface);
  color: var(--muted); border: 1px solid var(--line); border-radius: 20px; padding: 2px 9px;
}

.pt-cards { display: flex; flex-direction: column; gap: 10px; }
.pt-card {
  display: flex; align-items: center; gap: 18px;
  background: var(--card); border: 1px solid var(--line);
  border-left: 4px solid transparent; border-radius: 14px;
  padding: 16px 18px; box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s;
}
.pt-card:hover { background: #fafbff; }
.pt-card-filled  { border-left-color: var(--gold); }
.pt-card-partial { border-left-color: #f59e0b; }
.pt-card-editing { border-left-color: var(--indigo); }

.pt-num {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--surface); border: 1.5px solid var(--line);
  display: grid; place-items: center;
  font-size: 13px; font-weight: 800; color: var(--muted); flex-shrink: 0;
}
.pt-num-filled { background: var(--indigo); border-color: var(--indigo); color: #fff; }

.pt-card-body {
  flex: 1; display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  gap: 12px; min-width: 0;
}
.pt-field-lbl {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--muted); margin-bottom: 4px;
}
.pt-field-val {
  font-size: 14.5px; font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pt-dash { color: var(--muted); font-weight: 400; }

.pt-card-acts { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.pt-badge { font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 20px; white-space: nowrap; }
.pt-badge-ok   { background: #d1fae5; color: #065f46; }
.pt-badge-warn { background: #fef3c7; color: #92400e; }
.pt-badge-muted { background: var(--surface); color: var(--muted); border: 1px solid var(--line); }

.pt-ico-btn {
  background: none; border: none; padding: 7px; border-radius: 8px;
  cursor: pointer; color: var(--muted); display: grid; place-items: center;
  transition: background 0.12s, color 0.12s;
}
.pt-ico-btn:hover { background: var(--surface); color: var(--ink); }
.pt-ico-del:hover { color: var(--danger); background: #fdecea; }

.pt-inline-input {
  width: 100%; border: 1.5px solid var(--line); border-radius: 8px;
  padding: 6px 9px; font: inherit; font-size: 14px; color: var(--ink);
  background: var(--surface); transition: border-color 0.12s, box-shadow 0.12s;
}
.pt-inline-input:focus { outline: none; border-color: var(--indigo); background: #fff; box-shadow: 0 0 0 3px rgba(36,59,122,0.12); }
.pt-act-btn { padding: 7px 14px !important; font-size: 13px !important; }

.pt-expand-btn {
  display: block; width: 100%; background: none; border: none;
  color: var(--indigo); font-weight: 700; font-size: 14px;
  padding: 18px; cursor: pointer; text-align: center;
  margin-top: 4px; border-radius: 14px; transition: background 0.12s;
}
.pt-expand-btn:hover { background: var(--surface); }
.pt-empty {
  text-align: center; color: var(--muted); padding: 48px 24px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); font-size: 15px;
}

/* Form "Jadwal Baru" panel kartu */
.pt-form-panel {
  background: var(--card); border: 1.5px solid var(--indigo);
  border-radius: 16px; margin-bottom: 20px; overflow: hidden;
}
.pt-form-panel-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; background: #f5f7fd; border-bottom: 1.5px solid var(--line);
  gap: 16px; flex-wrap: wrap;
}
.pt-form-cards { padding: 12px 16px 16px; gap: 8px; }
.pt-card-form-row { border-left-color: var(--indigo) !important; }

/* Form "Jadwal Baru" (tabel 14 baris) — legacy */
.pt-form-top {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 18px;
  padding-bottom: 16px; border-bottom: 1px solid var(--line);
}
.pt-date-label { display: grid; gap: 6px; font-size: 13px; font-weight: 700; color: var(--indigo-dark); margin-bottom: 6px; }
.pt-date-label input[type="date"] { width: auto; font-size: 15px; font-weight: 600; }
table.pt-table { border-collapse: collapse; width: 100%; font-size: 14px; }
table.pt-table th { background: var(--indigo); color: #fff; font-weight: 700; font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase; padding: 11px 13px; text-align: left; white-space: nowrap; }
table.pt-table td { padding: 9px 13px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.pt-table tbody tr:last-child td { border-bottom: none; }
table.pt-table tbody tr:hover { background: #f8faff; }
.pt-no  { width: 48px; text-align: center !important; color: var(--muted); font-weight: 600; }
.pt-ling { width: 190px; font-weight: 600; color: var(--indigo-dark); }
table.pt-input-table td { padding: 6px 8px; }
table.pt-input-table input { width: 100%; border: 1px solid transparent; background: transparent; border-radius: 7px; padding: 7px 9px; font: inherit; color: var(--ink); transition: border-color 0.12s, background 0.12s; }
table.pt-input-table input:hover { border-color: var(--line); background: var(--surface); }
table.pt-input-table input:focus { outline: none; border-color: var(--indigo); background: #fff; box-shadow: 0 0 0 3px rgba(36,59,122,0.12); }
table.pt-input-table input::placeholder { color: #b0b5c4; }

/* ---------------------- Jadwal Ibadah — tabel pelayan kebaktian ---------------------- */
.jd-card-list { display: flex; flex-direction: column; gap: 16px; }

.jd-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.jd-card-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; background: #f8f9fd;
  border-bottom: 1px solid var(--line);
}
.jd-card-hd-left { flex: 1; min-width: 0; }
.jd-date-text { font-size: 15px; font-weight: 700; color: var(--indigo-dark); }
.jd-meta { display: flex; align-items: center; gap: 8px; margin-top: 5px; flex-wrap: wrap; }
.jd-meta-badge {
  font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 20px;
  background: var(--surface); color: var(--muted); border: 1px solid var(--line);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px;
}
.jd-warna-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.jd-warna-lbl { font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: capitalize; }
.jd-card-acts { display: flex; gap: 2px; flex-shrink: 0; }

/* Table */
.jd-table-wrap { overflow-x: auto; }
.jd-form-table { padding: 16px; }
.jd-table {
  width: 100%; border-collapse: collapse;
  font-size: 12.5px;
}
.jd-table thead tr { background: #f1f3f8; }
.jd-table thead th,
.jd-table tbody td {
  padding: 9px 12px;
  border: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}
.jd-role-hd { width: 88px; min-width: 88px; }
.jd-role-cell {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--muted);
  white-space: nowrap; background: #f8f9fd;
  position: sticky; left: 0; z-index: 1;
}
.jd-th { min-width: 130px; }
.jd-svc-label { font-size: 11.5px; font-weight: 700; color: var(--indigo-dark); }
.jd-svc-jam { font-size: 10px; font-weight: 500; color: var(--muted); margin-top: 2px; }
.jd-td { font-size: 12.5px; color: var(--ink); }
.jd-td-edit { padding: 4px 6px !important; }
.jd-cell-input {
  width: 100%; min-width: 110px;
  font-size: 12px; padding: 5px 8px;
  border: 1.5px solid var(--line); border-radius: 6px;
  background: var(--surface); color: var(--ink);
  font-family: inherit;
}
.jd-cell-input:focus { outline: none; border-color: var(--indigo); }

/* ---------------------- Dialog (Custom Confirm) ---------------------- */
.dlg-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(15,20,40,0.45);
  display: flex; align-items: center; justify-content: center;
  animation: dlg-fade-in 0.15s ease;
}
@keyframes dlg-fade-in { from { opacity: 0; } to { opacity: 1; } }
.dlg-box {
  background: var(--card); border-radius: 16px;
  border: 1.5px solid var(--line);
  padding: 28px 28px 22px;
  min-width: 320px; max-width: 420px; width: 90%;
  animation: dlg-slide-up 0.18s ease;
}
@keyframes dlg-slide-up { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
.dlg-title { font-size: 16px; font-weight: 800; color: var(--indigo-dark); margin-bottom: 8px; }
.dlg-body  { font-size: 13.5px; color: var(--muted); margin-bottom: 20px; line-height: 1.55; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* ---------------------- Pub/Send badge & button ---------------------- */
.pub-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; padding: 4px 10px;
  border-radius: 20px; text-transform: uppercase; letter-spacing: 0.05em;
}
.pub-sent {
  background: #d1fae5; color: #065f46;
  border: 1px solid #6ee7b7;
}
.pub-btn {
  font-size: 12px; font-weight: 700; padding: 5px 14px;
  border-radius: 8px; border: 1.5px solid var(--indigo);
  background: var(--indigo); color: #fff; cursor: pointer;
  letter-spacing: 0.02em; white-space: nowrap;
  transition: opacity .15s;
}
.pub-btn:hover { opacity: 0.85; }

/* ---------------------- Warta / Tingting ---------------------- */
.wt-week-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.wt-tabs {
  display: flex; gap: 4px; flex-wrap: wrap;
  border-bottom: 2px solid var(--line); margin-bottom: 0;
}
.wt-tab {
  font-size: 12.5px; font-weight: 600; padding: 8px 16px;
  border: none; background: none; cursor: pointer; color: var(--muted);
  border-bottom: 2.5px solid transparent; margin-bottom: -2px;
  border-radius: 6px 6px 0 0; transition: color .15s;
}
.wt-tab:hover { color: var(--indigo); }
.wt-tab-active { color: var(--indigo); border-bottom-color: var(--indigo); font-weight: 700; }
.wt-form-kb-badge {
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px;
  background: var(--indigo); color: #fff; white-space: nowrap;
}

/* Upload card */
.wt-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; margin-top: 16px; overflow: hidden;
}
.wt-card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.wt-card-sub { font-size: 12px; color: var(--muted); }
.wt-card-body {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1px; background: var(--line);
}
@media (max-width: 640px) { .wt-card-body { grid-template-columns: 1fr; } }
.wt-card-actions {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  padding: 12px 18px; border-top: 1px solid var(--line);
}
.wt-upload-section {
  background: var(--card); padding: 18px;
}
.wt-upload-label {
  font-size: 12.5px; font-weight: 700; color: var(--ink);
  margin-bottom: 12px;
}
.wt-upload-zone {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 6px;
  border: 2px dashed var(--line); border-radius: 10px;
  padding: 22px 16px; cursor: pointer; text-align: center;
  color: var(--muted); font-size: 13px; transition: border-color .15s;
}
.wt-upload-zone:hover { border-color: var(--indigo); color: var(--indigo); }
.wt-file-input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.wt-upload-hint { font-size: 11px; color: var(--muted); }
.wt-file-row {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: #f9fafb;
}
.wt-file-name { flex: 1; font-size: 13px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wt-file-replace { font-size: 12px; padding: 4px 10px; flex-shrink: 0; }
.wt-prog-wrap { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.wt-prog-track {
  flex: 1; height: 6px; background: var(--line); border-radius: 3px; overflow: hidden;
}
.wt-prog-bar { height: 100%; width: 0%; background: var(--indigo); border-radius: 3px; transition: width .2s; }
.wt-prog-pct { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* ---------------------- Kotak Masuk ---------------------- */
.inbox-list { display: flex; flex-direction: column; gap: 6px; }
.inbox-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; background: var(--card);
  border: 1px solid var(--line); border-radius: 10px;
}
.inbox-unread { background: #f0f3ff; border-color: var(--indigo); }
.inbox-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--indigo); flex-shrink: 0; margin-top: 6px;
}
.inbox-dot-read { background: var(--line); }
.inbox-body { flex: 1; min-width: 0; }
.inbox-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.inbox-from { font-size: 13.5px; font-weight: 700; color: var(--indigo-dark); }
.inbox-time { font-size: 11px; color: var(--muted); flex-shrink: 0; }
.inbox-msg { font-size: 13px; color: var(--muted); line-height: 1.5; }
.inbox-read-btn { align-self: center; color: #16a34a; }

@media (max-width: 760px) {
  .app-view { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: column; }
  .nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .nav-group { margin: 0; }
  .nav-group-title { display: none; }
  .content { padding: 16px; }
}
