/* ===== GESTEK - STILE GLOBALE ===== */

/* --- Importazione Font --- */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

/* --- Variabili CSS ---
   Palette allineata all'Hub Puglia Life (blu / turchese / lime)
   e ai colori del marchio Gestek (#013B7D blu, #5C7701 verde). */
:root {
    /* Marchio Gestek */
    --brand-blu: #013B7D;
    --brand-verde: #5C7701;

    /* Palette condivisa con Hub */
    --hub-blu: #0E3A5F;
    --hub-blu-scuro: #0a2c48;
    --hub-turchese: #16A6A6;
    --hub-lime: #9DC021;
    --hub-lime-scuro: #84a51b;
    --hub-bordo: #e2e8f0;
    --hub-sfondo: #eef3f7;

    --primary-color: #0E3A5F;
    --secondary-color: #16A6A6;
    --success-color: #4E7614;
    --info-color: #16A6A6;
    --warning-color: #C87F0A;
    --danger-color: #C0392B;
    --light-color: #f5f8fb;
    --dark-color: #1d2733;
    --muted-color: #5b6b7b;

    --gradient-primary: linear-gradient(135deg, var(--brand-blu) 0%, var(--hub-blu) 55%, #12506f 100%);
    --gradient-accent: linear-gradient(135deg, var(--hub-turchese) 0%, var(--hub-lime) 100%);
    --gradient-light: linear-gradient(135deg, #f5f9fc 0%, #e8eff5 100%);

    --border-radius: 0.875rem;
    --border-radius-sm: 0.625rem;
    --border-radius-lg: 1.25rem;

    /* Ombre tinte di blu: si posano sullo sfondo invece di sporcarlo di nero */
    --shadow-sm: 0 1px 2px rgba(14, 58, 95, 0.06), 0 3px 10px rgba(14, 58, 95, 0.05);
    --shadow: 0 2px 6px rgba(14, 58, 95, 0.07), 0 12px 28px rgba(14, 58, 95, 0.10);
    --shadow-lg: 0 4px 12px rgba(14, 58, 95, 0.08), 0 24px 48px rgba(14, 58, 95, 0.14);

    --transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);

    /* Allineamento delle utility Bootstrap alla stessa palette */
    --bs-primary: #0E3A5F;
    --bs-primary-rgb: 14, 58, 95;
    --bs-secondary: #5b6b7b;
    --bs-secondary-rgb: 91, 107, 123;
    --bs-success: #4E7614;
    --bs-success-rgb: 78, 118, 20;
    --bs-info: #16A6A6;
    --bs-info-rgb: 22, 166, 166;
    --bs-warning: #C87F0A;
    --bs-warning-rgb: 200, 127, 10;
    --bs-danger: #C0392B;
    --bs-danger-rgb: 192, 57, 43;
    --bs-body-color: #1d2733;
    --bs-link-color: #0E3A5F;
    --bs-link-color-rgb: 14, 58, 95;
    --bs-link-hover-color: #16A6A6;
    --bs-border-color: #e2e8f0;
    --bs-border-radius: 0.625rem;

    /* Riquadri di avviso Bootstrap (.alert-info e simili):
       senza questi restavano azzurro Material, fuori palette. */
    --bs-primary-bg-subtle: #e7eef4;
    --bs-primary-border-subtle: #c3d5e2;
    --bs-primary-text-emphasis: #0a2c48;
    --bs-info-bg-subtle: #e2f4f4;
    --bs-info-border-subtle: #b3e2e1;
    --bs-info-text-emphasis: #0e6564;
    --bs-success-bg-subtle: #edf3e2;
    --bs-success-border-subtle: #cfe0ab;
    --bs-success-text-emphasis: #3f5f11;
    --bs-warning-bg-subtle: #fbf0dd;
    --bs-warning-border-subtle: #f0d5a4;
    --bs-warning-text-emphasis: #7d4f08;
    --bs-danger-bg-subtle: #f9e6e4;
    --bs-danger-border-subtle: #eec0ba;
    --bs-danger-text-emphasis: #8c2921;
}

/* Le intestazioni scure delle tabelle seguono il blu del marchio */
.table-dark {
    --bs-table-bg: #0E3A5F;
    --bs-table-color: #ffffff;
    --bs-table-border-color: rgba(255, 255, 255, 0.14);
}

/* --- Reset e Base --- */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Manrope', 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(168deg, #dfeaf2 0%, #eef3f7 42%, #f7fafc 100%);
    background-attachment: fixed;
    min-height: 100dvh;
    color: var(--dark-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* I numeri restano incolonnati mentre i contatori si aggiornano */
.stat-number,
.table td,
.table th,
input[type="number"],
.tabular {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

/* Accessibilità: anello di focus visibile su tutta l'app */
a:focus-visible,
button:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--hub-turchese);
    outline-offset: 2px;
    border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* --- Header Moderno --- */
.gestek-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.86);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    box-shadow: 0 1px 0 rgba(14, 58, 95, 0.08), 0 6px 20px rgba(14, 58, 95, 0.05);
    border-bottom: 1px solid var(--hub-bordo);
    padding: 0.75rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 70px;
    transition: box-shadow 0.25s ease, background 0.25s ease;
}

