/* DRi Dashboard — base + components. Token-driven; no hardcoded hex. */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
::selection { background: hsl(var(--primary) / 0.25); }

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: hsl(var(--muted-foreground) / 0.3) transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb { background: hsl(var(--muted-foreground) / 0.28); border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: hsl(var(--muted-foreground) / 0.5); background-clip: content-box; }

/* ---------- Typography ---------- */
.display { font-size: clamp(2.4rem, 5vw, 3.4rem); font-weight: 300; letter-spacing: -0.03em; line-height: 1.02; }
.h1 { font-size: 1.75rem; font-weight: 600; letter-spacing: -0.02em; }
.h2 { font-size: 1.375rem; font-weight: 600; letter-spacing: -0.01em; }
.h3 { font-size: 1.05rem; font-weight: 500; }
.eyebrow { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.16em; color: hsl(var(--primary)); }
.label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: hsl(var(--muted-foreground)); }
.muted { color: hsl(var(--muted-foreground)); }
.small { font-size: 0.8rem; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; }

/* ---------- Layout shell ---------- */
.app-shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; transition: grid-template-columns var(--dur-enter) var(--ease); }
.scrim { display: none; }
.app-shell.collapsed { grid-template-columns: var(--sidebar-w-collapsed) 1fr; }
.main { min-width: 0; display: flex; flex-direction: column; }
.content { padding: 24px 28px 56px; max-width: 1480px; width: 100%; margin: 0 auto; }

