/* ==========================================================================
   EPSINIUM CRM — Feuille de style principale
   Charte graphique : Rouge EPSINIUM #D90429, neutres slate, thème clair
   Mobile-first responsive (320px → 4K)
   ========================================================================== */

:root {
  /* Palette EPSINIUM */
  --red: #D90429;
  --red-dark: #A80320;
  --red-light: #FDECEF;
  --bg: #F8FAFC;
  --card: #FFFFFF;
  --ink: #1E293B;
  --ink-soft: #475569;
  --ink-faint: #94A3B8;
  --border: #E2E8F0;
  --sidebar-bg: #0F172A;
  --sidebar-ink: #CBD5E1;
  --sidebar-active: rgba(217, 4, 41, 0.14);
  --green: #16A34A;
  --green-light: #DCFCE7;
  --orange: #EA580C;
  --orange-light: #FFEDD5;
  --blue: #2563EB;
  --blue-light: #DBEAFE;
  --violet: #7C3AED;
  --violet-light: #EDE9FE;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, .14);
  --topbar-h: 64px;
  --sidebar-w: 264px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
}
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: inherit; }
h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; }

/* ==========================================================================
   SHELL : sidebar + colonne principale
   ========================================================================== */
.app-shell { display: flex; min-height: 100vh; }

/* ---------- Sidebar (desktop) ---------- */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  color: var(--sidebar-ink);
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  transition: transform .28s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.logo-mark {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
  font-weight: 800;
  font-size: 22px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(217, 4, 41, .35);
}
.brand-text { display: flex; flex-direction: column; }
.brand-name { color: #fff; font-weight: 800; letter-spacing: .12em; font-size: 17px; }
.brand-sub { font-size: 11.5px; color: var(--ink-faint); letter-spacing: .04em; }
.drawer-close {
  display: none;
  margin-left: auto;
  background: none; border: none;
  color: var(--sidebar-ink);
  font-size: 28px; line-height: 1;
  min-width: 44px; min-height: 44px;
}

.sidebar-nav { flex: 1; overflow-y: auto; padding: 14px 12px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  min-height: 44px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-ink);
  font-weight: 500;
  font-size: 14.5px;
  margin-bottom: 2px;
  position: relative;
  transition: background .15s, color .15s;
}
.nav-item svg { width: 20px; height: 20px; fill: currentColor; flex-shrink: 0; opacity: .85; }
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; }
.nav-item.active {
  background: var(--sidebar-active);
  color: #fff;
  font-weight: 600;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: -12px; top: 8px; bottom: 8px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--red);
}
.nav-section {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--ink-faint);
  padding: 18px 14px 8px;
  font-weight: 700;
}

.sidebar-footer {
  padding: 14px;
  border-top: 1px solid rgba(255, 255, 255, .07);
}
.user-chip { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--red);
  color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.avatar-sm { width: 32px; height: 32px; font-size: 13px; }
