/* LeadTrace · Design system Raiola Networks
 * Mobile-first. Light + dark. Roboto self-hosted.
 */

/* ==== Roboto (self-hosted) ==== */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local('Roboto'), local('Roboto-Regular');
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: local('Roboto Medium'), local('Roboto-Medium');
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: local('Roboto Bold'), local('Roboto-Bold');
}

/* ==== Design tokens ==== */
:root {
  /* Paleta Raiola */
  --rl-blue: #0077B4;
  --rl-blue-strong: #066AFF;
  --rl-gold: #E7B04F;

  /* Light theme */
  --bg: #f8fafc;
  --bg-elev: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #f1f5f9;
  --bg-input: #ffffff;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-soft: #475569;
  --text-muted: #94a3b8;
  --primary: var(--rl-blue);
  --primary-strong: var(--rl-blue-strong);
  --accent: var(--rl-gold);
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #dc2626;
  --info: #0ea5e9;

  --shadow-sm: 0 1px 2px rgba(15,23,42,.06);
  --shadow-md: 0 4px 12px rgba(0,119,180,.08);
  --shadow-lg: 0 12px 40px rgba(0,119,180,.12);

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 999px;

  /* Spacing (densidad cómoda por defecto) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  --font-base: 'Roboto', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

  --transition: 200ms ease-out;
}

html.tema-oscuro {
  --bg: #0a1929;
  --bg-elev: #142a45;
  --bg-card: #142a45;
  --bg-hover: #1c3658;
  --bg-input: #0f223a;
  --border: #1e3a60;
  --border-strong: #2e4d75;
  --text: #f1f5f9;
  --text-soft: #cbd5e1;
  --text-muted: #94a3b8;
  --primary: #2196F3;
  --primary-strong: #3b82f6;
  --accent: var(--rl-gold);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,.45);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.5);
}

html.densidad-compacta {
  --space-1: 2px;
  --space-2: 6px;
  --space-3: 10px;
  --space-4: 14px;
  --space-5: 18px;
  --space-6: 20px;
  --space-8: 26px;
}

@media (prefers-color-scheme: dark) {
  html.tema-auto {
    --bg: #0a1929;
    --bg-elev: #142a45;
    --bg-card: #142a45;
    --bg-hover: #1c3658;
    --bg-input: #0f223a;
    --border: #1e3a60;
    --border-strong: #2e4d75;
    --text: #f1f5f9;
    --text-soft: #cbd5e1;
    --text-muted: #94a3b8;
    --primary: #2196F3;
    --primary-strong: #3b82f6;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    --shadow-md: 0 4px 12px rgba(0,0,0,.45);
    --shadow-lg: 0 12px 40px rgba(0,0,0,.5);
  }
}

/* ==== Reset & base ==== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-base);
  font-size: 14px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { margin: 0 0 var(--space-3) 0; font-weight: 600; line-height: 1.3; color: var(--text); }
h1 { font-size: 24px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
p { margin: 0 0 var(--space-3) 0; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-strong); }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }

/* ==== Layout principal ==== */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 248px;
  flex-shrink: 0;
  background: var(--bg-elev);
  border-right: 1px solid var(--border);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  transition: transform var(--transition);
}
.sidebar.collapsed { width: 64px; }
.sidebar.collapsed .nav-label { display: none; }
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-2);
  font-weight: 700;
  font-size: 16px;
  color: var(--primary);
}
.sidebar-brand-logo {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--rl-blue), var(--rl-blue-strong));
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
}
.sidebar-section { margin-top: var(--space-3); }
.sidebar-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: var(--space-2);
}
.nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px var(--space-3);
  border-radius: var(--radius-md);
  color: var(--text-soft);
  font-weight: 500;
  min-height: 44px;
  transition: background var(--transition), color var(--transition);
}
.nav-link:hover { background: var(--bg-hover); color: var(--text); }
.nav-link.active {
  background: linear-gradient(135deg, rgba(0,119,180,.12), rgba(6,106,255,.12));
  color: var(--primary);
}
.nav-link svg { width: 18px; height: 18px; flex-shrink: 0; }

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.topbar {
  height: 60px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elev);
  display: flex;
  align-items: center;
  padding: 0 var(--space-5);
  gap: var(--space-4);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar-search { flex: 1; max-width: 480px; }
.topbar-search input {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  padding: 8px var(--space-3);
  border-radius: var(--radius-md);
}
.topbar-icon-btn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: var(--radius-md);
  background: transparent;
  border: 0;
  color: var(--text-soft);
  cursor: pointer;
  position: relative;
  transition: background var(--transition);
}
.topbar-icon-btn:hover { background: var(--bg-hover); }
.topbar-icon-btn .badge {
  position: absolute;
  top: 4px; right: 4px;
  background: var(--danger);
  color: #fff;
  border-radius: var(--radius-pill);
  padding: 1px 5px;
  font-size: 10px;
  font-weight: 600;
  min-width: 16px;
  text-align: center;
}
.user-menu { display: flex; align-items: center; gap: var(--space-2); }
.avatar {
  width: 36px; height: 36px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--rl-blue), var(--rl-gold));
  color: #fff;
  display: grid; place-items: center;
  font-weight: 600;
  font-size: 13px;
}

