/* =====================================================================
   Cek Objek Kendaraan — design system
   Token & komponen mengikuti shadcn/ui (tema zinc, gaya "new-york").
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --background: 0 0% 100%;
  --foreground: 240 10% 3.9%;
  --card: 0 0% 100%;
  --card-foreground: 240 10% 3.9%;
  --popover: 0 0% 100%;
  --primary: 240 5.9% 10%;
  --primary-foreground: 0 0% 98%;
  --secondary: 240 4.8% 95.9%;
  --secondary-foreground: 240 5.9% 10%;
  --muted: 240 4.8% 95.9%;
  --muted-foreground: 240 3.8% 46.1%;
  --accent: 240 4.8% 95.9%;
  --accent-foreground: 240 5.9% 10%;
  --destructive: 0 72.2% 50.6%;
  --destructive-foreground: 0 0% 98%;
  --success: 142 71% 35%;
  --warning: 32 95% 44%;
  --info: 217 91% 50%;
  --border: 240 5.9% 90%;
  --input: 240 5.9% 90%;
  --ring: 240 5.9% 10%;
  --radius: 0.5rem;
  --sidebar: 0 0% 98%;
  --sidebar-width: 15rem;
  --header-height: 3.5rem;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
}

/* ---------- Reset & dasar ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; border: 0 solid hsl(var(--border)); }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.5;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01';
}
a { color: inherit; text-decoration: none; }
a.link, .link { color: hsl(var(--foreground)); text-decoration: underline; text-underline-offset: 4px; font-weight: 500; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; }
code, pre, .mono { font-family: var(--font-mono); }
code { font-size: 0.8125em; background: hsl(var(--muted)); padding: 0.125rem 0.375rem; border-radius: calc(var(--radius) - 4px); }
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.01em; }
::selection { background: hsl(var(--primary) / 0.15); }
:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; }

.icon { width: 1rem; height: 1rem; flex-shrink: 0; }
.icon-sm { width: 0.875rem; height: 0.875rem; }
.icon-lg { width: 1.25rem; height: 1.25rem; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Layout aplikasi (sidebar + konten) ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width);
  display: flex; flex-direction: column;
  background: hsl(var(--sidebar)); border-right: 1px solid hsl(var(--border));
  z-index: 40;
}
.sidebar-header { height: var(--header-height); display: flex; align-items: center; gap: 0.625rem; padding: 0 1rem; border-bottom: 1px solid hsl(var(--border)); }
.brand-mark {
  width: 2rem; height: 2rem; border-radius: var(--radius);
  background: hsl(var(--primary)); color: hsl(var(--primary-foreground));
  display: grid; place-items: center;
}
.brand-name { font-weight: 600; font-size: 0.875rem; line-height: 1.2; }
.brand-sub { font-size: 0.75rem; color: hsl(var(--muted-foreground)); }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 0.75rem 0.5rem; display: flex; flex-direction: column; gap: 0.125rem; }
.nav-group-label { padding: 0.5rem 0.75rem 0.25rem; font-size: 0.75rem; font-weight: 500; color: hsl(var(--muted-foreground)); }
.nav-item {
  display: flex; align-items: center; gap: 0.625rem;
  height: 2.25rem; padding: 0 0.75rem; border-radius: calc(var(--radius) - 2px);
  font-weight: 500; color: hsl(var(--muted-foreground));
  transition: background-color .15s, color .15s;
}
.nav-item:hover { background: hsl(var(--accent)); color: hsl(var(--accent-foreground)); }
.nav-item.active { background: hsl(var(--accent)); color: hsl(var(--foreground)); box-shadow: inset 2px 0 0 hsl(var(--primary)); }
.sidebar-footer { border-top: 1px solid hsl(var(--border)); padding: 0.5rem; }
.user-chip { display: flex; align-items: center; gap: 0.625rem; padding: 0.5rem; border-radius: calc(var(--radius) - 2px); }
.user-chip:hover { background: hsl(var(--accent)); }
.avatar {
  width: 2rem; height: 2rem; border-radius: 9999px; flex-shrink: 0;
  background: hsl(var(--secondary)); border: 1px solid hsl(var(--border));
  display: grid; place-items: center; font-weight: 600; font-size: 0.75rem; text-transform: uppercase;
}
.avatar-lg { width: 3.5rem; height: 3.5rem; font-size: 1.125rem; }

.main { flex: 1; margin-left: var(--sidebar-width); min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--header-height);
  display: flex; align-items: center; gap: 0.75rem; padding: 0 1.5rem;
  background: hsl(var(--background) / 0.85); backdrop-filter: blur(8px);
  border-bottom: 1px solid hsl(var(--border));
}
.topbar-title { font-weight: 600; }
.content { padding: 1.5rem; max-width: 1400px; width: 100%; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.page-title { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; }
.page-description { color: hsl(var(--muted-foreground)); margin-top: 0.25rem; }
.sidebar-toggle { display: none; }
.sidebar-backdrop { display: none; }

@media (max-width: 1023px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .sidebar-backdrop.open { display: block; position: fixed; inset: 0; background: rgb(0 0 0 / 0.4); z-index: 35; }
  .main { margin-left: 0; }
  .sidebar-toggle { display: inline-flex; }
  .content { padding: 1rem; }
  .topbar { padding: 0 1rem; }
}

/* ---------- Typography helpers ---------- */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.muted, .text-muted { color: hsl(var(--muted-foreground)); }
.text-success { color: hsl(var(--success)); }
.text-warning { color: hsl(var(--warning)); }
.text-destructive { color: hsl(var(--destructive)); }
.tabular { font-variant-numeric: tabular-nums; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.break-all { word-break: break-all; }

/* ---------- Layout helpers ---------- */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; min-width: 0; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 0.25rem; } .gap-2 { gap: 0.5rem; } .gap-3 { gap: 0.75rem; } .gap-4 { gap: 1rem; } .gap-6 { gap: 1.5rem; }
.grid { display: grid; }
.grid-2 { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: 1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { display: grid; gap: 1rem; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.stack-sm { display: flex; flex-direction: column; gap: 0.5rem; }
.stack-lg { display: flex; flex-direction: column; gap: 1.5rem; }
.mt-1 { margin-top: 0.25rem; } .mt-2 { margin-top: 0.5rem; } .mt-4 { margin-top: 1rem; } .mt-6 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; } .mb-4 { margin-bottom: 1rem; } .mb-6 { margin-bottom: 1.5rem; }
.w-full { width: 100%; }
.max-w-sm { max-width: 24rem; } .max-w-md { max-width: 28rem; } .max-w-lg { max-width: 32rem; } .max-w-2xl { max-width: 42rem; }
.hidden { display: none !important; }
@media (max-width: 1023px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .grid-2, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- Button ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  height: 2.25rem; padding: 0 1rem; border-radius: calc(var(--radius) - 2px);
  font-size: 0.875rem; font-weight: 500; white-space: nowrap; line-height: 1;
  border: 1px solid transparent; transition: background-color .15s, color .15s, border-color .15s, opacity .15s;
  user-select: none;
}
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }
.btn-primary { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: hsl(var(--primary) / 0.9); }
.btn-secondary { background: hsl(var(--secondary)); color: hsl(var(--secondary-foreground)); }
.btn-secondary:hover { background: hsl(var(--secondary) / 0.8); }
.btn-outline { background: hsl(var(--background)); border-color: hsl(var(--input)); box-shadow: var(--shadow-sm); }
.btn-outline:hover { background: hsl(var(--accent)); }
.btn-ghost:hover { background: hsl(var(--accent)); }
.btn-destructive { background: hsl(var(--destructive)); color: hsl(var(--destructive-foreground)); box-shadow: var(--shadow-sm); }
.btn-destructive:hover { background: hsl(var(--destructive) / 0.9); }
.btn-ghost-destructive { color: hsl(var(--destructive)); }
.btn-ghost-destructive:hover { background: hsl(var(--destructive) / 0.08); }
.btn-sm { height: 2rem; padding: 0 0.75rem; font-size: 0.8125rem; }
.btn-lg { height: 2.5rem; padding: 0 1.5rem; }
.btn-icon { width: 2.25rem; padding: 0; }
.btn-icon.btn-sm { width: 2rem; }
.btn-block { width: 100%; }
.btn-group { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }

/* ---------- Card ---------- */
.card { background: hsl(var(--card)); color: hsl(var(--card-foreground)); border: 1px solid hsl(var(--border)); border-radius: calc(var(--radius) + 2px); box-shadow: var(--shadow-sm); }
.card-header { padding: 1.25rem 1.5rem 0; display: flex; flex-direction: column; gap: 0.25rem; }
.card-header.row { flex-direction: row; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.card-title { font-size: 1rem; font-weight: 600; line-height: 1.4; }
.card-description { color: hsl(var(--muted-foreground)); font-size: 0.875rem; }
.card-content { padding: 1.25rem 1.5rem; }
.card-footer { padding: 1rem 1.5rem; border-top: 1px solid hsl(var(--border)); display: flex; align-items: center; justify-content: flex-end; gap: 0.5rem; background: hsl(var(--muted) / 0.4); border-radius: 0 0 calc(var(--radius) + 2px) calc(var(--radius) + 2px); }
.card-flush .card-content { padding: 0; }

/* ---------- Stat card ---------- */
.stat { padding: 1.25rem 1.5rem; }
.stat-head { display: flex; align-items: center; justify-content: space-between; color: hsl(var(--muted-foreground)); font-weight: 500; }
.stat-value { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; margin-top: 0.5rem; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat-hint { font-size: 0.75rem; color: hsl(var(--muted-foreground)); margin-top: 0.25rem; }

/* ---------- Form ---------- */
.field { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.label { font-size: 0.875rem; font-weight: 500; line-height: 1; }
.hint { font-size: 0.8125rem; color: hsl(var(--muted-foreground)); }
.input, .select, .textarea {
  width: 100%; height: 2.25rem; padding: 0 0.75rem;
  background: hsl(var(--background)); border: 1px solid hsl(var(--input));
  border-radius: calc(var(--radius) - 2px); box-shadow: var(--shadow-sm);
  font-size: 0.875rem; transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 5rem; padding: 0.5rem 0.75rem; resize: vertical; }
.input::placeholder { color: hsl(var(--muted-foreground)); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: hsl(var(--ring)); box-shadow: 0 0 0 3px hsl(var(--ring) / 0.12); }
.input:disabled, .select:disabled { opacity: 0.5; cursor: not-allowed; }
.select {
  appearance: none; padding-right: 2rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 15 5 5 5-5'/%3E%3Cpath d='m7 9 5-5 5 5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.5rem center;
}
.input-group { position: relative; display: flex; align-items: center; }
.input-group > .icon { position: absolute; left: 0.75rem; color: hsl(var(--muted-foreground)); pointer-events: none; }
.input-group > .icon + .input { padding-left: 2.25rem; }
.input-group > .input-action { position: absolute; right: 0.25rem; }
.form-row { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.field-error { font-size: 0.8125rem; color: hsl(var(--destructive)); }

/* Checkbox */
.checkbox {
  appearance: none; width: 1rem; height: 1rem; flex-shrink: 0; cursor: pointer;
  border: 1px solid hsl(var(--primary)); border-radius: 4px; background: hsl(var(--background));
  display: inline-grid; place-content: center; box-shadow: var(--shadow-sm);
}
.checkbox:checked { background: hsl(var(--primary)); }
.checkbox:checked::after {
  content: ''; width: 0.5rem; height: 0.3rem; margin-top: -0.1rem;
  border: 2px solid hsl(var(--primary-foreground)); border-top: 0; border-right: 0; transform: rotate(-45deg);
}
.check { display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer; font-weight: 500; }
.check-desc { font-weight: 400; color: hsl(var(--muted-foreground)); font-size: 0.8125rem; }

/* Switch */
.switch { position: relative; display: inline-flex; align-items: center; gap: 0.75rem; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track { width: 2.25rem; height: 1.25rem; border-radius: 9999px; background: hsl(var(--input)); transition: background-color .15s; position: relative; flex-shrink: 0; }
.switch-track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 1rem; height: 1rem; border-radius: 9999px; background: hsl(var(--background)); box-shadow: var(--shadow); transition: transform .15s; }
.switch input:checked + .switch-track { background: hsl(var(--primary)); }
.switch input:checked + .switch-track::after { transform: translateX(1rem); }
.switch input:focus-visible + .switch-track { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; }

/* Chip pilihan (toggle group) */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  display: inline-flex; align-items: center; gap: 0.5rem; height: 2rem; padding: 0 0.75rem;
  border: 1px solid hsl(var(--input)); border-radius: calc(var(--radius) - 2px);
  background: hsl(var(--background)); font-size: 0.8125rem; font-weight: 500; cursor: pointer; user-select: none;
  transition: background-color .15s, border-color .15s;
}
.chip:hover { background: hsl(var(--accent)); }
.chip:has(input:checked) { border-color: hsl(var(--primary)); background: hsl(var(--accent)); }
.chip .chip-count { font-size: 0.75rem; color: hsl(var(--muted-foreground)); font-variant-numeric: tabular-nums; }

/* ---------- Badge ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 0.25rem; height: 1.375rem; padding: 0 0.5rem;
  border-radius: calc(var(--radius) - 4px); border: 1px solid transparent;
  font-size: 0.75rem; font-weight: 500; white-space: nowrap; line-height: 1;
}
.badge-default { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.badge-secondary { background: hsl(var(--secondary)); color: hsl(var(--secondary-foreground)); }
.badge-outline { border-color: hsl(var(--border)); color: hsl(var(--foreground)); }
.badge-success { background: hsl(var(--success) / 0.1); color: hsl(var(--success)); border-color: hsl(var(--success) / 0.2); }
.badge-warning { background: hsl(var(--warning) / 0.1); color: hsl(var(--warning)); border-color: hsl(var(--warning) / 0.25); }
.badge-destructive { background: hsl(var(--destructive) / 0.08); color: hsl(var(--destructive)); border-color: hsl(var(--destructive) / 0.2); }
.badge-info { background: hsl(var(--info) / 0.08); color: hsl(var(--info)); border-color: hsl(var(--info) / 0.2); }
.dot { width: 0.5rem; height: 0.5rem; border-radius: 9999px; background: currentColor; display: inline-block; }

/* ---------- Table ---------- */
.table-wrap { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.table th {
  height: 2.5rem; padding: 0 1rem; text-align: left; white-space: nowrap;
  font-weight: 500; color: hsl(var(--muted-foreground)); border-bottom: 1px solid hsl(var(--border));
  background: hsl(var(--muted) / 0.4);
}
.table td { padding: 0.75rem 1rem; border-bottom: 1px solid hsl(var(--border)); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color .1s; }
.table tbody tr:hover { background: hsl(var(--muted) / 0.5); }
.table tr.clickable { cursor: pointer; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .actions { text-align: right; white-space: nowrap; }
.table-empty { padding: 3rem 1rem !important; text-align: center; color: hsl(var(--muted-foreground)); }
.table-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.75rem 1rem; border-top: 1px solid hsl(var(--border)); color: hsl(var(--muted-foreground)); flex-wrap: wrap; }
.cell-sub { font-size: 0.75rem; color: hsl(var(--muted-foreground)); margin-top: 0.125rem; }

/* ---------- Toolbar / filter ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding: 1rem; border-bottom: 1px solid hsl(var(--border)); }
.toolbar .input-group { flex: 1; min-width: 14rem; max-width: 24rem; }
.toolbar .select { width: auto; min-width: 10rem; }
.toolbar .input[type="date"] { width: auto; }

/* ---------- Tabs ---------- */
.tabs-list { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.25rem; height: 2.5rem; background: hsl(var(--muted)); border-radius: var(--radius); margin-bottom: 1.25rem; max-width: 100%; overflow-x: auto; }
.tab-trigger { display: inline-flex; align-items: center; gap: 0.5rem; height: 2rem; padding: 0 0.875rem; border-radius: calc(var(--radius) - 2px); font-weight: 500; color: hsl(var(--muted-foreground)); white-space: nowrap; transition: all .15s; }
.tab-trigger:hover { color: hsl(var(--foreground)); }
.tab-trigger.active { background: hsl(var(--background)); color: hsl(var(--foreground)); box-shadow: var(--shadow-sm); }

/* ---------- Alert ---------- */
.alert { display: flex; gap: 0.75rem; padding: 0.875rem 1rem; border: 1px solid hsl(var(--border)); border-radius: var(--radius); background: hsl(var(--background)); }
.alert > .icon { margin-top: 0.125rem; }
.alert-title { font-weight: 500; line-height: 1.4; }
.alert-desc { color: hsl(var(--muted-foreground)); font-size: 0.875rem; }
.alert-destructive { border-color: hsl(var(--destructive) / 0.4); color: hsl(var(--destructive)); background: hsl(var(--destructive) / 0.04); }
.alert-destructive .alert-desc { color: hsl(var(--destructive) / 0.9); }
.alert-success { border-color: hsl(var(--success) / 0.35); color: hsl(var(--success)); background: hsl(var(--success) / 0.05); }
.alert-success .alert-desc { color: hsl(var(--success)); }
.alert-warning { border-color: hsl(var(--warning) / 0.4); color: hsl(var(--warning)); background: hsl(var(--warning) / 0.05); }
.alert-warning .alert-desc { color: hsl(var(--warning)); }

/* ---------- Dialog ---------- */
.dialog-overlay { position: fixed; inset: 0; z-index: 60; background: rgb(0 0 0 / 0.5); display: none; align-items: flex-start; justify-content: center; padding: 6vh 1rem 1rem; overflow-y: auto; }
.dialog-overlay.open { display: flex; animation: fade-in .15s ease; }
.dialog { width: 100%; max-width: 32rem; background: hsl(var(--background)); border: 1px solid hsl(var(--border)); border-radius: calc(var(--radius) + 2px); box-shadow: var(--shadow-lg); animation: zoom-in .15s ease; }
.dialog-lg { max-width: 56rem; }
.dialog-header { padding: 1.25rem 1.5rem 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.dialog-title { font-size: 1.0625rem; font-weight: 600; }
.dialog-description { color: hsl(var(--muted-foreground)); margin-top: 0.25rem; }
.dialog-body { padding: 1.25rem 1.5rem; }
.dialog-footer { padding: 0 1.5rem 1.25rem; display: flex; justify-content: flex-end; gap: 0.5rem; flex-wrap: wrap; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes zoom-in { from { opacity: 0; transform: scale(.97); } }

/* ---------- Toast (gaya sonner) ---------- */
.toaster { position: fixed; right: 1rem; bottom: 1rem; z-index: 80; display: flex; flex-direction: column; gap: 0.5rem; width: min(24rem, calc(100vw - 2rem)); }
.toast { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.875rem 1rem; background: hsl(var(--background)); border: 1px solid hsl(var(--border)); border-radius: var(--radius); box-shadow: var(--shadow-lg); animation: toast-in .2s ease; }
.toast-success > .icon { color: hsl(var(--success)); }
.toast-error > .icon { color: hsl(var(--destructive)); }
.toast-info > .icon { color: hsl(var(--info)); }
.toast-msg { flex: 1; font-weight: 500; line-height: 1.4; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Data list (key-value) ---------- */
.dl { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 0.625rem 1rem; }
.dl dt { color: hsl(var(--muted-foreground)); }
.dl dd { min-width: 0; word-break: break-word; }
@media (max-width: 640px) { .dl { grid-template-columns: 1fr; gap: 0.125rem; } .dl dd { margin-bottom: 0.5rem; } }

/* ---------- Kode & log ---------- */
.code { font-family: var(--font-mono); font-size: 0.75rem; line-height: 1.6; background: hsl(var(--muted) / 0.6); border: 1px solid hsl(var(--border)); border-radius: var(--radius); padding: 0.75rem 1rem; white-space: pre-wrap; word-break: break-all; max-height: 26rem; overflow: auto; }
.console { font-family: var(--font-mono); font-size: 0.75rem; line-height: 1.7; background: hsl(240 10% 3.9%); color: hsl(240 5% 84%); border-radius: var(--radius); padding: 0.75rem 1rem; height: 22rem; overflow: auto; white-space: pre-wrap; word-break: break-word; }
.console .t { color: hsl(240 4% 50%); }
.console .ok { color: hsl(142 69% 58%); }
.console .warn { color: hsl(38 92% 60%); }
.console .err { color: hsl(0 84% 66%); }

/* ---------- Progress & skeleton ---------- */
.progress { height: 0.5rem; background: hsl(var(--secondary)); border-radius: 9999px; overflow: hidden; }
.progress-bar { height: 100%; background: hsl(var(--primary)); border-radius: 9999px; transition: width .4s ease; }
.skeleton { background: hsl(var(--muted)); border-radius: calc(var(--radius) - 2px); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.5; } }

/* ---------- Lain-lain ---------- */
.separator { height: 1px; background: hsl(var(--border)); margin: 1.25rem 0; }
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 0.5rem; padding: 3rem 1rem; color: hsl(var(--muted-foreground)); }
.empty .icon { width: 2rem; height: 2rem; margin-bottom: 0.25rem; }
.empty-title { font-weight: 600; color: hsl(var(--foreground)); }
.kbd { font-family: var(--font-mono); font-size: 0.75rem; padding: 0.125rem 0.375rem; border: 1px solid hsl(var(--border)); border-radius: 4px; background: hsl(var(--muted)); }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid hsl(var(--border)); }
.list-row:first-child { padding-top: 0; }
.list-row:last-child { border-bottom: 0; padding-bottom: 0; }
.status-line { display: inline-flex; align-items: center; gap: 0.375rem; font-size: 0.8125rem; color: hsl(var(--muted-foreground)); }

/* ---------- Halaman login ---------- */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-aside { background: hsl(240 10% 3.9%); color: hsl(0 0% 98%); padding: 2.5rem; display: flex; flex-direction: column; justify-content: space-between; }
.auth-aside .brand-mark { background: hsl(0 0% 98%); color: hsl(240 10% 3.9%); }
.auth-quote { font-size: 1.125rem; line-height: 1.6; max-width: 28rem; color: hsl(0 0% 90%); }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 2rem; }
.auth-card { width: 100%; max-width: 22rem; }
@media (max-width: 900px) { .auth-page { grid-template-columns: 1fr; } .auth-aside { display: none; } }

.rot-90 { transform: rotate(90deg); }
.user-chip.active { background: hsl(var(--accent)); }
details > summary { list-style: none; display: inline-flex; align-items: center; gap: 0.375rem; }
details > summary::-webkit-details-marker { display: none; }
