/* =====================================================================
   Reservasi Operasional — Design system
   ===================================================================== */
:root {
  --bg: #f4f2ed;
  --surface: #ffffff;
  --surface-2: #faf8f4;
  --ink: #1a1d23;
  --ink-2: #474b54;
  --muted: #858993;
  --line: #e7e3da;
  --line-2: #f1ede6;

  --navy: #16212c;
  --navy-2: #1f2d3a;
  --gold: #c19a55;
  --gold-soft: #f6eedd;

  --primary: #1d2f3f;
  --room: #8a6a3b;
  --room-soft: #f5ede1;
  --vehicle: #1f6f64;
  --vehicle-soft: #e2f0ec;

  --success: #2e7a4e; --success-soft: #e4f3e9;
  --amber: #a86d12;   --amber-soft: #fbf0d9;
  --danger: #b3402e;  --danger-soft: #fbe8e3;
  --info: #2e5d86;    --info-soft: #e5eef7;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(22, 24, 30, .04), 0 6px 24px -8px rgba(22, 24, 30, .08);
  --shadow-lg: 0 24px 60px -20px rgba(16, 22, 30, .35);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sidebar-w: 268px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14.5px; line-height: 1.5; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
.i { flex-shrink: 0; vertical-align: middle; }
[hidden] { display: none !important; }

/* Utilitas */
.muted { color: var(--muted); }
.small, small { font-size: 12.5px; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 12.5px; letter-spacing: .01em; }
.d-block { display: block; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.inline { display: inline; }
.mt-8 { margin-top: 8px; }
.text-danger { color: var(--danger); }
.strong { font-weight: 600; }
.display { font-family: var(--font-display); font-weight: 500; letter-spacing: -.01em; }
.stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* =============================== Layout =============================== */
.app { display: flex; min-height: 100vh; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.content { padding: 8px 32px 32px; display: flex; flex-direction: column; gap: 20px; flex: 1; }
.app-footer { padding: 16px 32px 24px; color: var(--muted); font-size: 12px; }

.sidebar {
  width: var(--sidebar-w); flex-shrink: 0; background: var(--navy); color: #c9d1da;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 20px 14px 14px;
  background-image: radial-gradient(120% 60% at 0% 0%, rgba(193, 154, 85, .10), transparent 60%);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 20px; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: var(--navy); background: linear-gradient(135deg, #e6c98d, var(--gold)); box-shadow: 0 6px 16px -6px rgba(193, 154, 85, .7); }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { color: #fff; font-size: 15px; font-weight: 700; }
.brand-text small { color: #8d99a6; font-size: 11.5px; }
.brand-light .brand-text strong { color: #fff; }

.nav { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding-right: 2px; scrollbar-width: thin; scrollbar-color: #2c3b4a transparent; }
.nav-group { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: #6e7c8a; padding: 16px 12px 6px; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: #b8c2cc; font-weight: 500; transition: background .15s, color .15s; }
.nav-link:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.nav-link.active { background: rgba(193, 154, 85, .14); color: #fff; box-shadow: inset 3px 0 0 var(--gold); }
.nav-link.active .i { color: var(--gold); }
.nav-badge { margin-left: auto; background: var(--gold); color: var(--navy); font-size: 11px; font-weight: 700; border-radius: 99px; padding: 1px 8px; }

.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 12px 8px 4px; border-top: 1px solid rgba(255, 255, 255, .07); margin-top: 10px; }
.sidebar-user .who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.sidebar-user .who strong { color: #fff; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .who small { color: #8391a0; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .icon-btn { color: #9aa6b2; }
.sidebar-user .icon-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; font-weight: 700; font-size: 13px; color: var(--navy); background: linear-gradient(135deg, #f1dfb8, #d7b675); }
.avatar.sm { width: 32px; height: 32px; font-size: 12px; }
.avatar.xl { width: 84px; height: 84px; font-size: 28px; margin: 0 auto 14px; }

.topbar { display: flex; align-items: center; gap: 16px; padding: 24px 32px 16px; }
.page-head { flex: 1; min-width: 0; }
.page-head h1 { font-family: var(--font-display); font-weight: 500; font-size: 28px; letter-spacing: -.015em; }
.page-head p { color: var(--muted); margin-top: 2px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.date-chip { display: inline-flex; gap: 8px; align-items: center; padding: 8px 14px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-size: 13px; font-weight: 500; }
.menu-btn { display: none; }
.sidebar-backdrop { display: none; }

/* =============================== Cards =============================== */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head.padded { padding: 18px 22px 0; }
.card-head h3 { font-size: 15.5px; font-weight: 700; }
.link { display: inline-flex; align-items: center; gap: 4px; color: var(--vehicle); font-weight: 600; font-size: 13px; }
.link:hover { text-decoration: underline; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; align-items: start; }

.hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 26px 28px;
  background: linear-gradient(115deg, #fffdf8 0%, #fff 45%, #f3f7f5 100%); position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(193, 154, 85, .16), transparent 70%); pointer-events: none; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--gold); font-weight: 700; }
.hero h2 { font-size: 32px; margin: 2px 0 6px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { display: flex; gap: 14px; align-items: flex-start; padding: 18px; transition: transform .15s, box-shadow .15s; }
a.stat:hover { transform: translateY(-2px); }
.stat small { display: block; color: var(--muted); font-weight: 500; }
.stat strong { display: block; font-family: var(--font-display); font-size: 30px; font-weight: 500; line-height: 1.15; margin: 2px 0; }
.stat strong span { font-size: 17px; color: var(--muted); }
.stat em { font-style: normal; font-size: 12px; color: var(--muted); }
.stat-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.tone-ink { background: #eceef2; color: var(--primary); }
.tone-amber { background: var(--amber-soft); color: var(--amber); }
.tone-room { background: var(--room-soft); color: var(--room); }
.tone-vehicle { background: var(--vehicle-soft); color: var(--vehicle); }

/* =============================== Buttons =============================== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 11px; border: 1px solid transparent; font-weight: 600; font-size: 13.5px; cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s, transform .05s; white-space: nowrap; background: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 14px -8px rgba(29, 47, 63, .8); }
.btn-primary:hover:not(:disabled) { background: #2a4256; }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { border-color: #cfc9bd; color: var(--ink); }
.btn-room { background: var(--room); color: #fff; }
.btn-room:hover { background: #765a31; }
.btn-vehicle { background: var(--vehicle); color: #fff; }
.btn-vehicle:hover { background: #185c53; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #9a3525; }
.btn-ghost-danger { background: var(--surface); color: var(--danger); border-color: #efd0c9; }
.btn-ghost-danger:hover { background: var(--danger-soft); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 9px; gap: 6px; }
.btn-lg { padding: 12px 20px; font-size: 14.5px; }
.btn-block { width: 100%; }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 10px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; transition: background .15s; }
.icon-btn:hover { background: var(--line-2); }
.icon-btn.bordered { border: 1px solid var(--line); background: var(--surface); }
.icon-btn.danger { color: var(--danger); }
.icon-btn.danger:hover { background: var(--danger-soft); }
.btn-group { display: flex; gap: 6px; align-items: center; }

/* =============================== Badges & pills =============================== */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-pending { background: var(--amber-soft); color: var(--amber); }
.badge-approved, .badge-available, .badge-active { background: var(--success-soft); color: var(--success); }
.badge-rejected { background: var(--danger-soft); color: var(--danger); }
.badge-cancelled, .badge-inactive { background: #efefef; color: #7a7d84; }
.badge-sent { background: var(--success-soft); color: var(--success); }
.badge-failed { background: var(--danger-soft); color: var(--danger); }
.badge-completed { background: var(--info-soft); color: var(--info); }
.badge-maintenance, .badge-off { background: var(--amber-soft); color: var(--amber); }

.pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.pill-free { background: var(--success-soft); color: var(--success); }
.pill-busy { background: var(--danger-soft); color: var(--danger); }
.pill-warn { background: var(--amber-soft); color: var(--amber); }
.pill-muted { background: var(--line-2); color: var(--ink-2); }
.pill-role-admin { background: var(--navy); color: #f3e3c2; }
.pill-role-approver { background: var(--gold-soft); color: #8a6420; }
.pill-role-driver { background: var(--vehicle-soft); color: var(--vehicle); }
.pill-role-user { background: var(--line-2); color: var(--ink-2); }

.plate { display: inline-block; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 2px 7px; border-radius: 5px; background: #20252c; color: #fff; white-space: nowrap; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; vertical-align: middle; }
.swatch.lg { width: 30px; height: 30px; border-radius: 9px; }

.type-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.type-chip.room { background: var(--room-soft); color: var(--room); }
.type-chip.vehicle { background: var(--vehicle-soft); color: var(--vehicle); }
.dot-icon { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.dot-icon.room { background: var(--room-soft); color: var(--room); }
.dot-icon.vehicle { background: var(--vehicle-soft); color: var(--vehicle); }

/* =============================== Dashboard lists =============================== */
.agenda { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.agenda-item { display: flex; gap: 16px; align-items: center; padding: 14px 4px; border-bottom: 1px dashed var(--line); position: relative; }
.agenda-item:last-child { border-bottom: 0; }
.agenda-time { width: 56px; flex-shrink: 0; display: flex; flex-direction: column; }
.agenda-time strong { font-size: 15px; }
.agenda-time small { color: var(--muted); }
.agenda-body { flex: 1; min-width: 0; border-left: 3px solid var(--room); padding-left: 14px; }
.agenda-item.vehicle .agenda-body { border-color: var(--vehicle); }
.agenda-item.is-done { opacity: .55; }
.agenda-item.is-now .agenda-body { background: linear-gradient(90deg, rgba(193, 154, 85, .10), transparent); border-radius: 0 8px 8px 0; padding-block: 4px; }
.agenda-title { font-weight: 600; display: block; }
.agenda-title:hover { text-decoration: underline; }
.meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.meta span { display: inline-flex; align-items: center; gap: 5px; }
.live { color: #b8862f !important; font-weight: 700; }

.mini-list, .resource-status { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.mini-list li { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.mini-list a { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mini-list a strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-list a small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.resource-status li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.resource-status li:last-child { border-bottom: 0; }
.resource-status li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.resource-status li small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.empty-inline { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted); padding: 26px 10px; text-align: center; }
.empty-state { text-align: center; padding: 48px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty-state h3 { font-family: var(--font-display); font-weight: 500; font-size: 21px; }
.empty-state p { color: var(--muted); max-width: 420px; margin-bottom: 8px; }
.empty-icon { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; background: var(--gold-soft); color: #9a7331; margin-bottom: 6px; }

/* =============================== Forms =============================== */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field > label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.opt { font-weight: 500; color: var(--muted); font-size: 11.5px; margin-left: 4px; }
.req { color: var(--danger); }
input:not([type]), input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=time], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); outline: none; transition: border-color .15s, box-shadow .15s, background .15s; min-height: 42px;
}
input[type=color] { width: 64px; height: 42px; padding: 4px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); cursor: pointer; }
textarea { resize: vertical; min-height: 70px; }
select { height: 42px; }
input:focus, select:focus, textarea:focus { border-color: #b9a47c; background: #fff; box-shadow: 0 0 0 4px rgba(193, 154, 85, .16); }
.has-error input, .has-error select, .has-error textarea { border-color: var(--danger); }
.field small.error { color: var(--danger); }

.step { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 13px; color: var(--ink); margin: 6px 0 14px; }
.step span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: var(--gold); font-size: 12px; }
.form-card .step:not(:first-child) { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-2); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface-2); font-size: 12.5px; font-weight: 500; cursor: pointer; transition: all .15s; }
.chip input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(193, 154, 85, .35); }

.quick-durations { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 14px; }
.quick-durations button { border: 1px dashed #d6cfc1; background: transparent; border-radius: 8px; padding: 4px 10px; font-size: 12px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.quick-durations button:hover { background: var(--gold-soft); border-style: solid; border-color: var(--gold); }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; min-height: 42px; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 40px; height: 23px; border-radius: 99px; background: #d9d5cd; position: relative; transition: background .2s; flex-shrink: 0; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s; }
.switch input:checked + .track { background: var(--vehicle); }
.switch input:checked + .track::after { transform: translateX(17px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px rgba(193, 154, 85, .35); }
.switch-label { font-size: 13.5px; font-weight: 500; }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 14px; }
.alert-error { background: var(--danger-soft); color: #8b2f20; }
.alert-ok { background: var(--success-soft); color: #22603c; }
.alert-warn { background: var(--amber-soft); color: var(--amber); }
.alert-warn[hidden] { display: none; }

/* =============================== Booking =============================== */
.booking-layout { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 20px; align-items: start; }
.form-card { position: sticky; top: 16px; }
.legend { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.lg { display: inline-block; width: 12px; height: 8px; border-radius: 3px; margin-left: 6px; }
.lg-free { background: #cfe8d8; }
.lg-busy { background: #e9a99b; }
.lg-room { background: var(--room); }
.lg-vehicle { background: var(--vehicle); }
.lg-pending { background: repeating-linear-gradient(45deg, #c9b58f 0 3px, #fff 3px 6px); border: 1px solid #c9b58f; }

.resource-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-top: 14px; transition: opacity .2s; }
.resource-grid.loading, .cal-body.loading { opacity: .45; pointer-events: none; }
.resource-card { text-align: left; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); padding: 16px 16px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 8px; position: relative; transition: border-color .15s, box-shadow .15s, transform .15s; overflow: hidden; }
.resource-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c, var(--room)); }
.resource-card:hover:not(.is-disabled) { border-color: #cdbf9f; transform: translateY(-2px); box-shadow: var(--shadow); }
.resource-card.is-selected { border-color: var(--navy); box-shadow: 0 0 0 4px rgba(22, 33, 44, .1), var(--shadow); }
.resource-card.is-selected::after { content: '✓'; position: absolute; top: 12px; right: 12px; width: 22px; height: 22px; border-radius: 50%; background: var(--navy); color: var(--gold); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.resource-card.is-selected .rc-top .pill { visibility: hidden; }
.resource-card.is-disabled { cursor: not-allowed; background: var(--surface-2); }
.resource-card.is-disabled .rc-name, .resource-card.is-disabled .rc-meta { opacity: .6; }
.rc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rc-name { font-family: var(--font-display); font-size: 19px; font-weight: 500; }
.rc-meta { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12.5px; flex-wrap: wrap; }
.rc-fac { display: flex; flex-wrap: wrap; gap: 4px; min-height: 20px; }
.rc-fac span { font-size: 11px; padding: 2px 8px; border-radius: 6px; background: var(--line-2); color: var(--ink-2); }
.rc-note { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--amber); font-weight: 600; }
.rc-note.ok { color: var(--success); }
.rc-reason { font-size: 12px; color: var(--danger); font-style: normal; display: block; }
.daybar { position: relative; height: 10px; border-radius: 99px; background: #e5f2ea; overflow: hidden; margin-top: 4px; }
.daybar .seg { position: absolute; top: 0; bottom: 0; background: #e9a99b; }
.daybar .seg.pending { background: repeating-linear-gradient(45deg, #e9a99b 0 3px, #f6d9d1 3px 6px); }
.daybar .sel { position: absolute; top: -1px; bottom: -1px; border: 2px solid var(--navy); border-radius: 4px; background: rgba(22, 33, 44, .15); }
.daybar .sel.clash { border-color: var(--danger); background: rgba(179, 64, 46, .25); }
.daybar-scale { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); margin-top: -3px; }

.resource-option { display: block; cursor: pointer; margin-top: 10px; }
.resource-option input { position: absolute; opacity: 0; pointer-events: none; }
.ro-body { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.resource-option:hover:not(.is-disabled) .ro-body { border-color: #cdbf9f; }
.resource-option input:checked + .ro-body { border-color: var(--navy); box-shadow: 0 0 0 4px rgba(22, 33, 44, .08); }
.resource-option input:focus-visible + .ro-body { box-shadow: 0 0 0 4px rgba(193, 154, 85, .3); }
.resource-option.is-disabled { cursor: not-allowed; }
.resource-option.is-disabled .ro-body { background: var(--surface-2); }
.resource-option.is-disabled .ro-text > strong, .resource-option.is-disabled .ro-text > small { opacity: .55; }
.ro-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-soft); color: #9a7331; flex-shrink: 0; }
.ro-icon.vehicle { background: var(--vehicle-soft); color: var(--vehicle); }
.ro-body > span:not(.ro-icon):not(.pill), .ro-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ro-body small { color: var(--muted); }
.any-option { margin-top: 12px; }
#vehicleForm .resource-grid { display: flex; flex-direction: column; gap: 0; margin-top: 0; }

.flow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 20px; padding: 14px; border-radius: 12px; background: var(--surface-2); border: 1px dashed var(--line); font-size: 12.5px; color: var(--ink-2); }
.flow > div { display: flex; align-items: center; gap: 8px; }
.flow span { width: 20px; height: 20px; border-radius: 50%; background: var(--navy); color: var(--gold); display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.flow .i { color: var(--muted); }
.submit-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
#selectedInfo { display: flex; align-items: center; gap: 6px; }

/* =============================== Toolbar / tables =============================== */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.segmented { display: inline-flex; gap: 2px; padding: 4px; border-radius: 12px; background: #e9e5dc; }
.segmented a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--ink-2); transition: all .15s; white-space: nowrap; }
.segmented a b { font-size: 11px; background: rgba(0, 0, 0, .07); padding: 0 7px; border-radius: 99px; }
.segmented a.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.segmented.subtle { background: transparent; border: 1px solid var(--line); }
.segmented.subtle a.active { background: var(--navy); color: #fff; }
.search { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; min-width: 280px; }
.search input { border: 0; background: transparent; box-shadow: none !important; padding-left: 0; }
.hint { display: flex; align-items: center; gap: 6px; max-width: 560px; }

.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: .06em; color: var(--muted); font-weight: 700; padding: 14px 18px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 14px 18px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr:hover { background: #fcfbf8; }
.table tbody tr:last-child td { border-bottom: 0; }
.table th.right, .table td.right { text-align: right; }
.table .mono { white-space: nowrap; }
.cell-main { display: flex; align-items: center; gap: 12px; }
.cell-main > div { display: flex; flex-direction: column; min-width: 0; }
.cell-main a:hover { text-decoration: underline; }

/* =============================== Detail =============================== */
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.detail-hero { position: relative; overflow: hidden; }
.detail-hero::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--room); }
.detail-hero.vehicle::before { background: var(--vehicle); }
.dh-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.detail-hero h2 { font-size: 28px; margin: 14px 0 12px; }
.dh-when { display: flex; gap: 20px; flex-wrap: wrap; color: var(--ink-2); }
.dh-when > div { display: flex; gap: 8px; align-items: center; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; margin: 0; }
.info-grid.one { grid-template-columns: 1fr; text-align: left; margin-top: 20px; }
.info-grid .full { grid-column: 1 / -1; }
.info-grid dt { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin-bottom: 3px; }
.info-grid dd { margin: 0; font-weight: 500; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 20px; position: relative; }
.timeline::before { content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding-bottom: 16px; display: flex; flex-direction: column; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ''; position: absolute; left: -20px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2.5px solid var(--muted); }
.timeline .tl-approved::before, .timeline .tl-completed::before, .timeline .tl-driver_accepted::before, .timeline .tl-departed::before { border-color: var(--success); }
.timeline .tl-rejected::before, .timeline .tl-cancelled::before, .timeline .tl-driver_declined::before { border-color: var(--danger); }
.timeline .tl-created::before { border-color: var(--gold); }
.timeline small { color: var(--muted); }
.timeline p { margin-top: 4px; font-size: 13px; background: var(--surface-2); padding: 8px 10px; border-radius: 8px; color: var(--ink-2); }
.action-card .card-head { margin-bottom: 12px; }
.help-card { display: flex; gap: 12px; background: var(--gold-soft); border-color: #eadcbf; color: #6f5423; font-size: 13px; box-shadow: none; }
.help-card code { word-break: break-all; }

/* =============================== Approval =============================== */
.approval-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.approval-card { display: flex; flex-direction: column; gap: 10px; border-top: 4px solid var(--room); }
.approval-card.vehicle { border-top-color: var(--vehicle); }
.approval-card header { display: flex; justify-content: space-between; align-items: center; }
.approval-card h3 { font-family: var(--font-display); font-weight: 500; font-size: 19px; }
.approval-card footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line-2); }
.facts { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 7px; color: var(--ink-2); font-size: 13px; }
.facts li { display: flex; gap: 9px; align-items: center; }
.facts .i { color: var(--muted); }
.requester { display: flex; gap: 10px; align-items: center; min-width: 0; }
.requester > div { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.requester small { color: var(--muted); }

/* =============================== Calendar =============================== */
.cal-card { padding: 20px; }
.cal-toolbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.cal-title { flex: 1; font-size: 24px; min-width: 200px; }
.cal-controls { display: flex; gap: 10px; flex-wrap: wrap; }
.cal-body { transition: opacity .2s; }
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.mg-head { padding: 10px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); text-align: center; }
.mg-cell { min-height: 118px; padding: 8px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 3px; cursor: pointer; transition: background .15s; min-width: 0; }
.mg-cell:nth-child(7n + 7) { border-right: 0; }
.mg-cell:hover { background: #fcfaf5; }
.mg-cell.out { background: #fbfaf7; }
.mg-cell.out .mg-date { color: #c1c3c8; }
.mg-date { font-size: 13px; font-weight: 600; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; margin-bottom: 2px; }
.mg-cell.today .mg-date { background: var(--navy); color: var(--gold); }
.mg-more { font-size: 11.5px; color: var(--muted); font-weight: 600; padding-left: 4px; }
.ev-chip { display: block; width: 100%; text-align: left; border: 0; border-left: 3px solid var(--c); background: color-mix(in srgb, var(--c) 12%, white); color: var(--ink); padding: 3px 6px; border-radius: 5px; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.ev-chip b { font-weight: 700; color: var(--c); }
.ev-chip.st-pending { background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--c) 10%, white) 0 4px, #fff 4px 8px); border-left-style: dashed; }
.ev-chip.st-completed { opacity: .6; }
.ev-chip:hover { filter: brightness(.96); }

.timeline-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.timeline-inner { min-width: 860px; position: relative; }
.tl-head, .tl-row { display: grid; grid-template-columns: 200px 1fr; }
.tl-head { background: var(--surface-2); border-bottom: 1px solid var(--line); height: 38px; }
.tl-hours { position: relative; }
.tl-hours span { position: absolute; top: 10px; transform: translateX(-50%); font-size: 11px; color: var(--muted); font-weight: 600; }
.tl-hours span:first-child { transform: none; padding-left: 4px; }
.tl-hours span:last-child { transform: translateX(-100%); padding-right: 4px; }
.tl-group { padding: 10px 14px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: #fbfaf6; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; gap: 6px; }
.tl-label { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-right: 1px solid var(--line-2); min-width: 0; }
.tl-label > div { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.tl-label strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-label small { color: var(--muted); }
.tl-row { border-bottom: 1px solid var(--line-2); }
.tl-row:last-child { border-bottom: 0; }
.tl-track { position: relative; min-height: 52px; cursor: copy;
  background-image: repeating-linear-gradient(90deg, var(--line-2) 0 1px, transparent 1px calc(100% / var(--hours))); }
.tl-track:hover { background-color: #fcfaf4; }
.tl-track.disabled { cursor: not-allowed; background-color: #f6f4ef; }
.tl-bar { position: absolute; top: 9px; bottom: 9px; border: 0; border-radius: 7px; background: var(--c); color: #fff; font-size: 11.5px; font-weight: 600; padding: 0 8px; text-align: left; cursor: pointer; overflow: hidden; box-shadow: 0 2px 6px -2px rgba(0, 0, 0, .3); }
.tl-bar span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-bar.st-pending { background: repeating-linear-gradient(45deg, var(--c) 0 6px, color-mix(in srgb, var(--c) 70%, white) 6px 12px); }
.tl-bar.st-completed { opacity: .55; }
.tl-now { position: absolute; top: 38px; bottom: 0; left: calc(200px + (100% - 200px) * var(--x) / 100); width: 2px; background: #d0473a; pointer-events: none; }
.tl-now::before { content: ''; position: absolute; top: -4px; left: -4px; width: 10px; height: 10px; border-radius: 50%; background: #d0473a; }
.cal-legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); margin-top: 14px; align-items: center; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend .lg { margin: 0; }
#calHint { margin-left: auto; }
.ev-detail { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }

/* =============================== Modal & toast =============================== */
.modal { position: fixed; inset: 0; background: rgba(15, 20, 28, .45); backdrop-filter: blur(3px); display: none; align-items: center; justify-content: center; padding: 20px; z-index: 100; }
.modal.open { display: flex; animation: fade .15s ease-out; }
.modal-card { background: var(--surface); border-radius: 20px; width: 100%; max-width: 720px; max-height: calc(100vh - 40px); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: rise .2s ease-out; }
.modal-sm { max-width: 460px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px 8px; gap: 10px; }
.modal-head h3 { font-family: var(--font-display); font-weight: 500; font-size: 21px; }
.modal-body { padding: 10px 22px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } }

.toasts { position: fixed; top: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; max-width: 420px; }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 13px 14px; border-radius: 12px; background: var(--navy); color: #fff; box-shadow: var(--shadow-lg); font-size: 13.5px; animation: rise .25s ease-out; transition: opacity .4s, transform .4s; }
.toast.hide { opacity: 0; transform: translateX(20px); }
.toast-success .i:first-child { color: #7fd3a1; }
.toast-error { background: #5b1f16; }
.toast-error .i:first-child { color: #ffb4a4; }
.toast span { flex: 1; }
.toast-x { border: 0; background: none; color: rgba(255, 255, 255, .6); cursor: pointer; padding: 0; }

/* =============================== Reports =============================== */
.filter-bar { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; padding: 16px 20px; }
.filter-bar .field { margin: 0; min-width: 150px; flex: 1; }
.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.bars li { display: grid; grid-template-columns: 150px 1fr 120px; gap: 12px; align-items: center; font-size: 13px; }
.bar-label { display: flex; align-items: center; gap: 6px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 10px; border-radius: 99px; background: var(--line-2); overflow: hidden; display: flex; }
.bar-track i { display: block; height: 100%; border-radius: 99px; min-width: 0; }
.bar-track.stacked i { border-radius: 0; }
.bar-track i.room { background: var(--room); }
.bar-track i.vehicle { background: var(--vehicle); }
.bar-val { text-align: right; font-weight: 600; white-space: nowrap; }

/* =============================== Profile =============================== */
.profile-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; align-items: start; }
.profile-card { text-align: center; padding: 30px 24px; }
.profile-card h2 { font-size: 24px; }

/* =============================== Auth =============================== */
.auth-body { background: var(--navy); }
.auth { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.auth-hero { padding: 40px 56px; color: #c9d1da; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
  background: radial-gradient(80% 60% at 10% 10%, rgba(193, 154, 85, .22), transparent 60%), radial-gradient(60% 50% at 90% 90%, rgba(31, 111, 100, .35), transparent 60%), var(--navy); }
.auth-copy { max-width: 480px; }
.auth-copy h2 { font-family: var(--font-display); font-weight: 500; font-size: 40px; color: #fff; line-height: 1.15; letter-spacing: -.015em; }
.auth-copy p { margin-top: 16px; font-size: 15.5px; color: #9eabb8; }
.auth-points { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-direction: column; gap: 12px; }
.auth-points li { display: flex; gap: 12px; align-items: center; color: #dfe5ea; }
.auth-points .i { color: var(--gold); }
.auth-foot { color: #6e7c8a; }
.auth-panel { background: var(--bg); display: grid; place-items: center; padding: 40px 24px; border-radius: 28px 0 0 28px; }
.auth-form { width: 100%; max-width: 380px; }
.auth-form h1 { font-family: var(--font-display); font-weight: 500; font-size: 32px; }
.auth-form > .muted { margin: 6px 0 26px; }
.demo-box { margin-top: 24px; padding: 14px; border-radius: 12px; border: 1px dashed #d6cfc1; font-size: 12.5px; color: var(--ink-2); }
.demo-box code { background: var(--gold-soft); padding: 1px 6px; border-radius: 5px; }
.demo-list { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.demo-list button { flex: 1; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 7px; font-size: 12px; font-weight: 600; cursor: pointer; }
.demo-list button:hover { border-color: var(--gold); background: var(--gold-soft); }

/* =============================== Tugas pengemudi =============================== */
.driver-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ds-item { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; }
.ds-item strong { font-family: var(--font-display); font-size: 30px; font-weight: 500; line-height: 1.1; }
.ds-item small { color: var(--muted); font-weight: 500; }
.ds-item.hot { background: var(--amber-soft); border-color: #efd9a8; }
.ds-item.hot strong { color: var(--amber); }
.task-group { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; margin-top: 8px; }
.task-group b { font-size: 11px; background: var(--line-2); padding: 1px 8px; border-radius: 99px; }
.task-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.task-swipe { display: none; font-size: 12px; font-weight: 500; margin-left: auto; align-items: center; gap: 4px; }
.task { display: flex; flex-direction: column; gap: 14px; border-top: 4px solid var(--vehicle); }
.task.confirm { border-top-color: var(--amber); }
.task-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.task-head h3 { font-size: 21px; margin-top: 2px; }
.task-when { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
.task-when > div { display: flex; flex-direction: column; }
.task-when > div.right { margin-left: auto; text-align: right; }
.task-when strong { font-family: var(--font-display); font-size: 26px; font-weight: 500; line-height: 1.1; }
.task-when small { color: var(--muted); }
.task-arrow { flex: 1; display: flex; flex-direction: column; align-items: center; color: var(--muted); font-size: 11px; }
.task-arrow em { font-style: normal; }
.task-steps { list-style: none; margin: 0; padding: 0; display: flex; }
.task-steps li { flex: 1; text-align: center; font-size: 11px; font-weight: 600; color: var(--muted); position: relative; padding-top: 18px; }
.task-steps li::before { content: ''; position: absolute; top: 2px; left: 50%; transform: translateX(-50%); width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line); z-index: 1; }
.task-steps li::after { content: ''; position: absolute; top: 7px; left: -50%; width: 100%; height: 2px; background: var(--line); }
.task-steps li:first-child::after { display: none; }
.task-steps li.done { color: var(--vehicle); }
.task-steps li.done::before { background: var(--vehicle); border-color: var(--vehicle); }
.task-steps li.done::after { background: var(--vehicle); }
.task-facts li { align-items: flex-start; }
.task-facts li > span { display: flex; flex-direction: column; }
.task-facts small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.task-facts .plate { align-self: flex-start; }
.task-contact { display: flex; gap: 8px; flex-wrap: wrap; }
.task-actions { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.odo-form { display: flex; flex-direction: column; gap: 10px; }
.odo { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 14px; background: #10181f; color: #cbd4dc; }
.odo span { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: #e3c285; }
.odo input { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 30px; letter-spacing: .08em; text-align: center; background: #0a1016; color: #fff; border: 1px solid #2b3946; min-height: 60px; }
.odo input:focus { background: #0a1016; border-color: var(--gold); }
.odo input.warn { border-color: var(--danger); }
.odo small { color: #8d99a6; text-align: center; }
.odo small strong { color: #fff; }
.odo .text-danger { color: #f4a797; }
.task-wait { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-2); background: var(--surface-2); padding: 10px 12px; border-radius: 10px; }

/* =============================== Responsive =============================== */
@media (max-width: 1200px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .detail-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1024px) {
  .booking-layout, .profile-layout { grid-template-columns: minmax(0, 1fr); }
  .form-card { position: static; }
}
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 90; transform: translateX(-100%); transition: transform .25s ease; visibility: hidden; }
  body.sidebar-open .sidebar { transform: none; box-shadow: var(--shadow-lg); visibility: visible; }
  body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 80; }
  .menu-btn { display: inline-grid; }
  .auth { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .auth-panel { border-radius: 0; }
}
@media (max-width: 640px) {
  .content { padding: 4px 16px 24px; }
  .topbar { padding: 16px; flex-wrap: wrap; }
  .page-head h1 { font-size: 22px; }
  .date-chip { display: none; }
  .stats { grid-template-columns: minmax(0, 1fr); }
  .field-row, .form-grid, .info-grid { grid-template-columns: minmax(0, 1fr); }
  .bars li { grid-template-columns: 100px 1fr 90px; }
  .mg-cell { min-height: 76px; padding: 4px; }
  .ev-chip b { display: none; }
  .search { min-width: 0; width: 100%; }
  .approval-grid, .task-grid { grid-template-columns: minmax(0, 1fr); }
  .hero h2 { font-size: 26px; }
  .app-footer { padding: 12px 16px 20px; }
  .driver-summary .ds-item strong { font-size: 24px; }
}
/* Layar sempit (2 kartu tidak muat): tugas tetap berjajar ke samping, digeser horizontal */
@media (max-width: 760px) {
  .task-grid.task-row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 86%; overflow-x: auto;
    scroll-snap-type: x mandatory; overscroll-behavior-x: contain; padding-bottom: 6px; margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; }
  .task-row > .task { scroll-snap-align: start; }
  .task-grid.task-row:has(> .task:only-child) { grid-auto-columns: 100%; }
  .task-swipe { display: inline-flex; }
}

@media print {
  .sidebar, .topbar-actions, .filter-bar, .app-footer { display: none !important; }
  .card { box-shadow: none; }
}

/* Hak akses role */
.perm-table th.center, .perm-table td.center { text-align: center; width: 140px; }
.perm-table .perm-group td { background: var(--line-2, #f1eee6); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted, #6b6f76); padding-top: 10px; padding-bottom: 10px; }
.perm-check { width: 18px; height: 18px; accent-color: var(--vehicle, #1f6f64); cursor: pointer; }
.perm-check:disabled { cursor: not-allowed; opacity: .55; }
.submit-bar.padded { padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* PWA */
.install-link { margin: 8px 12px 4px; width: calc(100% - 24px); border: 1px dashed rgba(193, 154, 85, .55); background: transparent; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.install-link[hidden], [data-install][hidden] { display: none !important; }
@media (display-mode: standalone) { [data-install] { display: none !important; } }

/* Logo perusahaan (pojok kiri atas) — latar putih agar warna logo tetap utuh di atas latar gelap */
.brand-mark.brand-logo { display: flex; align-items: center; justify-content: center; width: auto; height: auto; padding: 4px 6px;
  background: #fff; border-radius: 11px; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); flex: none; overflow: hidden; }
.brand-mark.brand-logo img { display: block; height: 36px; width: auto; max-width: none; }
@media (max-width: 640px) { .brand-mark.brand-logo img { height: 32px; } }
