/* ============================================================
   Melon Assets — Design System
   /var/www/melon_assets_spydersolutions_co_za/public_html/assets/style.css
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  /* Brand */
  --color-primary:      #f97316;
  --color-primary-dark: #ea6c0a;
  --color-primary-pale: #fff7ed;
  /* Sidebar */
  --sidebar-bg:         #0f172a;
  --sidebar-width:      260px;
  --sidebar-text:       #94a3b8;
  --sidebar-text-hover: #f1f5f9;
  --sidebar-active-bg:  rgba(249,115,22,0.12);
  --sidebar-active:     #f97316;
  /* Content */
  --bg-page:            #f1f5f9;
  --bg-card:            #ffffff;
  --bg-header:          #ffffff;
  /* Text */
  --text-primary:       #0f172a;
  --text-secondary:     #64748b;
  --text-muted:         #94a3b8;
  /* Borders */
  --border:             #e2e8f0;
  --border-focus:       #f97316;
  /* Status colours */
  --success:   #22c55e;
  --warning:   #f59e0b;
  --danger:    #ef4444;
  --info:      #3b82f6;
  --muted:     #94a3b8;
  /* Shadow */
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08);
  --shadow-md:  0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.12);
  /* Misc */
  --radius:     10px;
  --radius-sm:  6px;
  --topbar-h:   64px;
  --transition: .18s ease;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-font-smoothing: antialiased; }