/* ---------- Sidebar ---------- */
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: hsl(var(--surface-dark)); color: hsl(0 0% 100% / 0.92);
  border-right: 1px solid hsl(0 0% 100% / 0.07); overflow: hidden; z-index: 40;
}
.sidebar-brand { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 22px 20px 18px; min-height: 76px; }
.sidebar-brand .logo-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--gradient-drix); flex: none; display: grid; place-items: center; color: #000; font-weight: 800; box-shadow: 0 6px 18px -6px hsl(190 100% 50% / 0.6); }
.sidebar-brand .brand-logo { height: 40px; width: auto; max-width: 180px; object-fit: contain; }
.app-shell.collapsed .sidebar-brand .brand-logo { height: 30px; max-width: 100%; }
.sidebar-brand .brand-text { font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
.sidebar-brand .brand-text small { display: block; font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; color: hsl(0 0% 100% / 0.45); }
.app-shell.collapsed .brand-text { opacity: 0; pointer-events: none; }

.nav { position: relative; flex: 1; padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav-group-label { font-size: 0.6rem; letter-spacing: 0.18em; text-transform: uppercase; color: hsl(0 0% 100% / 0.35); padding: 16px 12px 6px; white-space: nowrap; }
.app-shell.collapsed .nav-group-label { opacity: 0; height: 14px; padding-top: 8px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: 10px; color: hsl(0 0% 100% / 0.62); font-weight: 500; white-space: nowrap;
  transition: background var(--dur-hover) var(--ease), color var(--dur-hover) var(--ease);
}
.nav-item svg { width: 19px; height: 19px; flex: none; }
.nav-item:hover { background: hsl(0 0% 100% / 0.06); color: hsl(0 0% 100% / 0.95); }
.nav-item.active { color: #fff; background: hsl(0 0% 100% / 0.05); }
.nav-item .nav-text { transition: opacity var(--dur-hover) var(--ease); }
.app-shell.collapsed .nav-item .nav-text { opacity: 0; }
/* Sliding active indicator */
.nav-indicator { position: absolute; left: 12px; width: 2px; border-radius: 2px; background: hsl(var(--primary)); box-shadow: 0 0 10px hsl(var(--primary) / 0.9); transition: top var(--dur-enter) var(--ease), height var(--dur-enter) var(--ease), opacity var(--dur-hover); }

.sidebar-bottom { padding: 12px; border-top: 1px solid hsl(0 0% 100% / 0.07); display: flex; flex-direction: column; gap: 10px; }
.qr-row { display: flex; gap: 10px; }
.app-shell.collapsed .qr-row { flex-direction: column; }
.qr-thumb { flex: 1; border: 1px solid hsl(0 0% 100% / 0.12); border-radius: 12px; padding: 8px; background: hsl(0 0% 100% / 0.04); display: flex; flex-direction: column; align-items: center; gap: 6px; transition: transform var(--dur-hover) var(--ease), border-color var(--dur-hover); }
.qr-thumb:hover { transform: translateY(-2px); border-color: hsl(var(--primary) / 0.6); }
.qr-thumb img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 6px; background: #fff; }
.qr-thumb span { font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase; color: hsl(0 0% 100% / 0.55); }
.app-shell.collapsed .qr-thumb span { display: none; }
.contact-link { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 0.78rem; color: hsl(0 0% 100% / 0.55); padding: 8px; border-radius: 10px; transition: color var(--dur-hover), background var(--dur-hover); white-space: nowrap; }
.contact-link:hover { color: #fff; background: hsl(0 0% 100% / 0.06); }
.app-shell.collapsed .contact-link span { display: none; }

/* ---------- Topbar ---------- */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 18px; padding: 16px 28px; background: hsl(var(--background) / 0.72); backdrop-filter: blur(18px); border-bottom: 1px solid hsl(var(--border)); }
.topbar .titles { flex: 1; min-width: 0; }
.topbar .titles .page-title { font-size: 1.3rem; font-weight: 600; letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; }
.topbar .titles .page-title svg { width: 22px; height: 22px; color: hsl(var(--primary)); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid hsl(var(--border)); background: hsl(var(--card)); color: hsl(var(--foreground)); display: grid; place-items: center; transition: all var(--dur-hover) var(--ease); }
.icon-btn:hover { border-color: hsl(var(--primary) / 0.6); box-shadow: var(--shadow-glow); transform: translateY(-1px); }
.icon-btn svg { width: 18px; height: 18px; }
.sidebar-toggle { display: grid; }

.user-chip { display: flex; align-items: center; gap: 10px; padding: 5px 6px 5px 12px; border: 1px solid hsl(var(--border)); border-radius: 99px; background: hsl(var(--card)); transition: all var(--dur-hover) var(--ease); }
.user-chip:hover { border-color: hsl(var(--primary) / 0.6); }
.user-chip .avatar { width: 28px; height: 28px; border-radius: 99px; background: hsl(var(--secondary)); color: hsl(var(--muted-foreground)); display: grid; place-items: center; border: 1px solid hsl(var(--border)); }
.user-chip .avatar svg { width: 16px; height: 16px; }
.user-chip .u-meta { line-height: 1.1; }
.user-chip .u-meta b { font-size: 0.8rem; font-weight: 600; }
.user-chip .u-meta small { font-size: 0.62rem; color: hsl(var(--muted-foreground)); }

/* ---------- Panels / cards ---------- */
.panel { background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: 18px; padding: 22px; box-shadow: var(--shadow-sm); }
.panel-glass { background: hsl(var(--card) / 0.6); backdrop-filter: blur(18px); border: 1px solid hsl(var(--border)); border-radius: 18px; }
.panel-pad-0 { padding: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-head h3 { font-size: 0.95rem; font-weight: 600; display: flex; align-items: center; gap: 9px; }
.panel-head h3 svg { width: 17px; height: 17px; color: hsl(var(--primary)); }
.panel-sub { font-size: 0.74rem; color: hsl(var(--muted-foreground)); }

.panel-drix { position: relative; border-radius: 24px; padding: 1px; background: var(--gradient-drix); box-shadow: 0 30px 80px -28px hsl(190 100% 50% / 0.35); }
.panel-drix > .panel-drix-inner { background: hsl(0 0% 4%); color: #fff; border-radius: 23px; padding: 22px; height: 100%; }
.panel-drix .eyebrow { color: hsl(0 0% 100% / 0.7); }

/* ---------- KPI cards ---------- */
.kpi { position: relative; overflow: hidden; }
.kpi .kpi-top { display: flex; align-items: center; justify-content: space-between; }
.kpi-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: hsl(var(--primary) / 0.12); color: hsl(var(--primary)); }
.kpi-icon svg { width: 21px; height: 21px; }
.kpi-value { font-size: 2.3rem; font-weight: 300; letter-spacing: -0.03em; margin-top: 14px; line-height: 1; }
.kpi-label { margin-top: 8px; font-size: 0.82rem; color: hsl(var(--muted-foreground)); }
.kpi-trend { display: inline-flex; align-items: center; gap: 4px; font-size: 0.72rem; font-weight: 600; padding: 3px 8px; border-radius: 99px; margin-top: 10px; }
.kpi-trend svg { width: 13px; height: 13px; }
.kpi-flash { animation: kpiFlash 0.7s var(--ease); }
@keyframes kpiFlash { 0% { color: hsl(var(--primary)); } 100% { color: inherit; } }

/* ---------- 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: 0.84rem; transition: transform var(--dur-hover) var(--ease), box-shadow var(--dur-hover) var(--ease), background var(--dur-hover), border-color var(--dur-hover); white-space: nowrap; }
.btn svg { width: 16px; height: 16px; }
.btn:active { transform: scale(0.98); }
.btn-cyan { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.btn-cyan:hover { box-shadow: 0 10px 26px -10px hsl(var(--primary) / 0.7); transform: translateY(-1px); }
.btn-dark { background: hsl(var(--foreground)); color: hsl(var(--background)); }
.btn-dark:hover { box-shadow: var(--shadow-glow); transform: translateY(-1px); }
.btn-outline { border-color: hsl(var(--border)); background: hsl(var(--card)); color: hsl(var(--foreground)); }
.btn-outline:hover { border-color: hsl(var(--primary) / 0.6); background: hsl(var(--muted)); }
.btn-ghost { background: transparent; color: hsl(var(--muted-foreground)); }
.btn-ghost:hover { background: hsl(var(--muted)); color: hsl(var(--foreground)); }
.btn-danger { background: hsl(var(--destructive)); color: #fff; }
.btn-danger:hover { box-shadow: 0 10px 26px -10px hsl(var(--destructive) / 0.7); transform: translateY(-1px); }
.btn-sm { padding: 7px 11px; font-size: 0.78rem; border-radius: 9px; }
.btn-lg { padding: 13px 22px; font-size: 0.92rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-loading { opacity: 0.55; pointer-events: none; }
.btn .spin { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-icon-nudge:hover svg { transform: translateX(2px); transition: transform var(--dur-hover) var(--ease); }

/* ---------- Status pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 0.72rem; font-weight: 600; }
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 99px; background: currentColor; }
.pill-success { color: hsl(var(--success)); background: hsl(var(--success) / 0.12); }
.pill-warning { color: hsl(var(--warning)); background: hsl(var(--warning) / 0.14); }
.pill-danger  { color: hsl(var(--destructive)); background: hsl(var(--destructive) / 0.12); }
.pill-info    { color: hsl(var(--info)); background: hsl(var(--info) / 0.12); }
.pill-muted   { color: hsl(var(--muted-foreground)); background: hsl(var(--muted)); }
.badge { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; background: hsl(var(--primary) / 0.14); color: hsl(var(--primary)); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 0.78rem; font-weight: 500; color: hsl(var(--muted-foreground)); }
.input, .select, textarea.input {
  width: 100%; padding: 10px 12px; border-radius: 11px; border: 1px solid hsl(var(--input));
  background: hsl(var(--card)); color: hsl(var(--foreground)); font-size: 0.86rem; font-family: inherit;
  transition: border-color var(--dur-hover), box-shadow var(--dur-hover);
}
.input:focus, .select:focus, textarea.input:focus { outline: none; border-color: hsl(var(--ring)); box-shadow: var(--shadow-glow); }
.input.error, .select.error { border-color: hsl(var(--destructive)); }
.select { appearance: none; 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='%23999' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.shake { animation: shake 0.4s var(--ease); }
@keyframes shake { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-6px)} 40%{transform:translateX(6px)} 60%{transform:translateX(-4px)} 80%{transform:translateX(4px)} }

/* Toggle switch */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: hsl(var(--muted-foreground) / 0.4); border-radius: 99px; transition: var(--dur-hover) var(--ease); }
.switch .slider::before { content: ''; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: #fff; border-radius: 99px; transition: var(--dur-hover) var(--ease); box-shadow: var(--shadow-sm); }
.switch input:checked + .slider { background: hsl(var(--primary)); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* Segmented control (time range) */
.segmented { display: inline-flex; padding: 3px; background: hsl(var(--muted)); border-radius: 11px; gap: 2px; }
.segmented button { padding: 6px 14px; border: none; background: transparent; border-radius: 8px; font-size: 0.78rem; font-weight: 600; color: hsl(var(--muted-foreground)); transition: color var(--dur-hover); }
.segmented button.active { background: hsl(var(--card)); color: hsl(var(--foreground)); box-shadow: var(--shadow-sm); }

/* Status-button group (daily status in the form) */
.status-dots { display: inline-flex; gap: 6px; }
.status-dots button { width: 30px; height: 30px; border-radius: 9px; border: 1px solid hsl(var(--border)); background: hsl(var(--card)); display: grid; place-items: center; transition: all var(--dur-hover) var(--ease); }
.status-dots button .dot { width: 12px; height: 12px; border-radius: 99px; }
.status-dots button.online .dot { background: hsl(var(--success)); }
.status-dots button.offline .dot { background: hsl(var(--destructive)); }
.status-dots button.standby .dot { background: hsl(var(--warning)); }
.status-dots button.active { border-color: hsl(var(--primary)); box-shadow: var(--shadow-glow); transform: scale(1.05); }

/* ---------- Tables ---------- */
.table-wrap { overflow: auto; border-radius: 14px; }
table.table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
table.table thead th { position: sticky; top: 0; background: hsl(var(--card)); text-align: left; font-weight: 600; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: hsl(var(--muted-foreground)); padding: 11px 12px; border-bottom: 1px solid hsl(var(--border)); z-index: 1; }
table.table tbody td { padding: 11px 12px; border-bottom: 1px solid hsl(var(--border)); }
table.table tbody tr { transition: background var(--dur-hover); }
table.table tbody tr:hover { background: hsl(var(--muted) / 0.5); }
table.table tbody tr:last-child td { border-bottom: none; }
.day-dot { display: inline-block; width: 11px; height: 11px; border-radius: 99px; }
.day-dot.online { background: hsl(var(--success)); }
.day-dot.offline { background: hsl(var(--destructive)); }
.day-dot.standby { background: hsl(var(--warning)); }

/* ---------- Tabs ---------- */
.tabs { position: relative; display: flex; gap: 4px; border-bottom: 1px solid hsl(var(--border)); margin-bottom: 22px; }
.tab { position: relative; padding: 11px 16px; font-weight: 600; font-size: 0.85rem; color: hsl(var(--muted-foreground)); background: none; border: none; transition: color var(--dur-hover); display: flex; align-items: center; gap: 8px; }
.tab svg { width: 16px; height: 16px; }
.tab.active { color: hsl(var(--foreground)); }
.tab-indicator { position: absolute; bottom: -1px; height: 2px; background: hsl(var(--primary)); border-radius: 2px; transition: left var(--dur-enter) var(--ease), width var(--dur-enter) var(--ease); }

/* ---------- Grid helpers ---------- */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.row { display: flex; gap: 12px; align-items: center; }
.row-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.mt-12 { margin-top: 12px; } .mt-18 { margin-top: 18px; } .mt-24 { margin-top: 24px; }
.stack { display: flex; flex-direction: column; gap: 18px; }

/* ---------- Insights ---------- */
.insight-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 16px; background: hsl(0 0% 100% / 0.04); border: 1px solid hsl(0 0% 100% / 0.08); }
.insight-card .i-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; background: hsl(0 0% 100% / 0.06); }
.insight-card .i-ic svg { width: 18px; height: 18px; }
.insight-card b { font-weight: 600; }
.insight-card p { font-size: 0.8rem; color: hsl(0 0% 100% / 0.65); margin-top: 2px; }

/* ---------- Skeletons ---------- */
.skeleton { position: relative; overflow: hidden; background: hsl(var(--muted)); border-radius: 10px; }
.skeleton::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, hsl(var(--foreground) / 0.06), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { 100% { transform: translateX(100%); } }
.sk-line { height: 12px; margin: 8px 0; }
.sk-chart { height: 220px; }

/* ---------- Empty state ---------- */
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 48px 20px; text-align: center; color: hsl(var(--muted-foreground)); }
.empty .e-ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: hsl(var(--muted)); }
.empty .e-ic svg { width: 24px; height: 24px; }

/* ---------- Toasts ---------- */
.toast-host { position: fixed; right: 20px; bottom: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; align-items: center; gap: 11px; min-width: 260px; max-width: 380px; padding: 13px 15px; border-radius: 13px; background: hsl(var(--card)); border: 1px solid hsl(var(--border)); box-shadow: var(--shadow-md); overflow: hidden; position: relative; animation: toastIn var(--dur-enter) var(--ease); }
.toast.out { animation: toastOut 0.3s var(--ease) forwards; }
.toast .t-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.toast .t-ic svg { width: 17px; height: 17px; }
.toast.success .t-ic { background: hsl(var(--success) / 0.14); color: hsl(var(--success)); }
.toast.error .t-ic { background: hsl(var(--destructive) / 0.14); color: hsl(var(--destructive)); }
.toast.info .t-ic { background: hsl(var(--primary) / 0.14); color: hsl(var(--primary)); }
.toast .t-bar { position: absolute; left: 0; bottom: 0; height: 2px; background: hsl(var(--primary)); animation: tbar 3.2s linear forwards; }
.toast.success .t-bar { background: hsl(var(--success)); }
.toast.error .t-bar { background: hsl(var(--destructive)); }
@keyframes tbar { from { width: 100%; } to { width: 0; } }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px) scale(0.98); } }

