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

/* ─── Design Tokens ───────────────────────────────────────────────── */
:root {
  /* Surfaces & neutrals – light, business-app gray/white */
  --bg: #eceef1;
  --surface: #ffffff;
  --surface-2: #f2f3f5;          /* toolbar / table header gray */
  --border: #d8dce2;
  --border-strong: #c0c6ce;
  /* Sidebar – muted dark navy slate (flat) */
  --sidebar-bg: #21303f;
  --sidebar-bg-2: #21303f;
  --sidebar-text: #b6bfca;
  --sidebar-active-bg: #2e74bd;  /* medium-blue active highlight */
  --sidebar-active-text: #ffffff;
  /* Text – neutral grays (not pure black) */
  --text-primary: #2a2f36;
  --text-secondary: #5a626c;
  --text-muted: #8a929c;
  /* Accent – professional azure blue + link blue */
  --accent: #2f7dc4;
  --accent-hover: #2767a6;
  --accent-light: #e2eef8;
  --accent-border: #b6d3ec;
  --link: #1f6fbf;
  --row-hover: #eef5fb;
  --row-selected: #d4e7f7;
  --red: #c5392f;
  --red-light: #fdecea;
  --amber: #b9740a;
  --amber-light: #fcf3e4;
  --green: #2f9e52;
  --green-light: #e8f6ec;
  /* Geometry – squarer, desktop-app feel */
  --radius-sm: 2px;
  --radius: 3px;
  --radius-lg: 4px;
  /* Depth – minimal; rely on crisp borders */
  --shadow-xs: 0 1px 1px rgba(20,30,45,.04);
  --shadow-sm: 0 1px 2px rgba(20,30,45,.07);
  --shadow-md: 0 6px 22px rgba(20,30,45,.14);
  --sidebar-w: 212px;
  --topbar-h: 48px;
  --font: 'Segoe UI', 'Segoe UI Variable', system-ui, -apple-system, 'Inter', sans-serif;
  --mono: 'Consolas', 'SF Mono', ui-monospace, monospace;
  --transition: 110ms ease;
}

/* ─── Reset ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 13.5px; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { font-family: var(--font); background: var(--bg); color: var(--text-primary); min-height: 100vh; }
/* Numeric data lines up in columns */
.stat-value, .stock-num, .data-table td, .cell-part-number { font-variant-numeric: tabular-nums; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: var(--font); border: none; background: none; }
input, select, textarea { font-family: var(--font); }

/* ─── Layout ──────────────────────────────────────────────────────── */
.layout { display: flex; min-height: 100vh; }

/* ─── Sidebar ─────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.logo-mark {
  width: 28px; height: 28px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-mark svg { width: 16px; height: 16px; color: #fff; }
.logo-text-wrap strong { display: block; font-size: 13px; font-weight: 600; color: #fff; line-height: 1.2; }
.logo-text-wrap span { font-size: 11px; color: var(--sidebar-text); }

.sidebar-nav { flex: 1; padding: 8px 8px 0; overflow-y: auto; }

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #4a5060;
  padding: 12px 8px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--sidebar-text);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  margin-bottom: 1px;
}
.nav-item { padding: 9px 10px; font-size: 13.5px; border-radius: var(--radius); }
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; opacity: .8; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #e3e7ec; }
.nav-item.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-text);
}
.nav-item.active svg { opacity: 1; color: #fff; }

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.user-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border-radius: var(--radius-sm);
}
.user-avatar {
  width: 28px; height: 28px;
  background: #2a2f3a;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: #a0a6b4;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,.1);
}
.user-info-wrap { flex: 1; min-width: 0; }
.user-info-wrap strong { display: block; font-size: 12px; font-weight: 500; color: #d4d8e2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-info-wrap span { font-size: 11px; color: #4a5060; text-transform: capitalize; }
.logout-btn {
  width: 100%;
  margin-top: 6px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  color: #5c6070;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background var(--transition), color var(--transition);
  border: 1px solid rgba(255,255,255,.06);
}
.logout-btn svg { width: 13px; height: 13px; }
.logout-btn:hover { background: rgba(255,255,255,.04); color: #a0a6b4; }

/* ─── Main Content ────────────────────────────────────────────────── */
.main-content { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }

