/* ============================================================
   THEME.CSS — Token di design centralizzati (stile shadcn/ui)
   Per cambiare l'accento basta modificare --accent* qui sotto.
   I nomi --color-* sono mantenuti per compatibilità con i template.
   ============================================================ */

@font-face {
  font-family: "Geist";
  src: url("../vendor/geist/Geist-Variable.0e46e732cced.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("../vendor/geist/GeistMono-Variable.addf0d443087.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Accento (azzurro). --accent-strong = versione più scura per pulsanti/testo
     piccolo: il bianco su #0284c7 ha contrasto ~4.1:1, su #0369a1 ~5.9:1. */
  --accent:         #0284c7;
  --accent-strong:  #0369a1;
  --accent-hover:   #075985;
  --accent-soft:    #e6f2fa;
  --accent-fg:      #ffffff;
  --accent-rgb:     2, 132, 199;

  /* Alias storici */
  --color-primary:       var(--accent);
  --color-primary-dark:  var(--accent-strong);
  --color-primary-light: var(--accent-soft);

  /* Sfondi */
  --color-bg:        #ffffff;
  --color-surface:   #ffffff;
  --color-surface-2: #fafafa;   /* sidebar, righe alternate, aree secondarie */
  --color-muted-bg:  #e9e9ec;   /* hover, chip, intestazioni tabella */

  /* Bordi */
  --color-border:    #e4e4e7;

  /* Testi */
  --color-text:      #09090b;
  --color-muted:     #71717a;
  --color-heading:   #09090b;

  /* Toni semantici (testo su sfondo tenue) */
  --tone-success: #15803d;
  --tone-danger:  #b91c1c;
  --tone-warning: #a16207;
  --tone-info:    #0369a1;
  --tone-neutral: #52525b;
  --tone-agenda:  #0f766e;   /* "da fare" dell'agenda: verde acqua, fuori dalla tavolozza delle ore */

  /* Layout */
  --navbar-height:   56px;
  --sidebar-width:   248px;

  /* Tipografia */
  --font-sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Arrotondamenti */
  --radius-sm:  6px;
  --radius-md:  8px;    /* controlli */
  --radius-lg:  12px;   /* card */

  /* Ombre (quasi assenti) */
  --shadow-sm:  0 1px 2px rgba(0,0,0,.04);
  --shadow-md:  0 4px 12px rgba(0,0,0,.08);

  /* Override variabili Bootstrap */
  --bs-font-sans-serif:     var(--font-sans);
  --bs-font-monospace:      var(--font-mono);
  --bs-body-font-family:    var(--font-sans);
  --bs-body-font-size:      .875rem;
  --bs-body-bg:             var(--color-bg);
  --bs-body-color:          var(--color-text);
  --bs-secondary-color:     var(--color-muted);
  --bs-secondary-bg:        var(--color-muted-bg);
  --bs-tertiary-bg:         var(--color-surface-2);
  --bs-emphasis-color:      var(--color-heading);
  --bs-heading-color:       var(--color-heading);
  --bs-border-color:        var(--color-border);
  --bs-border-radius:       var(--radius-md);
  --bs-border-radius-sm:    var(--radius-sm);
  --bs-border-radius-lg:    var(--radius-lg);
  --bs-primary:             var(--accent);
  --bs-primary-rgb:         var(--accent-rgb);
  --bs-primary-bg-subtle:   var(--accent-soft);
  --bs-primary-border-subtle: #bcdcf0;
  --bs-primary-text-emphasis: var(--accent-hover);
  --bs-link-color:          var(--accent-strong);
  --bs-link-color-rgb:      3, 105, 161;
  --bs-link-hover-color:    var(--accent-hover);
  --bs-link-hover-color-rgb: 7, 89, 133;
  --bs-focus-ring-color:    rgba(var(--accent-rgb), .25);

  /* Firme grafiche: il riquadro è un "foglio" chiaro in entrambi i temi, così
     l'inchiostro scuro della firma resta leggibile e uguale a quello del PDF */
  --firma-carta:      #ffffff;
  --firma-inchiostro: #1e293b;
  --firma-guida:      #cbd5e1;
}

/* ============================================================
   TEMA SCURO
   ============================================================ */
[data-theme="dark"],
[data-bs-theme="dark"] {
  --accent:         #38a1e8;
  --accent-strong:  #38a1e8;
  --accent-hover:   #5bb5f0;
  --accent-soft:    #0c2635;
  --accent-fg:      #04121c;
  --accent-rgb:     56, 161, 232;

  --color-bg:        #09090b;
  --color-surface:   #0c0c0f;
  --color-surface-2: #101013;
  --color-muted-bg:  #2a2a30;

  --color-border:    #27272a;

  --color-text:      #fafafa;
  --color-muted:     #a1a1aa;
  --color-heading:   #fafafa;

  --tone-success: #4ade80;
  --tone-danger:  #f87171;
  --tone-warning: #facc15;
  --tone-info:    #7cc4f3;
  --tone-neutral: #a1a1aa;
  --tone-agenda:  #2dd4bf;

  --shadow-sm:  none;
  --shadow-md:  0 8px 24px rgba(0,0,0,.5);

  --firma-carta:      #f4f4f5;
  --firma-inchiostro: #1e293b;
  --firma-guida:      #a1a1aa;

  --bs-primary-border-subtle: #12425d;
  --bs-link-color-rgb:      56, 161, 232;
  --bs-link-hover-color-rgb: 91, 181, 240;
}
