/* ============================================================
   FleetAdmin — Design System
   Fuente: Inter (system stack)
   Paleta: sidebar navy oscuro + acento azul + contenido blanco
   ============================================================ */

/* ── Variables ────────────────────────────────────────────── */
:root {
  /* Brand */
  --navy:         #0f172a;
  --navy-800:     #1e293b;
  --navy-700:     #253347;
  --blue:         #3b82f6;
  --blue-600:     #2563eb;
  --blue-light:   #93c5fd;
  --blue-pale:    #eff6ff;

  /* Semánticos */
  --green:        #10b981;
  --green-pale:   #ecfdf5;
  --red:          #ef4444;
  --red-pale:     #fef2f2;
  --orange:       #f59e0b;
  --orange-pale:  #fffbeb;
  --purple:       #8b5cf6;

  /* Grises */
  --gray-50:      #f8fafc;
  --gray-100:     #f1f5f9;
  --gray-200:     #e2e8f0;
  --gray-300:     #cbd5e1;
  --gray-400:     #94a3b8;
  --gray-500:     #64748b;
  --gray-600:     #475569;
  --gray-900:     #0f172a;
  --white:        #ffffff;

  /* Layout */
  --sidebar-w:    260px;
  --header-h:     60px;
  --radius:       10px;
  --radius-sm:    6px;
  --radius-lg:    14px;

  /* Sombras */
  --shadow-sm:    0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:       0 4px 12px rgba(0,0,0,.08);
  --shadow-md:    0 8px 24px rgba(0,0,0,.10);

  /* Transición */
  --t:            180ms ease;
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: .9rem;
  line-height: 1.6;
  color: var(--gray-900);
  background: var(--gray-50);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* ══════════════════════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════════════════════ */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 200;
  transition: transform var(--t);
  scrollbar-width: thin;
  scrollbar-color: var(--navy-700) transparent;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--navy-700); border-radius: 4px; }

/* Logo */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: 1.4rem 1.3rem 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
}
.logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-600) 100%);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(59,130,246,.4);
}
.logo-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -.01em;
}
.logo-sub {
  font-size: .68rem;
  color: var(--gray-400);
  display: block;
  margin-top: -.1rem;
}

/* Nav groups */
nav { padding: .75rem 0; flex: 1; }
.nav-group { margin-bottom: .25rem; }
.nav-group-label {
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gray-500);
  padding: .65rem 1.3rem .3rem;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .52rem 1.3rem;
  margin: .05rem .6rem;
  border-radius: var(--radius-sm);
  color: var(--gray-400);
  font-size: .83rem;
  font-weight: 500;
  transition: background var(--t), color var(--t);
  cursor: pointer;
  text-decoration: none;
}
.nav-item:hover {
  background: var(--navy-700);
  color: var(--white);
  text-decoration: none;
}
.nav-item.active {
  background: rgba(59,130,246,.18);
  color: var(--white);
}
.nav-item.active .nav-icon { filter: none; }
.nav-icon { font-size: 1rem; flex-shrink: 0; opacity: .75; }
.nav-item.active .nav-icon,
.nav-item:hover .nav-icon { opacity: 1; }
.nav-badge {
  margin-left: auto;
  background: var(--red);
  color: var(--white);
  font-size: .62rem;
  font-weight: 700;
  min-width: 18px; height: 18px;
  border-radius: 9px;
  padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
}

/* Sidebar user footer */
.sidebar-user {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem 1rem 1rem 1.1rem;
  border-top: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
}
.user-avatar {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--purple) 100%);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  color: var(--white);
  flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name {
  font-size: .8rem;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-role {
  font-size: .68rem;
  color: var(--gray-400);
}
.logout-btn {
  color: var(--gray-500);
  font-size: 1rem;
  padding: .25rem;
  border-radius: 4px;
  transition: color var(--t);
  flex-shrink: 0;
  text-decoration: none;
}
.logout-btn:hover { color: var(--red); text-decoration: none; }

/* Overlay (móvil) */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 199;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }

/* ══════════════════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════════════════ */
.main-header {
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.5rem;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.btn-menu {
  display: none;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--gray-600);
  padding: .25rem;
  border-radius: var(--radius-sm);
  transition: background var(--t);
}
.btn-menu:hover { background: var(--gray-100); }
.header-breadcrumb {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex: 1;
  font-size: .82rem;
  color: var(--gray-500);
  min-width: 0;
}
.header-breadcrumb span + span::before {
  content: "›";
  margin-right: .5rem;
  opacity: .5;
}
.header-breadcrumb span:last-child { color: var(--gray-900); font-weight: 600; }
.header-actions { display: flex; align-items: center; gap: .75rem; }
.header-bell {
  position: relative;
  font-size: 1.1rem;
  text-decoration: none;
  padding: .3rem;
  border-radius: var(--radius-sm);
  transition: background var(--t);
}
.header-bell:hover { background: var(--gray-100); }
.bell-dot {
  position: absolute;
  top: 3px; right: 3px;
  width: 8px; height: 8px;
  background: var(--red);
  border-radius: 50%;
  border: 2px solid var(--white);
}

/* ══════════════════════════════════════════════════════════
   MAIN CONTENT
══════════════════════════════════════════════════════════ */
.main-content {
  margin-left: var(--sidebar-w);
  margin-top: var(--header-h);
  padding: 1.75rem 2rem;
  min-height: calc(100vh - var(--header-h));
}

/* ── Page header ────────────────────────────────────────── */
.page-header {
  margin-bottom: 1.5rem;
}
.page-header h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -.02em;
}
.page-header p {
  font-size: .82rem;
  color: var(--gray-500);
  margin-top: .2rem;
}

/* ══════════════════════════════════════════════════════════
   STATS GRID (dashboard)
══════════════════════════════════════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t), transform var(--t);
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.stat-icon.blue   { background: var(--blue-pale);   }
.stat-icon.green  { background: var(--green-pale);  }
.stat-icon.orange { background: var(--orange-pale); }
.stat-icon.red    { background: var(--red-pale);    }
.stat-info { min-width: 0; }
.stat-label {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--gray-500);
}
.stat-value {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -.03em;
  line-height: 1.2;
  margin: .1rem 0 .15rem;
}
.stat-sub {
  font-size: .72rem;
  color: var(--gray-400);
}

/* ══════════════════════════════════════════════════════════
   PANELS
══════════════════════════════════════════════════════════ */
.panel {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 1.3rem;
  border-bottom: 1px solid var(--gray-100);
  background: var(--gray-50);
}
.panel-title {
  font-size: .85rem;
  font-weight: 700;
  color: var(--navy);
}
.panel-body { padding: 1.1rem 1.3rem; }

/* ══════════════════════════════════════════════════════════
   LAYOUT GRID (2 cols con aside)
══════════════════════════════════════════════════════════ */
.layout-grid {
  display: grid;
  grid-template-columns: 1fr var(--col-aside, 340px);
  gap: 1.25rem;
  align-items: start;
}

/* ══════════════════════════════════════════════════════════
   TABLES
══════════════════════════════════════════════════════════ */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .83rem;
}
thead { background: var(--gray-50); }
th {
  text-align: left;
  padding: .7rem 1rem;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gray-500);
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}
td {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-600);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--gray-50); }