/* ---------- Modal ---------- */
.modal-host { position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: hsl(0 0% 0% / 0.55); backdrop-filter: blur(6px); animation: fadeIn var(--dur-hover) var(--ease); }
.modal { position: relative; background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: 20px; box-shadow: var(--shadow-md); width: 100%; max-width: 460px; padding: 24px; animation: scaleIn var(--dur-enter) var(--ease); }
.modal.modal-wide { max-width: 720px; }
.modal-img { background: transparent; border: none; box-shadow: none; padding: 0; width: auto; max-width: 92vw; max-height: 92vh; display: flex; flex-direction: column; align-items: center; }
.modal-img img { border-radius: 16px; max-height: 78vh; max-width: 92vw; width: auto; background: #fff; padding: 12px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.97) translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Motion utilities ---------- */
.reveal { opacity: 0; transform: translateY(18px); }
.reveal.in { opacity: 1; transform: none; transition: opacity var(--dur-enter) var(--ease), transform var(--dur-enter) var(--ease); }
.hover-lift { transition: transform var(--dur-hover) var(--ease), box-shadow var(--dur-hover) var(--ease); }
.hover-lift:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* ---------- Centered standalone screens (login / wizard / errors) ---------- */
.center-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; background:
  radial-gradient(1200px 600px at 80% -10%, hsl(var(--primary) / 0.12), transparent 60%),
  radial-gradient(900px 500px at -10% 110%, hsl(262 83% 63% / 0.10), transparent 60%),
  hsl(var(--background)); }