.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 50;
}
.topbar-title { font-size: 14px; font-weight: 600; color: var(--text-primary); letter-spacing: -.01em; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }

.page-body { padding: 16px 20px; }

/* ─── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1;
}
.btn svg { width: 14px; height: 14px; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); color: var(--text-primary); border: 1px solid var(--border); box-shadow: var(--shadow-xs); }
.btn-secondary:hover { background: var(--bg); border-color: var(--border-strong); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-icon {
  padding: 6px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: all var(--transition);
}
.btn-icon svg { width: 14px; height: 14px; display: block; }
.btn-icon:hover { border-color: var(--border-strong); color: var(--text-primary); }
.btn-icon.danger:hover { border-color: var(--red); color: var(--red); background: var(--red-light); }

/* ─── Stats Grid ──────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 13px;
  transition: border-color var(--transition);
}
.stat-card:hover { border-color: var(--border-strong); }
.stat-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.stat-label svg { width: 12px; height: 12px; }
.stat-value {
  font-size: 19px;
  font-weight: 650;
  color: var(--text-primary);
  letter-spacing: -.02em;
  line-height: 1;
}
.stat-value.warn { color: var(--amber); }
.stat-value.danger { color: var(--red); }

/* ─── Filter Bar ──────────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 8px 10px;
}
/* When a toolbar sits directly above the table, join them seamlessly */
.filter-bar + .table-wrap { border-top-left-radius: 0; border-top-right-radius: 0; }
.search-wrap { position: relative; flex: 1; min-width: 200px; }
.search-wrap svg {
  position: absolute;
  left: 10px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px;
  color: var(--text-muted);
  pointer-events: none;
}
.input-field {
  width: 100%;
  padding: 7px 10px 7px 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-primary);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.input-field.no-icon { padding-left: 10px; }
.input-field:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(29,95,208,.14); }
.input-field::placeholder { color: var(--text-muted); }
.select-field {
  padding: 7px 28px 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-primary);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239099ad' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center;
  appearance: none;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  min-width: 140px;
  transition: border-color var(--transition);
}
.select-field:focus { outline: none; border-color: var(--accent); }
.filter-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}
.filter-toggle input[type="checkbox"] { accent-color: var(--accent); width: 14px; height: 14px; }

/* ─── List layout: category panel + table (Fleet style) ───────────── */
.list-layout { display: flex; align-items: stretch; }
.cat-panel {
  width: 196px;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  overflow: hidden;
}
.cat-panel-head {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 12px;
  font-size: 12px; font-weight: 600; color: var(--text-secondary);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.cat-panel-head svg { width: 14px; height: 14px; opacity: .8; }
.cat-list { list-style: none; }
.cat-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 12px;
  font-size: 13px; color: var(--text-primary);
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.cat-item:last-child { border-bottom: none; }
.cat-item:hover { background: var(--row-hover); }
.cat-item.active {
  background: var(--accent-light);
  color: var(--link);
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--accent);
}
.cat-count {
  font-size: 11px; color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 7px; min-width: 20px; text-align: center;
}
.cat-item.active .cat-count { color: var(--link); background: #fff; border-color: var(--accent-border); }
.list-main { flex: 1; min-width: 0; }
.list-main .filter-bar { border-radius: 0; }
.list-main .table-wrap { border-radius: 0; }
.table-footer {
  display: flex; align-items: center; justify-content: flex-end;
  padding: 7px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
}
/* Inside a list-layout the left edge is the panel, so only round bottom-right */
.list-main .table-footer { border-radius: 0 0 var(--radius) 0; }
/* Square the table's bottom corners when a footer is attached directly below */
.table-wrap:has(+ .table-footer) { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.record-count { font-size: 12px; color: var(--text-secondary); }

/* ─── Table ───────────────────────────────────────────────────────── */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table thead tr { border-bottom: 1px solid var(--border); }
.data-table th {
  padding: 9px 14px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  background: var(--surface-2);
}
.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background var(--transition); cursor: pointer; }
.data-table tbody tr:hover td { background: var(--row-hover); }
.data-table tbody tr.selected td { background: var(--row-selected); }

/* Part numbers / IDs render as blue links, like the reference */
.cell-part-number { color: var(--link); font-size: 13px; font-weight: 600; }
.data-table tbody tr:hover .cell-part-number { text-decoration: underline; }
.cell-name { font-weight: 500; line-height: 1.3; }
.cell-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; line-height: 1.3; }
.cell-actions { display: flex; gap: 2px; align-items: center; }
.cell-actions .btn-icon { border-color: transparent; background: transparent; color: var(--accent); }
.cell-actions .btn-icon:hover { background: var(--surface-2); border-color: var(--border); color: var(--accent-hover); }
.cell-actions .btn-icon.danger { color: var(--text-muted); }
.cell-actions .btn-icon.danger:hover { color: var(--red); background: var(--red-light); border-color: transparent; }