/* Logo */
.header-left {
    display: flex;
    align-items: center;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--dark-color);
    text-decoration: none;
    transition: var(--transition);
}

.header-logo:hover {
    color: var(--primary-color);
}

/* Marchio Gestek in immagine */
.header-logo .logo-img {
    height: 38px;
    width: auto;
    display: block;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.header-logo:hover .logo-img {
    transform: translateY(-1px);
}

.header-logo .logo-claim {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted-color);
    padding-left: 0.85rem;
    margin-left: 0.15rem;
    border-left: 1px solid var(--hub-bordo);
    white-space: nowrap;
    transition: color 0.25s ease;
}

.header-logo:hover .logo-claim {
    color: var(--hub-turchese);
}

@media (max-width: 640px) {
    .header-logo .logo-img { height: 32px; }
    .header-logo .logo-claim { display: none; }
}

/* Stesso marchio nelle barre Bootstrap delle pagine di dettaglio */
.navbar-brand .logo-img {
    height: 30px;
    width: auto;
    display: block;
}

/* Nuovo layout logo con sottotitolo */
.header-logo .logo-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1;
}

.header-logo .logo-main {
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--dark-color);
    transition: var(--transition);
}

.header-logo .logo-subtitle {
    font-weight: 400;
    font-size: 0.7rem;
    color: var(--muted-color);
    letter-spacing: 1.5px;
    margin-top: 2px;
    margin-left: 1px;
    transition: var(--transition);
}

/* Effetto hover sul logo */
.header-logo:hover .logo-main {
    color: var(--primary-color);
}

.header-logo:hover .logo-subtitle {
    color: var(--primary-color);
    opacity: 0.8;
}

/* Menu di navigazione */
.header-nav {
    flex: 1;
    display: flex;
    justify-content: center;
    margin-left: 2rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
}

.nav-menu .nav-item {
    position: relative;
}

.nav-menu .nav-item a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    color: var(--muted-color);
    text-decoration: none;
    font-weight: 500;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    position: relative;
}

.nav-menu .nav-item a:hover,
.nav-menu .nav-item.active a {
    color: var(--dark-color);
    background: rgba(14, 58, 95, 0.07);
}

.nav-menu .nav-item.active a {
    color: var(--primary-color);
    font-weight: 600;
}

.nav-menu .nav-item.active a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
}

.nav-menu .nav-item a i {
    font-size: 1.1rem;
}

/* Dropdown nel menu */
.nav-menu .dropdown {
    position: relative;
}

