.loader {
    border: 16px solid #f3f3f3; /* Light grey */
    border-top: 16px solid #636b6f; /* Blue */
    border-radius: 50%;
    width: 120px;
    height: 120px;
    animation: spin 2s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Palette colori brand identity - tonalità blu */
:root {
    --primary-dark: #002855;      /* Blu navy scuro - testo principale e header */
    --primary-medium: #0A4C7D;    /* Blu medio - elementi attivi */
    --primary-base: #1976D2;      /* Blu base - azioni principali */
    --primary-light: #7FA8C9;     /* Blu chiaro - hover e accenti */
    --primary-lightest: #f5f7fa;  /* Grigio chiaro - sfondi */
    --background: #F5F7FA;        /* Sfondo generale */
    --surface: #FFFFFF;           /* Superfici card */
    --text-dark: #002855;         /* Testo principale */
    --text-muted: #7FA8C9;        /* Testo secondario */
    --success: #4CAF50;           /* Verde per successo */
    --warning: #FF9800;           /* Arancione per warning */
    --error: #F44336;             /* Rosso per errori */
    --pastel-peach: #FFE5D9;      /* Peach pastello per highlight */
    --pastel-orange: #FFBA92;     /* Arancione pastello */
}

/* Badge brand identity - tonalità blu */
.badge-primary-dark {
    background: var(--primary-dark) !important;
    color: white !important;
}

.badge-primary {
    background: var(--primary-base) !important;
    color: white !important;
}

.badge-primary-light {
    background: var(--primary-light) !important;
    color: #ffffff !important;
}

.badge-primary-lightest {
    background: var(--primary-lightest) !important;
    color: var(--primary-dark) !important;
}

.badge-success {
    background: var(--success) !important;
    color: white !important;
}

.badge-warning {
    background: var(--warning) !important;
    color: white !important;
}

.badge-error {
    background: var(--error) !important;
    color: white !important;
}

/* Retrocompatibilità badge pastello -> mappati a blu */
.badge-pastel-green,
.badge-pastel-green-light {
    background: var(--success) !important;
    color: white !important;
}

.badge-pastel-lavender,
.badge-pastel-purple,
.badge-pastel-blue,
.badge-pastel-blue-light {
    background: var(--primary-base) !important;
    color: white !important;
}

.badge-pastel-peach,
.badge-pastel-orange,
.badge-pastel-yellow {
    background: var(--warning) !important;
    color: white !important;
}

.badge-pastel-pink {
    background: var(--primary-light) !important;
    color: #ffffff !important;
}

.badge-pastel-gray {
    background: var(--text-muted) !important;
    color: white !important;
}

/* Pulsanti brand identity */
.btn-primary {
    background: var(--primary-base) !important;
    color: white !important;
    border: none;
}

.btn-primary:hover {
    background: var(--primary-medium) !important;
    color: white !important;
}

.btn-secondary {
    background: var(--primary-light) !important;
    color: #ffffff !important;
    border: none;
}

.btn-secondary:hover {
    background: var(--primary-medium) !important;
    color: white !important;
}

/* Retrocompatibilità pulsanti pastello -> mappati a blu */
.btn-pastel-blue,
.btn-pastel-lavender {
    background: var(--primary-base) !important;
    color: white !important;
    border: none;
}

.btn-pastel-blue:hover,
.btn-pastel-lavender:hover {
    background: var(--primary-medium) !important;
    color: white !important;
}

.btn-pastel-peach {
    background: var(--warning) !important;
    color: white !important;
    border: none;
}

.btn-pastel-peach:hover {
    background: #E68900 !important;
    color: white !important;
}

.btn-pastel-green {
    background: var(--success) !important;
    color: white !important;
    border: none;
}

.btn-pastel-green:hover {
    background: #45A049 !important;
    color: white !important;
}

/* Alert brand identity */
.alert-primary {
    background: var(--primary-lightest);
    color: var(--primary-dark);
    border: 1px solid var(--primary-light);
    border-radius: 10px;
}

.alert-success {
    background: #E8F5E9;
    color: #2E7D32;
    border: 1px solid var(--success);
    border-radius: 10px;
}

.alert-warning {
    background: #FFF3E0;
    color: #E65100;
    border: 1px solid var(--warning);
    border-radius: 10px;
}

/* Retrocompatibilità alert pastello -> mappati */
.alert-pastel-green {
    background: #E8F5E9;
    color: #2E7D32;
    border: 1px solid var(--success);
    border-radius: 10px;
}

.alert-pastel-peach,
.alert-pastel-yellow {
    background: #FFF3E0;
    color: #E65100;
    border: 1px solid var(--warning);
    border-radius: 10px;
}

.alert-pastel-blue {
    background: var(--primary-lightest);
    color: var(--primary-dark);
    border: 1px solid var(--primary-light);
    border-radius: 10px;
}

/* Utilities */
.text-primary-dark {
    color: var(--primary-dark) !important;
}

.text-primary {
    color: var(--primary-base) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.bg-primary {
    background-color: var(--primary-base) !important;
}

.bg-primary-light {
    background-color: var(--primary-light) !important;
    color: #ffffff !important;
}

.bg-primary-lightest {
    background-color: var(--primary-lightest) !important;
}

/* Retrocompatibilità utilities */
.text-pastel-dark {
    color: var(--text-dark) !important;
}

.text-pastel-muted {
    color: var(--text-muted) !important;
}

.bg-pastel-green {
    background-color: var(--success) !important;
}

.bg-pastel-blue,
.bg-pastel-lavender {
    background-color: var(--primary-base) !important;
}

.bg-pastel-peach {
    background-color: var(--warning) !important;
}