/* ─── Status Badges ───────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
  border: 1px solid transparent;
}
.badge-ok   { background: var(--green-light); color: var(--green); border-color: rgba(26,138,74,.18); }
.badge-low  { background: var(--amber-light); color: var(--amber); border-color: rgba(194,119,10,.2); }
.badge-empty{ background: var(--red-light); color: var(--red); border-color: rgba(209,44,44,.18); }
.badge-warn { background: var(--amber-light); color: var(--amber); border-color: rgba(194,119,10,.2); }
.badge-category { background: var(--accent-light); color: var(--accent); border-color: var(--accent-border); font-weight: 600; }
.badge-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; display: inline-block; }

.stock-num { font-weight: 600; font-size: 13px; color: var(--text-primary); }
.stock-secondary { font-size: 12px; color: var(--text-muted); }

/* ─── Modal ───────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.32);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity 150ms ease;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 600px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 20px 48px rgba(0,0,0,.18);
  border: 1px solid var(--border);
  transform: translateY(8px) scale(.98);
  transition: transform 150ms ease;
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.modal-header h2 { font-size: 15px; font-weight: 600; }
.modal-body { padding: 20px; }
.modal-footer {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 0 0 var(--radius) var(--radius);
}

/* ─── Form ────────────────────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .span2 { grid-column: 1 / -1; }
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-label { font-size: 12px; font-weight: 500; color: var(--text-secondary); }
.form-input, .form-select, .form-textarea {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-primary);
  background: var(--surface);
  width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(29,95,208,.14);
}
.form-textarea { resize: vertical; min-height: 72px; }

/* ─── Combobox (pick an existing value or type a new one) ──────────── */
.combo { position: relative; }
.combo-menu {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 30;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  max-height: 184px; overflow-y: auto;
  margin-top: 2px; padding: 3px;
}
.combo-menu[hidden] { display: none; }
.combo-option {
  padding: 6px 9px; font-size: 13px; cursor: pointer;
  border-radius: var(--radius-sm);
}
.combo-option:hover { background: var(--accent-light); color: var(--accent); }

/* ─── Image Gallery ───────────────────────────────────────────────── */
.image-gallery { display: grid; grid-template-columns: repeat(5,1fr); gap: 8px; margin-top: 6px; }
.image-thumb {
  position: relative; aspect-ratio: 1;
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); background: var(--bg);
}
.image-thumb img { width: 100%; height: 100%; object-fit: cover; }
.img-delete {
  position: absolute; top: 4px; right: 4px;
  background: rgba(220,38,38,.85); color: #fff;
  border-radius: 3px; width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; cursor: pointer; opacity: 0;
  transition: opacity var(--transition);
}
.image-thumb:hover .img-delete { opacity: 1; }
.image-add-btn {
  aspect-ratio: 1; border-radius: var(--radius);
  border: 1px dashed var(--border-strong);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; font-size: 11px; color: var(--text-muted); cursor: pointer;
  background: var(--bg);
  transition: border-color var(--transition), color var(--transition);
}
.image-add-btn:hover { border-color: var(--accent); color: var(--accent); }
.image-add-btn svg { width: 16px; height: 16px; }
.image-count { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ─── Empty State ─────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.empty-state svg { width: 36px; height: 36px; margin-bottom: 12px; opacity: .4; }
.empty-state h3 { font-size: 14px; font-weight: 600; color: var(--text-secondary); }
.empty-state p { font-size: 13px; margin-top: 4px; }

/* ─── Divider ─────────────────────────────────────────────────────── */
.section-divider {
  font-size: 11px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--text-muted);
  padding: 8px 0 6px; border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}