.content {
  flex: 1;
  padding: var(--space-6);
  max-width: 100%;
}
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.page-title { font-size: 22px; font-weight: 600; margin: 0; }
.page-subtitle { color: var(--text-muted); margin-top: 4px; }

.app-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-3) var(--space-6);
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* ==== Cards ==== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
  gap: var(--space-3);
}
.card-title { margin: 0; font-size: 14px; font-weight: 600; color: var(--text-soft); text-transform: uppercase; letter-spacing: .04em; }

/* ==== KPI grid ==== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}
.kpi {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  position: relative;
  overflow: hidden;
}
.kpi::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  background: radial-gradient(circle at top right, rgba(0,119,180,.08), transparent 70%);
  pointer-events: none;
}
.kpi-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.kpi-value { font-size: 28px; font-weight: 700; margin: var(--space-2) 0; color: var(--text); }
.kpi-trend { display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; }
.kpi-trend.up { color: var(--success); }
.kpi-trend.down { color: var(--danger); }
.kpi-sparkline { height: 40px; margin-top: var(--space-3); }

/* ==== Buttons ==== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 10px var(--space-4);
  min-height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: var(--bg-elev);
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
}
.btn:hover { background: var(--bg-hover); }
.btn-primary {
  background: linear-gradient(135deg, var(--rl-blue), var(--rl-blue-strong));
  color: #fff;
  border: none;
  box-shadow: 0 2px 8px rgba(6,106,255,.25);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--rl-blue-strong), var(--rl-blue));
  color: #fff;
  box-shadow: 0 4px 16px rgba(6,106,255,.35);
  transform: translateY(-1px);
}
.btn-secondary { border-color: var(--border-strong); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text-soft); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; border: none; }
.btn-danger:hover { background: #b91c1c; color: #fff; }
.btn-sm { padding: 6px var(--space-3); min-height: 32px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ==== Tablas ==== */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.data-table thead th {
  background: var(--bg-hover);
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-soft);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
.data-table tbody td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tbody tr:hover { background: var(--bg-hover); }
.data-table tbody tr:last-child td { border-bottom: 0; }

/* ==== Badges & pills ==== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  background: var(--bg-hover);
  color: var(--text-soft);
}
.badge-success { background: rgba(22,163,74,.12); color: var(--success); }
.badge-warning { background: rgba(245,158,11,.12); color: #d97706; }
.badge-danger { background: rgba(220,38,38,.12); color: var(--danger); }
.badge-info { background: rgba(14,165,233,.12); color: var(--info); }
.badge-primary { background: rgba(0,119,180,.12); color: var(--primary); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 12px;
  cursor: pointer;
  transition: background var(--transition);
}
.chip:hover { background: var(--bg-hover); }
.chip.active { background: linear-gradient(135deg, rgba(0,119,180,.12), rgba(6,106,255,.12)); color: var(--primary); border-color: var(--primary); }

/* ==== Forms ==== */
.form-group { margin-bottom: var(--space-4); }
.form-label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 500; color: var(--text-soft); }
.form-control, .input, input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=tel], input[type=url], input[type=search], select, textarea {
  width: 100%;
  padding: 10px var(--space-3);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
  min-height: 40px;
}
.form-control:focus, input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,119,180,.18);
}
.form-error { color: var(--danger); font-size: 12px; margin-top: 4px; }
.form-help { color: var(--text-muted); font-size: 12px; margin-top: 4px; }

.checkbox-row { display: flex; align-items: center; gap: var(--space-2); }

/* ==== Skeletons ==== */
.skeleton {
  background: linear-gradient(90deg, var(--bg-hover), var(--border), var(--bg-hover));
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-line { height: 14px; margin-bottom: 8px; }

/* ==== Empty / error states ==== */
.empty-state {
  text-align: center;
  padding: var(--space-12) var(--space-5);
  color: var(--text-muted);
}
.empty-state svg { width: 56px; height: 56px; margin-bottom: var(--space-4); color: var(--text-muted); }
.empty-state h3 { color: var(--text); margin-bottom: var(--space-2); }

.error-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--bg);
}
.error-card {
  text-align: center;
  background: var(--bg-card);
  padding: var(--space-12);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  max-width: 480px;
  border: 1px solid var(--border);
}
.error-code { font-size: 64px; font-weight: 800; color: var(--primary); line-height: 1; }
.error-message { color: var(--text-soft); margin-bottom: var(--space-5); }

