/* ============================================================
   Design Tokens — Flow
   Wave B.1 — Fase B UI/UX
   Riferimento: docs/spec-fase-b-ui.md §3
   ============================================================ */

:root {
    /* ------------------------------------------------------------
       Color Palette — Semantica
       ------------------------------------------------------------ */

    /* Primary — Blu principale (già in uso: login, admin, richieste) */
    --color-primary:        #2563EB;
    --color-primary-hover:  #1D4ED8;
    --color-primary-soft:   #DBEAFE;

    /* Success — Verde operazione positiva */
    --color-success:        #16A34A;
    --color-success-hover:  #15803D;
    --color-success-soft:   #DCFCE7;

    /* Warning — Giallo attenzione */
    --color-warning:        #D97706;
    --color-warning-hover:  #B45309;
    --color-warning-soft:   #FEF3C7;

    /* Danger — Rosso bloccante */
    --color-danger:         #DC2626;
    --color-danger-hover:   #B91C1C;
    --color-danger-soft:    #FEE2E2;

    /* Info — Blu informativo */
    --color-info:           #0284C7;
    --color-info-hover:     #0369A1;
    --color-info-soft:      #E0F2FE;

    /* Accent — Gold (usato in errors come evidenziatore) */
    --color-accent-gold:    #C9A84C;

    /* ------------------------------------------------------------
       Color Palette — Neutrals (scala 50-900)
       ------------------------------------------------------------ */

    --color-neutral-900:    #0B1524; /* navy/sfondo scuro — già in login, sodalizio */
    --color-neutral-700:    #334155;
    --color-neutral-500:    #64748B; /* unifica #5e6278 e #a1a5b7 attuali */
    --color-neutral-300:    #CBD5E1;
    --color-neutral-200:    #E2E8F0; /* ≈ #E1E3EA */
    --color-neutral-100:    #F1F5F9; /* ≈ #f4f6f8 */
    --color-neutral-50:     #F8FAFC; /* ≈ #f9f9f9 */
    --color-white:          #FFFFFF;

    /* ------------------------------------------------------------
       Spacing — Scala modulare 4px
       ------------------------------------------------------------ */

    --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;
    --space-16: 64px;

    /* ------------------------------------------------------------
       Typography — Scala modulare 1.125 (major second)
       ------------------------------------------------------------ */

    --font-family-base: 'Montserrat', sans-serif;

    --text-xs:   0.75rem;   /* 12px */
    --text-sm:   0.875rem;  /* 14px */
    --text-base: 1rem;      /* 16px */
    --text-lg:   1.125rem;  /* 18px */
    --text-xl:   1.25rem;   /* 20px */
    --text-2xl:  1.5rem;    /* 24px */
    --text-3xl:  2rem;      /* 32px */
    --text-4xl:  2.75rem;   /* 44px */

    --font-weight-regular:  400;
    --font-weight-medium:   500;
    --font-weight-semibold: 600;
    --font-weight-bold:     700;

    --line-height-tight:    1.2;
    --line-height-normal:   1.5;
    --line-height-relaxed:  1.7;

    /* ------------------------------------------------------------
       Radius
       ------------------------------------------------------------ */

    --radius-sm:   4px;
    --radius-md:   8px;
    --radius-lg:   12px;
    --radius-xl:   16px;
    --radius-full: 9999px;

    /* ------------------------------------------------------------
       Shadow
       ------------------------------------------------------------ */

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 10px 24px rgba(15, 23, 42, 0.12);

    /* ------------------------------------------------------------
       Workflow State Tokens
       ------------------------------------------------------------ */

    --state-bozza-bg:           #F1F5F9;
    --state-bozza-text:         #334155;
    --state-inviata-bg:         #DBEAFE;
    --state-inviata-text:       #2563EB;
    --state-inprogress-bg:      #FEF3C7;
    --state-inprogress-text:    #B45309;
    --state-deliberata-bg:      #DCFCE7;
    --state-deliberata-text:    #15803D;
    --state-rifiutata-bg:       #FEE2E2;
    --state-rifiutata-text:     #B91C1C;
    --state-completata-bg:      #DCFCE7;
    --state-completata-text:    #16A34A;

    /* ------------------------------------------------------------
       Form Component Tokens
       ------------------------------------------------------------ */

    --form-section-bg:          #F8FAFC;
    --form-section-border:      #E2E8F0;
    --form-section-padding:     24px;
    --form-section-radius:      8px;
    --form-field-gap:           16px;
    --form-label-color:         #334155;
    --form-label-weight:        500;
    --form-input-border:        #CBD5E1;
    --form-input-focus:         #2563EB;
    --form-input-bg:            #FFFFFF;
    --form-error-color:         #DC2626;
    --form-error-bg:            #FEE2E2;

    /* ------------------------------------------------------------
       Wizard Step Tokens
       ------------------------------------------------------------ */

    --step-connector-color:             #E2E8F0;
    --step-connector-completed-color:   #16A34A;
    --step-connector-width:             2px;
    --step-completed-bg:                #16A34A;
    --step-completed-text:              #FFFFFF;
    --step-active-bg:                   #2563EB;
    --step-active-text:                 #FFFFFF;
    --step-active-ring:                 #DBEAFE;
    --step-pending-bg:                  #F1F5F9;
    --step-pending-text:                #64748B;
    --step-disabled-bg:                 #F1F5F9;
    --step-disabled-text:               #CBD5E1;
    --step-disabled-cursor:             not-allowed;
    --step-warning-bg:                  #FEF3C7;
    --step-warning-text:                #B45309;

    /* ------------------------------------------------------------
       Autosave Indicator Tokens
       ------------------------------------------------------------ */

    --autosave-idle-color:      #CBD5E1;
    --autosave-saving-color:    #2563EB;
    --autosave-saved-color:     #16A34A;
    --autosave-error-color:     #DC2626;
    --autosave-font-size:       0.75rem;
    --autosave-spacing:         8px;

    /* ------------------------------------------------------------
       Toast / Flash Notification Tokens
       ------------------------------------------------------------ */

    --toast-success-bg:         #DCFCE7;
    --toast-success-border:     #16A34A;
    --toast-success-text:       #15803D;
    --toast-warning-bg:         #FEF3C7;
    --toast-warning-border:     #D97706;
    --toast-warning-text:       #B45309;
    --toast-danger-bg:          #FEE2E2;
    --toast-danger-border:      #DC2626;
    --toast-danger-text:        #B91C1C;
    --toast-info-bg:            #E0F2FE;
    --toast-info-border:        #0284C7;
    --toast-info-text:          #0369A1;

    /* ------------------------------------------------------------
       Bozza Restore Banner Tokens (alias semantici su toast-info)
       ------------------------------------------------------------ */

    --bozza-restore-bg:         var(--toast-info-bg);
    --bozza-restore-border:     var(--toast-info-border);
    --bozza-restore-text:       var(--toast-info-text);

    /* ------------------------------------------------------------
       Upload Dropzone Tokens
       ------------------------------------------------------------ */

    --dropzone-idle-border:         #CBD5E1;
    --dropzone-drag-over-bg:        #DBEAFE;
    --dropzone-drag-over-border:    #2563EB;
    --dropzone-error-border:        #DC2626;
    --dropzone-success-border:      #16A34A;
}