/* ─── Spinner ─────────────────────────────────────────────────────── */
.spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Toast ───────────────────────────────────────────────────────── */
.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 999; display: flex; flex-direction: column; gap: 6px; }
.toast {
  padding: 10px 14px; border-radius: var(--radius);
  font-size: 13px; font-weight: 500; color: #fff;
  box-shadow: var(--shadow-md); display: flex; align-items: center; gap: 8px;
  animation: slideIn 200ms ease;
  min-width: 240px;
}
.toast svg { width: 14px; height: 14px; flex-shrink: 0; }
.toast.success { background: #16a34a; }
.toast.error   { background: var(--red); }
.toast.info    { background: var(--accent); }
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ─── Login ───────────────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  background: var(--bg);
}
.login-left {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.login-card {
  width: 100%;
  max-width: 360px;
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
}
.login-brand .brand-mark {
  width: 32px; height: 32px;
  background: var(--accent);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
}
.login-brand .brand-mark svg { width: 18px; height: 18px; color: #fff; }
.login-brand strong { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.login-heading { font-size: 22px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.login-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; }
.login-form .form-group { margin-bottom: 14px; }
.login-form .form-label { color: var(--text-secondary); margin-bottom: 5px; }
.login-form .form-input { border-color: var(--border); padding: 9px 12px; }
.login-btn {
  width: 100%; padding: 10px; font-size: 14px; font-weight: 600;
  margin-top: 4px;
}
.login-error { font-size: 12px; color: var(--red); margin-top: 8px; display: none; }
.login-error.visible { display: block; }
.login-hint { font-size: 12px; color: var(--text-muted); margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.login-hint code { background: var(--bg); border: 1px solid var(--border); padding: 1px 5px; border-radius: 3px; font-size: 11px; }
.login-right {
  width: 420px;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px;
  border-left: 1px solid rgba(255,255,255,.06);
}
.login-right-title { font-size: 18px; font-weight: 600; color: #fff; margin-bottom: 12px; line-height: 1.4; }
.login-right-desc { font-size: 13px; color: var(--sidebar-text); line-height: 1.7; }
.feature-list { margin-top: 28px; display: flex; flex-direction: column; gap: 14px; }
.feature-item { display: flex; align-items: flex-start; gap: 10px; }
.feature-icon {
  width: 28px; height: 28px; border-radius: var(--radius-sm);
  background: rgba(29,95,208,.2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}
.feature-icon svg { width: 14px; height: 14px; color: #93c5fd; }
.feature-item strong { display: block; font-size: 13px; font-weight: 500; color: #d4d8e2; }
.feature-item span { font-size: 12px; color: var(--sidebar-text); line-height: 1.5; }

/* ─── Offline / sync banner ───────────────────────────────────────── */
.offline-banner {
  position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%);
  z-index: 1000; display: none; align-items: center; gap: 8px;
  background: var(--amber); color: #fff;
  font-size: 12.5px; font-weight: 600; letter-spacing: .01em;
  padding: 8px 16px; border-radius: 999px;
  box-shadow: var(--shadow-md);
}
.offline-banner.syncing { background: var(--accent); }

/* ─── Scrollbar ───────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; }

/* ─── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 1100px) { .stats-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) {
  .login-right { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  :root { --sidebar-w: 0px; }
  .sidebar { transform: translateX(-216px); width: 216px; }
  .main-content { margin-left: 0; }
  .form-grid { grid-template-columns: 1fr; }
}