.nav-menu .dropdown-toggle::after {
    content: '\\F282';
    font-family: 'bootstrap-icons';
    margin-left: 0.5rem;
    font-size: 0.8rem;
}

.nav-menu .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow);
    min-width: 220px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    z-index: 100;
    border: 1px solid rgba(0,0,0,0.05);
}

.nav-menu .dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-menu .dropdown-menu li a {
    padding: 0.6rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-menu .dropdown-menu li a:hover {
    background: #f8f9fa;
}

/* Azioni utente e notifiche */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    flex-shrink: 0;
}

/* Il nome utente non deve mai mandare a capo e sfondare la barra */
.header-actions .user-name,
.header-actions .user-role {
    display: block;
    max-width: 11rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Contenitori Principali --- */
.main-container {
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    margin: 2rem auto;
    box-shadow: var(--shadow);
    border: 1px solid var(--hub-bordo);
    max-width: 1400px;
}

/* Variante aperta: la dashboard porta le proprie schede, non serve il pannello bianco */
.main-container.dash-canvas {
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border: none;
    box-shadow: none;
    padding: 0 1.25rem;
    margin: 1.75rem auto 4rem;
}

@media (max-width: 576px) {
    .main-container { padding: 1.25rem; margin: 1rem auto; }
    .main-container.dash-canvas { padding: 0 0.9rem; margin: 1rem auto 3rem; }
}

.page-header {
    background: var(--gradient-light);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Notifiche */
.notification-bell {
    position: relative;
    cursor: pointer;
}

.notification-bell i {
    font-size: 1.3rem;
    color: var(--muted-color);
    transition: var(--transition);
}

.notification-bell:hover i {
    color: var(--dark-color);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger-color);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-dropdown {
    position: absolute;
    top: 100%;
    right: -10px;
    background: white;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-lg);
    width: 320px;
    margin-top: 1rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    z-index: 100;
    border: 1px solid rgba(0,0,0,0.05);
}

.notification-bell:hover .notification-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #f1f1f1;
    background-color: #f8f9fa;
}

.notification-header h6 {
    margin: 0;
    font-weight: 600;
}

.mark-all-read {
    font-size: 0.8rem;
    color: var(--primary-color);
    text-decoration: none;
}

.notification-list {
    max-height: 300px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f1f1;
    transition: var(--transition);
}

.notification-item:hover {
    background: #f8f9fa;
}

.notification-item.unread {
    background: rgba(22, 166, 166, 0.07);
}

.notification-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.notification-icon.warning {
    background: rgba(200, 127, 10, 0.13);
    color: var(--warning-color);
}

.notification-icon.info {
    background: rgba(22, 166, 166, 0.13);
    color: var(--info-color);
}

.notification-icon.success {
    background: rgba(92, 140, 27, 0.14);
    color: var(--success-color);
}

.notification-content {
    flex: 1;
}

.notification-content p {
    margin: 0 0 0.25rem;
    font-size: 0.9rem;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--muted-color);
}

.notification-footer {
    padding: 0.75rem;
    text-align: center;
    border-top: 1px solid #f1f1f1;
}

.notification-footer a {
    color: var(--primary-color);
    font-size: 0.85rem;
    text-decoration: none;
}

/* --- Titoli --- */
.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

/* --- Pulsanti --- */
.btn {
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    pointer-events: auto;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 14px rgba(14, 58, 95, 0.28);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(14, 58, 95, 0.38);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #4E7614 0%, var(--brand-verde) 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(92, 119, 1, 0.26);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(92, 119, 1, 0.34);
    color: white;
}

.btn-primary:active,
.btn-success:active,
.btn-danger:active {
    transform: translateY(0);
}

.btn-outline-secondary {
    border: 2px solid var(--muted-color);
    color: var(--muted-color);
    background: transparent;
}

.btn-outline-secondary:hover {
    background: var(--muted-color);
    color: white;
    transform: translateY(-1px);
}

/* Menu utente */
.user-menu {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(14, 58, 95, 0.22);
    transition: var(--transition);
}

