@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap');

:root {
  --bg:         #F7F7F5;
  --bg-card:    #FFFFFF;
  --bg-dark:    #0A0F1E;
  --bg-input:   #F0F0EC;
  --text-1:     #0A0F1E;
  --text-2:     #6B6B6B;
  --text-3:     #A0A09A;
  --border:     rgba(10,15,30,.08);
  --accent:     #EA580C;
  --accent-l:   #FFF0E8;
  --blue:       #2563EB;
  --blue-bg:    #EEF3FF;
  --green:      #16A34A;
  --green-bg:   #E6F7EE;
  --amber:      #D97706;
  --amber-bg:   #FEF3E2;
  --red:        #DC2626;
  --red-bg:     #FEE2E2;
  --purple:     #7C3AED;
  --teal:       #0D9488;
  --teal-bg:    #E0F7F5;
  --gray-bg:    #F0F0EB;
  --r-sm:       6px;
  --r-md:       10px;
  --r-lg:       16px;
  --r-xl:       22px;
  --sh:         0 1px 3px rgba(0,0,0,.06);
  --ease:       .18s cubic-bezier(.4,0,.2,1);
   /* hauteur barre nav mobile */
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-text-size-adjust: 100%; }
body {
  padding: 0; font-family: 'DM Sans', sans-serif; background: var(--bg); color: var(--text-1); min-height: 100vh; -webkit-font-smoothing: antialiased; overflow-x: hidden; }

/* ── LAYOUT DESKTOP ─────────────────────────────────────── */
.app { display: flex; height: 100vh; height: 100dvh; max-width: 100vw; }