.user-meta { display: flex; flex-direction: column; min-width: 0; }
.user-name { color: #fff; font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11.5px; color: var(--ink-faint); }
.logout-link {
  display: block;
  text-align: center;
  padding: 9px;
  min-height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .05);
  color: var(--sidebar-ink);
  font-size: 13.5px;
  font-weight: 500;
}
.logout-link:hover { background: var(--red); color: #fff; text-decoration: none; }

/* ---------- Colonne principale ---------- */
.main-col {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.topbar {
  height: var(--topbar-h);
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 40;
}
.page-title { font-size: 19px; font-weight: 700; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-user { display: flex; align-items: center; gap: 10px; }
.topbar-name { font-weight: 600; font-size: 14px; }

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  flex-shrink: 0;
}
.burger span {
  display: block; height: 2px; width: 100%;
  background: var(--ink); border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.drawer-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .55);
  z-index: 55;
  opacity: 0;
  transition: opacity .28s;
}
.drawer-overlay.show { opacity: 1; }

.content { flex: 1; padding: 24px; max-width: 1600px; width: 100%; margin: 0 auto; }
.app-footer {
  padding: 16px 24px;
  text-align: center;
  color: var(--ink-faint);
  font-size: 12.5px;
  border-top: 1px solid var(--border);
}

/* ==========================================================================
   COMPOSANTS
   ========================================================================== */

/* ---------- Boutons (cibles tactiles >= 44px) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 14.5px;
  transition: background .15s, box-shadow .15s, transform .05s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 2px 8px rgba(217,4,41,.28); }
.btn-primary:hover { background: var(--red-dark); text-decoration: none; }
.btn-outline { background: var(--card); border-color: var(--border); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink-faint); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--ink-soft); }
.btn-ghost:hover { background: var(--bg); text-decoration: none; }
.btn-danger-soft { background: var(--red-light); color: var(--red); }
.btn-danger-soft:hover { background: #FAD3DB; text-decoration: none; }
.btn-sm { min-height: 38px; padding: 7px 13px; font-size: 13.5px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- Cartes ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-pad { padding: 20px; }
.card-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.card-header h2 { font-size: 16px; }

/* ---------- KPI ---------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}
.kpi {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  display: flex; align-items: center; gap: 14px;
}
.kpi-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.kpi-icon svg { width: 24px; height: 24px; fill: #fff; }
.kpi-icon.red { background: linear-gradient(135deg, var(--red), var(--red-dark)); }
.kpi-icon.blue { background: linear-gradient(135deg, var(--blue), #1D4ED8); }
.kpi-icon.green { background: linear-gradient(135deg, var(--green), #15803D); }
.kpi-icon.orange { background: linear-gradient(135deg, var(--orange), #C2410C); }
.kpi-value { font-size: 26px; font-weight: 800; line-height: 1.1; }
.kpi-label { font-size: 13px; color: var(--ink-soft); font-weight: 500; }

/* ---------- Grilles utilitaires ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex-wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.mt { margin-top: 16px; }
.muted { color: var(--ink-soft); }
.small { font-size: 13px; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px; font-weight: 600;
  white-space: nowrap;
}
.badge-red { background: var(--red-light); color: var(--red); }
.badge-green { background: var(--green-light); color: var(--green); }
.badge-orange { background: var(--orange-light); color: var(--orange); }
.badge-blue { background: var(--blue-light); color: var(--blue); }
.badge-violet { background: var(--violet-light); color: var(--violet); }
.badge-slate { background: #F1F5F9; color: var(--ink-soft); }

/* ---------- Formulaires ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; font-size: 13.5px; }
.field label .req { color: var(--red); }
.input, .select, .textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 96px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(217, 4, 41, .12);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; flex-wrap: wrap; }
.check-line { display: flex; align-items: center; gap: 9px; min-height: 44px; font-size: 14px; }
.check-line input { width: 18px; height: 18px; accent-color: var(--red); }

/* ---------- Barre de filtres ---------- */
.filter-bar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  margin-bottom: 18px;
}
.filter-bar .select, .filter-bar .input { width: auto; min-width: 160px; }

/* ---------- Tableaux ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 640px;
}
table.data th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ink-soft);
  font-weight: 700;
  padding: 12px 14px;
  border-bottom: 2px solid var(--border);
  background: var(--bg);
  white-space: nowrap;
}
table.data td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
table.data tbody tr:hover { background: #FBFDFF; }
table.data tbody tr:last-child td { border-bottom: none; }

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--ink-faint);
}
.empty-state svg { width: 52px; height: 52px; fill: var(--border); margin: 0 auto 12px; }

/* ---------- Alerte / panneau alertes ---------- */
.alert {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid;
  font-size: 14px;
}
.alert-red { background: var(--red-light); border-color: #F5B5C0; color: #8F0320; }
.alert-orange { background: var(--orange-light); border-color: #FED7AA; color: #9A3412; }
.alert-green { background: var(--green-light); border-color: #BBF7D0; color: #166534; }
.alert-blue { background: var(--blue-light); border-color: #BFDBFE; color: #1E40AF; }

/* ---------- Listes agenda / activités ---------- */
.item-list { display: flex; flex-direction: column; }
.item-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 4px;
  border-bottom: 1px solid var(--border);
}
.item-row:last-child { border-bottom: none; }
.item-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.item-main { flex: 1; min-width: 0; }
.item-title { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-sub { font-size: 12.5px; color: var(--ink-soft); }

/* ==========================================================================
   KANBAN
   ========================================================================== */
.kanban-scroll { overflow-x: auto; padding-bottom: 10px; -webkit-overflow-scrolling: touch; }
.kanban { display: flex; gap: 14px; min-height: 60vh; }
.kanban-col {
  min-width: 272px;
  width: 272px;
  flex-shrink: 0;
  background: #F1F5F9;
  border-radius: var(--radius);
  display: flex; flex-direction: column;
  max-height: calc(100vh - 230px);
}
.kanban-col-header {
  padding: 13px 15px;
  font-weight: 700;
  font-size: 14px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 2px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
}
.kanban-count {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  padding: 1px 9px;
  color: var(--ink-soft);
}
.kanban-cards { padding: 10px; overflow-y: auto; flex: 1; }
.kanban-cards.drag-over { outline: 2px dashed var(--red); outline-offset: -4px; border-radius: var(--radius-sm); }
.deal-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 13px;
  margin-bottom: 9px;
  box-shadow: var(--shadow);
  cursor: grab;
  touch-action: pan-y;
}
.deal-card:active { cursor: grabbing; }
.deal-card.dragging { opacity: .45; }
.deal-title { font-weight: 600; font-size: 14px; margin-bottom: 5px; }
.deal-amount { color: var(--red); font-weight: 700; font-size: 14.5px; }
.deal-meta { font-size: 12px; color: var(--ink-soft); margin-top: 6px; display: flex; flex-direction: column; gap: 2px; }

/* Onglets de colonnes (mobile) */
.kanban-tabs { display: none; gap: 8px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 12px; }
.kanban-tab {
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  font-weight: 600; font-size: 13px;
  white-space: nowrap;
  color: var(--ink-soft);
}
.kanban-tab.active { background: var(--red); border-color: var(--red); color: #fff; }

/* ==========================================================================
   MODALE
   ========================================================================== */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .55);
  display: none;
  align-items: center; justify-content: center;
  z-index: 100;
  padding: 16px;
}
.modal-backdrop.show { display: flex; }
.modal {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex; flex-direction: column;
  animation: modalIn .2s ease;
}
@keyframes modalIn { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 17px 20px;
  border-bottom: 1px solid var(--border);
}
.modal-header h2 { font-size: 17px; }
.modal-close {
  background: none; border: none;
  font-size: 26px; line-height: 1;
  color: var(--ink-soft);
  min-width: 44px; min-height: 44px;
}
.modal-body { padding: 20px; overflow-y: auto; }

/* ==========================================================================
   TOASTS
   ========================================================================== */
.toast-stack {
  position: fixed;
  bottom: 18px; right: 18px;
  display: flex; flex-direction: column; gap: 10px;
  z-index: 200;
  max-width: min(92vw, 380px);
}
.toast {
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 10px;
  animation: toastIn .22s ease;
}
.toast.success { background: var(--green); }
.toast.error { background: var(--red); }
@keyframes toastIn { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ==========================================================================
   PAGE AUTH
   ========================================================================== */
.auth-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background:
    radial-gradient(1000px 500px at 85% -10%, rgba(217, 4, 41, .09), transparent 60%),
    var(--bg);
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 34px 30px;
}
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.auth-title { font-size: 21px; margin: 14px 0 4px; }
.auth-sub { color: var(--ink-soft); font-size: 14px; margin-bottom: 22px; }
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--ink-faint); font-size: 12.5px;
  margin: 18px 0;
}
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.btn-google {
  width: 100%;
  min-height: 46px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-weight: 600; font-size: 14.5px;
  color: var(--ink);
}
.btn-google:hover { background: var(--bg); text-decoration: none; }
.btn-google svg { width: 19px; height: 19px; }
.auth-alt { text-align: center; margin-top: 18px; font-size: 14px; color: var(--ink-soft); }