.user-info-display {
    display: none;
}

@media (min-width: 992px) {
    .user-info-display {
        display: flex;
        flex-direction: column;
        line-height: 1.2;
    }
    
    .user-name {
        font-weight: 600;
        font-size: 0.9rem;
        color: var(--dark-color);
    }
    
    .user-role {
        font-size: 0.75rem;
        color: var(--muted-color);
    }
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-menu:hover .user-avatar {
    border-color: var(--primary-color);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-lg);
    width: 240px;
    margin-top: 1rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    z-index: 100;
    border: 1px solid rgba(0,0,0,0.05);
    overflow: hidden;
}

.user-menu:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-info {
    padding: 1rem;
    border-bottom: 1px solid #f1f1f1;
}

.user-info h6 {
    margin: 0;
    font-weight: 600;
}

.user-info p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--muted-color);
}

.user-links {
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
}

.user-links li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    color: var(--dark-color);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
}

.user-links li a:hover {
    background: #f8f9fa;
    color: var(--primary-color);
}

/* Menu mobile */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark-color);
    cursor: pointer;
}

/* Responsive */
@media (max-width: 1400px) {
    .search-container {
        width: 200px;
    }

    .gestek-header {
        padding: 0.75rem 1.25rem;
    }

    .header-nav {
        margin-left: 1rem;
    }
    
    .nav-menu .nav-item a span {
        display: none;
    }
    
    .nav-menu .nav-item a {
        padding: 0.6rem 0.8rem;
    }
    
    .nav-menu .nav-item a i {
        font-size: 1.2rem;
    }
}

@media (max-width: 992px) {
    .gestek-header {
        padding: 0.75rem 1rem;
    }
    
    .header-nav {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        box-shadow: var(--shadow);
        padding: 1rem;
        z-index: 99;
    }
    
    .header-nav.mobile-visible {
        display: block;
    }
    
    .nav-menu {
        flex-direction: column;
        width: 100%;
    }
    
    .nav-menu .nav-item a {
        padding: 0.8rem 1rem;
        width: 100%;
        justify-content: flex-start;
    }
    
    .nav-menu .nav-item a span {
        display: inline-block;
    }
    
    .nav-menu .dropdown-menu {
        position: static;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        width: 100%;
        margin-top: 0;
        padding-left: 2rem;
        display: none;
    }
    
    .nav-menu .dropdown.active .dropdown-menu {
        display: block;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .search-container {
        display: none;
    }
}

@media (max-width: 576px) {
    /* I menu a tendina restano dentro lo schermo: con right negativo
       sporgevano a destra e facevano scorrere la pagina in orizzontale. */
    .notification-dropdown,
    .user-dropdown {
        width: min(300px, calc(100vw - 1.5rem));
        right: 0;
    }
}

/* --- Form Elements --- */
.form-control, 
.form-select {
    border-radius: var(--border-radius-sm);
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    transition: var(--transition);
    font-size: 0.95rem;
}

.form-control:focus, 
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(22, 166, 166, 0.18);
    outline: none;
}

.form-label {
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* --- Tables --- */
.table-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-top: 1.5rem;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background: var(--gradient-light);
    border-bottom: 2px solid var(--primary-color);
    font-weight: 600;
    color: var(--dark-color);
    padding: 1rem 0.75rem;
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background-color: rgba(14, 58, 95, 0.04);
    transform: scale(1.01);
}

/* --- DataTables Customization --- */
.dataTables_wrapper {
    margin-top: 1.5rem;
}

.dataTables_filter input {
    border-radius: var(--border-radius-sm);
    padding: 0.5rem 1rem;
    border: 2px solid #e9ecef;
    transition: var(--transition);
}

.dataTables_filter input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.page-item.active .page-link {
    background: var(--gradient-primary);
    border-color: var(--primary-color);
}