.center-card { width: 100%; max-width: 440px; text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.center-card.wide { max-width: 760px; }

/* Split login (admin | guest) */
.login-card { width: 100%; max-width: 880px; display: grid; grid-template-columns: 1.05fr 1fr; border-radius: 24px; overflow: hidden; border: 1px solid hsl(var(--border)); box-shadow: var(--shadow-md); background: hsl(var(--card)); }
.login-left { padding: 44px 40px; }
.login-right { position: relative; padding: 44px 40px; color: #fff; background: hsl(0 0% 4%); display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.login-right::before { content: ''; position: absolute; inset: 0; background: var(--gradient-drix); opacity: 0.16; }
.login-right > * { position: relative; z-index: 1; }
.login-feature { display: flex; gap: 10px; align-items: center; margin-top: 9px; color: hsl(0 0% 100% / 0.82); font-size: 0.85rem; }
.login-feature svg { width: 16px; height: 16px; color: hsl(var(--primary)); flex: none; }
@media (max-width: 760px) {
  .login-card { grid-template-columns: 1fr; max-width: 440px; }
  .login-left { padding: 32px 26px; }
  .login-right { padding: 32px 26px; }
}
.error-code { font-size: 4rem; font-weight: 300; letter-spacing: -0.04em; color: hsl(var(--primary)); }
.status-icon { width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center; }
.status-icon svg { width: 28px; height: 28px; }
.status-icon.warn { background: hsl(var(--warning) / 0.14); color: hsl(var(--warning)); }

/* ---------- Custom cursor ---------- */
.cursor-dot, .cursor-ring { position: fixed; top: 0; left: 0; border-radius: 99px; pointer-events: none; z-index: 99999; mix-blend-mode: difference; }
.cursor-dot { width: 6px; height: 6px; background: #fff; transform: translate(-50%, -50%); }
.cursor-ring { width: 30px; height: 30px; border: 1.5px solid #fff; transform: translate(-50%, -50%); transition: width 0.18s var(--ease), height 0.18s var(--ease), background 0.18s; }
.cursor-ring.hot { width: 46px; height: 46px; background: hsl(var(--primary) / 0.12); }
body.has-cursor, body.has-cursor a, body.has-cursor button { cursor: none; }

/* ---------- Mobile ---------- */
.mobile-only { display: none; }
@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; width: var(--sidebar-w); transform: translateX(-100%); transition: transform var(--dur-enter) var(--ease); }
  .app-shell.nav-open .sidebar { transform: none; box-shadow: var(--shadow-md); }
  .scrim { display: block; position: fixed; inset: 0; background: hsl(0 0% 0% / 0.5); z-index: 35; opacity: 0; pointer-events: none; transition: opacity var(--dur-hover); }
  .app-shell.nav-open .scrim { opacity: 1; pointer-events: auto; }
  .mobile-only { display: inline-grid; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .content { padding: 18px 16px 48px; }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hide-sm { display: none !important; }

  /* Declutter the header on phones */
  .topbar { padding: 12px 14px; gap: 8px; }
  .topbar .eyebrow { display: none; }
  .topbar .titles .page-title { font-size: 1.05rem; gap: 8px; }
  .topbar .titles .page-title svg { width: 18px; height: 18px; }
  .user-chip { border: none; background: transparent; padding: 0; gap: 0; }
  .user-chip .avatar { display: none; }
  .btn-sm { padding: 7px 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
