/* ============================================================
   ASET IT - BIMA GROUP — tema VibeCoder (indigo/violet, kartu kaca)
   ============================================================ */
:root {
  --ink: #1f1b3a;
  --ink-soft: #635f82;
  --ink-faint: #8c88a8;
  --line: rgba(79, 70, 229, 0.12);
  --line-strong: rgba(79, 70, 229, 0.22);
  --indigo: #4f46e5;
  --violet: #8b5cf6;
  --grad: linear-gradient(135deg, #4f46e5 0%, #8b5cf6 100%);
  --good: #0f9d68;
  --good-soft: #e5f8ef;
  --warn: #b45309;
  --warn-soft: #fef3e2;
  --bad: #c0392b;
  --bad-soft: #fdeaea;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 40px -22px rgba(41, 31, 90, 0.35), 0 2px 8px rgba(41, 31, 90, 0.05);
  --glass: rgba(255, 255, 255, 0.62);
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: #f3f0ff;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--indigo); text-decoration: none; }
a:hover { color: var(--violet); }
h1, h2, h3 { margin: 0; letter-spacing: -0.015em; }
p { margin: 0; }

.orbs { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.55; }
.orb.a { width: 460px; height: 460px; background: #c7d2fe; top: -140px; left: -100px; }
.orb.b { width: 420px; height: 420px; background: #fbcfe8; bottom: -160px; right: -120px; }
.orb.c { width: 380px; height: 380px; background: #bae6fd; top: 40%; left: 45%; opacity: 0.35; }

/* ---------------------------------------------------------------- layout */
.shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  gap: 32px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 28px 48px;
  min-height: 100vh;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 22px 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow);
}

.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: var(--grad);
  color: #fff;
  box-shadow: 0 8px 18px -8px rgba(79, 70, 229, 0.9);
  flex: none;
}
.brand-mark svg { width: 21px; height: 21px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-text strong { font-size: 13.5px; font-weight: 700; letter-spacing: 0.01em; }
.brand-text small { font-size: 11px; color: var(--ink-faint); }

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 14px;
  transition: background 0.16s ease, color 0.16s ease;
  border: 0;
  background: none;
  width: 100%;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.nav-link:hover { background: rgba(79, 70, 229, 0.08); color: var(--indigo); }
.nav-link.is-active {
  background: #fff;
  color: var(--indigo);
  box-shadow: 0 6px 16px -10px rgba(41, 31, 90, 0.5);
  font-weight: 600;
}
.nav-ico { display: grid; place-items: center; width: 20px; height: 20px; flex: none; }
.nav-ico svg { width: 19px; height: 19px; }
.nav-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.nav-logout { color: var(--ink-faint); }

.main { min-width: 0; display: flex; flex-direction: column; gap: 24px; }

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 4px 2px;
}
.topbar h1 { font-size: 26px; font-weight: 700; }
.topbar-text p { color: var(--ink-soft); font-size: 14px; margin-top: 3px; }
.topbar-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.page-foot { color: var(--ink-faint); font-size: 12px; text-align: center; padding-top: 8px; }

/* ---------------------------------------------------------------- kartu */
.card {
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
}
.card-flush { padding: 0; overflow: hidden; }
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.card-head h2 { font-size: 16px; font-weight: 600; }
.card-head:last-child { margin-bottom: 0; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.gap-lg { gap: 24px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-lg { display: flex; flex-direction: column; gap: 24px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.stat-card {
  display: flex;
  gap: 14px;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  align-items: flex-start;
}
.stat-ico {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  flex: none;
}
.stat-ico svg { width: 20px; height: 20px; }
.tone-indigo .stat-ico { background: rgba(79, 70, 229, 0.12); color: var(--indigo); }
.tone-violet .stat-ico { background: rgba(139, 92, 246, 0.14); color: #7c3aed; }
.tone-green .stat-ico { background: var(--good-soft); color: var(--good); }
.tone-amber .stat-ico { background: var(--warn-soft); color: var(--warn); }
.stat-body { display: flex; flex-direction: column; min-width: 0; }
.stat-label { font-size: 12.5px; color: var(--ink-soft); font-weight: 500; }
.stat-value { font-size: 23px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.25; }
.stat-sub { font-size: 11.5px; color: var(--ink-faint); }

/* ---------------------------------------------------------------- elemen */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.16s ease, background 0.16s ease;
  white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; }
.btn:hover { background: #fff; box-shadow: 0 10px 22px -16px rgba(41, 31, 90, 0.8); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 12px 24px -14px rgba(79, 70, 229, 0.95); }
.btn-primary:hover { color: #fff; filter: brightness(1.05); }
.btn-ghost { background: rgba(255, 255, 255, 0.55); border-color: var(--line); color: var(--ink-soft); }
.btn-ghost:hover { color: var(--indigo); }
.btn-danger { background: var(--bad-soft); border-color: rgba(192, 57, 43, 0.2); color: var(--bad); }
.btn-danger:hover { background: #fbdcd9; color: var(--bad); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.15s ease;
}
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:hover { color: var(--indigo); border-color: var(--line-strong); background: #fff; }
.icon-btn.danger:hover { color: var(--bad); border-color: rgba(192, 57, 43, 0.3); }

.chip-row { display: flex; gap: 10px; flex-wrap: wrap; }
.chip {
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.7);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink-soft);
}
.chip:hover:not(:disabled) { background: #fff; color: var(--indigo); }
.chip-good.chip-active, .chip-good:disabled { background: var(--good-soft); color: var(--good); border-color: rgba(15, 157, 104, 0.35); }
.chip-warn.chip-active, .chip-warn:disabled { background: var(--warn-soft); color: var(--warn); border-color: rgba(180, 83, 9, 0.3); }
.chip-bad.chip-active, .chip-bad:disabled { background: var(--bad-soft); color: var(--bad); border-color: rgba(192, 57, 43, 0.3); }
.chip:disabled { cursor: default; opacity: 1; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-baik { background: var(--good-soft); color: var(--good); }
.badge-perlu-perhatian { background: var(--warn-soft); color: var(--warn); }
.badge-rusak { background: var(--bad-soft); color: var(--bad); }
.badge-st-aktif { background: rgba(79, 70, 229, 0.1); color: var(--indigo); }
.badge-st-dipinjam { background: rgba(139, 92, 246, 0.13); color: #7c3aed; }
.badge-st-dalam-perbaikan { background: var(--warn-soft); color: var(--warn); }
.badge-st-tidak-aktif { background: rgba(99, 95, 130, 0.12); color: var(--ink-soft); }
.badge-st-dihapuskan { background: var(--bad-soft); color: var(--bad); }
.badge-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

.pill {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.09);
  color: var(--indigo);
  font-size: 12px;
  font-weight: 600;
}
.muted { color: var(--ink-soft); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; letter-spacing: -0.01em; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }
.mb { margin-bottom: 14px; }
.h3 { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.link-quiet { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.link-quiet:hover { color: var(--indigo); }
.link-arrow { font-size: 13px; font-weight: 600; }

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
}
.alert-success { background: var(--good-soft); color: #0b6b47; border-color: rgba(15, 157, 104, 0.22); }
.alert-error { background: var(--bad-soft); color: #9b2c20; border-color: rgba(192, 57, 43, 0.22); }

.empty { text-align: center; padding: 48px 24px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty-ico {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(79, 70, 229, 0.09);
  color: var(--indigo);
  margin-bottom: 4px;
}
.empty-ico svg { width: 24px; height: 24px; }
.empty h3 { font-size: 16px; }
.empty p { color: var(--ink-soft); font-size: 14px; max-width: 42ch; }
.empty .btn { margin-top: 10px; }

/* ---------------------------------------------------------------- dashboard */
.bar-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.bar-row:last-child { margin-bottom: 0; }
.bar-top { display: flex; justify-content: space-between; font-size: 13.5px; }
.bar-top span { color: var(--ink-soft); }
.bar-track { height: 8px; border-radius: 999px; background: rgba(79, 70, 229, 0.08); overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 999px; background: var(--grad); }
.bar-sub { font-size: 11.5px; color: var(--ink-faint); }

.legend { display: flex; flex-direction: column; gap: 14px; }
.legend-row { display: grid; grid-template-columns: 10px 1fr 90px 32px; align-items: center; gap: 10px; font-size: 13.5px; }
.legend-row strong { text-align: right; }
.legend-name { color: var(--ink-soft); }
.legend-bar { height: 7px; border-radius: 999px; background: rgba(79, 70, 229, 0.08); overflow: hidden; }
.legend-fill { display: block; height: 100%; border-radius: 999px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: block; }
.dot-baik, .fill-baik { background: #10b981; }
.dot-perlu-perhatian, .fill-perlu-perhatian { background: #f59e0b; }
.dot-rusak, .fill-rusak { background: #ef4444; }
.mini-row { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; color: var(--ink-soft); }
.mini-row strong { color: var(--ink); }

/* ---------------------------------------------------------------- tabel */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
  font-weight: 600;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
}
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:hover { background: rgba(255, 255, 255, 0.5); }
.table tbody tr:last-child td { border-bottom: 0; }
.cell-main { font-weight: 600; color: var(--ink); display: block; }
.cell-main:hover { color: var(--indigo); }
.cell-sub { display: block; font-size: 11.5px; color: var(--ink-faint); margin-top: 2px; }
.cell-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cell-right { text-align: right; }
.cell-check { width: 44px; text-align: center; }
.table-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.table-foot span { font-size: 13px; }

input[type='checkbox'] { width: 16px; height: 16px; accent-color: var(--indigo); cursor: pointer; }

.list-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.list-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.filter-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding: 16px 18px;
}
.filter-bar select, .filter-bar input {
  padding: 9px 12px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.8);
  font: inherit;
  font-size: 13.5px;
  color: var(--ink);
}
.filter-bar select:focus, .filter-bar input:focus { outline: 2px solid rgba(79, 70, 229, 0.35); outline-offset: 1px; }
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 260px;
  min-width: 220px;
  padding: 0 12px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.8);
}
.search-box:focus-within { outline: 2px solid rgba(79, 70, 229, 0.35); outline-offset: 1px; }
.search-box input { border: 0; background: transparent; padding: 10px 0; flex: 1; font: inherit; font-size: 13.5px; outline: none; min-width: 0; }
.search-ico { display: grid; place-items: center; color: var(--ink-faint); }
.search-ico svg { width: 16px; height: 16px; }

.pagination { display: flex; gap: 6px; justify-content: center; padding: 16px; flex-wrap: wrap; }
.page-btn {
  min-width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  padding: 0 8px;
}
.page-btn:hover { background: #fff; color: var(--indigo); }
.page-btn.is-active { background: var(--grad); border-color: transparent; color: #fff; }
.page-dots { align-self: center; color: var(--ink-faint); }

/* ---------------------------------------------------------------- form */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.span-2 { grid-column: span 2; }
.span-full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.field b { color: var(--bad); }
.field input, .field select, .field textarea {
  padding: 11px 13px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.85);
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  width: 100%;
  resize: vertical;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid rgba(79, 70, 229, 0.35);
  outline-offset: 1px;
  border-color: rgba(79, 70, 229, 0.4);
}
.field small { font-size: 11.5px; color: var(--ink-faint); }
.field-error { font-size: 12px; color: var(--bad); font-weight: 500; }
.form-actions { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.form-actions-inline { display: flex; justify-content: flex-end; gap: 12px; }

/* ---------------------------------------------------------------- detail */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.detail-top { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 20px; }
.detail-title { font-size: 21px; margin-top: 8px; }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.kode-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(79, 70, 229, 0.09);
  color: var(--indigo);
  font-size: 12.5px;
  font-weight: 600;
}
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; }
.info-item { display: flex; flex-direction: column; gap: 2px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.info-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-faint); font-weight: 600; }
.info-value { font-size: 14px; font-weight: 600; word-break: break-word; }
.note-box { margin-top: 18px; padding: 14px 16px; border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.6); border: 1px solid var(--line); }
.note-box p { font-size: 14px; color: var(--ink-soft); margin-top: 4px; white-space: pre-wrap; }

.stat-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.stat-list li { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; color: var(--ink-soft); }
.stat-list strong { color: var(--ink); font-weight: 600; }

.qr-card { text-align: center; }
.qr-card .card-head { justify-content: center; }
.qr-box {
  display: grid;
  place-items: center;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid var(--line);
  margin-bottom: 12px;
}
.qr-box svg { width: 100%; height: auto; max-width: 190px; display: block; }
.qr-code { font-size: 13px; font-weight: 600; letter-spacing: 0.04em; }
.qr-card .btn { margin-top: 14px; }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { display: flex; gap: 14px; padding: 0 0 20px 0; position: relative; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 16px;
  bottom: 0;
  width: 1px;
  background: var(--line-strong);
}
.timeline li:last-child::before { display: none; }
.tl-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--indigo);
  flex: none;
  margin-top: 6px;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}
.tl-fix { background: var(--bad); box-shadow: 0 0 0 4px rgba(192, 57, 43, 0.12); }
.tl-cond { background: var(--warn); box-shadow: 0 0 0 4px rgba(180, 83, 9, 0.12); }
.tl-body { flex: 1; min-width: 0; }
.tl-title { font-size: 13.5px; font-weight: 600; }
.tl-tech { color: var(--ink-faint); font-weight: 500; }
.tl-text { font-size: 13.5px; color: var(--ink-soft); margin-top: 2px; }
.tl-meta { font-size: 11.5px; color: var(--ink-faint); margin-top: 4px; }
.tl-del { flex: none; opacity: 0.5; transition: opacity 0.15s ease; }
.tl-del:hover { opacity: 1; }
.timeline.compact li { padding-bottom: 14px; }
.timeline.compact .tl-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------------------------------------------------------------- pilih label */
.labels-layout { align-items: start; }
.pick-list { display: flex; flex-direction: column; gap: 8px; max-height: 480px; overflow-y: auto; padding-right: 4px; margin-bottom: 16px; }
.pick-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
}
.pick-row:hover { background: #fff; border-color: var(--line-strong); }
.pick-main { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.pick-main strong { font-size: 13.5px; font-weight: 600; }
.pick-meta { flex: none; }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 14px; font-size: 13.5px; color: var(--ink-soft); }
.steps strong { display: block; color: var(--ink); font-size: 13.5px; }
.steps span { display: block; }

/* ---------------------------------------------------------------- auth */
.auth-body { display: flex; min-height: 100vh; }
.auth-wrap { position: relative; z-index: 1; margin: auto; padding: 32px 20px; width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 18px; }
.auth-card {
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 24px;
  box-shadow: 0 30px 60px -30px rgba(41, 31, 90, 0.45);
  padding: 32px 30px;
}
.auth-brand { display: flex; align-items: center; gap: 10px; font-size: 13px; margin-bottom: 22px; letter-spacing: 0.01em; }
.auth-brand strong { font-weight: 700; }
.auth-brand .brand-mark { width: 36px; height: 36px; border-radius: 12px; }
.auth-card h1 { font-size: 19px; line-height: 1.35; letter-spacing: -0.01em; }
.auth-sub { font-size: 13.5px; color: var(--ink-soft); margin-top: 6px; margin-bottom: 20px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form .btn { margin-top: 4px; padding: 12px; }
.auth-foot { text-align: center; font-size: 12px; color: var(--ink-faint); }
.auth-card .alert { margin-bottom: 16px; }

/* ---------------------------------------------------------------- cetak label */
.print-body { background: #eef0f7; padding: 24px; }
.print-bar {
  max-width: 210mm;
  margin: 0 auto 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  background: #fff;
  border-radius: 14px;
  padding: 16px 20px;
  box-shadow: var(--shadow);
}
.print-bar strong { display: block; font-size: 14px; }
.print-bar .small { color: var(--ink-soft); }
.print-actions { display: flex; gap: 10px; }
.label-sheet {
  max-width: 190mm;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 50mm);
  justify-content: center;
  gap: 4mm;
}
.label {
  height: 30mm;
  display: flex;
  gap: 3mm;
  align-items: center;
  padding: 3mm;
  background: #fff;
  border: 1px solid #d7d3ea;
  border-radius: 3mm;
  overflow: hidden;
  break-inside: avoid;
}
.label-qr { flex: none; width: 23mm; height: 23mm; }
.label-qr svg { width: 100%; height: 100%; display: block; }
.label-body { min-width: 0; }
.label-code { font-size: 7.5pt; font-weight: 700; letter-spacing: 0.02em; color: #1f1b3a; }
.label-name { font-size: 7pt; font-weight: 600; color: #1f1b3a; line-height: 1.25; margin-top: 1mm; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.label-meta { font-size: 6pt; color: #635f82; margin-top: 0.8mm; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }

@media print {
  @page { size: A4; margin: 10mm; }
  .print-body { background: #fff; padding: 0; }
  .no-print { display: none !important; }
  .label-sheet { max-width: none; gap: 4mm; }
  .label { border: 0.4mm solid #b9b4cf; border-radius: 2mm; }
}

/* ---------------------------------------------------------------- responsif */
@media (max-width: 1080px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 18px 16px 40px; }
  .sidebar { position: static; padding: 14px; gap: 14px; }
  .nav { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .nav-link { white-space: nowrap; padding: 9px 12px; }
  .nav-link span:not(.nav-ico) { font-size: 13px; }
  .nav-foot { border-top: 0; padding-top: 0; }
  .nav-logout { padding: 9px 12px; }
  .brand-text small { display: none; }
  .topbar h1 { font-size: 22px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .span-2, .span-full { grid-column: auto; }
  .info-grid { grid-template-columns: minmax(0, 1fr); }
  .label-sheet { grid-template-columns: repeat(2, 50mm); justify-content: center; }
  .card { padding: 18px; }
  .filter-bar { padding: 14px; }
  .filter-bar .search-box, .filter-bar select { flex: 1 1 100%; }
  .table th, .table td { padding: 11px 12px; }
}

@media (max-width: 520px) {
  .stat-grid { grid-template-columns: minmax(0, 1fr); }
  .label-sheet { grid-template-columns: 50mm; }
  .list-actions { width: 100%; }
  .list-actions .btn { flex: 1; }
}

/* ---------------------------------------------------------------- pengguna & peran */
.nav-bottom { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.nav-foot { margin-top: 0; padding-top: 0; border-top: 0; }
.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--line);
  min-width: 0;
}
.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 11px;
  background: var(--grad);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.avatar-sm { width: 30px; height: 30px; border-radius: 9px; font-size: 11.5px; }
.user-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.user-meta strong { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta small { font-size: 10.5px; color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta .user-site { color: var(--indigo); font-weight: 600; }
.user-row { display: flex; align-items: center; gap: 12px; min-width: 0; }

.badge-peran { text-transform: none; letter-spacing: 0; }
.badge-peran::before { display: none; }
.badge-peran-admin { background: rgba(79, 70, 229, 0.12); color: var(--indigo); }
.badge-peran-staf { background: rgba(99, 95, 130, 0.13); color: var(--ink-soft); }

.peran-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.peran-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; color: var(--ink-soft); }
.peran-list .badge { flex: none; margin-top: 1px; }

@media (max-width: 860px) {
  .nav-bottom { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
  .user-card { flex: 1; min-width: 0; }
}

/* ---------------------------------------------------------------- laporan */
.field-inline { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field-inline > span { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-faint); }
.field-inline select, .field-inline input {
  padding: 9px 11px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.85);
  font: inherit;
  font-size: 13.5px;
  color: var(--ink);
}
.field-inline select:focus, .field-inline input:focus { outline: 2px solid rgba(79, 70, 229, 0.35); outline-offset: 1px; }
.filter-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }

.unduh-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 18px 22px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(139, 92, 246, 0.08));
  border: 1px solid rgba(79, 70, 229, 0.16);
}
.unduh-text { display: flex; flex-direction: column; gap: 2px; }
.unduh-text strong { font-size: 14px; }
.unduh-aksi { display: flex; gap: 10px; flex-wrap: wrap; }

.laporan-info { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.table tfoot td { border-top: 2px solid var(--line-strong); background: rgba(255, 255, 255, 0.6); }

@media (max-width: 860px) {
  .filter-actions { margin-left: 0; width: 100%; }
  .field-inline { flex: 1 1 46%; }
  .unduh-aksi { width: 100%; }
  .unduh-aksi .btn { flex: 1; }
}

/* ---------------------------------------------------------------- site / area kerja */
/* Dropdown site di halaman login: beri ruang & panah yang jelas. */
.auth-form .field select { cursor: pointer; padding-right: 34px; }

.site-chosen {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(79, 70, 229, 0.08);
  border: 1px solid rgba(79, 70, 229, 0.18);
  margin-bottom: 18px;
  font-size: 13px;
}
.site-chosen-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint); font-weight: 600; }
.site-chosen strong { flex: 1; font-size: 13.5px; }
.auth-hint { font-size: 12px; color: var(--ink-faint); line-height: 1.5; margin-top: 14px; }

.site-tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 8px;
  background: rgba(79, 70, 229, 0.08);
  color: var(--indigo);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.filter-locked {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 11px;
  background: rgba(79, 70, 229, 0.09);
  border: 1px solid rgba(79, 70, 229, 0.18);
  color: var(--indigo);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.filter-locked svg { width: 14px; height: 14px; }
.locked-value {
  padding: 11px 13px;
  border-radius: 11px;
  border: 1px dashed var(--line-strong);
  background: rgba(79, 70, 229, 0.06);
  font-size: 14px;
  font-weight: 600;
  color: var(--indigo);
}