body {
  font-family: 'Plus Jakarta Sans', 'Segoe UI', -apple-system, system-ui, sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

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

/* ── Sidebar ───────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
  transition: transform var(--transition);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  height: var(--topbar-h);
  border-bottom: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
}
.sidebar-brand .brand-icon {
  width: 36px; height: 36px;
  background: var(--color-primary);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.sidebar-brand .brand-name {
  font-family: 'Syne', 'Segoe UI', -apple-system, system-ui, sans-serif;
  font-size: 1.1rem;
  color: #f1f5f9;
  letter-spacing: .02em;
}
.sidebar-brand .brand-sub {
  font-size: .65rem;
  color: var(--sidebar-text);
  letter-spacing: .08em;
  text-transform: uppercase;
  display: block;
  margin-top: 1px;
}

.sidebar-section {
  padding: 20px 12px 8px;
}
.sidebar-section-label {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--sidebar-text);
  opacity: .6;
  padding: 0 8px;
  margin-bottom: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  font-size: .88rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
  cursor: pointer;
  white-space: nowrap;
}
.nav-item:hover {
  background: rgba(255,255,255,.06);
  color: var(--sidebar-text-hover);
}
.nav-item.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active);
}
.nav-item .nav-icon {
  width: 18px; height: 18px;
  flex-shrink: 0;
  opacity: .8;
}
.nav-item.active .nav-icon { opacity: 1; }
.nav-badge {
  margin-left: auto;
  background: var(--color-primary);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 20px;
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px 12px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}
.sidebar-user:hover { background: rgba(255,255,255,.06); }
.sidebar-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  flex-shrink: 0;
}
.sidebar-user-info .name { font-size: .82rem; color: #e2e8f0; font-weight: 600; }
.sidebar-user-info .role { font-size: .7rem; color: var(--sidebar-text); }
.sidebar-logout {
  display: flex; align-items: center; gap: 8px;
  font-size: .8rem; color: var(--sidebar-text);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  margin-top: 4px;
  transition: all var(--transition);
}
.sidebar-logout:hover { background: rgba(239,68,68,.12); color: #fca5a5; }

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

/* ── Top Bar ───────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--bg-header);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  color: var(--text-muted);
}
.topbar-breadcrumb span.sep { opacity: .5; }
.topbar-breadcrumb span:last-child { color: var(--text-secondary); }
.topbar-spacer { flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }

/* ── Page Body ─────────────────────────────────────────────── */
.page-body {
  padding: 28px;
  flex: 1;
}
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.page-title {
  font-family: 'Syne', 'Segoe UI', -apple-system, system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
}
.page-subtitle {
  font-size: .85rem;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-title {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text-primary);
}
.card-body { padding: 20px; }

/* ── Stat Cards ────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--stat-accent, var(--color-primary));
}
.stat-card .stat-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--stat-accent-pale, var(--color-primary-pale));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 14px;
  color: var(--stat-accent, var(--color-primary));
}
.stat-card .stat-value {
  font-family: 'Syne', 'Segoe UI', -apple-system, system-ui, sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.stat-card .stat-label {
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: .85rem;
  font-weight: 600;
  font-family: 'Plus Jakarta Sans', 'Segoe UI', -apple-system, system-ui, sans-serif;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}
.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover { background: var(--color-primary-dark); color: #fff; }
.btn-secondary {
  background: var(--border);
  color: var(--text-secondary);
}
.btn-secondary:hover { background: #d1d5db; color: var(--text-primary); }
.btn-danger {
  background: #fef2f2;
  color: var(--danger);
  border: 1px solid #fecaca;
}
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-success {
  background: #f0fdf4;
  color: var(--success);
  border: 1px solid #bbf7d0;
}
.btn-success:hover { background: var(--success); color: #fff; }
.btn-icon {
  padding: 7px;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.btn-icon:hover { background: var(--border); color: var(--text-primary); }
.btn-sm { padding: 5px 10px; font-size: .78rem; }
.btn-lg { padding: 11px 24px; font-size: .95rem; }

/* ── Forms ─────────────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.form-grid-3 { grid-template-columns: repeat(3, 1fr); }
.form-full { grid-column: 1 / -1; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.form-label .req { color: var(--danger); margin-left: 2px; }
.form-control {
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-family: 'Plus Jakarta Sans', 'Segoe UI', -apple-system, system-ui, sans-serif;
  color: var(--text-primary);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}
.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(249,115,22,.12);
}
.form-control::placeholder { color: var(--text-muted); }
select.form-control { cursor: pointer; }
.form-hint {
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.form-section {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 8px;
}
.form-section-title {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--color-primary);
  margin-bottom: 16px;
}

/* ── Toggle Switch ─────────────────────────────────────────── */
.toggle-wrap { display: flex; align-items: center; gap: 10px; }
.toggle {
  position: relative;
  width: 42px; height: 24px;
  cursor: pointer;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: #cbd5e1;
  border-radius: 24px;
  transition: background var(--transition);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  top: 3px; left: 3px;
  transition: transform var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.toggle input:checked + .toggle-slider { background: var(--color-primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }
.toggle-label { font-size: .85rem; font-weight: 500; }

/* ── Tables ────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}
.data-table thead th {
  background: #f8fafc;
  padding: 11px 14px;
  text-align: left;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table thead th a {
  display: inline-flex; align-items: center; gap: 4px;
  color: inherit;
}
.data-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: #f8fafc; }
.data-table td {
  padding: 12px 14px;
  color: var(--text-secondary);
  vertical-align: middle;
}
.data-table td .asset-number {
  font-family: 'Syne', 'Segoe UI', -apple-system, system-ui, sans-serif;
  font-size: .9rem;
  font-weight: 700;
  color: var(--color-primary);
}
.data-table td .device-name {
  font-weight: 600;
  color: var(--text-primary);
}
.table-actions { display: flex; gap: 4px; justify-content: flex-end; }
.table-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  font-size: .88rem;
}
.table-empty .empty-icon { font-size: 2.5rem; margin-bottom: 10px; opacity: .4; }

/* ── Search & Filter Bar ───────────────────────────────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: #fafbfc;
}
.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 220px;
}
.search-input-wrap .search-icon {
  position: absolute;
  left: 10px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.search-input-wrap input {
  padding-left: 34px;
  width: 100%;
}
.filter-select { min-width: 140px; }

/* ── Badges ────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .03em;
  white-space: nowrap;
}
.badge-success { background: #dcfce7; color: #15803d; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger  { background: #fee2e2; color: #b91c1c; }
.badge-primary { background: #dbeafe; color: #1d4ed8; }
.badge-info    { background: #e0f2fe; color: #0369a1; }
.badge-muted   { background: #f1f5f9; color: #64748b; }
.badge-orange  { background: #fff7ed; color: #c2410c; }

/* ── Modal ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.5);
  backdrop-filter: blur(2px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(10px);
  transition: transform .2s ease;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-lg { max-width: 860px; }
.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title { font-size: .95rem; font-weight: 700; }
.modal-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 1.2rem; padding: 4px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.modal-close:hover { background: var(--border); color: var(--text-primary); }
.modal-body { padding: 24px; }
.modal-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ── Toast Notifications ───────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 280px;
  max-width: 380px;
  font-size: .85rem;
  background: #fff;
  border-left: 4px solid var(--toast-color, var(--info));
  animation: slideIn .2s ease forwards;
}
.toast.toast-success { --toast-color: var(--success); }
.toast.toast-error   { --toast-color: var(--danger); }
.toast.toast-warning { --toast-color: var(--warning); }
.toast .toast-icon { flex-shrink: 0; font-size: 1rem; margin-top: 1px; }
.toast .toast-text { flex: 1; color: var(--text-primary); font-weight: 500; }
.toast .toast-close { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 1rem; padding: 0; margin-left: 4px; }
@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Login Page ────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sidebar-bg);
  position: relative;
  overflow: hidden;
}
.login-page::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249,115,22,.15), transparent 70%);
  top: -200px; right: -100px;
}
.login-page::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59,130,246,.08), transparent 70%);
  bottom: -150px; left: -100px;
}
.login-card {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(10px);
}
.login-logo {
  text-align: center;
  margin-bottom: 32px;
}
.login-logo .logo-icon {
  width: 56px; height: 56px;
  background: var(--color-primary);
  border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 12px;
}
.login-logo h1 {
  font-family: 'Syne', 'Segoe UI', -apple-system, system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: #f1f5f9;
}
.login-logo p {
  font-size: .82rem;
  color: #64748b;
  margin-top: 4px;
}
.login-card .form-label { color: #94a3b8; }
.login-card .form-control {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.1);
  color: #f1f5f9;
}
.login-card .form-control::placeholder { color: #475569; }
.login-card .form-control:focus {
  border-color: var(--color-primary);
  background: rgba(255,255,255,.07);
}
.login-error {
  background: rgba(239,68,68,.12);
  border: 1px solid rgba(239,68,68,.25);
  color: #fca5a5;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: .83rem;
  margin-bottom: 16px;
}
.login-btn {
  width: 100%;
  justify-content: center;
  padding: 12px;
  font-size: .92rem;
  margin-top: 6px;
}
.login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: .75rem;
  color: #334155;
}

/* ── Dashboard ─────────────────────────────────────────────── */
.widget-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 24px; }
.warranty-list { list-style: none; }
.warranty-list li {
  display: flex; align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: .83rem;
}
.warranty-list li:last-child { border-bottom: none; }
.warranty-list .wl-num { font-weight: 700; color: var(--text-primary); min-width: 90px; }
.warranty-list .wl-device { flex: 1; color: var(--text-secondary); }

/* ── Settings Tabs ─────────────────────────────────────────── */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); padding: 0 20px; background: #fafbfc; }
.tab-btn {
  padding: 12px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: -1px;
  font-family: 'Plus Jakarta Sans', 'Segoe UI', -apple-system, system-ui, sans-serif;
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { border-bottom-color: var(--color-primary); color: var(--color-primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Pagination ────────────────────────────────────────────── */
.pagination-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap; gap: 10px;
}
.pagination { display: flex; gap: 4px; list-style: none; }
.page-item.disabled .page-link { opacity: .4; pointer-events: none; }
.page-item.active .page-link {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.page-link {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .82rem;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.page-link:hover:not(.active) { background: var(--border); color: var(--text-primary); }
.pagination-info { font-size: .78rem; color: var(--text-muted); }

/* ── Log timeline ──────────────────────────────────────────── */
.log-action { font-size: .72rem; font-weight: 700; letter-spacing: .05em; }
.log-CREATE  { color: var(--success); }
.log-UPDATE  { color: var(--info); }
.log-DELETE  { color: var(--danger); }
.log-LOGIN   { color: var(--color-primary); }
.log-LOGOUT  { color: var(--text-muted); }
.log-VIEW    { color: var(--text-muted); }

/* ── Depreciation indicator ────────────────────────────────── */
.depn-bar-wrap { display: flex; align-items: center; gap: 8px; }
.depn-bar {
  flex: 1; height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.depn-bar-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: 3px;
  transition: width .5s ease;
}
.depn-pct { font-size: .75rem; font-weight: 700; color: var(--text-secondary); }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-grid-3 { grid-template-columns: 1fr; }
  .widget-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  :root { --sidebar-width: 0px; }
  .sidebar { transform: translateX(-260px); width: 260px; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .page-body { padding: 16px; }
  .topbar { padding: 0 16px; }
}

/* ── Utilities ─────────────────────────────────────────────── */
.text-muted { color: var(--text-muted); }
.text-sm    { font-size: .8rem; }
.text-xs    { font-size: .72rem; }
.text-right { text-align: right; }
.text-center{ text-align: center; }
.fw-600     { font-weight: 600; }
.fw-700     { font-weight: 700; }
.mt-4       { margin-top: 4px; }
.mt-8       { margin-top: 8px; }
.mt-16      { margin-top: 16px; }
.mt-24      { margin-top: 24px; }
.mb-16      { margin-bottom: 16px; }
.d-flex     { display: flex; }
.align-center{ align-items: center; }
.gap-8      { gap: 8px; }
.gap-12     { gap: 12px; }
.hidden     { display: none !important; }
.divider    { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
