:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --ink: #1c1917;
  --ink-2: #44403c;
  --muted: #78716c;
  --line: #e7e5e4;
  --line-2: #d6d3d1;

  --gold: #BA8F2E;
  --gold-hover: #9c7726;
  --gold-dim: rgba(186,143,46,0.10);
  --gold-border: rgba(186,143,46,0.30);

  --ok: #15803d;
  --ok-bg: #f0fdf4;
  --warn: #b45309;
  --warn-bg: #fffbeb;
  --urgent: #b91c1c;
  --urgent-bg: #fef2f2;
  --info-bg: #f5f5f4;
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

html, body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100%;
}

/* ─── NAV BAR ─── */
.topbar {
  height: 52px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-mark { width: 28px; height: 28px; border-radius: 6px; background: var(--gold); display: flex; align-items: center; justify-content: center; }
.brand-mark svg { width: 14px; height: 14px; fill: #fff; }
.topbar-logo { height: 24px; object-fit: contain; }
.topbar-div { width: 1px; height: 20px; background: var(--line); }
.topbar-title { font-size: 13px; font-weight: 600; color: var(--ink); letter-spacing: .01em; }
.topbar-clock { margin-left: auto; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--muted); line-height: 1.4; text-align: right; }
.topbar-clock b { color: var(--ink-2); font-weight: 500; }

/* ─── LAYOUT ─── */
.body-wrap { display: grid; grid-template-columns: 380px 1fr; min-height: calc(100vh - 52px); max-width: 100%; }

/* ─── LEFT PANEL ─── */
.left-panel { border-right: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; }
.left-inner { padding: 32px 28px 40px; position: sticky; top: 52px; max-height: calc(100vh - 52px); overflow-y: auto; }

.panel-eyebrow { font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.panel-heading { font-size: 22px; font-weight: 700; color: var(--ink); line-height: 1.25; letter-spacing: -.02em; margin-bottom: 6px; }
.panel-sub { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 28px; }

/* Type toggle */
.type-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 24px; }
.type-row input { display: none; }
.type-label { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 11px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; transition: .18s ease; user-select: none; }
.type-label .t-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .4; transition: .18s ease; }
.type-row input:checked + .type-label { border-color: var(--gold-border); color: var(--gold); background: var(--gold-dim); }
.type-row input:checked + .type-label .t-dot { opacity: 1; }

.divider { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.divider-line { flex: 1; height: 1px; background: var(--line); }
.divider-label { font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* Fields */
.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field > label, .field-row .field > label { display: block; font-size: 11.5px; font-weight: 600; color: var(--ink-2); letter-spacing: .02em; margin-bottom: 7px; }
.opt-tag { font-family: 'JetBrains Mono', monospace; font-size: 9.5px; font-weight: 500; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; margin-left: 5px; }

input[type=text], input[type=password], input[type=date], select, textarea { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 11px 14px; font-size: 13.5px; font-family: 'Inter', sans-serif; font-weight: 500; color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s; }
input[type=text]:focus, input[type=password]:focus, input[type=date]:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim); background: var(--surface); }

select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2378716c' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; cursor: pointer; }
textarea { min-height: 88px; resize: vertical; line-height: 1.55; }
.hidden { display: none !important; }

