/* ============================================================
   SMART FLEET MANAGEMENT — MENABUE
   Design tokens + base styles
   ============================================================ */

:root {
  /* Brand */
  --red:        #c8102e;
  --red-600:    #b30d28;
  --red-700:    #97091f;
  --red-tint:   #fdeef0;
  --red-tint-2: #fbdde1;

  /* Ink / neutrals */
  --ink:    #15171c;
  --ink-2:  #494f58;
  --ink-3:  #7c828c;
  --ink-4:  #aab0ba;
  --line:   #e7e9ee;
  --line-2: #f0f2f5;
  --bg:     #f4f6f9;
  --surface:#ffffff;
  --surface-2:#fafbfc;

  /* Role colors */
  --role-commerciale: #1d9e75;
  --role-backoffice:  #1f5fae;
  --role-admin:       #c8102e;
  --role-cliente:     #8a8d8f;

  /* Status colors */
  --st-disponibile:   #1d9e75;
  --st-inarrivo:      #1f5fae;
  --st-prenotato:     #e07b00;
  --st-trattativa:    #7a4fce;
  --st-venduto:       #3a3f47;
  --st-noleggiato:    #0f9bae;
  --st-daverificare:  #c2960a;
  --st-preparazione:  #4759c9;
  --st-archiviato:    #8a8d8f;
  --st-nonvisibile:   #b6bac1;

  /* Radii + shadow */
  --r-sm: 7px;
  --r-md: 11px;
  --r-lg: 16px;
  --r-xl: 22px;
  --sh-1: 0 1px 2px rgba(20,23,28,.05), 0 1px 1px rgba(20,23,28,.04);
  --sh-2: 0 4px 14px rgba(20,23,28,.07), 0 1px 3px rgba(20,23,28,.05);
  --sh-3: 0 18px 48px rgba(20,23,28,.14), 0 4px 14px rgba(20,23,28,.08);
  --sh-card: 0 30px 80px -28px rgba(20,23,28,.40), 0 8px 24px -12px rgba(20,23,28,.18);

  /* Type */
  --font-display: "Archivo", system-ui, sans-serif;
  --font-ui: "Hanken Grotesk", system-ui, sans-serif;

  /* Admin dark theme */
  --ad-bg:      #0d1015;
  --ad-surface: #161a22;
  --ad-surface-2:#1c212b;
  --ad-line:    #2a313d;
  --ad-text:    #e9ecf1;
  --ad-text-2:  #99a2b0;
  --ad-red:     #ff405a;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; overflow: hidden; }
body {
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
#root { height: 100vh; overflow: hidden; }

/* ---- Dark theme (admin) — overrides tokens, cascades everywhere ---- */
.theme-dark {
  --red:        #ff4d63;
  --red-600:    #ff3350;
  --red-700:    #e02943;
  --red-tint:   rgba(255,77,99,.14);
  --red-tint-2: rgba(255,77,99,.30);

  --ink:    #e9ecf1;
  --ink-2:  #aab2c0;
  --ink-3:  #818a98;
  --ink-4:  #5d6675;
  --line:   #2a313d;
  --line-2: #222834;
  --bg:     #0d1015;
  --surface:#161a22;
  --surface-2:#1c212b;

  --sh-1: 0 1px 2px rgba(0,0,0,.4);
  --sh-2: 0 4px 14px rgba(0,0,0,.45);
  --sh-3: 0 18px 48px rgba(0,0,0,.6);
}
.theme-dark { background: var(--bg); color: var(--ink); }

button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }
::selection { background: var(--red-tint-2); }

/* Scrollbar */
.scroll::-webkit-scrollbar { width: 10px; height: 10px; }
.scroll::-webkit-scrollbar-thumb { background: #d3d7df; border-radius: 20px; border: 3px solid transparent; background-clip: content-box; }
.scroll::-webkit-scrollbar-thumb:hover { background: #b9bec8; background-clip: content-box; }
.scroll::-webkit-scrollbar-track { background: transparent; }

/* Wordmark */
.wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: .34em;
  line-height: 1;
  text-transform: uppercase;
}
.wordmark-sub {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: .26em;
  text-transform: uppercase;
}

/* Animations */
@keyframes floatIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@keyframes pulseDot { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
@keyframes slotPulse { 0%,100%{ box-shadow: 0 0 0 0 rgba(200,16,46,0);} 50%{ box-shadow: 0 0 0 4px rgba(200,16,46,.06);} }

image-slot { font-family: var(--font-ui); }

/* Print — only the PDF sheet */
@media print {
  @page { margin: 0; size: A4; }
  body * { visibility: hidden !important; }
  .pdf-print, .pdf-print * { visibility: visible !important; }
  .pdf-print { position: absolute !important; left: 0; top: 0; width: 210mm; box-shadow: none !important; border: none !important; }
  .no-print { display: none !important; }
}