/* ── SIDEBAR DESKTOP ────────────────────────────────────── */
.sidebar {
  width: 240px; background: var(--bg-dark);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 300; transition: transform var(--ease);
}
.sidebar-header { padding: 20px 16px 16px; border-bottom: 1px solid rgba(255,255,255,.06); }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon { width: 34px; height: 34px; background: var(--accent); border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.logo-icon svg { width: 20px; height: 20px; }
.logo h1 { font-size: 13px; font-weight: 600; color: #fff; }
.logo-sub { font-size: 11px; color: rgba(255,255,255,.3); padding-left: 44px; margin-top: 2px; }

.sidebar-nav { flex: 1; padding: 8px; overflow-y: auto; }
.nav-section { font-size: 10px; font-weight: 500; color: rgba(255,255,255,.22); letter-spacing: .08em; text-transform: uppercase; padding: 12px 8px 4px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--r-md);
  color: rgba(255,255,255,.45); cursor: pointer;
  font-size: 13px; font-weight: 400;
  transition: all var(--ease); user-select: none; margin-bottom: 2px;
}
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,.07); color: rgba(255,255,255,.85); }
.nav-item.active { background: rgba(234,88,12,.2); color: #fff; font-weight: 500; }
.nav-badge { margin-left: auto; background: var(--accent); color: #fff; font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 20px; min-width: 18px; text-align: center; }

.sidebar-footer { padding: 12px; border-top: 1px solid rgba(255,255,255,.06); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r-md); cursor: pointer; transition: background var(--ease); }
.user-chip:hover { background: rgba(255,255,255,.07); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: #fff; flex-shrink: 0; }
.user-name { font-size: 12px; font-weight: 500; color: #fff; }
.user-role { font-size: 11px; color: rgba(255,255,255,.35); }
.logout-btn { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 8px; border: none; background: transparent; color: rgba(255,255,255,.3); font-size: 12px; cursor: pointer; border-radius: 6px; font-family: inherit; margin-top: 6px; transition: all var(--ease); }
.logout-btn:hover { background: rgba(255,255,255,.06); color: rgba(255,255,255,.6); }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 250; }

/* ── MAIN ───────────────────────────────────────────────── */
.main { margin-left: 240px; flex: 1; display: flex; flex-direction: column; height: 100vh; max-width: calc(100vw - 240px); }

/* ── TOPBAR ─────────────────────────────────────────────── */
.topbar {
  height: 60px;
  padding: 0 24px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  position: sticky; top: 0; z-index: 100;
}
.topbar-title { font-size: 15px; font-weight: 600; flex: 1; }
.hamburger { display: none; flex-direction: column; gap: 4px; cursor: pointer; padding: 8px; border-radius: 8px; }
.hamburger span { width: 20px; height: 2px; background: var(--text-1); border-radius: 2px; }
.search-btn { display: flex; align-items: center; gap: 8px; background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--r-md); padding: 7px 14px; font-size: 13px; color: var(--text-3); cursor: pointer; min-width: 180px; }
.search-btn kbd { margin-left: auto; font-size: 10px; background: var(--border); padding: 1px 5px; border-radius: 4px; }
.btn-add { display: flex; align-items: center; gap: 6px; background: var(--accent); color: #fff; border: none; padding: 8px 16px; border-radius: var(--r-md); font-size: 13px; font-weight: 500; cursor: pointer; font-family: inherit; white-space: nowrap; }
.btn-add:hover { background: #C2410C; }

/* ── CONTENT ────────────────────────────────────────────── */
.content { flex: 1; padding: 16px; overflow-y: auto; overflow-x: hidden; max-width: 100%; box-sizing: border-box; -webkit-overflow-scrolling: touch; position: relative; }
.page { display: none; }
.page.active { display: block; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }

/* ── BOTTOM NAV MOBILE ──────────────────────────────────── */






.bn-icon-wrap { position: relative; }

/* ── MÉTRIQUES ──────────────────────────────────────────── */
.metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
.metric {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 14px 12px;
  border-top: 3px solid var(--accent);
}
.metric.c-orange { border-top-color: var(--accent); }
.metric.c-green  { border-top-color: var(--green); }
.metric.c-blue   { border-top-color: var(--blue); }
.metric.c-amber  { border-top-color: var(--amber); }
.metric.c-red    { border-top-color: var(--red); }
.metric.c-teal   { border-top-color: var(--teal); }
.metric-val  { font-size: 22px; font-weight: 700; line-height: 1; margin-bottom: 3px; }
.metric-lbl  { font-size: 11px; color: var(--text-2); margin-bottom: 8px; }
.metric-link { font-size: 11px; color: var(--accent); cursor: pointer; font-weight: 500; }

/* ── GRILLES ────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }

/* ── PANEL ──────────────────────────────────────────────── */
.panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--sh); margin-bottom: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.panel-title { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.panel-title svg { width: 14px; height: 14px; color: var(--accent); }
.panel-link { font-size: 11px; color: var(--accent); cursor: pointer; font-weight: 500; }

/* ── ACTIONS RAPIDES ────────────────────────────────────── */
.quick { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 14px 18px; margin-bottom: 16px; }
.quick h3 { font-size: 11px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 10px; }
.quick-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.qbtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 14px; border-radius: var(--r-md); font-size: 13px; font-weight: 600; cursor: pointer; border: none; color: #fff; font-family: inherit; }
.qbtn:hover { filter: brightness(1.1); }
.qbtn svg { width: 13px; height: 13px; }
.qbtn.orange { background: var(--accent); }
.qbtn.blue   { background: var(--blue); }
.qbtn.green  { background: var(--green); }
.qbtn.teal   { background: var(--teal); }

/* ── TABLES ─────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th { text-align: left; font-size: 11px; font-weight: 500; color: var(--text-3); letter-spacing: .05em; text-transform: uppercase; padding: 0 12px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
tbody td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--bg); }
.td-main { font-weight: 500; }

/* ── BADGES ─────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 20px; font-size: 11px; font-weight: 500; white-space: nowrap; }
.badge::before { content:''; width:5px; height:5px; border-radius:50%; }
.b-orange { background:var(--accent-l); color:#7C2D12; } .b-orange::before { background:var(--accent); }
.b-blue   { background:var(--blue-bg);  color:#1E3A8A; } .b-blue::before   { background:var(--blue); }
.b-green  { background:var(--green-bg); color:#14532D; } .b-green::before  { background:var(--green); }
.b-amber  { background:var(--amber-bg); color:#78350F; } .b-amber::before  { background:var(--amber); }
.b-red    { background:var(--red-bg);   color:#7F1D1D; } .b-red::before    { background:var(--red); }
.b-gray   { background:var(--gray-bg);  color:var(--text-2); } .b-gray::before { background:var(--text-3); }
.b-teal   { background:var(--teal-bg);  color:#134E4A; } .b-teal::before   { background:var(--teal); }
.b-urgent { background:var(--red-bg);   color:var(--red); font-weight:700; }

/* ── PROGRESS ───────────────────────────────────────────── */
.prog-wrap { display: flex; align-items: center; gap: 8px; }
.prog-track { flex:1; height:6px; background:var(--bg-input); border-radius:3px; overflow:hidden; min-width:60px; }
.prog-fill { height:100%; border-radius:3px; }
.pf-low { background:var(--blue); } .pf-mid { background:var(--amber); } .pf-high { background:var(--green); }
.prog-pct { font-size:11px; color:var(--text-2); min-width:28px; }

/* ── BUTTONS ────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: var(--r-md); font-size: 12px; font-weight: 500; cursor: pointer; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-1); font-family: inherit; }
.btn-sm { padding: 4px 8px; font-size: 11px; }
.btn-edit { background:var(--accent-l); color:#7C2D12; border-color:transparent; }
.btn-del  { background:var(--red-bg);   color:var(--red);   border-color:transparent; }
.action-btns { display:inline-flex; align-items:center; gap:4px; }

/* ── FILTRES ────────────────────────────────────────────── */
.filters { display: flex; gap: 3px; background: var(--bg-input); border-radius: var(--r-md); padding: 3px; margin-bottom: 14px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.filter { padding: 6px 12px; border-radius: var(--r-sm); font-size: 12px; font-weight: 500; cursor: pointer; color: var(--text-2); white-space: nowrap; flex-shrink: 0; }
.filter.active { background: var(--bg-card); color: var(--text-1); box-shadow: 0 1px 4px rgba(0,0,0,.08); }

/* ── MODAL ──────────────────────────────────────────────── */
.modal-bg { display: none; position: fixed; top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important; width: 100% !important; height: 100% !important; background: rgba(10,15,30,.8) !important; z-index: 99999 !important; align-items: center; justify-content: center; padding: 16px; }
.modal-bg.open { display: flex !important; }
.modal { background: var(--bg-card); border-radius: var(--r-xl); width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto; box-shadow: 0 24px 60px rgba(0,0,0,.2); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 12px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg-card); }
.modal-title { font-size: 14px; font-weight: 600; }
.modal-close { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg-input); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 16px; color: var(--text-2); }
.modal-body { padding: 10px 16px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 20px calc(20px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--border); }

/* ── FORM ───────────────────────────────────────────────── */
.f-row { margin-bottom: 8px; }
.f-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.f-label { display: block; font-size: 10px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 3px; }
input[type=text], input[type=number], input[type=date], input[type=email], input[type=tel], input[type=password], select, textarea {
  width: 100%; padding: 8px 10px; font-size: 13px; font-family: inherit;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--r-md); color: var(--text-1); outline: none;
  -webkit-appearance: none; appearance: none;
}
input:focus, select:focus, textarea:focus { background: var(--bg-card); border-color: var(--accent); box-shadow: 0 0 0 3px rgba(234,88,12,.1); }
textarea { resize: vertical; min-height: 70px; line-height: 1.5; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236B6B6B' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 10px center; padding-right:28px; }

/* ── BTN PRIMARY ────────────────────────────────────────── */
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: #C2410C; }

/* ── TOAST ──────────────────────────────────────────────── */
.toasts { position: fixed; bottom: calc(var(--nav-h) + 12px); right: 16px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { background: var(--bg-dark); color: #fff; padding: 10px 14px; border-radius: var(--r-md); font-size: 13px; display: flex; align-items: center; gap: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.25); animation: toastIn .25s ease; }
.toast.out { opacity: 0; transform: translateX(20px); transition: all .3s ease; }
@keyframes toastIn { from { opacity:0; transform:translateX(20px); } to { opacity:1; transform:none; } }

/* ── SEARCH ─────────────────────────────────────────────── */
.search-overlay { display: none; position: fixed; inset: 0; background: rgba(10,15,30,.7); z-index: 600; align-items: flex-start; justify-content: center; padding-top: 60px; }
.search-overlay.open { display: flex; }
.search-box { background: var(--bg-card); border-radius: var(--r-xl); width: 100%; max-width: 500px; margin: 0 16px; box-shadow: 0 24px 64px rgba(0,0,0,.2);  }
.search-in { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.search-in input { flex: 1; border: none; background: transparent; font-size: 15px; color: var(--text-1); }
.search-in input:focus { box-shadow: none; }
.search-res { max-height: 300px; overflow-y: auto; }
.search-item { display: flex; align-items: center; gap: 12px; padding: 10px 18px; cursor: pointer; border-bottom: 1px solid var(--border); font-size: 13px; }
.search-item:hover { background: var(--bg); }
.search-empty { padding: 20px; text-align: center; font-size: 13px; color: var(--text-3); }
.res-type { font-size: 10px; color: var(--text-3); text-transform: uppercase; min-width: 70px; }

/* ── LOGIN ──────────────────────────────────────────────── */
.login-screen { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; width: 100%; height: 100%; background: var(--bg-dark); z-index: 9999; align-items: center; justify-content: center; padding: 20px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.login-screen.active { display: flex; }
.login-card { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: var(--r-xl); padding: 36px 28px; width: 100%; max-width: 340px; text-align: center; }
.login-icon { width: 56px; height: 56px; background: var(--accent); border-radius: 14px; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.login-icon svg { width: 28px; height: 28px; }
.login-h1 { font-size: 20px; font-weight: 600; color: #fff; margin-bottom: 4px; }
.login-sub { font-size: 13px; color: rgba(255,255,255,.35); margin-bottom: 24px; }
.login-label { display: block; font-size: 11px; font-weight: 500; color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 5px; text-align: left; }
.login-input { width: 100%; padding: 10px 14px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: var(--r-md); color: #fff; font-size: 14px; font-family: inherit; outline: none; margin-bottom: 12px; }
.login-input:focus { border-color: var(--accent); }
.login-input::placeholder { color: rgba(255,255,255,.25); }
.login-btn { width: 100%; padding: 12px; background: var(--accent); color: #fff; border: none; border-radius: var(--r-md); font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer; margin-top: 4px; }
.login-btn:hover { background: #C2410C; }
.login-err { color: #FCA5A5; font-size: 12px; margin-top: 10px; min-height: 18px; }

/* ── OFFLINE ────────────────────────────────────────────── */
.offline-bar { display: none; background: var(--amber-bg); color: var(--amber); text-align: center; font-size: 12px; padding: 7px; font-weight: 500; }
body.offline .offline-bar { display: block; }

/* ── EMPTY ──────────────────────────────────────────────── */
.empty { padding: 32px 20px; text-align: center; color: var(--text-3); font-size: 13px; }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE MOBILE
   ══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Sidebar cachée, bottom nav visible */
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: 8px 0 32px rgba(0,0,0,.4); }
  .sidebar-overlay { display: block; }
  .main { margin-left: 0; padding-bottom: 0; max-width: 100vw; width: 100%; }
  .app { overflow-x: hidden; max-width: 100vw; }
  img, video { max-width: 100%; }
  
  .hamburger { display: none; } /* hamburger caché sur mobile, on utilise bottom nav */
  .search-btn { display: none; }

  /* Topbar simplifiée */
  .topbar { padding: 0 16px; height: 52px; border-bottom: 1px solid var(--border); }
  .topbar-title { font-size: 14px; }
  .btn-add { padding: 7px 12px; font-size: 12px; }

  /* Content */
  .content { padding: 14px; padding-bottom: 16px; }

  /* Métriques : 2 colonnes */
  .metrics { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
  .metric { padding: 12px 10px; }
  .metric-val { font-size: 20px; }
  .metric-lbl { font-size: 11px; }

  /* Grilles */
  .grid-2 { grid-template-columns: 1fr; }
  .f-row2  { grid-template-columns: 1fr; }

  /* Actions rapides */
  .quick-btns { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .qbtn { flex-shrink: 0; }

  /* Toasts au-dessus de la bottom nav */
  .toasts { bottom: calc(var(--nav-h) + 16px); right: 12px; left: 12px; }
}

@media (max-width: 480px) {
  .metrics { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .metric-val { font-size: 18px; }
  .content { padding: 10px; }
  .panel { padding: 14px; }
  .action-btns .btn-edit span, .action-btns .btn-del span { display: none; }
}

/* Tables responsive mobile */
@media (max-width: 768px) {
  table.mobile-cards { display: block; }
  table.mobile-cards thead { display: none; }
  table.mobile-cards tbody { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
  table.mobile-cards tbody tr { display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 12px 14px; }
  table.mobile-cards tbody tr:hover td { background: transparent; }
  table.mobile-cards tbody td { display: flex; align-items: flex-start; justify-content: space-between; padding: 4px 0 !important; border-bottom: none !important; font-size: 13px; gap: 8px; }
  table.mobile-cards tbody td::before { content: attr(data-label); font-size: 10px; font-weight: 500; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; min-width: 85px; flex-shrink: 0; padding-top: 2px; }
  table.mobile-cards tbody td:first-child { padding: 0 0 8px !important; border-bottom: 1px solid var(--border) !important; margin-bottom: 6px; }
  table.mobile-cards tbody td:first-child::before { display: none; }
  table.mobile-cards tbody .td-main { font-size: 14px; font-weight: 600; padding-left: 0 !important; }
  table.mobile-cards tbody td[data-label=""] { justify-content: flex-end; padding-top: 8px !important; border-top: 1px solid var(--border) !important; margin-top: 4px; }
  table.mobile-cards tbody td[data-label=""]::before { display: none; }
}

.modal-footer { display:flex;justify-content:flex-end;gap:10px;padding:12px 20px calc(20px + env(safe-area-inset-bottom, 0px)); border-top:1px solid var(--border); }

/* ── Modal optimisé mobile ── */
@media (max-width: 600px) {
  .modal-bg { align-items: flex-end; padding: 0; }
  .modal {
    max-width: 100%;
    max-height: 88vh;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    margin: 0;
  }
  .modal-head { padding: 12px 16px 10px; }
  .modal-body { padding: 8px 14px; }
  .modal-foot { padding: 10px 14px calc(16px + env(safe-area-inset-bottom, 0px)); }
  .f-row { margin-bottom: 7px; }
  .f-row2 { margin-bottom: 7px; gap: 7px; }
  .f-label { font-size: 9.5px; margin-bottom: 2px; }
  input, select, textarea {
    font-size: 15px !important;
    padding: 8px 10px !important;
  }
  textarea { min-height: 60px !important; }
}

/* ── Métriques desktop ── */
@media (min-width: 768px) {
  .metrics { grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
  .metric { padding: 16px 14px; }
  .metric-val { font-size: 26px; }
}

/* ── Dashboard panels responsive ── */
.panels-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}
@media (max-width: 600px) {
  .panels-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .content { padding: 12px; overflow-x: hidden; }

  .panel { padding: 14px; margin-bottom: 12px; }
  .metrics { gap: 8px; margin-bottom: 12px; }
  .metric { padding: 12px 10px; }
  .metric-val { font-size: 20px; }
  .metric-lbl { font-size: 10px; }
}