/* ══════════════════════════════════════════════════════════
   BADGES
══════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: .2rem .6rem;
  border-radius: 99px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
}
.badge-blue   { background: var(--blue-pale);   color: var(--blue-600); }
.badge-green  { background: var(--green-pale);  color: #065f46; }
.badge-red    { background: var(--red-pale);    color: #991b1b; }
.badge-orange { background: var(--orange-pale); color: #92400e; }
.badge-gray   { background: var(--gray-100);    color: var(--gray-600); }
.badge-purple { background: #f5f3ff;            color: #5b21b6; }

/* ══════════════════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .83rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--t), border-color var(--t), color var(--t), box-shadow var(--t), transform var(--t);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
  box-shadow: 0 1px 4px rgba(59,130,246,.35);
}
.btn-primary:hover {
  background: var(--blue-600);
  border-color: var(--blue-600);
  box-shadow: 0 4px 12px rgba(59,130,246,.45);
  color: var(--white);
}
.btn-outline {
  background: var(--white);
  color: var(--gray-600);
  border-color: var(--gray-300);
}
.btn-outline:hover {
  background: var(--gray-50);
  border-color: var(--gray-400);
  color: var(--gray-900);
}
.btn-danger {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}
.btn-danger:hover { background: #dc2626; border-color: #dc2626; color: var(--white); }
.btn-success {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}
.btn-success:hover { background: #059669; border-color: #059669; color: var(--white); }

.btn-sm  { padding: .35rem .75rem; font-size: .77rem; border-radius: 5px; }
.btn-lg  { padding: .7rem 1.4rem;  font-size: .9rem; }
.btn-block { width: 100%; justify-content: center; }

/* ══════════════════════════════════════════════════════════
   FORMS
══════════════════════════════════════════════════════════ */
.form-group { display: flex; flex-direction: column; gap: .35rem; }
.form-label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--gray-600);
}
.form-control {
  width: 100%;
  padding: .55rem .85rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: .87rem;
  color: var(--gray-900);
  background: var(--white);
  transition: border-color var(--t), box-shadow var(--t);
  outline: none;
  font-family: inherit;
  line-height: 1.5;
}
.form-control:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
.form-control::placeholder { color: var(--gray-400); }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .75rem center; padding-right: 2.25rem; }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-hint { font-size: .72rem; color: var(--gray-400); }
.field-error { font-size: .75rem; color: var(--red); font-weight: 500; }

/* Input con ícono */
.input-icon-wrap { position: relative; }
.input-icon {
  position: absolute;
  left: .85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: .9rem;
  pointer-events: none;
}
.input-icon-wrap .form-control { padding-left: 2.5rem; }

/* ══════════════════════════════════════════════════════════
   ALERTS / FLASH MESSAGES
══════════════════════════════════════════════════════════ */
.alert {
  padding: .8rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
}
.alert-danger  { background: var(--red-pale);    color: #991b1b; border-color: #fecaca; }
.alert-success { background: var(--green-pale);  color: #065f46; border-color: #a7f3d0; }
.alert-warning { background: var(--orange-pale); color: #92400e; border-color: #fde68a; }
.alert-info    { background: var(--blue-pale);   color: #1e40af; border-color: var(--blue-light); }

/* ══════════════════════════════════════════════════════════
   ALERT LIST (dashboard)
══════════════════════════════════════════════════════════ */
.alert-list { display: flex; flex-direction: column; gap: .6rem; }
.alert-item {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .7rem .9rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid transparent;
  background: var(--gray-50);
}
.alert-item.critica { border-color: var(--red);    background: var(--red-pale); }
.alert-item.alta    { border-color: var(--orange);  background: var(--orange-pale); }
.alert-item.media   { border-color: var(--blue);    background: var(--blue-pale); }
.alert-item.baja    { border-color: var(--green);   background: var(--green-pale); }
.ai-icon   { font-size: .95rem; flex-shrink: 0; margin-top: .05rem; }
.ai-body   { flex: 1; min-width: 0; }
.ai-title  { font-size: .8rem; font-weight: 600; color: var(--gray-900); }
.ai-meta   { font-size: .72rem; color: var(--gray-500); margin-top: .1rem; }

/* ══════════════════════════════════════════════════════════
   RENTABILIDAD (dashboard)
══════════════════════════════════════════════════════════ */
.rent-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: .83rem;
}
.rent-row:last-child { border-bottom: none; }
.rent-vehicle { flex: 1; color: var(--gray-600); }
.rent-amount  { font-weight: 600; color: var(--navy); }
.rent-profit  { font-weight: 700; font-size: .82rem; min-width: 70px; text-align: right; }
.rent-profit.pos { color: var(--green); }
.rent-profit.neg { color: var(--red); }

/* ══════════════════════════════════════════════════════════
   EMPTY STATE
══════════════════════════════════════════════════════════ */
.empty-state {
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--gray-400);
  font-size: .85rem;
}
.es-icon {
  font-size: 2.5rem;
  margin-bottom: .75rem;
  display: block;
  opacity: .5;
}

/* ══════════════════════════════════════════════════════════
   LOGIN PAGE
══════════════════════════════════════════════════════════ */
body:has(.login-page) {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-800) 100%);
}
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 480px;
}
.login-brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 4rem;
  color: var(--white);
}
.brand-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-600) 100%);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 24px rgba(59,130,246,.5);
}
.login-brand h1 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -.04em;
  margin-bottom: .5rem;
}
.login-brand > p {
  font-size: 1rem;
  color: var(--gray-400);
  margin-bottom: 2rem;
  max-width: 380px;
  line-height: 1.7;
}
.login-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.login-features li {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .88rem;
  color: var(--gray-400);
}
.login-features li::before {
  content: "✓";
  width: 22px; height: 22px;
  background: rgba(59,130,246,.2);
  color: var(--blue-light);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .7rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* Panel del formulario */
.login-form-wrap {
  background: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 3.5rem;
  min-height: 100vh;
}
.login-form-wrap h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -.03em;
  margin-bottom: .3rem;
}
.subtitle {
  font-size: .85rem;
  color: var(--gray-500);
  margin-bottom: 1.75rem;
}

