/* =========================================================
   SIMADU — palet mengikuti majalah Rancangan Aksi Perubahan (navy, biru, emas)
   ========================================================= */
:root {
  --navy-900: #061d4a; --navy-800: #0a2a66; --navy-700: #0f3a86; --navy-600: #1e56c9; --navy-500: #2f6be0;
  --gold: #f6bb35; --gold-600: #e89818; --gold-100: #fff4d6;
  --bg: #eef5ff; --surface: #ffffff; --surface-2: #f8fafc; --line: #dbe5f3; --line-2: #e9f0fa;
  --ink: #0f1e3d; --ink-2: #44526a; --muted: #7a879c;
  --green: #169b5a; --green-bg: #e3f6ee; --amber: #b25e09; --amber-bg: #fdf1dc; --red: #c0282d; --red-bg: #fde8e8;
  --blue: #1e63d6; --blue-bg: #e4eeff; --purple: #7a4fd6; --purple-bg: #efe8fb; --teal: #0e7c86; --teal-bg: #e0f4f5; --gray-bg: #edf0f4;
  --radius: 14px; --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(16, 32, 64, .05), 0 4px 16px rgba(16, 32, 64, .06);
  --shadow-lg: 0 10px 40px rgba(8, 29, 58, .18);
  --font: "Poppins", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--ink); background: var(--bg); }
a { color: var(--navy-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0; }
img { max-width: 100%; }
code, .mono { font-family: Consolas, "Cascadia Mono", monospace; font-size: .92em; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.r { text-align: right; }
.ic { flex: none; vertical-align: middle; }
.txt-red { color: var(--red); font-weight: 600; }
.txt-amber { color: var(--amber); font-weight: 600; }
.hint { color: var(--muted); font-size: 12.5px; margin: 8px 0 0; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.hint.pad { padding: 0 18px 14px; }
.lead { font-size: 15px; color: var(--ink-2); }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 262px; flex: none; background: linear-gradient(180deg, var(--navy-800), var(--navy-900));
  color: #c9d5ea; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 40;
}
.brand { display: flex; gap: 12px; align-items: center; padding: 20px 20px 18px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.07); }
.brand:hover { text-decoration: none; }
.brand img { width: 42px; height: 42px; object-fit: contain; }
.brand strong { display: block; font-size: 19px; letter-spacing: 2px; }
.brand small { display: block; color: var(--gold); font-size: 11.5px; letter-spacing: .3px; }
.sidebar nav { padding: 10px 12px 20px; flex: 1; }
.nav-group { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.2px; color: #7f93b5; margin: 16px 10px 6px; font-weight: 600; }
.sidebar nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px; color: #c9d5ea; margin: 1px 0; font-size: 13.5px; position: relative; }
.sidebar nav a:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.sidebar nav a.active { background: rgba(212,167,44,.14); color: #fff; font-weight: 600; }
.sidebar nav a.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold); }
.sidebar nav a.active .ic { color: var(--gold); }
.pill { margin-left: auto; background: var(--gold); color: var(--navy-900); font-style: normal; font-size: 11px; font-weight: 700; border-radius: 20px; padding: 0 7px; line-height: 18px; }
.sidebar-foot { padding: 14px 20px; font-size: 11px; color: #7f93b5; border-top: 1px solid rgba(255,255,255,.07); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 62px; display: flex; align-items: center; gap: 12px; padding: 0 24px; background: rgba(255,255,255,.9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.topbar-title { font-weight: 600; font-size: 15px; color: var(--ink-2); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn { position: relative; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn .dot { position: absolute; top: -5px; right: -6px; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 700; border-radius: 20px; padding: 0 5px; line-height: 17px; border: 2px solid #fff; }
.user-btn { display: flex; align-items: center; gap: 10px; background: none; border: 0; cursor: pointer; padding: 4px 6px; border-radius: 10px; text-align: left; font: inherit; color: inherit; }
.user-btn:hover { background: var(--surface-2); }
.user-btn b { display: block; font-size: 13px; }
.user-btn small { display: block; font-size: 11.5px; color: var(--muted); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--navy-600), var(--navy-800)); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; border: 2px solid var(--gold); }
.dropdown { position: relative; }
.dropdown-menu { display: none; position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); min-width: 210px; padding: 6px; z-index: 50; }
.dropdown-menu.wide { width: 380px; max-width: calc(100vw - 24px); }
.dropdown.open .dropdown-menu { display: block; }
.dd-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; font-weight: 600; font-size: 13px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }
.dd-empty { padding: 18px 10px; color: var(--muted); text-align: center; }
.dd-item { display: flex; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--ink); }
.dd-item:hover { background: var(--surface-2); text-decoration: none; }
.dd-item b { display: block; font-size: 13px; font-weight: 600; }
.dd-item small { display: block; color: var(--muted); font-size: 12px; }
.dd-item .ic { margin-top: 2px; }
.dd-item.t-danger .ic { color: var(--red); } .dd-item.t-warning .ic { color: var(--amber); } .dd-item.t-info .ic { color: var(--blue); }
.dd-link { display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 10px; border-radius: 8px; color: var(--ink); background: none; border: 0; font: inherit; cursor: pointer; text-align: left; }
.dd-link:hover { background: var(--surface-2); text-decoration: none; }
.content { padding: 24px; flex: 1; max-width: 1480px; width: 100%; }
.foot { padding: 14px 24px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }
.only-mobile { display: none; }
.backdrop { display: none; }