/* Submit button */
.btn-primary { width: 100%; margin-top: 8px; padding: 14px 20px; background: var(--gold); color: #fff; border: none; border-radius: 8px; font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 9px; transition: background .18s, transform .1s; letter-spacing: .01em; }
.btn-primary:hover { background: var(--gold-hover); }
.btn-primary:active { transform: scale(.99); }
.btn-primary:disabled { opacity: .65; cursor: not-allowed; transform: none; }

.spinner-sm { width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

.footer-note { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }

/* ─── RIGHT PANEL ─── */
.right-panel { padding: 32px 28px 60px; max-width: 100%; overflow-x: hidden; }
.board-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; gap: 12px; }
.board-title-wrap h2 { font-size: 18px; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
.board-title-wrap .board-sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.count-badge { font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700; color: var(--gold); background: var(--gold-dim); border: 1px solid var(--gold-border); border-radius: 20px; padding: 4px 12px; letter-spacing: .04em; }

/* Filter bar */
.filter-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.search-wrap { position: relative; flex: 0 0 180px; }
.search-wrap svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 13px; height: 13px; color: var(--muted); pointer-events: none; }
#searchInput { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 6px 30px 6px 30px; font-size: 11.5px; font-family: 'JetBrains Mono', monospace; font-weight: 500; color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s, width .2s; }
#searchInput::placeholder { color: var(--muted); }
#searchInput:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim); }
.search-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; border-radius: 50%; background: var(--line); border: none; color: var(--muted); font-size: 11px; line-height: 1; cursor: pointer; display: none; align-items: center; justify-content: center; transition: background .15s; }
.search-clear:hover { background: var(--line-2); color: var(--ink); }
.search-clear.visible { display: flex; }

.chips { display: flex; gap: 8px; flex: 1; flex-wrap: wrap; }
.chip { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 6px 14px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; transition: .15s ease; user-select: none; }
.chip:hover { border-color: var(--line-2); color: var(--ink-2); }
.chip.active { background: var(--gold-dim); color: var(--gold); border-color: var(--gold-border); }

.board { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; max-width: 100%; }
.state-box { padding: 56px 24px; text-align: center; }
.state-icon { font-size: 28px; margin-bottom: 12px; opacity: .35; }
.state-label { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.state-spinner { width: 26px; height: 26px; border: 2px solid var(--line); border-top-color: var(--gold); border-radius: 50%; margin: 0 auto 14px; animation: spin .8s linear infinite; }
.state-error { color: var(--urgent); } .state-error .state-icon { opacity: 1; }

/* Task rows */
.task-row { display: flex; align-items: flex-start; gap: 0; padding: 0; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .15s; }
.task-row:last-child { border-bottom: none; }
.task-row:hover { background: var(--bg); }
.row-accent { width: 3px; align-self: stretch; flex-shrink: 0; border-radius: 0; background: transparent; transition: background .15s; }
.task-row:hover .row-accent, .task-row[data-type="Reminder"] .row-accent { background: var(--gold); }
.task-row[data-type="Task List"] .row-accent { background: var(--line-2); }

.row-inner { flex: 1; min-width: 0; padding: 16px 18px 16px 16px; }
.row-top { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.row-type-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); flex-shrink: 0; margin-top: 5px; }
[data-type="Reminder"] .row-type-dot { background: var(--gold); }
.row-title { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.4; word-break: break-word; }