/* ==========================================================================
   UPLOAD ZONE
   ========================================================================== */
.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 28px 18px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 14px;
  transition: border-color .15s, background .15s;
  cursor: pointer;
}
.dropzone.dragging, .dropzone:hover { border-color: var(--red); background: var(--red-light); }
.doc-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.doc-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  background: var(--card);
}
.doc-row .grow { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ==========================================================================
   TIMELINE (fiche contact / entreprise)
   ========================================================================== */
.timeline { display: flex; flex-direction: column; gap: 0; position: relative; padding-left: 22px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.timeline-item { position: relative; padding: 0 0 18px 12px; }
.timeline-item::before {
  content: ''; position: absolute; left: -19px; top: 5px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--red);
  border: 2px solid var(--card);
}
.timeline-date { font-size: 12px; color: var(--ink-faint); }
.timeline-body { font-size: 14px; }

/* ==========================================================================
   PAGINATION
   ========================================================================== */
.pagination { display: flex; gap: 6px; justify-content: flex-end; padding: 14px 0 0; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 40px; min-height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  font-size: 13.5px; font-weight: 600;
  color: var(--ink);
  padding: 0 10px;
}
.pagination .current { background: var(--red); border-color: var(--red); color: #fff; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1100px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); width: min(84vw, 300px); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .drawer-close { display: block; }
  .drawer-overlay { display: block; pointer-events: none; }
  .drawer-overlay.show { pointer-events: auto; }
  .main-col { margin-left: 0; }
  .burger { display: flex; }
  .topbar-name { display: none; }
  .content { padding: 16px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .page-title { font-size: 17px; }
}

@media (max-width: 640px) {
  /* Kanban : bascule en onglets + colonne unique */
  .kanban-tabs { display: flex; }
  .kanban { min-height: auto; }
  .kanban-col { display: none; width: 100%; min-width: 0; max-height: none; }
  .kanban-col.mobile-active { display: flex; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 14px; gap: 10px; }
  .kpi-icon { width: 40px; height: 40px; }
  .kpi-value { font-size: 21px; }
  .filter-bar .select, .filter-bar .input { width: 100%; }
  .card-header { padding: 14px 16px; }
  .card-pad { padding: 16px; }
  .modal { max-width: 100%; }
}

@media (max-width: 380px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 26px 20px; }
}