/* ══════════════════════════════════════════════════════════
   ERROR PAGES (403 / 404)
══════════════════════════════════════════════════════════ */
.error-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  background: var(--gray-50);
}
.error-code {
  font-size: 5rem;
  font-weight: 900;
  color: var(--gray-200);
  line-height: 1;
  letter-spacing: -.05em;
}
.error-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--navy);
  margin: .75rem 0 .5rem;
}
.error-desc { color: var(--gray-500); margin-bottom: 1.5rem; }

/* ══════════════════════════════════════════════════════════
   PAGINACIÓN
══════════════════════════════════════════════════════════ */
.pagination {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: 1rem 1.3rem;
  border-top: 1px solid var(--gray-100);
  flex-wrap: wrap;
}
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px; height: 32px;
  padding: 0 .6rem;
  border-radius: 6px;
  font-size: .8rem;
  font-weight: 500;
  transition: background var(--t), color var(--t);
  text-decoration: none;
  color: var(--gray-600);
  border: 1px solid transparent;
}
.pagination a:hover { background: var(--gray-100); }
.pagination .current {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
  font-weight: 700;
}
.pagination .disabled { opacity: .35; pointer-events: none; }

/* ══════════════════════════════════════════════════════════
   FORM SECTIONS (fieldset-like, usado en forms CRUD)
══════════════════════════════════════════════════════════ */
.fs {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.fs-h {
  padding: .85rem 1.4rem;
  border-bottom: 1px solid var(--gray-200);
  font-weight: 700;
  font-size: .875rem;
  color: var(--navy);
  background: var(--gray-50);
}
.fs-b {
  padding: 1.4rem;
  display: grid;
  gap: 1rem;
}
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: 1fr 1fr 1fr; }
.full { grid-column: 1 / -1; }

/* ══════════════════════════════════════════════════════════
   UTILIDADES
══════════════════════════════════════════════════════════ */
.text-muted  { color: var(--gray-400); }
.text-danger { color: var(--red);      }
.text-success{ color: var(--green);    }
.text-sm     { font-size: .8rem;       }
.fw-bold     { font-weight: 700;       }
.mt-1  { margin-top: .5rem; }
.mt-2  { margin-top: 1rem;  }
.mt-3  { margin-top: 1.5rem;}
.mb-1  { margin-bottom: .5rem; }
.mb-2  { margin-bottom: 1rem;  }
.d-flex   { display: flex; }
.gap-1    { gap: .5rem;  }
.gap-2    { gap: 1rem;   }
.flex-wrap{ flex-wrap: wrap; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-end     { justify-content: flex-end; }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .layout-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(calc(-1 * var(--sidebar-w)));
  }
  .sidebar.open { transform: translateX(0); }
  .main-header  { left: 0; }
  .main-content { margin-left: 0; padding: 1.2rem 1rem; }
  .btn-menu { display: flex; }
  .login-page { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-form-wrap { padding: 2.5rem 1.75rem; min-height: 100vh; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .page-header[style] { flex-direction: column; align-items: flex-start !important; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .main-content { padding: 1rem .85rem; }
}

/* ══════════════════════════════════════════════════════════
   SCROLLBAR (webkit)
══════════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }
