/* ============================================================
   PT. RAIH BINTANG — Pengajuan Anggaran & Jurnal Regional
   ============================================================ */
:root {
  --navy-950: #07152c;
  --navy-900: #0b1f3f;
  --navy-800: #102a52;
  --navy-700: #163a6b;
  --navy-600: #1e4c86;
  --blue: #1c47a8;
  --blue-soft: #e8eefc;
  --red: #d61f2c;
  --red-700: #b31520;
  --red-soft: #fdecee;
  --green: #0f8a5f;
  --green-soft: #e6f7ef;
  --amber: #b7791f;
  --amber-soft: #fdf4e3;
  --gray-900: #182234;
  --gray-700: #3d4a61;
  --gray-500: #6b778c;
  --gray-400: #93a0b4;
  --gray-300: #c7d0de;
  --gray-200: #e4e9f2;
  --gray-100: #f1f4f9;
  --bg: #f3f6fb;
  --card: #ffffff;
  --line: #e3e9f2;
  --shadow-sm: 0 1px 2px rgba(15, 33, 63, .06), 0 2px 8px rgba(15, 33, 63, .04);
  --shadow-md: 0 8px 30px rgba(11, 31, 63, .10);
  --shadow-lg: 0 24px 60px rgba(7, 21, 44, .22);
  --radius: 14px;
  --radius-sm: 9px;
  --sidebar-w: 264px;
  --font: "Segoe UI", "Inter", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 9999;
  background: var(--navy-900); color: #fff; padding: 10px 16px;
  border-radius: 0 0 10px 0; font-weight: 600; text-decoration: none;
}
.skip-link:focus { left: 0; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  color: var(--gray-900);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
svg { display: block; }

/* ---------- generic ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 9px; padding: 9px 16px;
  font-size: 13.5px; font-weight: 600; cursor: pointer; line-height: 1.2;
  transition: .16s ease; white-space: nowrap; background: #fff; color: var(--gray-700);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 4px 14px rgba(214, 31, 44, .24); }
.btn-primary:hover { background: var(--red-700); }
.btn-navy { background: var(--navy-800); color: #fff; box-shadow: 0 4px 14px rgba(16, 42, 82, .2); }
.btn-navy:hover { background: var(--navy-700); }
.btn-outline { background: #fff; border-color: var(--gray-300); color: var(--gray-700); }
.btn-outline:hover { border-color: var(--navy-600); color: var(--navy-700); }
.btn-ghost { background: transparent; color: var(--gray-700); }
.btn-ghost:hover { background: var(--gray-100); }
.btn-danger-ghost { background: transparent; color: var(--red); }
.btn-danger-ghost:hover { background: var(--red-soft); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 7px; }
.btn-lg { padding: 12px 22px; font-size: 14.5px; }
.btn-icon { padding: 8px; width: 34px; height: 34px; }
.btn svg { width: 16px; height: 16px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px;
  border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .01em;
  border: 1px solid transparent; white-space: nowrap;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-draft { background: #eef1f6; color: #5b687d; border-color: #e2e7f0; }
.badge-submitted { background: var(--amber-soft); color: var(--amber); border-color: #f3e2bd; }
.badge-approved { background: var(--green-soft); color: var(--green); border-color: #c9eedd; }
.badge-rejected { background: var(--red-soft); color: var(--red-700); border-color: #f8d2d6; }
.badge-info { background: var(--blue-soft); color: var(--blue); border-color: #d5e0f8; }
.badge-neutral { background: #f1f4f9; color: var(--gray-500); border-color: var(--gray-200); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--gray-200);
  background: #fff; color: var(--gray-700); border-radius: 999px; padding: 5px 11px;
  font-size: 12px; font-weight: 600; cursor: pointer; transition: .15s;
}
.chip:hover { border-color: var(--navy-600); color: var(--navy-700); }
.chip.active { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }

.muted { color: var(--gray-500); }
.small { font-size: 12px; }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.strong { font-weight: 700; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grow { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.hidden { display: none !important; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 20px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.card-head h3 { font-size: 15px; }
.card-head .sub { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.card-body { padding: 20px; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- login ---------- */
.login-root {
  min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; background: #fff;
}
.login-brand {
  position: relative; overflow: hidden; color: #fff; padding: 56px 64px;
  background:
    radial-gradient(900px 500px at -10% -10%, rgba(28, 71, 168, .55), transparent 60%),
    radial-gradient(700px 500px at 110% 110%, rgba(214, 31, 44, .35), transparent 55%),
    linear-gradient(140deg, var(--navy-950), var(--navy-800) 55%, var(--navy-700));
  display: flex; flex-direction: column; justify-content: space-between;
}
.login-brand::before,
.login-brand::after {
  content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,.08);
}
.login-brand::before { width: 620px; height: 620px; right: -260px; top: -180px; }
.login-brand::after { width: 420px; height: 420px; right: -140px; top: -80px; background: radial-gradient(circle, rgba(255,255,255,.05), transparent 70%); }
.login-logo-card {
  display: inline-flex; background: #fff; border-radius: 14px; padding: 12px 20px;
  box-shadow: 0 18px 50px rgba(0,0,0,.28); width: fit-content;
}
.login-logo-card img { height: 46px; }
.login-headline { margin-top: 46px; max-width: 520px; position: relative; z-index: 2; }
.login-headline .kicker {
  display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: #ffb9be;
  border: 1px solid rgba(255,255,255,.18); padding: 6px 12px; border-radius: 999px;
  background: rgba(255,255,255,.04);
}
.login-headline h1 { font-size: 38px; line-height: 1.14; margin: 20px 0 14px; letter-spacing: -0.02em; }
.login-headline h1 span { color: #ff8b93; }
.login-headline p { color: rgba(255,255,255,.72); font-size: 14.5px; line-height: 1.7; max-width: 460px; }
.login-features { display: flex; flex-direction: column; gap: 14px; margin-top: 34px; position: relative; z-index: 2; }
.login-feature { display: flex; align-items: flex-start; gap: 12px; }
.login-feature .ic {
  width: 34px; height: 34px; border-radius: 9px; background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.14); display: grid; place-items: center; flex: 0 0 auto;
}
.login-feature .ic svg { width: 16px; height: 16px; color: #ffb9be; }
.login-feature b { display: block; font-size: 13.5px; font-weight: 600; }
.login-feature span { font-size: 12.5px; color: rgba(255,255,255,.6); }
.login-foot { position: relative; z-index: 2; font-size: 11.5px; color: rgba(255,255,255,.45); margin-top: 40px; }

.login-panel { display: flex; align-items: center; justify-content: center; padding: 40px 32px; background: #fbfcfe; }
.login-box { width: 100%; max-width: 400px; }
.login-box .mobile-logo { display: none; }
.login-box h2 { font-size: 25px; letter-spacing: -0.02em; }
.login-box .lead { color: var(--gray-500); font-size: 13.5px; margin-top: 6px; margin-bottom: 26px; }
.login-form { display: flex; flex-direction: column; gap: 15px; }
.login-form .btn { width: 100%; margin-top: 4px; padding: 12px; font-size: 14px; }
.login-error {
  background: var(--red-soft); color: var(--red-700); border: 1px solid #f6cdd2;
  padding: 9px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 600;
}

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow: auto; color: #cfd9ea;
  background:
    radial-gradient(420px 220px at 0% 0%, rgba(28, 71, 168, .35), transparent 70%),
    linear-gradient(180deg, var(--navy-950), var(--navy-900) 60%, #0a1c38);
  display: flex; flex-direction: column; z-index: 30;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 6px; }
.brand-box { padding: 20px 18px 16px; }
.brand-card {
  background: #fff; border-radius: 11px; padding: 9px 12px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 26px rgba(0,0,0,.25);
}
.brand-card img { height: 34px; width: auto; }
.brand-sub {
  margin-top: 12px; font-size: 10px; letter-spacing: .13em; text-transform: uppercase;
  color: rgba(255,255,255,.38); font-weight: 700; text-align: center;
}
.side-nav { padding: 6px 12px 12px; flex: 1; }
.nav-label {
  font-size: 10px; letter-spacing: .13em; text-transform: uppercase; color: rgba(255,255,255,.32);
  font-weight: 700; padding: 18px 12px 7px;
}
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px;
  color: #b9c6da; font-size: 13px; font-weight: 500; cursor: pointer; margin-bottom: 2px;
  position: relative; transition: .15s; text-decoration: none;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.nav-item.active { background: rgba(255,255,255,.1); color: #fff; font-weight: 600; }
.nav-item.active::before {
  content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--red);
}
.nav-item svg { width: 17px; height: 17px; opacity: .85; flex: 0 0 auto; }
.nav-item .count {
  margin-left: auto; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 700;
  border-radius: 999px; padding: 1px 7px; min-width: 20px; text-align: center;
}
.side-user {
  margin: 12px; padding: 12px; border-radius: 11px; display: flex; gap: 10px; align-items: center;
  background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.07);
}
.side-user .avatar { width: 34px; height: 34px; font-size: 12px; }
.side-user .meta { min-width: 0; flex: 1; }
.side-user .meta b { display: block; font-size: 12.5px; color: #fff; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user .meta span { display: block; font-size: 10.5px; color: rgba(255,255,255,.45); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user .logout {
  background: transparent; border: 0; color: rgba(255,255,255,.5); cursor: pointer; padding: 5px;
  border-radius: 6px; display: grid; place-items: center;
}
.side-user .logout:hover { background: rgba(255,255,255,.1); color: #fff; }

.avatar {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--blue), var(--navy-700)); color: #fff;
  font-weight: 700; font-size: 13px; flex: 0 0 auto; letter-spacing: .02em;
}
.avatar.soft { background: var(--blue-soft); color: var(--blue); }

.main { min-width: 0; display: flex; flex-direction: column; }
.sidebar-backdrop { display: none; }
.topbar {
  position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.86); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line); padding: 0 28px; height: 66px;
  display: flex; align-items: center; gap: 14px;
}
.topbar .page-crumb { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--gray-400); font-weight: 700; }
.topbar .page-title { font-size: 16.5px; font-weight: 700; letter-spacing: -0.01em; }
.topbar .spacer { flex: 1; }
.topbar .period-pick { display: flex; align-items: center; gap: 8px; }
.topbar .period-pick select {
  border: 1px solid var(--gray-200); background: #fff; border-radius: 8px; padding: 7px 10px;
  font-size: 12.5px; font-weight: 600; color: var(--gray-700);
}
.topbar .user-mini { display: flex; align-items: center; gap: 9px; padding-left: 14px; border-left: 1px solid var(--line); }
.topbar .user-mini .who b { display: block; font-size: 12.5px; line-height: 1.2; }
.topbar .user-mini .who span { display: block; font-size: 10.5px; color: var(--gray-500); }
.hamburger { display: none; }

.content { padding: 26px 28px 50px; max-width: 1500px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h2 { font-size: 22px; letter-spacing: -0.02em; }
.page-head p { color: var(--gray-500); font-size: 13px; margin-top: 5px; }
.page-head .actions { display: flex; gap: 9px; flex-wrap: wrap; }

/* ---------- KPI ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.kpi::after { content: ""; position: absolute; inset: auto 0 0 0; height: 3px; background: var(--gray-200); }
.kpi.accent::after { background: linear-gradient(90deg, var(--red), #ff6b75); }
.kpi.blue::after { background: linear-gradient(90deg, var(--blue), #5b83d8); }
.kpi.green::after { background: linear-gradient(90deg, var(--green), #34c08c); }
.kpi.amber::after { background: linear-gradient(90deg, var(--amber), #e0a83f); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.kpi-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--gray-500); font-weight: 700; }
.kpi-ic {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: var(--gray-100); color: var(--navy-700);
}
.kpi-ic svg { width: 17px; height: 17px; }
.kpi.accent .kpi-ic { background: var(--red-soft); color: var(--red); }
.kpi.blue .kpi-ic { background: var(--blue-soft); color: var(--blue); }
.kpi.green .kpi-ic { background: var(--green-soft); color: var(--green); }
.kpi.amber .kpi-ic { background: var(--amber-soft); color: var(--amber); }
.kpi-value { font-size: 23px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.kpi-value.sm { font-size: 19px; }
.kpi-sub { font-size: 11.5px; color: var(--gray-500); margin-top: 6px; }
.kpi-sub b { color: var(--gray-700); }

/* ---------- chart ---------- */
.chart-wrap { padding: 6px 0 0; }
.hbar-row { display: grid; grid-template-columns: 118px 1fr 92px; gap: 12px; align-items: center; margin-bottom: 13px; }
.hbar-label { font-size: 12px; color: var(--gray-700); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-track { background: var(--gray-100); border-radius: 5px; height: 14px; position: relative; overflow: hidden; }
.hbar-fill { position: absolute; inset: 0 auto 0 0; border-radius: 5px; background: linear-gradient(90deg, var(--blue), #6b8fdd); }
.hbar-fill.red { background: linear-gradient(90deg, var(--red), #ff7a83); }
.hbar-fill.green { background: linear-gradient(90deg, var(--green), #3fcb95); }
.hbar-val { font-size: 11.5px; text-align: right; font-weight: 600; color: var(--gray-700); }
.vchart { display: flex; align-items: flex-end; gap: 14px; height: 150px; padding: 4px 4px 0; }
.vchart .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; height: 100%; justify-content: flex-end; }
.vchart .bars { display: flex; align-items: flex-end; gap: 4px; height: 100%; width: 100%; justify-content: center; }
.vchart .bar { width: 14px; border-radius: 4px 4px 2px 2px; background: var(--blue); min-height: 2px; transition: .3s; }
.vchart .bar.alt { background: #d9e2f5; }
.vchart .lbl { font-size: 10.5px; color: var(--gray-500); white-space: nowrap; }
.legend { display: flex; gap: 16px; font-size: 11.5px; color: var(--gray-500); margin-top: 12px; flex-wrap: wrap; }
.legend .sw { width: 9px; height: 9px; border-radius: 2px; display: inline-block; margin-right: 6px; }

/* ---------- table ---------- */
.table-wrap { overflow: auto; }
table.data { width: 100%; border-collapse: collapse; }
table.data th {
  text-align: left; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--gray-500); font-weight: 700; padding: 11px 12px; border-bottom: 1px solid var(--line);
  background: #fafbfd; white-space: nowrap; position: sticky; top: 0; z-index: 1;
}
table.data td { padding: 11px 12px; border-bottom: 1px solid #eef1f7; font-size: 13px; vertical-align: middle; }
table.data tbody tr { transition: background .12s; }
table.data tbody tr:hover { background: #f8fafd; }
table.data tbody tr.clickable { cursor: pointer; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tfoot td { padding: 11px 12px; font-weight: 700; background: #fafbfd; border-top: 1px solid var(--line); }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data td.actions-cell { text-align: right; white-space: nowrap; }
.cell-main { font-weight: 600; }
.cell-sub { font-size: 11.5px; color: var(--gray-500); margin-top: 2px; }
.row-actions { display: inline-flex; gap: 4px; }
.icon-btn {
  width: 30px; height: 30px; border-radius: 7px; border: 1px solid transparent; background: transparent;
  display: inline-grid; place-items: center; cursor: pointer; color: var(--gray-500);
}
.icon-btn:hover { background: var(--gray-100); color: var(--navy-700); }
.icon-btn.danger:hover { background: var(--red-soft); color: var(--red); }
.icon-btn svg { width: 15px; height: 15px; }

/* ---------- filters / forms ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar .grow { flex: 1; }
.search-box { position: relative; min-width: 200px; }
.search-box input {
  width: 100%; border: 1px solid var(--gray-200); background: #fff; border-radius: 9px;
  padding: 9px 12px 9px 34px; font-size: 13px; color: var(--gray-900); outline: none;
}
.search-box svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--gray-400); }
.search-box input:focus, .input:focus, .select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(28, 71, 168, .1); }
.input, .select, textarea {
  width: 100%; border: 1px solid var(--gray-200); background: #fff; border-radius: 9px;
  padding: 9px 11px; font-size: 13px; color: var(--gray-900); outline: none; font-family: inherit;
}
.select { 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='%236b778c' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; padding-right: 30px; }
textarea { resize: vertical; min-height: 72px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 11.5px; font-weight: 700; color: var(--gray-700); letter-spacing: .02em; }
.field .hint { font-size: 11px; color: var(--gray-400); }
.field .req { color: var(--red); }
.form-grid { display: grid; gap: 14px; }
.form-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.form-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.checkline { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--gray-700); }
.checkline input { width: 15px; height: 15px; accent-color: var(--red); }
.input-money { text-align: right; font-variant-numeric: tabular-nums; }
.form-actions { display: flex; gap: 9px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow: auto; }
.tab {
  border: 0; background: transparent; padding: 10px 15px; font-size: 13px; font-weight: 600;
  color: var(--gray-500); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 7px;
}
.tab:hover { color: var(--navy-700); }
.tab.active { color: var(--navy-800); border-bottom-color: var(--red); }
.tab .n { background: var(--gray-100); border-radius: 999px; font-size: 10.5px; padding: 1px 7px; color: var(--gray-500); }
.tab.active .n { background: var(--red-soft); color: var(--red); }

/* ---------- submission form ---------- */
.doc-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.doc-head {
  padding: 20px 24px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfcff, #ffffff);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start;
}
.doc-head .brandline { display: flex; gap: 13px; align-items: center; }
.doc-head .brandline img { height: 40px; }
.doc-head h3 { font-size: 16px; }
.doc-head .sub { font-size: 12px; color: var(--gray-500); margin-top: 3px; }
.doc-meta { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 4px; }
.doc-meta .item { font-size: 11.5px; color: var(--gray-500); }
.doc-meta .item b { display: block; font-size: 13px; color: var(--gray-900); margin-top: 2px; }
.items-table { width: 100%; border-collapse: collapse; }
.items-table th {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--gray-500);
  background: #f7f9fc; padding: 9px 8px; border-bottom: 1px solid var(--line); font-weight: 700;
}
.items-table td { border-bottom: 1px solid #eef1f7; padding: 6px 6px; vertical-align: middle; }
.items-table td input, .items-table td select {
  width: 100%; border: 1px solid transparent; background: transparent; border-radius: 6px;
  padding: 7px 8px; font-size: 12.5px; color: var(--gray-900); outline: none;
}
.items-table td input:hover, .items-table td select:hover { border-color: var(--gray-200); background: #fff; }
.items-table td input:focus, .items-table td select:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(28,71,168,.08); }
.items-table .col-no { width: 42px; text-align: center; color: var(--gray-400); font-size: 12px; }
.items-table .col-amount { width: 120px; }
.items-table .col-total { width: 128px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; padding-right: 10px; font-size: 12.5px; }
.items-table .col-del { width: 46px; text-align: center; }
.items-table .money-in { text-align: right; font-variant-numeric: tabular-nums; }
.items-table .account-select { font-size: 11.5px; }
.add-row-bar { padding: 12px 16px; border-bottom: 1px solid var(--line); background: #fbfcfe; }
.summary-panel { padding: 18px 24px 22px; background: #fafbfd; display: flex; justify-content: space-between; gap: 26px; flex-wrap: wrap; }
.summary-lines { flex: 1; min-width: 300px; max-width: 520px; }
.summary-line { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13px; color: var(--gray-700); border-bottom: 1px dashed #e6ebf4; }
.summary-line:last-child { border-bottom: 0; }
.summary-line b { font-variant-numeric: tabular-nums; }
.summary-line.highlight { font-size: 14.5px; font-weight: 700; color: var(--navy-800); padding-top: 9px; }
.summary-line.highlight b { color: var(--red); font-size: 16px; }
.summary-note { flex: 0 0 300px; max-width: 360px; }
.summary-note .box { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px; font-size: 12px; color: var(--gray-500); line-height: 1.6; }
.sign-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding: 22px 24px 26px; border-top: 1px solid var(--line); background: #fff; }
.sign-box { text-align: center; border: 1px solid var(--line); border-radius: 11px; padding: 14px; }
.sign-box .role { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--gray-500); font-weight: 700; }
.sign-box .name { font-size: 13px; font-weight: 700; margin-top: 6px; }
.sign-box .space { height: 52px; border-bottom: 1px dashed var(--gray-300); margin: 10px 14px; }
.sign-box .status { font-size: 11.5px; }

/* ---------- buku besar & rincian pemakaian ---------- */
.ledger-layout { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 18px; align-items: start; }
.ledger-list { max-height: calc(100vh - 330px); overflow: auto; }
.ledger-item {
  display: flex; gap: 10px; align-items: center; width: 100%; padding: 10px 16px;
  border: 0; border-bottom: 1px solid #f0f3f8; border-left: 3px solid transparent;
  background: #fff; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.ledger-item:hover { background: #f8fafd; }
.ledger-item.active { background: #f1f5fd; border-left-color: var(--blue); }
.ledger-item .li-name { font-size: 12.5px; font-weight: 700; }
.ledger-item .li-cat { font-size: 11px; color: var(--gray-500); margin-top: 2px; }
.ledger-item .li-amt { margin-left: auto; text-align: right; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.matrix { min-width: 1080px; }
.matrix th, .matrix td { padding: 8px 9px; font-size: 11.5px; }
.matrix .col-sel { background: #f4f8ff; }
@media (max-width: 1000px) {
  .ledger-layout { grid-template-columns: 1fr; }
  .ledger-list { max-height: 300px; }
}

/* ---------- approval timeline ---------- */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 20px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute; left: -26px; top: 2px; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--gray-300); background: #fff; display: grid; place-items: center;
}
.tl-dot svg { width: 10px; height: 10px; }
.tl-item.approved .tl-dot { border-color: var(--green); background: var(--green); color: #fff; }
.tl-item.rejected .tl-dot { border-color: var(--red); background: var(--red); color: #fff; }
.tl-item.pending .tl-dot { border-color: var(--amber); background: var(--amber-soft); }
.tl-title { font-size: 13px; font-weight: 700; }
.tl-meta { font-size: 11.5px; color: var(--gray-500); margin-top: 2px; }
.tl-note { font-size: 12px; color: var(--gray-700); background: #f7f9fc; border: 1px solid var(--line); border-radius: 7px; padding: 7px 10px; margin-top: 7px; }

.approval-action { border: 1px solid #f0dfb6; background: #fffdf6; border-radius: var(--radius); padding: 18px; }
.approval-action h4 { font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.approval-action .hint { font-size: 12px; color: var(--gray-500); margin: 5px 0 12px; }
.approval-action .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(7, 21, 44, .55); backdrop-filter: blur(2px);
  z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 40px 20px; overflow: auto;
  animation: fadeIn .15s ease;
}
.modal {
  background: #fff; border-radius: 16px; width: 100%; max-width: 560px; box-shadow: var(--shadow-lg);
  animation: popIn .18s ease; margin: auto 0;
}
.modal.wide { max-width: 860px; }
.modal-head { padding: 20px 24px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.modal-head h3 { font-size: 16px; }
.modal-head p { font-size: 12px; color: var(--gray-500); margin-top: 3px; }
.modal-body { padding: 22px 24px; }
.modal-foot { padding: 16px 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 9px; background: #fafbfd; border-radius: 0 0 16px 16px; }
.modal-close { border: 0; background: var(--gray-100); width: 30px; height: 30px; border-radius: 8px; cursor: pointer; color: var(--gray-500); display: grid; place-items: center; }
.modal-close:hover { background: var(--red-soft); color: var(--red); }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: translateY(8px) scale(.99); } }

/* ---------- toast ---------- */
.toast-root { position: fixed; right: 22px; bottom: 22px; z-index: 200; display: flex; flex-direction: column; gap: 9px; }
.toast {
  background: var(--navy-900); color: #fff; border-radius: 10px; padding: 12px 16px; font-size: 13px;
  box-shadow: var(--shadow-md); display: flex; gap: 9px; align-items: center; min-width: 240px; max-width: 380px;
  animation: slideIn .2s ease;
}
.toast.ok { background: #0d6b4d; }
.toast.err { background: #a51420; }
.toast svg { width: 16px; height: 16px; flex: 0 0 auto; }
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } }

/* ---------- timeline of lists, misc ---------- */
.empty { padding: 46px 20px; text-align: center; color: var(--gray-500); }
.empty .ic { width: 46px; height: 46px; border-radius: 12px; background: var(--gray-100); display: grid; place-items: center; margin: 0 auto 12px; color: var(--gray-400); }
.empty .ic svg { width: 22px; height: 22px; }
.empty b { display: block; color: var(--gray-700); font-size: 14px; margin-bottom: 4px; }
.empty span { font-size: 12.5px; }

.notice { display: flex; gap: 11px; padding: 13px 15px; border-radius: 10px; font-size: 12.5px; line-height: 1.55; border: 1px solid; }
.notice svg { width: 17px; height: 17px; flex: 0 0 auto; margin-top: 1px; }
.notice.info { background: var(--blue-soft); border-color: #d5e0f8; color: #1b3d7a; }
.notice.warn { background: var(--amber-soft); border-color: #f3e2bd; color: #7a5210; }
.notice.danger { background: var(--red-soft); border-color: #f6cdd2; color: var(--red-700); }
.notice.success { background: var(--green-soft); border-color: #c9eedd; color: #0b6b4a; }

.progress { height: 8px; border-radius: 999px; background: var(--gray-100); overflow: hidden; min-width: 88px; }
.progress > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--blue), #5b83d8); }
.progress.green > span { background: linear-gradient(90deg, var(--green), #34c08c); }
.progress.red > span { background: linear-gradient(90deg, var(--red), #ff7a83); }

.stat-strip { display: flex; gap: 26px; flex-wrap: wrap; }
.stat-strip .item .l { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--gray-500); font-weight: 700; }
.stat-strip .item .v { font-size: 16px; font-weight: 700; margin-top: 3px; }

.section-title { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--gray-500); font-weight: 700; margin: 0 0 10px; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }

.step-editor { display: flex; flex-direction: column; gap: 10px; }
.step-row {
  display: grid; grid-template-columns: 34px 1.4fr 1fr 1.4fr 34px; gap: 10px; align-items: end;
  border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fbfcfe;
}
.step-row .num-badge { width: 30px; height: 30px; border-radius: 50%; background: var(--navy-800); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; }

.login-accounts { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- print ---------- */
.print-area { display: none; }
@media print {
  @page { size: A4; margin: 12mm; }
  html, body { margin: 0 !important; padding: 0 !important; background: #fff; }
  .shell, .login-root, .toast-root, .modal-backdrop { display: none !important; }
  .print-area { display: block !important; width: 100%; overflow: hidden; color: #000; font-size: 10.5px; }
  .print-area .p-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #000; padding-bottom: 8px; }
  .print-area .p-head img { height: 52px; }
  .print-area .p-company { text-align: right; font-size: 9.5px; line-height: 1.4; }
  .print-area h1 { font-size: 15px; text-align: center; margin: 14px 0 3px; letter-spacing: .06em; }
  .print-area .p-sub { text-align: center; font-size: 10px; margin-bottom: 12px; }
  .print-area .p-meta { display: flex; gap: 26px; font-size: 10px; margin-bottom: 10px; }
  .print-area .p-meta b { display: block; font-size: 11px; }
  .print-area table { width: 100%; border-collapse: collapse; table-layout: fixed; }
  .print-area td, .print-area th { overflow-wrap: anywhere; }
  .print-area th, .print-area td { border: 1px solid #666; padding: 4px 5px; font-size: 9.5px; }
  .print-area th { background: #eee; }
  .print-area .num { text-align: right; white-space: nowrap; }
  .print-area tfoot td { font-weight: 700; }
  .print-area .p-sign { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 26px; text-align: center; font-size: 9px; }
  .print-area .p-sign .space { height: 60px; }
  .print-area .p-sign .name { border-top: 1px solid #000; padding-top: 4px; font-weight: 700; }
  .print-area .p-foot { margin-top: 18px; font-size: 8px; color: #444; display: flex; justify-content: space-between; }
}

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .login-root { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-box .mobile-logo { display: block; margin-bottom: 26px; }
  .login-box .mobile-logo img { height: 42px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: 264px; transform: translateX(-100%);
    transition: transform .2s ease; box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: none; }
  .sidebar-backdrop { display: none; }
  body.menu-open { overflow: hidden; }
  body.menu-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(9, 17, 32, .45); z-index: 25; }
  .hamburger { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); background: #fff; border-radius: 9px; cursor: pointer; }
  .content { padding: 20px 16px 40px; }
  .topbar { padding: 0 16px; }
  .topbar .user-mini .who { display: none; }
  .doc-head, .summary-panel, .sign-grid { padding-left: 16px; padding-right: 16px; }
  .sign-grid { grid-template-columns: 1fr 1fr; }
  .items-table { min-width: 820px; }
  .doc-card .table-wrap { overflow-x: auto; }
  .step-row { grid-template-columns: 30px 1fr; }
  .step-row .num-badge { grid-row: span 2; }
}
@media (max-width: 620px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 14px; }
  .kpi-value { font-size: 18px; }
  .kpi-value.sm { font-size: 15px; }
  .grid-4 { grid-template-columns: 1fr; }
  .form-grid.cols-2, .form-grid.cols-3, .form-grid.cols-4 { grid-template-columns: 1fr; }
  .page-head { align-items: flex-start; }
  .summary-note { flex: 1 1 100%; }
  .topbar .period-pick label { display: none; }
  .topbar .tb-title { display: none; }
  .tabs { flex-wrap: wrap; row-gap: 6px; }
  .hbar-row { grid-template-columns: 92px 1fr 70px; }
}

/* Menu access checkboxes */
.menu-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft, #f8fafc);
  margin-bottom: 6px;
}
.menu-checks .checkline { margin: 0; font-size: 12.5px; }

/* Import & wipe journal */
.drop-zone {
  border: 2px dashed #c7d2e1;
  background: #f8fafc;
  border-radius: 12px;
  padding: 34px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.drop-zone:hover, .drop-zone.dragover { border-color: var(--navy); background: #f1f5fb; }
.drop-zone .dz-icon { color: var(--navy); margin-bottom: 8px; }
.drop-zone h4 { margin: 0 0 4px; font-size: 15px; }
.import-table { max-height: 440px; }
.import-table td { font-size: 12px; }
.row-error td { background: #fff5f5; }
.danger-panel {
  border: 1px solid #f3c4c4;
  background: #fff7f7;
  border-radius: 12px;
  padding: 20px;
}
.confirm-input { width: 260px; text-transform: uppercase; letter-spacing: 2px; font-weight: 700; }
@media (max-width: 620px) {
  .menu-checks { grid-template-columns: 1fr; }
  .confirm-input { width: 100%; }
}

/* Nota jurnal */
.nota-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
}
.nota-link:hover { text-decoration: underline; }
