/* SIMANIS · panel admin (tanpa framework CSS) */
:root {
  --canvas: #eef3f1; --panel: #fff; --sea: #0e2e38; --sea-2: #164452; --sea-3: #2b6170;
  --side: #0b252d; --side-2: #12333d; --side-text: #b7cccd;
  --text: #1d3a42; --text-2: #4f6b72; --line: #dbe5e3; --line-strong: #a9bcbf;
  --accent: #c2412d; --accent-hover: #a63422; --gold: #e9c27a; --gold-soft: #f4e3bd;
  --ok: #1f7a55; --warn: #9a6a12; --ease: cubic-bezier(.16, 1, .3, 1);
  --f-display: 'Bricolage Grotesque', 'Plus Jakarta Sans', sans-serif;
  --f-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; overflow-x: hidden; overflow-x: clip; }
body { font: 15px/1.55 var(--f-body); color: var(--text); background: var(--canvas); -webkit-font-smoothing: antialiased; }
a { color: var(--sea-3); }
h1, h2, h3 { font-family: var(--f-display); color: var(--sea); letter-spacing: -.01em; margin: 0; line-height: 1.15; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Kerangka */
.shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--side); color: var(--side-text); position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 18px 12px 30px; }
.side .brand { display: flex; gap: 12px; align-items: center; padding: 6px 10px 18px; border-bottom: 1px solid rgba(255,255,255,.07); margin-bottom: 12px; text-decoration: none; }
.side .brand img { width: 40px; height: 40px; object-fit: contain; background: #fff; border-radius: 10px; padding: 3px; }
.side .brand b { display: block; color: #fff; font: 800 18px/1 var(--f-display); letter-spacing: .03em; }
.side .brand small { display: block; font: 500 10.5px/1.3 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: #8fb0b3; margin-top: 4px; }
.side h4 { font: 500 10.5px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: #6f9196; margin: 18px 12px 8px; }
.side nav a { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 10px; color: var(--side-text); text-decoration: none; font-weight: 500; position: relative; transition: background-color .2s, color .2s; }
.side nav a:hover { background: var(--side-2); color: #fff; }
.side nav a.on { background: var(--sea-2); color: #fff; }
.side nav a.on::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.side nav a .badge { margin-left: auto; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.side nav svg { width: 18px; height: 18px; flex: none; opacity: .8; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 14px; padding: 14px 26px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.top .burger { display: none; width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.top h1 { font-size: 20px; font-weight: 800; }
.top .who { margin-left: auto; display: flex; gap: 12px; align-items: center; font-size: 14px; color: var(--text-2); }
.top .who b { color: var(--sea); }
.content { padding: 24px 26px 60px; display: grid; gap: 20px; align-content: start; }

@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 270px; z-index: 50; transform: translateX(-100%); transition: transform .35s var(--ease); }
  body.nav-open .side { transform: none; box-shadow: 0 0 0 100vmax rgba(5, 20, 25, .45); }
  .top .burger { display: inline-grid; place-items: center; }
  .content { padding: 18px 16px 50px; }
  .top { padding: 12px 16px; }
  .top .who span { display: none; }
}

/* Komponen */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: 0 18px 40px -34px rgba(14, 46, 56, .35); min-width: 0; }
.card > h2 { font-size: 17px; font-weight: 700; margin-bottom: 14px; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 1100px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.welcome { position: relative; overflow: hidden; border-radius: 20px; padding: 26px 28px; color: #fff; background: var(--sea) center 42% / cover no-repeat; isolation: isolate; display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: end; }
.welcome::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(11,37,45,.94), rgba(11,37,45,.78) 50%, rgba(11,37,45,.3)); }
.welcome .k { font: 500 11px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-soft); }
.welcome h2 { color: #fff; font-size: clamp(24px, 2.4vw, 32px); font-weight: 800; margin: 10px 0 6px; }
.welcome p { margin: 0; color: #cfe0e0; max-width: 56ch; }
.welcome .acts { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 860px) { .welcome { grid-template-columns: 1fr; } }

.tile { display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; padding: 18px 20px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); text-decoration: none; color: var(--text); position: relative; overflow: hidden; transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.tile:hover { transform: translateY(-3px); box-shadow: 0 24px 46px -30px rgba(14, 46, 56, .5); }
.tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--tile, var(--sea-3)); }
.tile .n { font: 800 32px/1 var(--f-display); color: var(--sea); font-variant-numeric: tabular-nums; }
.tile .t { grid-column: 1 / -1; color: var(--text-2); font-weight: 600; font-size: 14px; }
.tile .ic { grid-row: 1; grid-column: 2; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--tile, #2b6170) 14%, white); color: var(--tile, var(--sea-3)); }
.tile .ic svg { width: 20px; height: 20px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 10px; border: 1px solid transparent; font: 600 14px var(--f-body); text-decoration: none; cursor: pointer; transition: background-color .2s, transform .3s var(--ease), border-color .2s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-pri { background: var(--accent); color: #fff; }
.btn-pri:hover { background: var(--accent-hover); color: #fff; }
.btn-sea { background: var(--sea-2); color: #fff; }
.btn-sea:hover { background: var(--sea); color: #fff; }
.btn-ghost { background: #fff; color: var(--sea); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--sea); }
.btn-glass { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.25); }
.btn-sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
@media (pointer: coarse) { .btn { min-height: 44px; } }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar .grow { flex: 1 1 220px; }
input, select, textarea { font: 500 15px/1.4 var(--f-body); color: var(--sea); background: #fff; border: 1.5px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; width: 100%; transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--sea-3); box-shadow: 0 0 0 3px rgba(43, 97, 112, .15); }
.toolbar input, .toolbar select { width: auto; }
.toolbar .grow input { width: 100%; }
textarea { min-height: 110px; resize: vertical; }
.form { display: grid; gap: 14px; }
.form .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.field { display: grid; gap: 5px; min-width: 0; }
.field label { font-weight: 600; font-size: 13.5px; color: var(--sea); }
.field .hint { font-size: 12.5px; color: var(--text-2); }
.req { color: var(--accent); }
.check { display: inline-flex; gap: 8px; align-items: center; font-weight: 500; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { background: #f3f7f6; text-align: left; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--sea); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: #f7faf9; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .mono { font-family: var(--f-mono); font-size: 12.5px; }
.tbl .ava { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: #e3ece9; vertical-align: middle; }
.muted { color: var(--text-2); }
.empty { padding: 26px; text-align: center; color: var(--text-2); }

.pill { display: inline-flex; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pill.info { background: #e1eef3; color: #1d5163; } .pill.warn { background: #fbf0d9; color: #7a5410; }
.pill.ok { background: #e3f1ea; color: #14513a; } .pill.done { background: #e9edec; color: #3e5c64; }
.pill.danger { background: #fbe9e5; color: #8a2a1b; } .pill.muted { background: #eef1f1; color: #5b6f73; }

.note { padding: 12px 16px; border-radius: 12px; font-weight: 500; }
.note.ok { background: #e3f1ea; color: #14513a; border: 1px solid #b6d9c6; }
.note.bad { background: #fbe9e5; color: #8a2a1b; border: 1px solid #f0c3b9; }

.kv { display: grid; grid-template-columns: 170px 1fr; gap: 7px 14px; margin: 0; }
.kv dt { color: var(--text-2); } .kv dd { margin: 0; font-weight: 600; }
@media (max-width: 600px) { .kv { grid-template-columns: 1fr; } .kv dd { margin-bottom: 6px; } }

.pager { display: flex; gap: 6px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 38px; height: 38px; display: inline-grid; place-items: center; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: #fff; text-decoration: none; color: var(--sea); font-weight: 600; }
.pager .cur { background: var(--sea); color: #fff; border-color: var(--sea); }

.spark { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding-top: 10px; }
.spark div { flex: 1; display: grid; gap: 6px; justify-items: center; align-content: end; height: 100%; }
.spark i { display: block; width: 100%; max-width: 30px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--sea-3), var(--sea)); min-height: 3px; }
.spark span { font: 500 10px var(--f-mono); color: var(--text-2); }

.menu-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.menu-map ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.menu-map li { display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: 14px; }

/* Halaman masuk */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; }
.auth .vis { background: var(--sea) center 40% / cover no-repeat; position: relative; display: flex; align-items: flex-end; padding: 52px; isolation: isolate; }
.auth .vis::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(14,46,56,.05) 30%, rgba(14,46,56,.85)); }
.auth .vis b { display: block; font: 800 clamp(60px, 8vw, 120px)/.9 var(--f-display); color: #fff; letter-spacing: -.03em; }
.auth .vis p { color: #d7e6e6; font-size: 18px; max-width: 30ch; margin: 12px 0 0; }
.auth .pnl { display: grid; place-items: center; padding: 36px 22px; }
.auth .box { width: min(400px, 100%); }
.auth .id { display: flex; gap: 12px; align-items: center; margin-bottom: 34px; }
.auth .id img { width: 52px; height: 52px; object-fit: contain; }
.auth .id b { font: 800 18px var(--f-display); color: var(--sea); display: block; }
.auth .id small { color: var(--text-2); }
.auth h1 { font-size: 34px; font-weight: 800; margin-bottom: 6px; }
.auth input { height: 50px; }
.auth .btn { width: 100%; height: 50px; border-radius: 999px; font-size: 15px; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth .vis { min-height: 200px; padding: 26px; } .auth .vis b { font-size: 54px; } }

/* Cetak surat */
.print-bar { position: sticky; top: 0; background: var(--sea); color: #fff; padding: 12px 20px; display: flex; gap: 10px; align-items: center; justify-content: space-between; z-index: 5; }
.print-bar b { font-family: var(--f-display); }
.kertas { width: 210mm; min-height: 297mm; margin: 24px auto; background: #fff; padding: 18mm 20mm; box-shadow: 0 20px 60px -30px rgba(0,0,0,.4); font: 12pt/1.5 'Times New Roman', serif; color: #000; }
.kertas table { border-collapse: collapse; }
.kertas .kop { width: 100%; }
.kertas .kop-logo { width: 90px; vertical-align: middle; }
.kertas .kop-logo img { width: 80px; height: auto; }
.kertas .kop-teks { text-align: center; font-weight: 700; line-height: 1.3; }
.kertas .kop-besar { font-size: 16pt; }
.kertas .kop-alamat { font-weight: 400; font-size: 10pt; }
.kertas .kop-garis { border: 0; border-top: 3px double #000; margin: 6px 0 14px; }
@media print { .print-bar { display: none; } body { background: #fff; } .kertas { margin: 0; box-shadow: none; padding: 12mm 16mm; width: auto; min-height: 0; } @page { size: A4; margin: 0; } }
@media (max-width: 860px) { .kertas { width: auto; min-height: 0; margin: 12px; padding: 18px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