.page-link {
    color: var(--primary-color);
    border-radius: var(--border-radius-sm);
    margin: 0 0.125rem;
    transition: var(--transition);
}

.page-link:hover {
    color: white;
    background: var(--primary-color);
    transform: translateY(-1px);
}

/* --- Modals --- */
.modal-content {
    border-radius: var(--border-radius-lg);
    border: none;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.modal-header {
    background: var(--gradient-primary);
    color: white;
    border-bottom: none;
    padding: 1.5rem;
}

.modal-title {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    background: var(--light-color);
}

/* --- Cards --- */
.card {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--shadow);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    background: var(--gradient-light);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-weight: 600;
    padding: 1.25rem;
}

/* --- Action Bar --- */
.action-bar {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* --- Search Input Group --- */
.search-input-group {
    position: relative;
}

.search-input-group .form-control {
    padding-left: 3rem;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted-color);
    z-index: 5;
}

/* --- Badges --- */
.badge {
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    padding: 0.5rem 0.75rem;
}

/* --- Alerts --- */
.alert {
    border-radius: var(--border-radius);
    border: none;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: linear-gradient(135deg, rgba(92, 140, 27, 0.10) 0%, rgba(157, 192, 33, 0.12) 100%);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background: linear-gradient(135deg, rgba(192, 57, 43, 0.10) 0%, rgba(214, 96, 77, 0.10) 100%);
    color: var(--danger-color);
    border-left: 4px solid var(--danger-color);
}

/* --- Loading States --- */
.spinner-border {
    width: 1.25rem;
    height: 1.25rem;
}

#loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* --- Breadcrumbs --- */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 1rem;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb-item a:hover {
    color: var(--secondary-color);
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .main-container {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .action-bar {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .main-container {
        margin: 0.5rem;
        padding: 1rem;
    }
    
    .navbar-brand {
        font-size: 1.5rem;
    }
    
    .page-title {
        font-size: 1.25rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* --- Animazioni --- */
.fade-in {
    animation: fadeIn 0.6s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Statistiche Dashboard --- */
.stats-card {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    border: none;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

/* --- Welcome Card --- */
.welcome-card {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: none;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.welcome-card:hover {
    box-shadow: var(--shadow);
}

/* Stili per l'intestazione di benvenuto */
.welcome-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding-bottom: 1rem;
}

.welcome-header h3 {
    color: var(--primary-color);
    font-weight: 600;
}

.date-time-info {
    font-size: 0.95rem;
}

.date-time-info .bi {
    font-size: 1.2rem;
}

.weather-container {
    padding-top: 0.5rem;
}

#weather-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    overflow: hidden;
    border-radius: var(--border-radius);
    background-color: rgba(255, 255, 255, 0.5);
}

.weather-widget-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.weatherwidget-io {
    display: block;
    width: 100%;
    height: 38px;
    min-height: 38px;
    font-size: 0.8rem;
    overflow: hidden;
    position: relative;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    background: #f5f5f5;
    padding: 0;
}

@media (max-width: 992px) {
    .welcome-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .welcome-header h3 {
        margin-bottom: 1rem;
    }
    
    .date-time-info {
        flex-wrap: wrap;
        margin-bottom: 0.5rem;
    }
    
    .date-info, .time-info, .day-info {
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 576px) {
    .date-time-info {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .date-info, .time-info, .day-info {
        margin-right: 0 !important;
        margin-bottom: 0.5rem;
        width: 100%;
    }
    
    #weather-container {
        min-height: 100px;
    }
    
    .weatherwidget-io {
        height: 100px;
    }
}

.slide-in {
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* --- Utilities --- */
.glass-effect {
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-hover {
    transition: var(--transition);
}

.shadow-hover:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}
.btn.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #b02a37 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(192, 57, 43, 0.26);
}
.btn.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(192, 57, 43, 0.34);
}
.btn.btn-danger:active {
    transform: translateY(0);
    filter: brightness(0.95);
}