/* ==== Toasts ==== */
.toast-stack {
  position: fixed;
  right: var(--space-5);
  bottom: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  z-index: 1000;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  animation: toast-in 220ms ease-out;
  border-left: 3px solid var(--info);
  min-width: 280px;
  max-width: 360px;
}
.toast.success { border-left-color: var(--success); }
.toast.warning { border-left-color: var(--warning); }
.toast.danger { border-left-color: var(--danger); }
@keyframes toast-in { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ==== Modal ==== */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.4);
  backdrop-filter: blur(4px);
  display: grid; place-items: center;
  z-index: 100;
  animation: fade-in 200ms ease-out;
}
.modal {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  max-width: 560px;
  width: calc(100vw - 32px);
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ==== Login ==== */
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--rl-blue), var(--rl-blue-strong));
  padding: var(--space-5);
}
.auth-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 420px;
}
.auth-card h1 { text-align: center; margin-bottom: var(--space-2); color: var(--primary); }
.auth-subtitle { text-align: center; color: var(--text-muted); margin-bottom: var(--space-6); }

/* ==== Avatar / journey dots ==== */
.touch-journey {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
  padding: var(--space-3);
  background: var(--bg-elev);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow-x: auto;
}
.touch-dot {
  width: 14px; height: 14px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
  cursor: pointer;
  border: 2px solid var(--bg-elev);
  position: relative;
}
.touch-line { flex: 1; min-width: 16px; height: 2px; background: var(--border); }

/* ==== Setup wizard ==== */
.wizard-shell {
  min-height: 100vh;
  background: linear-gradient(135deg, #f1f5f9, #e0e7ff);
  padding: var(--space-6);
}
.wizard-card {
  max-width: 760px;
  margin: 0 auto;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
.stepper { display: flex; gap: var(--space-2); margin-bottom: var(--space-6); flex-wrap: wrap; }
.step {
  display: flex; align-items: center; gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--bg-hover);
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}
.step.active { background: linear-gradient(135deg, var(--rl-blue), var(--rl-blue-strong)); color: #fff; }
.step.done { background: rgba(22,163,74,.12); color: var(--success); }
.check-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-2);
}
.check-row.ok { border-left: 3px solid var(--success); }
.check-row.fail { border-left: 3px solid var(--danger); background: rgba(220,38,38,.04); }

/* ==== Timeline ==== */
.timeline {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  position: relative;
  padding-left: var(--space-5);
}
.timeline::before {
  content: '';
  position: absolute;
  left: 8px; top: 8px; bottom: 8px;
  width: 2px;
  background: var(--border);
}
.timeline-item {
  position: relative;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px; height: 12px;
  border-radius: var(--radius-pill);
  background: var(--primary);
  border: 2px solid var(--bg);
}
.timeline-item.ghl::before { background: #7c3aed; }
.timeline-item.csv::before { background: var(--success); }
.timeline-item.system::before { background: var(--text-muted); }
.timeline-item.admin::before { background: var(--accent); }
.timeline-item .ts { font-size: 11px; color: var(--text-muted); }
.timeline-item .title { font-weight: 600; margin-top: 2px; }

/* ==== Origenes grid ==== */
.origen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-4);
}
.origen-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  border-left: 4px solid var(--primary);
}

/* ==== Diff cards (CSV importer) ==== */
.diff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.diff-summary { padding: var(--space-4); border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--bg-card); }
.diff-summary .num { font-size: 28px; font-weight: 700; }
.diff-summary.convert_new { border-left: 4px solid var(--success); }
.diff-summary.reactivate { border-left: 4px solid var(--info); }
.diff-summary.deactivate { border-left: 4px solid var(--warning); }
.diff-summary.country_changed { border-left: 4px solid var(--text-muted); }
.diff-summary.no_change { border-left: 4px solid var(--border-strong); }
.diff-summary.not_found { border-left: 4px solid var(--text-muted); }
.diff-summary.invalid { border-left: 4px solid var(--danger); }

/* ==== Funnel ==== */
.funnel-wrap { display: flex; flex-direction: column; gap: var(--space-2); }
.funnel-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

/* ==== Mobile-first responsive ==== */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0; left: 0;
    transform: translateX(-100%);
    z-index: 50;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }
  .topbar-search { max-width: 100%; }
  .content { padding: var(--space-4); }
  .data-table { font-size: 13px; }
  .data-table thead { display: none; }
  .data-table tbody td { display: block; padding: var(--space-2) var(--space-3); }
  .data-table tbody tr {
    display: block;
    margin-bottom: var(--space-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-card);
  }
  .data-table tbody tr td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--text-muted);
    margin-right: var(--space-2);
  }
}

/* ==== Utilidades ==== */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.text-center { text-align: center; }
.w-full { width: 100%; }
.hidden { display: none !important; }

.grid { display: grid; }
.grid-2 { grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.grid-3 { grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