/* ---------- Page head ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; font-weight: 700; color: var(--navy-800); }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; transition: background .15s, box-shadow .15s, transform .05s; color: var(--ink); background: #fff; }
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy-600); color: #fff; box-shadow: 0 2px 6px rgba(27,75,143,.3); }
.btn-primary:hover { background: var(--navy-700); }
.btn-light { background: #fff; border-color: var(--line); color: var(--ink-2); }
.btn-light:hover { background: var(--surface-2); }
.btn-gold { background: var(--gold); color: var(--navy-900); }
.btn-gold:hover { background: #e2b73c; }
.btn-ghost-light { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.25); }
.btn-ghost-light:hover { background: rgba(255,255,255,.18); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger-outline { background: #fff; color: var(--red); border-color: #f1c0c0; }
.btn-danger-outline:hover { background: var(--red-bg); }
.btn-sm { height: 31px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.icon-link { display: inline-flex; padding: 5px; border-radius: 7px; color: var(--ink-2); background: none; border: 0; cursor: pointer; }
.icon-link:hover { background: var(--line-2); }
.icon-link.danger:hover { color: var(--red); background: var(--red-bg); }
form.inline { display: inline; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 18px; }
.card.p0 { padding: 0; overflow: hidden; }
.card.accent { border-top: 3px solid var(--gold); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head.pad { padding: 16px 20px 0; }
.card-head h3, .card-title { font-size: 15px; font-weight: 700; color: var(--navy-800); display: flex; align-items: center; gap: 8px; }
.card-title { margin: 0 0 14px; }
.card-title small { font-weight: 400; }
.link { font-size: 13px; font-weight: 600; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-2 > .card, .grid-2 > div > .card:last-child { margin-bottom: 18px; }
.empty { text-align: center; color: var(--muted); padding: 24px 10px; }
.empty .ic { color: var(--green); }
.empty-state { text-align: center; padding: 48px 20px; }
.empty-state .ic { color: var(--muted); }
.empty-row { text-align: center; color: var(--muted); padding: 28px !important; }

/* ---------- Hero ---------- */
.hero-banner { position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
  background: radial-gradient(circle at 85% -20%, rgba(212,167,44,.35), transparent 45%), linear-gradient(120deg, var(--navy-700), var(--navy-900));
  color: #fff; border-radius: 18px; padding: 26px 30px; margin-bottom: 20px; box-shadow: var(--shadow-lg); }
.hero-banner::after { content: ""; position: absolute; right: -60px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%; border: 40px solid rgba(255,255,255,.04); }
.hero-banner h1 { font-size: 24px; margin: 4px 0 6px; }
.hero-banner p { margin: 0; color: #cdd8ec; }
.hero-banner b { color: var(--gold); }
.hb-kicker { font-size: 12px; text-transform: uppercase; letter-spacing: 1.4px; color: var(--gold); font-weight: 600; }
.hb-actions { display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { display: flex; gap: 12px; min-width: 0; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); color: var(--ink); transition: transform .12s, box-shadow .12s; }
a.stat:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat small { display: block; color: var(--muted); font-size: 12px; }
.stat b { display: block; font-size: 26px; line-height: 1.15; color: var(--navy-800); }
.stat b.sm { font-size: 16px; white-space: nowrap; }
.stat span { display: block; font-size: 12px; color: var(--muted); }
.stats.small .stat b { font-size: 20px; }
.stat-ic { width: 46px; height: 46px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.c-navy { background: #e3eaf6; color: var(--navy-600); } .c-green { background: var(--green-bg); color: var(--green); }
.c-amber { background: var(--amber-bg); color: var(--amber); } .c-blue { background: var(--blue-bg); color: var(--blue); }
.c-purple { background: var(--purple-bg); color: var(--purple); } .c-teal { background: var(--teal-bg); color: var(--teal); }

/* ---------- Reminders ---------- */
.reminders { display: flex; flex-direction: column; gap: 8px; }
.rem { display: flex; gap: 12px; align-items: flex-start; padding: 11px 12px; border-radius: 11px; border: 1px solid var(--line); border-left-width: 4px; color: var(--ink); background: #fff; }
.rem:hover { text-decoration: none; background: var(--surface-2); }
.rem b { display: block; font-size: 13.5px; }
.rem small { display: block; color: var(--muted); font-size: 12.5px; }
.rem em { margin-left: auto; font-style: normal; font-size: 11px; color: var(--muted); white-space: nowrap; }
.rem-ic { width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.rem.t-danger { border-left-color: var(--red); } .rem.t-danger .rem-ic { background: var(--red-bg); color: var(--red); }
.rem.t-warning { border-left-color: var(--gold); } .rem.t-warning .rem-ic { background: var(--amber-bg); color: var(--amber); }
.rem.t-info { border-left-color: var(--blue); } .rem.t-info .rem-ic { background: var(--blue-bg); color: var(--blue); }
.rem-group { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); margin: 14px 0 8px; }
.rem-group em { font-style: normal; background: var(--gray-bg); border-radius: 10px; padding: 0 7px; margin-left: 4px; }

/* ---------- Agenda ---------- */
.agenda { display: flex; flex-direction: column; gap: 8px; }
.ag { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); }
.ag:hover { background: var(--surface-2); text-decoration: none; }
.ag-date { width: 48px; height: 50px; border-radius: 10px; background: var(--navy-800); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; }
.ag-date b { font-size: 18px; line-height: 1; } .ag-date small { font-size: 11px; color: var(--gold); text-transform: uppercase; }
.ag-body { flex: 1; min-width: 0; }
.ag-body b { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-body small { display: block; color: var(--muted); font-size: 12px; }

/* ---------- Chart ---------- */
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.lg-servis { background: var(--navy-600); } .lg-bbm { background: var(--gold); }
.barchart { display: flex; align-items: flex-end; gap: 10px; height: 240px; padding: 10px 4px 0; border-bottom: 1px solid var(--line); }
.bc-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; min-width: 0; }
.bc-val { font-size: 10.5px; color: var(--muted); height: 16px; white-space: nowrap; }
.bc-stack { height: 190px; flex: none; width: 100%; max-width: 44px; display: flex; flex-direction: column; justify-content: flex-end; }
.bc-servis { background: linear-gradient(180deg, var(--navy-500), var(--navy-600)); border-radius: 0 0 4px 4px; }
.bc-bbm { background: linear-gradient(180deg, #e6be4f, var(--gold)); border-radius: 5px 5px 0 0; }
.bc-lbl { font-size: 11.5px; color: var(--muted); padding: 6px 0 4px; }

/* ---------- Fleet ---------- */
.fleet { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.fleet-card { border: 1px solid var(--line); border-radius: 13px; padding: 14px; color: var(--ink); background: linear-gradient(180deg, #fff, var(--surface-2)); border-top: 4px solid var(--green); transition: transform .12s, box-shadow .12s; }
.fleet-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.fleet-card.st-dipakai { border-top-color: var(--blue); } .fleet-card.st-servis { border-top-color: var(--amber); }
.fc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.fc-name { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.fc-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.fc-line { font-size: 12px; color: var(--ink-2); display: flex; gap: 6px; align-items: center; padding: 2px 0; }
.fc-line.warn { color: var(--amber); font-weight: 600; }
.plate { display: inline-block; background: #111; color: #fff; font-family: Consolas, monospace; font-weight: 700; letter-spacing: 1px; font-size: 12.5px; padding: 2px 8px; border-radius: 5px; border: 2px solid #fff; outline: 1px solid #111; white-space: nowrap; }
.plate.big { font-size: 17px; padding: 4px 12px; }

/* ---------- Badges & chips ---------- */
.badge { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 20px; white-space: nowrap; line-height: 18px; }
.b-green { background: var(--green-bg); color: var(--green); } .b-amber { background: var(--amber-bg); color: var(--amber); }
.b-red { background: var(--red-bg); color: var(--red); } .b-blue { background: var(--blue-bg); color: var(--blue); }
.b-purple { background: var(--purple-bg); color: var(--purple); } .b-teal { background: var(--teal-bg); color: var(--teal); }
.b-navy { background: #e3eaf6; color: var(--navy-700); } .b-gray { background: var(--gray-bg); color: #56637a; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { padding: 6px 13px; border-radius: 20px; background: #fff; border: 1px solid var(--line); color: var(--ink-2); font-size: 13px; font-weight: 500; }
.chip:hover { text-decoration: none; border-color: var(--navy-500); }
.chip.on { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }
.chip em { font-style: normal; font-size: 11px; background: rgba(0,0,0,.07); border-radius: 10px; padding: 0 6px; margin-left: 3px; }
.chip.on em { background: rgba(255,255,255,.2); }

/* ---------- Forms ---------- */
.field { display: block; margin-bottom: 13px; }
.field > span { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.input { width: 100%; height: 39px; padding: 0 12px; border: 1px solid #d3dae4; border-radius: 9px; font: inherit; color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s; }
textarea.input { height: auto; padding: 9px 12px; resize: vertical; }
select.input { padding-right: 30px; }
input[type=file].input { padding: 7px 10px; height: auto; }
.input:focus { outline: none; border-color: var(--navy-500); box-shadow: 0 0 0 3px rgba(42,98,176,.15); }
.input.upper { text-transform: uppercase; }
.input.big-num { font-size: 18px; font-weight: 700; height: 46px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 13.5px; margin: 6px 0 10px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--navy-600); }
.row-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 16px; }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.form-grid .card { margin-bottom: 16px; }
.form-actions { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 30%); padding: 14px 0 6px; display: flex; justify-content: flex-end; }
.form-narrow { max-width: 760px; }
.fs { border: 1px dashed var(--line); border-radius: 10px; padding: 10px 14px 2px; margin: 0 0 12px; }
.fs legend { font-size: 12px; color: var(--muted); padding: 0 6px; }
.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 14px; }
.filters .input { width: auto; min-width: 150px; }
.filters .search { flex: 1; min-width: 220px; position: relative; }
.filters .search .ic { position: absolute; left: 11px; top: 12px; color: var(--muted); }
.filters .search .input { width: 100%; padding-left: 34px; }
.inline-label { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.quick { display: inline-flex; gap: 12px; font-size: 13px; margin-left: auto; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.inline-form .input { width: auto; flex: 1; min-width: 160px; }
details.reject { margin-top: 12px; }
details.reject summary { cursor: pointer; color: var(--red); font-size: 13px; font-weight: 600; margin-bottom: 8px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 700; background: var(--surface-2); padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.table tbody tr:hover td { background: #fafbfd; }
.table tr.clickable { cursor: pointer; }
.table tfoot th { background: var(--surface-2); color: var(--ink); font-size: 13px; text-transform: none; letter-spacing: 0; border-top: 2px solid var(--line); }
.table.th.r, .table th.r { text-align: right; }
.table.compact td, .table.compact th { padding: 7px 10px; }
.table small { font-size: 12px; }
.row-danger td { background: #fff7f7; } .row-warning td { background: #fffbf1; }
.veh { display: flex; gap: 10px; align-items: center; }
.veh img, .veh-ph { width: 46px; height: 34px; border-radius: 7px; object-fit: cover; flex: none; background: var(--line-2); display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.veh small { display: block; color: var(--muted); margin-top: 3px; }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; font-size: 13px; }
.pages { display: flex; gap: 4px; }
.pages a { min-width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid var(--line); color: var(--ink-2); }
.pages a.on { background: var(--navy-700); color: #fff; border-color: var(--navy-700); }
.pages .dots { padding: 6px 4px; color: var(--muted); }

/* ---------- Alerts ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 11px; margin-bottom: 14px; font-size: 13.5px; border: 1px solid; transition: opacity .4s; }
.alert-success { background: var(--green-bg); color: #0b5d42; border-color: #b6e5d0; }
.alert-danger { background: var(--red-bg); color: #962025; border-color: #f4c0c0; }
.alert-warning { background: var(--amber-bg); color: #8a4a06; border-color: #f3d7a4; }
.alert-info { background: var(--blue-bg); color: #184c9d; border-color: #c3d6f5; }

/* ---------- Detail kendaraan ---------- */
.detail-top { display: grid; grid-template-columns: 380px 1fr; gap: 18px; }
.vehicle-card { padding: 0; overflow: hidden; }
.vc-photo { position: relative; height: 200px; background: linear-gradient(135deg, var(--navy-700), var(--navy-900)); }
.vc-photo img { width: 100%; height: 100%; object-fit: cover; }
.vc-photo .ph { height: 100%; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.25); }
.vc-photo .plate { position: absolute; left: 16px; bottom: 14px; }
.vc-badges { padding: 14px 18px 0; display: flex; gap: 6px; flex-wrap: wrap; }
.kv-list { display: grid; grid-template-columns: 130px 1fr; gap: 7px 12px; margin: 14px 18px 18px; font-size: 13px; }
.card .kv-list { margin: 10px 0 0; }
.vehicle-card .kv-list { margin: 14px 18px 18px; }
.kv-list.wide { grid-template-columns: 150px 1fr; }
.kv-list dt { color: var(--muted); }
.kv-list dd { margin: 0; font-weight: 500; }
.mini-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.mini-stats > div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); }
.mini-stats small { display: block; color: var(--muted); font-size: 11.5px; }
.mini-stats b { display: block; font-size: 22px; color: var(--navy-800); }
.mini-stats b.sm { font-size: 15px; padding: 4px 0; }
.mini-stats span { font-size: 11.5px; color: var(--muted); }
.doc-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.doc-chip { border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; border-left: 4px solid var(--line); }
.doc-chip small { display: block; font-size: 11.5px; color: var(--muted); }
.doc-chip b { display: block; font-size: 14px; }
.doc-chip em { font-style: normal; font-size: 12px; color: var(--muted); }
.doc-chip.ok { border-left-color: var(--green); } .doc-chip.warning { border-left-color: var(--gold); background: #fffbf1; } .doc-chip.warning em { color: var(--amber); font-weight: 600; }
.doc-chip.danger { border-left-color: var(--red); background: #fff7f7; } .doc-chip.danger em { color: var(--red); font-weight: 600; }
.next-servis b { display: block; } .next-servis small { display: block; color: var(--muted); }
.progress { height: 8px; background: var(--line-2); border-radius: 10px; overflow: hidden; margin: 10px 0 4px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--green), #35b584); border-radius: 10px; }
.progress i.mid { background: linear-gradient(90deg, var(--gold), #e8be46); } .progress i.bad { background: var(--red); }
.progress-wrap { flex: 1; min-width: 220px; }
.progress-wrap small { color: var(--muted); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: -4px -4px 14px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 10px 14px; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--navy-700); border-bottom-color: var(--gold); }
.tab-pane { display: none; } .tab-pane.on { display: block; }
.tabs-nav { display: flex; gap: 4px; margin-bottom: 14px; background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 4px; width: fit-content; }
.tabs-nav a { padding: 7px 16px; border-radius: 8px; font-weight: 600; color: var(--ink-2); font-size: 13px; }
.tabs-nav a.on { background: var(--navy-700); color: #fff; }
.tabs-nav a:hover { text-decoration: none; }
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.doc-item { position: relative; border: 1px solid var(--line); border-radius: 11px; padding: 10px; }
.doc-item b { display: block; font-size: 13px; margin-top: 8px; } .doc-item small { color: var(--muted); font-size: 11.5px; }
.doc-thumb { height: 110px; border-radius: 8px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--muted); }
.doc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.btn-x { position: absolute; top: 14px; right: 14px; border: 0; background: rgba(255,255,255,.9); border-radius: 6px; padding: 4px; cursor: pointer; color: var(--red); }
.danger-zone { margin: 4px 0 18px; text-align: right; }
.evidence { max-width: 100%; max-height: 320px; border-radius: 10px; border: 1px solid var(--line); margin: 6px 0 12px; }

/* ---------- Steps ---------- */
.steps-h { display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.steps-h .st { text-align: center; position: relative; padding: 0 6px; }
.steps-h .st::before { content: ""; position: absolute; top: 16px; left: -50%; width: 100%; height: 3px; background: var(--line); z-index: 0; }
.steps-h .st:first-child::before { display: none; }
.steps-h .st.done::before { background: var(--green); } .steps-h .st.bad::before { background: var(--red); }
.st-dot { position: relative; z-index: 1; width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 3px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: var(--muted); }
.st.done .st-dot { background: var(--green); border-color: var(--green); color: #fff; }
.st.bad .st-dot { background: var(--red); border-color: var(--red); color: #fff; }
.steps-h b { display: block; margin-top: 6px; font-size: 13px; }
.steps-h small { display: block; color: var(--muted); font-size: 11.5px; }

/* ---------- Cek harian ---------- */
.checklist-grid { border: 1px solid var(--line); border-radius: 12px; margin: 4px 0 14px; overflow: hidden; }
.ck-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 14px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.ck-row:last-child { border-bottom: 0; }
.ck-row:nth-child(odd) { background: var(--surface-2); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: #fff; }
.seg label { cursor: pointer; }
.seg input { display: none; }
.seg span { display: block; padding: 5px 12px; font-size: 12.5px; font-weight: 600; color: var(--muted); border-left: 1px solid var(--line); }
.seg label:first-child span { border-left: 0; }
.seg-ok input:checked + span { background: var(--green); color: #fff; }
.seg-warn input:checked + span { background: var(--gold); color: var(--navy-900); }
.seg-bad input:checked + span { background: var(--red); color: #fff; }
.prio-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.prio { border: 2px solid var(--line); border-radius: 11px; padding: 10px 12px; cursor: pointer; }
.prio input { display: none; }
.prio b { display: block; } .prio small { color: var(--muted); font-size: 11.5px; }
.prio:has(input:checked) { border-color: var(--navy-500); background: var(--blue-bg); }
.prio-darurat:has(input:checked) { border-color: var(--red); background: var(--red-bg); }
.prio-tinggi:has(input:checked) { border-color: var(--gold); background: var(--amber-bg); }

/* ---------- Kalender ---------- */
.cal-nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.cal-nav h3 { font-size: 17px; min-width: 150px; text-align: center; color: var(--navy-800); }
.cal-nav .legend { margin-left: auto; }
.lg-pj { background: var(--navy-500); } .lg-run { background: var(--purple); } .lg-done { background: #9fb4d6; } .lg-js { background: repeating-linear-gradient(45deg, var(--gold), var(--gold) 3px, #fff3cf 3px, #fff3cf 6px); } .lg-sv { background: var(--amber); }
.timeline-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 11px; }
.timeline { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 12px; }
.timeline th, .timeline td { border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); text-align: center; min-width: 30px; height: 44px; padding: 0; position: relative; }
.timeline th { background: var(--surface-2); font-weight: 700; color: var(--ink-2); height: 40px; }
.timeline th small { display: block; font-weight: 500; color: var(--muted); font-size: 10px; }
.timeline .tl-veh { position: sticky; left: 0; z-index: 2; background: #fff; text-align: left; padding: 6px 12px; min-width: 210px; height: auto; }
.timeline th.tl-veh { background: var(--surface-2); }
.timeline .tl-veh small { display: block; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
.timeline .wk { background: #f6f7fa; }
.timeline th.today { background: var(--gold); color: var(--navy-900); }
.timeline th.today small { color: var(--navy-900); }
.timeline td.c-pj { background: var(--navy-500); } .timeline td.c-run { background: var(--purple); } .timeline td.c-done { background: #9fb4d6; }
.timeline td.c-sv { background: var(--amber); } .timeline td.c-js { background: repeating-linear-gradient(45deg, var(--gold), var(--gold) 3px, #fff3cf 3px, #fff3cf 6px); }
.timeline td:not(.tl-veh) a { position: absolute; inset: 0; }
.timeline td em { font-style: normal; position: absolute; top: 2px; right: 2px; background: #fff; color: var(--ink); border-radius: 8px; font-size: 9px; padding: 0 4px; font-weight: 700; }

/* ---------- SOP ---------- */
.sop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.sop-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; color: var(--ink); box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s; }
.sop-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.sop-card small { display: block; color: var(--gold-600); font-weight: 700; font-size: 11.5px; letter-spacing: .5px; margin: 10px 0 4px; }
.sop-card b { display: block; font-size: 15px; color: var(--navy-800); }
.sop-card p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.sop-ic { width: 42px; height: 42px; border-radius: 11px; background: var(--gold-100); color: var(--gold-600); display: flex; align-items: center; justify-content: center; }
.sop-doc { max-width: 880px; font-size: 14.5px; }
.sop-doc h3 { font-size: 16px; color: var(--navy-800); margin: 20px 0 8px; padding-bottom: 6px; border-bottom: 2px solid var(--gold-100); }
.sop-doc ol.steps { counter-reset: s; list-style: none; padding: 0; }
.sop-doc ol.steps li { counter-increment: s; position: relative; padding: 8px 0 8px 46px; border-left: 2px solid var(--line); margin-left: 16px; }
.sop-doc ol.steps li::before { content: counter(s); position: absolute; left: -17px; top: 6px; width: 32px; height: 32px; border-radius: 50%; background: var(--navy-700); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 13px; }
.flow-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.flow-steps li { text-align: center; padding: 14px 8px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); position: relative; }
.flow-steps li .ic { color: var(--navy-600); width: 26px; height: 26px; }
.flow-steps b { display: block; font-size: 13px; margin: 6px 0 2px; color: var(--navy-800); }
.flow-steps small { font-size: 11.5px; color: var(--muted); }

/* ---------- Notifikasi ---------- */
.notif-list { display: flex; flex-direction: column; }
.notif { display: block; padding: 11px 12px; border-bottom: 1px solid var(--line-2); color: var(--ink); position: relative; }
.notif:hover { background: var(--surface-2); text-decoration: none; }
.notif b { display: block; font-size: 13.5px; } .notif small { display: block; color: var(--muted); } .notif em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.notif.unread { background: #f5f8ff; } .notif.unread::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; background: var(--blue); border-radius: 3px; }

/* ---------- Pengaturan ---------- */
.logo-row { display: flex; gap: 16px; align-items: center; margin-bottom: 8px; }
.logo-row img { width: 72px; height: 72px; object-fit: contain; border: 1px solid var(--line); border-radius: 12px; padding: 6px; background: var(--surface-2); }
.logo-row .field { flex: 1; }
pre.code { background: var(--navy-900); color: #e3ecff; padding: 12px 14px; border-radius: 9px; overflow-x: auto; }

/* ---------- Login ---------- */
.login-body { background: var(--navy-900); }
.login-wrap { display: grid; grid-template-columns: 1.15fr 1fr; min-height: 100vh; }
.login-hero { position: relative; overflow: hidden; color: #fff; display: flex; align-items: center; padding: 48px;
  background: radial-gradient(circle at 90% 10%, rgba(212,167,44,.35), transparent 40%), radial-gradient(circle at 0% 100%, rgba(42,98,176,.5), transparent 50%), linear-gradient(140deg, var(--navy-700), var(--navy-900)); }
.login-hero::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px); background-size: 36px 36px; }
.hero-inner { position: relative; z-index: 1; max-width: 560px; }
.hero-logo { width: 74px; height: 74px; object-fit: contain; margin-bottom: 18px; }
.hero-kicker { color: var(--gold); font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; font-size: 12.5px; }
.login-hero h1 { font-size: 54px; letter-spacing: 6px; margin: 6px 0 4px; }
.hero-sub { font-size: 17px; color: #cdd8ec; margin: 0 0 28px; }
.pilar { list-style: none; padding: 0; margin: 0 0 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pilar li { display: flex; gap: 12px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.09); border-radius: 13px; padding: 13px; backdrop-filter: blur(4px); }
.pilar .ic { color: var(--gold); margin-top: 2px; }
.pilar b { display: block; font-size: 13.5px; } .pilar span { display: block; font-size: 12px; color: #aebcd6; }
.hero-tag { display: inline-block; border: 1px solid rgba(212,167,44,.5); color: var(--gold); border-radius: 20px; padding: 6px 16px; font-size: 12.5px; letter-spacing: 1px; }
.login-form { background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 400px; background: #fff; border-radius: 18px; padding: 32px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.auth-card h2 { font-size: 24px; color: var(--navy-800); }
.auth-card > p.muted { margin: 4px 0 20px; }
.auth-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; background: linear-gradient(140deg, var(--navy-700), var(--navy-900)); }
.auth-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; }
.auth-brand img { width: 48px; }
.auth-brand strong { display: block; font-size: 20px; letter-spacing: 2px; color: var(--navy-800); }
.auth-brand small { color: var(--muted); }
.checklist { padding-left: 4px; list-style: none; font-size: 13px; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .detail-top { grid-template-columns: 1fr; }
  .flow-steps { grid-template-columns: repeat(4, 1fr); }
  .mini-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .backdrop { display: block; position: fixed; inset: 0; background: rgba(8,29,58,.45); z-index: 35; }
  .only-mobile { display: inline-flex; }
  .grid-2 { grid-template-columns: 1fr; }
  .row-3 { grid-template-columns: 1fr 1fr; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-hero { padding: 36px 24px; }
  .login-hero h1 { font-size: 40px; }
  .prio-pick { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .content { padding: 16px; }
  .topbar { padding: 0 16px; }
  .hide-mobile { display: none; }
  .row-2, .row-3 { grid-template-columns: 1fr; }
  .pilar { grid-template-columns: 1fr; }
  .hero-banner { padding: 20px; }
  .doc-chips { grid-template-columns: 1fr; }
  .flow-steps { grid-template-columns: 1fr 1fr; }
  .steps-h b { font-size: 11.5px; } .steps-h small { display: none; }
  .kv-list, .kv-list.wide { grid-template-columns: 110px 1fr; }
  .barchart { gap: 4px; } .bc-val { display: none; }
  .quick { margin-left: 0; }
}

/* ---------- Cetak dari halaman aplikasi ---------- */
@media print {
  .sidebar, .topbar, .foot, .page-head .actions, .filters, .chips, .no-print, .alert, .danger-zone { display: none !important; }
  body { background: #fff; }
  .content { padding: 0; }
  .card { box-shadow: none; border: 0; }
}

/* Cegah isi grid melebar keluar layar di layar sempit */
.grid-2 > *, .detail-top > * { min-width: 0; }
.rem > div, .ag-body { min-width: 0; flex: 1; }