.row-pills { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.pill { display: inline-flex; align-items: center; font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 3px 9px; border-radius: 4px; white-space: nowrap; }
.pill-date { background: var(--info-bg); color: var(--muted); border: 1px solid var(--line); }
.pill-not-started { background: var(--info-bg); color: #57534e; }
.pill-in-progress { background: var(--gold-dim); color: var(--gold); border: 1px solid var(--gold-border); }
.pill-low { background: var(--ok-bg); color: var(--ok); }
.pill-medium { background: var(--warn-bg); color: var(--warn); }
.pill-urgent { background: var(--urgent-bg); color: var(--urgent); }

.row-note { font-size: 12.5px; color: var(--muted); line-height: 1.55; background: var(--bg); padding: 9px 12px; border-left: 2px solid var(--line); border-radius: 0 5px 5px 0; margin-bottom: 10px; word-break: break-word; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.btn-sm { font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 5px 12px; border-radius: 5px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; transition: .15s ease; }
.btn-sm:hover { border-color: var(--ink); color: var(--ink); }
.btn-sm.edit:hover { border-color: var(--gold); color: var(--gold); background: var(--gold-dim); }
.btn-sm.done:hover { border-color: var(--ok); color: var(--ok); background: var(--ok-bg); }

/* ─── TOAST / MODAL ─── */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(12px); padding: 11px 20px 11px 16px; border-radius: 8px; font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 10px; opacity: 0; visibility: hidden; transition: .25s cubic-bezier(.34,1.56,.64,1); z-index: 10000; max-width: min(92vw, 380px); box-shadow: 0 4px 20px rgba(0,0,0,.12); }
.toast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.toast-ok { background: #052e16; color: #bbf7d0; }
.toast-err { background: #450a0a; color: #fecaca; }
.toast-icon { font-size: 16px; flex-shrink: 0; }

.overlay { position: fixed; inset: 0; background: rgba(28,25,23,.45); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: .2s ease; z-index: 9000; padding: 20px; }
.overlay.show { opacity: 1; visibility: visible; }

.modal-card { width: min(92vw, 440px); max-height: 90vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 26px 24px 24px; box-shadow: 0 20px 40px rgba(0,0,0,.15); transform: translateY(10px) scale(.97); animation: popIn .22s cubic-bezier(.34,1.56,.64,1) forwards; }
@keyframes popIn { to { transform: translateY(0) scale(1); } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 22px; gap: 16px; }
.modal-head h3 { font-size: 16px; font-weight: 700; color: var(--ink); }
.close-btn { width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: .15s ease; flex-shrink:0; }
.close-btn:hover { color: var(--ink); border-color: var(--ink-2); }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.btn-secondary { flex: 1; padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink-2); font-family: 'Inter', sans-serif; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: .15s ease; text-align: center; }
.btn-secondary:hover { background: var(--bg); border-color: var(--line-2); }
.modal-actions .btn-primary { flex: 2; margin-top: 0; }

/* ─── CALENDAR / WRAPPERS ─── */
.calendar-wrap, .design-req-wrap { display: none; }
.calendar-wrap.show, .design-req-wrap.show { display: block; }
.board-list-wrap { display: block; }
.board-list-wrap.hide { display: none; }

.cal-nav { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; }
.cal-nav-btn { width: 24px; height: 24px; border-radius: 5px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: .15s ease; flex-shrink: 0; }
.cal-nav-btn:hover { border-color: var(--gold); color: var(--gold); }
.cal-nav-btn svg { width: 11px; height: 11px; }
.cal-month-label { font-family: 'Inter', sans-serif; font-size: 13.5px; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
.cal-month-label span { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; font-weight: 500; color: var(--muted); margin-left: 6px; }

.cal-grid-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.cal-dow { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--line); }
.cal-dow-cell { padding: 8px 4px; text-align: center; font-family: 'JetBrains Mono', monospace; font-size: 9.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cal-days { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-cell { min-height: 88px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 7px 6px 6px; cursor: pointer; transition: background .12s; position: relative; vertical-align: top; }
.cal-cell:nth-child(7n) { border-right: none; }
.cal-cell:hover { background: var(--bg); }
.cal-cell.other-month { background: #fafaf9; } .cal-cell.other-month .cal-day-num { color: var(--line-2); }
.cal-cell.today .cal-day-num { background: var(--gold); color: #fff; border-radius: 50%; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; }
.cal-cell.selected { background: var(--gold-dim); } .cal-cell.selected .cal-day-num { color: var(--gold); }
.cal-day-num { font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700; color: var(--ink-2); margin-bottom: 4px; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; }
.cal-events { display: flex; flex-direction: column; gap: 2px; }
.cal-event { display: flex; align-items: center; gap: 4px; font-size: 10px; font-family: 'Inter', sans-serif; font-weight: 600; line-height: 1.3; padding: 2px 5px; border-radius: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-event.type-task { background: var(--info-bg); color: var(--ink-2); }
.cal-event.type-reminder { background: var(--gold-dim); color: var(--gold); }
.cal-event-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.type-task .cal-event-dot { background: var(--muted); } .type-reminder .cal-event-dot { background: var(--gold); }
.cal-event-more { font-family: 'JetBrains Mono', monospace; font-size: 9px; font-weight: 700; color: var(--muted); padding: 1px 5px; letter-spacing: .04em; }

.cal-detail { margin-top: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: none; }
.cal-detail.show { display: block; }
.cal-detail-head { padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.cal-detail-head h4 { font-size: 13px; font-weight: 700; color: var(--ink); }
.cal-detail-close { width: 24px; height: 24px; border-radius: 5px; border: 1px solid var(--line); background: var(--bg); color: var(--muted); font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: .15s ease; }
.cal-detail-close:hover { color: var(--ink); border-color: var(--ink); }
.cal-detail-list { padding: 8px 0; }

/* ─── DESIGN REQUEST VIEW & TABLE ─── */
.stats-strip { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.stat-pill { background: var(--surface); border: 1px solid var(--line); padding: 8px 14px; border-radius: 8px; display: flex; align-items: center; gap: 8px; flex: 1; min-width: 100px; }
.stat-num { font-weight: 700; font-family: 'JetBrains Mono', monospace; font-size: 14px; color: var(--ink); }
.stat-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }

.table-wrapper { width: 100%; overflow-x: auto; max-width: 100%; }
.req-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
.req-table th { padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 10.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.req-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--ink-2); vertical-align: middle; }
.req-table tr:last-child td { border-bottom: none; }
.req-table tbody tr { transition: background .12s; cursor: pointer; }
.req-table tbody tr:hover { background: var(--bg); }

/* Grid untuk modal detail request */
.req-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.req-field { display: flex; flex-direction: column; gap: 4px; }
.req-field span { font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.req-field strong { font-size: 13.5px; font-weight: 500; color: var(--ink); }

/* WA float */
.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 8000; background: #128C7E; color: #fff; text-decoration: none; padding: 11px 18px; border-radius: 999px; display: flex; align-items: center; gap: 8px; font-family: 'JetBrains Mono', monospace; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; box-shadow: 0 6px 20px rgba(18,140,126,.25); transition: .18s ease; }
.wa-float:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(18,140,126,.3); }

/* ─── RESPONSIVE ─── */
@media (max-width: 860px) {
  .body-wrap { grid-template-columns: 1fr; }
  .left-panel { border-right: none; border-bottom: 1px solid var(--line); }
  .left-inner { position: static; max-height: none; }
  .right-panel { padding: 24px 18px 80px; }
  .req-detail-grid { grid-template-columns: 1fr; }
}

.agenda-wrap { display: none; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.agenda-empty { padding: 40px 20px; text-align: center; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.agenda-row { display: flex; align-items: flex-start; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .12s; }
.agenda-row:last-child { border-bottom: none; }
.agenda-row:hover { background: var(--bg); }
.agenda-date { flex-shrink: 0; width: 42px; text-align: center; }
.agenda-day-num { font-family: 'JetBrains Mono', monospace; font-size: 20px; font-weight: 700; color: var(--ink); line-height: 1; }
.agenda-day-name { font-family: 'JetBrains Mono', monospace; font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.agenda-date.is-today .agenda-day-num { color: var(--gold); }
.agenda-items { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; padding-top: 2px; }
.agenda-item { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.agenda-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); flex-shrink: 0; }

@media (max-width: 520px) {
  .topbar { padding: 0 16px; }
  .left-inner { padding: 24px 18px 32px; }
  .field-row { grid-template-columns: 1fr; }
  .panel-heading { font-size: 19px; }
  .board-header { flex-direction: column; align-items: flex-start; }
  .cal-grid-wrap { display: none; }
  .agenda-wrap { display: block; }
  .stat-pill { min-width: 100%; }
}

/* ─── MOBILE: DESIGN REQUEST AS CARDS (FIX: tabel melebar ke samping) ─── */
@media (max-width: 700px) {
  .table-wrapper { overflow-x: visible; }

  .req-table thead { display: none; }
  .req-table, .req-table tbody, .req-table tr, .req-table td { display: block; width: 100%; }

  .req-table tr {
    border-bottom: 1px solid var(--line);
    padding: 14px 16px;
  }
  .req-table tr:last-child { border-bottom: none; }

  .req-table td {
    padding: 3px 0;
    border-bottom: none;
    white-space: normal;
    word-break: break-word;
  }

  /* Label di depan tiap kolom, dari data-label yang akan ditambahkan di JS */
  .req-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 8px;
    margin-bottom: 2px;
  }
  .req-table td[data-label]:first-child::before { margin-top: 0; }

  .req-table td:last-child {
    text-align: left;
    margin-top: 6px;
  }
  .req-table td:last-child::before { content: none; }
}

/* ─── SIDEBAR NAV (kompatibel dengan topbar fixed + body-wrap) ─── */
:root { --sidebar-w: 220px; }

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--line);
  position: fixed;
  top: var(--topbar-h, 52px);
  left: 0;
  height: calc(100vh - var(--topbar-h, 52px));
  overflow-y: auto;
  padding: 20px 0;
  z-index: 150;
  transition: transform .22s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px 16px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.sidebar-brand .brand-mark {
  width: 24px; height: 24px; border-radius: 6px;
  background: var(--gold); display: flex; align-items: center; justify-content: center;
}
.sidebar-brand .brand-mark svg { width: 12px; height: 12px; fill: #fff; }

.sidebar-menu-btn {
  display: none;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--bg);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.sidebar-menu-btn svg { width: 15px; height: 15px; stroke: var(--ink); }

.sidebar-nav { display: flex; flex-direction: column; gap: 2px; padding: 0 12px; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
  transition: background .15s, color .15s;
}
.sidebar-link:hover { background: var(--bg); color: var(--ink); }

.sidebar-link .link-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-2);
  flex-shrink: 0;
  transition: background .15s;
}

.sidebar-link.active { background: var(--gold-dim); color: var(--gold); }
.sidebar-link.active .link-dot { background: var(--gold); }

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--topbar-h, 52px);
  background: rgba(28,25,23,.4);
  z-index: 140;
}
.sidebar-overlay.show { display: block; }

/* Konten utama digeser ke kanan sejauh lebar sidebar */
.body-wrap { margin-left: var(--sidebar-w); }

@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); box-shadow: 0 0 30px rgba(0,0,0,.15); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-menu-btn { display: flex; }
  .body-wrap { margin-left: 0; }
}
/* ─── LOGIN PAGE ─── */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.login-card { width: 100%; max-width: 360px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 32px 28px; box-shadow: 0 20px 40px rgba(0,0,0,.06); }
.login-logo { display: block; height: 30px; object-fit: contain; margin: 0 auto 22px; }
.login-title { font-size: 18px; font-weight: 700; color: var(--ink); text-align: center; margin-bottom: 4px; }
.login-sub { font-size: 12.5px; color: var(--muted); text-align: center; margin-bottom: 26px; }

/* Posisi tombol mata untuk lihat password */
.password-wrapper { position: relative; display: flex; align-items: center; }
.password-wrapper input { padding-right: 40px; box-sizing: border-box; }
.toggle-password { position: absolute; right: 12px; background: transparent; border: none; color: var(--muted); cursor: pointer; padding: 0; display: flex; align-items: center; justify-content: center; outline: none; }
.toggle-password:hover { color: var(--ink); }

/* Peringatan error login */
.login-error { display: none; background: var(--urgent-bg); color: var(--urgent); font-size: 12.5px; font-weight: 500; padding: 10px 12px; border-radius: 8px; margin-bottom: 16px; }
.login-error.show { display: block; }
