/* ===================================================
   GESTIO — site.css
   =================================================== */

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* ===================================================
   FILTER PILL BUTTON
   =================================================== */
.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    border: none;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    color: white;
    background: linear-gradient(135deg, rgba(0,105,92,0.82), rgba(0,137,123,0.78));
    box-shadow: 0 3px 10px rgba(0,105,92,0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    white-space: nowrap;
    line-height: 1;
}
.filter-pill:hover {
    background: linear-gradient(135deg, rgba(0,88,78,0.92), rgba(0,120,107,0.88));
    box-shadow: 0 6px 16px rgba(0,105,92,0.28);
    transform: translateY(-2px);
}

/* Variante rossa (Spese) */
.filter-pill-red {
    background: linear-gradient(135deg, rgba(55,71,79,0.85), rgba(84,110,122,0.80));
    box-shadow: 0 3px 10px rgba(55,71,79,0.18);
}
.filter-pill-red:hover {
    background: linear-gradient(135deg, rgba(40,55,63,0.95), rgba(69,95,107,0.90));
    box-shadow: 0 6px 16px rgba(55,71,79,0.28);
}

/* ===================================================
   SEGMENTED CONTROL (Mese / Giorno)
   =================================================== */
.seg-control {
    display: inline-flex;
    background: rgba(128,128,128,0.10);
    border-radius: 999px;
    padding: 4px;
    gap: 2px;
}

.seg-btn {
    padding: 7px 20px;
    border: none;
    background: transparent;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    color: #888;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.22s ease, color 0.22s ease, box-shadow 0.22s ease;
    white-space: nowrap;
    line-height: 1;
}

.seg-btn:hover:not(.seg-active) {
    background: rgba(128,128,128,0.12);
    color: #555;
}

/* Variante ambra (Impostazioni) */
.seg-settings .seg-btn.seg-active {
    background: linear-gradient(135deg, #E65100, #F57C00);
    color: white;
    box-shadow: 0 3px 10px rgba(230,81,0,0.25);
}

/* Variante viola (Report) */
.seg-purple .seg-btn.seg-active {
    background: linear-gradient(135deg, #4527A0, #5E35B1);
    color: white;
    box-shadow: 0 3px 10px rgba(69,39,160,0.28);
}

/* Variante report-view (Mensile / Annuale) — viola più chiaro, più compatto */
.seg-report-view {
    background: rgba(94,53,177,0.08);
    border-radius: 10px;
    padding: 3px;
}
.seg-report-view .seg-btn {
    padding: 5px 16px;
    font-size: 0.82rem;
    border-radius: 8px;
    gap: 5px;
}
.seg-report-view .seg-btn.seg-active {
    background: linear-gradient(135deg, #5E35B1, #7B1FA2);
    color: white;
    box-shadow: 0 2px 8px rgba(94,53,177,0.30);
}

/* Variante teal (Entrate) */
.seg-green .seg-btn.seg-active {
    background: linear-gradient(135deg, #00695C, #00897B);
    color: white;
    box-shadow: 0 3px 10px rgba(0,105,92,0.28);
}

/* Variante indaco (Spese) */
.seg-red .seg-btn.seg-active {
    background: linear-gradient(135deg, #37474F, #546E7A);
    color: white;
    box-shadow: 0 3px 10px rgba(55,71,79,0.28);
}

/* ===================================================
   PAGINA ENTRATE — override verde
   =================================================== */


/* ===================================================
   DATEPICKER — override via body class (portal fix)
   =================================================== */

/* TEAL — Entrate */
body.page-body-entrate .mud-picker-content .mud-toolbar,
body.page-body-entrate .mud-picker-content .mud-picker-datepicker-toolbar {
    background: linear-gradient(135deg, #00695C, #00897B) !important;
}
body.page-body-entrate .mud-picker-content .mud-button-filled {
    background-color: #00897B !important;
}
body.page-body-entrate .mud-picker-content .mud-selected .mud-icon-button {
    background-color: #00897B !important;
    color: white !important;
}
body.page-body-entrate .mud-picker-content .mud-picker-calendar-day.mud-selected {
    background-color: #00897B !important;
    color: white !important;
}
body.page-body-entrate .mud-picker-content .mud-button-filled-primary {
    background-color: #00897B !important;
}

/* ARDESIA — Spese */
body.page-body-spese .mud-picker-content .mud-toolbar,
body.page-body-spese .mud-picker-content .mud-picker-datepicker-toolbar {
    background: linear-gradient(135deg, #37474F, #546E7A) !important;
}
body.page-body-spese .mud-picker-content .mud-button-filled {
    background-color: #546E7A !important;
}
body.page-body-spese .mud-picker-content .mud-picker-calendar-day.mud-selected {
    background-color: #546E7A !important;
    color: white !important;
}
body.page-body-spese .mud-picker-content .mud-button-filled-primary {
    background-color: #546E7A !important;
}

/* ---- ENTRATE — CSS variables teal ---- */
.page-entrate {
    --mud-palette-primary:         #00897B;
    --mud-palette-primary-darken:  #00695C;
    --mud-palette-primary-lighten: #4DB6AC;
    --mud-palette-primary-hover:   rgba(0,137,123,0.06);
    --mud-palette-primary-text:    #ffffff;
    --mud-palette-appbar-background: #00695C;
}

/* ---- SPESE — CSS variables ardesia ---- */
.page-spese {
    --mud-palette-primary:         #546E7A;
    --mud-palette-primary-darken:  #37474F;
    --mud-palette-primary-lighten: #90A4AE;
    --mud-palette-primary-hover:   rgba(84,110,122,0.06);
    --mud-palette-primary-text:    #ffffff;
}

/* ---- REPORT — CSS variables viola ---- */
.page-report {
    --mud-palette-primary:         #5E35B1;
    --mud-palette-primary-darken:  #4527A0;
    --mud-palette-primary-lighten: #9575CD;
    --mud-palette-primary-hover:   rgba(94,53,177,0.06);
    --mud-palette-primary-text:    #ffffff;
}

/* ---- IMPOSTAZIONI — CSS variables ambra ---- */
.page-impostazioni {
    --mud-palette-primary:         #F57C00;
    --mud-palette-primary-darken:  #E65100;
    --mud-palette-primary-lighten: #FFB74D;
    --mud-palette-primary-hover:   rgba(245,124,0,0.06);
    --mud-palette-primary-text:    #ffffff;
}

/* ---- ENTRATE — teal/smeraldo ---- */

.page-entrate .mud-table-head .mud-table-cell {
    background: linear-gradient(to right, #00695C, #00897B) !important;
}

.page-entrate .mud-button-filled.mud-button-filled-primary {
    background: linear-gradient(to right, rgba(0,105,92,0.82), rgba(0,137,123,0.78)) !important;
    box-shadow: 0 3px 10px rgba(0,105,92,0.18) !important;
}
.page-entrate .mud-button-filled.mud-button-filled-primary:hover:not(:disabled) {
    background: linear-gradient(to right, rgba(0,88,78,0.92), rgba(0,120,107,0.88)) !important;
    box-shadow: 0 7px 18px rgba(0,105,92,0.28) !important;
}

.page-entrate .mud-button-outlined.mud-button-outlined-primary {
    border-color: rgba(0,137,123,0.55) !important;
    color: #00695C !important;
}
.page-entrate .mud-button-outlined.mud-button-outlined-primary:hover:not(:disabled) {
    background-color: rgba(0,137,123,0.06) !important;
    border-color: rgba(0,137,123,0.78) !important;
}

.page-entrate .mud-button-text.mud-button-text-primary {
    color: rgba(0,105,92,0.80) !important;
}
.page-entrate .mud-button-text.mud-button-text-primary:hover:not(:disabled) {
    color: #00695C !important;
    background-color: rgba(0,137,123,0.06) !important;
}

/* ---- REPORT — viola/ametista ---- */

.page-report .mud-table-head .mud-table-cell {
    background: linear-gradient(to right, #4527A0, #5E35B1) !important;
}

.page-report .mud-button-filled.mud-button-filled-primary {
    background: linear-gradient(to right, rgba(69,39,160,0.82), rgba(94,53,177,0.78)) !important;
    box-shadow: 0 3px 10px rgba(69,39,160,0.18) !important;
}
.page-report .mud-button-filled.mud-button-filled-primary:hover:not(:disabled) {
    background: linear-gradient(to right, rgba(55,30,130,0.92), rgba(80,45,158,0.88)) !important;
    box-shadow: 0 7px 18px rgba(69,39,160,0.28) !important;
}

.page-report .mud-button-outlined.mud-button-outlined-primary {
    border-color: rgba(94,53,177,0.55) !important;
    color: #4527A0 !important;
}
.page-report .mud-button-outlined.mud-button-outlined-primary:hover:not(:disabled) {
    background-color: rgba(94,53,177,0.06) !important;
    border-color: rgba(94,53,177,0.78) !important;
}

.page-report .mud-button-text.mud-button-text-primary {
    color: rgba(69,39,160,0.80) !important;
}
.page-report .mud-button-text.mud-button-text-primary:hover:not(:disabled) {
    color: #4527A0 !important;
    background-color: rgba(94,53,177,0.06) !important;
}

/* ---- SPESE — indaco/ardesia ---- */

.page-spese .mud-table-head .mud-table-cell {
    background: linear-gradient(to right, #37474F, #546E7A) !important;
}

.page-spese .mud-button-filled.mud-button-filled-primary {
    background: linear-gradient(to right, rgba(55,71,79,0.85), rgba(84,110,122,0.80)) !important;
    box-shadow: 0 3px 10px rgba(55,71,79,0.18) !important;
}
.page-spese .mud-button-filled.mud-button-filled-primary:hover:not(:disabled) {
    background: linear-gradient(to right, rgba(40,55,63,0.95), rgba(69,95,107,0.90)) !important;
    box-shadow: 0 7px 18px rgba(55,71,79,0.28) !important;
}

.page-spese .mud-button-outlined.mud-button-outlined-primary {
    border-color: rgba(84,110,122,0.55) !important;
    color: #37474F !important;
}
.page-spese .mud-button-outlined.mud-button-outlined-primary:hover:not(:disabled) {
    background-color: rgba(84,110,122,0.06) !important;
    border-color: rgba(84,110,122,0.78) !important;
}

.page-spese .mud-button-text.mud-button-text-primary {
    color: rgba(55,71,79,0.80) !important;
}
.page-spese .mud-button-text.mud-button-text-primary:hover:not(:disabled) {
    color: #37474F !important;
    background-color: rgba(84,110,122,0.06) !important;
}

/* ===================================================
   TABLE HEADERS — Gradient rosso
   =================================================== */
.mud-table-head .mud-table-cell {
    background: linear-gradient(135deg, #B71C1C 0%, #C62828 60%, #D32F2F 100%) !important;
    color: white !important;
    font-weight: 700 !important;
    font-size: 0.8rem !important;
    letter-spacing: 0.6px !important;
    text-transform: uppercase !important;
    border-bottom: none !important;
    padding-top: 13px !important;
    padding-bottom: 13px !important;
    white-space: nowrap;
}

/* Bordi arrotondati prima/ultima cella header */
.mud-table-head tr th:first-child {
    border-radius: 10px 0 0 0 !important;
}
.mud-table-head tr th:last-child {
    border-radius: 0 10px 0 0 !important;
}

/* DataGrid header (usato in Dashboard) */
.mud-data-grid .mud-table-head .mud-table-cell {
    background: linear-gradient(135deg, #B71C1C 0%, #C62828 60%, #D32F2F 100%) !important;
    color: white !important;
    font-weight: 700 !important;
    font-size: 0.8rem !important;
    letter-spacing: 0.6px !important;
    text-transform: uppercase !important;
    border-bottom: none !important;
}

/* Icona sort freccia bianca */
.mud-table-head .mud-table-cell .mud-icon-root,
.mud-table-head .mud-table-cell .mud-button-root {
    color: rgba(255,255,255,0.85) !important;
}

/* ===================================================
   BUTTONS — Filled Primary
   =================================================== */
.mud-button-filled.mud-button-filled-primary {
    background: linear-gradient(135deg, rgba(160,30,30,0.82) 0%, rgba(185,45,45,0.78) 100%) !important;
    color: white !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    letter-spacing: 0.3px !important;
    box-shadow: 0 3px 10px rgba(160, 30, 30, 0.18) !important;
    backdrop-filter: blur(4px);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
}
.mud-button-filled.mud-button-filled-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(145,25,25,0.92) 0%, rgba(170,40,40,0.88) 100%) !important;
    box-shadow: 0 7px 18px rgba(160, 30, 30, 0.28) !important;
    transform: translateY(-2px) !important;
}
.mud-button-filled.mud-button-filled-primary:disabled {
    opacity: 0.5 !important;
    transform: none !important;
}

/* ===================================================
   BUTTONS — Outlined Primary
   =================================================== */
.mud-button-outlined.mud-button-outlined-primary {
    border-color: rgba(198, 40, 40, 0.55) !important;
    color: #C62828 !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    letter-spacing: 0.3px !important;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease !important;
}
.mud-button-outlined.mud-button-outlined-primary:hover:not(:disabled) {
    background-color: rgba(198, 40, 40, 0.05) !important;
    border-color: rgba(198, 40, 40, 0.75) !important;
    transform: translateY(-1px) !important;
}

/* ===================================================
   BUTTONS — Text Primary
   =================================================== */
.mud-button-text.mud-button-text-primary {
    color: rgba(198, 40, 40, 0.78) !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    transition: background-color 0.18s ease, color 0.18s ease !important;
}
.mud-button-text.mud-button-text-primary:hover:not(:disabled) {
    color: #C62828 !important;
    background-color: rgba(198, 40, 40, 0.05) !important;
}

/* ===================================================
   BUTTONS — Icon Button Primary
   =================================================== */
.mud-icon-button.mud-button-filled-primary {
    background: rgba(185, 45, 45, 0.80) !important;
    color: white !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 6px rgba(160,30,30,0.2) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}
.mud-icon-button.mud-button-filled-primary:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 5px 14px rgba(160,30,30,0.3) !important;
}

/* FAB (+) */
.mud-fab.mud-button-filled-primary {
    background: linear-gradient(135deg, rgba(160,30,30,0.85) 0%, rgba(185,45,45,0.82) 100%) !important;
    box-shadow: 0 5px 16px rgba(160,30,30,0.30) !important;
    transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.25s ease !important;
}
.mud-fab.mud-button-filled-primary:hover {
    transform: scale(1.1) translateY(-2px) !important;
    box-shadow: 0 9px 24px rgba(160,30,30,0.38) !important;
}

/* ===================================================
   STAT CARDS — Gradient + Hover + Slide-in
   =================================================== */
.stat-card {
    border-radius: 16px !important;
    overflow: hidden !important;
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.28s ease !important;
    animation: cardSlideIn 0.45s ease-out both;
}

.stat-card:hover {
    transform: translateY(-7px) scale(1.015) !important;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.22) !important;
}

.stat-card-income {
    background: linear-gradient(135deg, #1B5E20 0%, #2E7D32 55%, #43A047 100%) !important;
}

.stat-card-expense {
    background: linear-gradient(135deg, #B71C1C 0%, #C62828 55%, #E53935 100%) !important;
}

.stat-card-balance-pos {
    background: linear-gradient(135deg, #0D47A1 0%, #1565C0 55%, #1976D2 100%) !important;
}

.stat-card-balance-neg {
    background: linear-gradient(135deg, #4A148C 0%, #6A1B9A 55%, #7B1FA2 100%) !important;
}

/* Icon watermark inside cards */
.stat-card-icon {
    position: absolute;
    right: -4px;
    bottom: -6px;
    font-size: 5.5rem !important;
    color: rgba(255, 255, 255, 0.13) !important;
    pointer-events: none;
}

/* ===================================================
   COUNT-UP ANIMATION
   =================================================== */
.count-value {
    display: inline-block;
    animation: countSlideIn 0.55s ease-out both;
}

@keyframes countSlideIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0);     }
}

@keyframes cardSlideIn {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0);    }
}

/* Stagger animation delay per card */
.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.12s; }
.stat-card:nth-child(3) { animation-delay: 0.19s; }

/* ===================================================
   QUICK STAT PAPERS
   =================================================== */
.quick-stat {
    border-radius: 12px !important;
    transition: transform 0.22s ease, box-shadow 0.22s ease !important;
}

.quick-stat:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.13) !important;
}

/* ===================================================
   CHART CARDS
   =================================================== */
.chart-card {
    border-radius: 16px !important;
    overflow: hidden !important;
}

/* ===================================================
   SIDEBAR / DRAWER
   =================================================== */
.pizzeria-drawer {
    background: linear-gradient(180deg, #5C1A1A 0%, #7B2424 40%, #6B1E1E 100%) !important;
    border-right: 1px solid rgba(255, 100, 100, 0.18) !important;
}

.pizzeria-drawer-header {
    padding: 20px 18px 16px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pizzeria-brand {
    font-family: 'Pacifico', cursive !important;
    font-weight: 400 !important;
    color: white !important;
    line-height: 1.25 !important;
    font-size: 1.05rem !important;
    letter-spacing: 0.3px;
}

/* ===================================================
   NAV MENU
   =================================================== */
.pizzeria-nav .mud-nav-link {
    color: rgba(255, 255, 255, 0.78) !important;
    margin: 3px 8px !important;
    border-radius: 10px !important;
    padding: 11px 16px !important;
    transition: background-color 0.2s ease,
                color 0.2s ease,
                padding-left 0.2s ease !important;
    font-size: 0.92rem !important;
}

.pizzeria-nav .mud-nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    padding-left: 22px !important;
}

.pizzeria-nav .mud-nav-link.active {
    background-color: rgba(198, 40, 40, 0.78) !important;
    color: white !important;
    box-shadow: 0 4px 14px rgba(198, 40, 40, 0.38) !important;
    padding-left: 20px !important;
}

.pizzeria-nav .mud-nav-link .mud-icon-root {
    font-size: 1.35rem !important;
    margin-right: 10px !important;
}

/* ===================================================
   APPBAR BRAND (title in AppBar)
   =================================================== */
.appbar-brand {
    font-family: 'Pacifico', cursive !important;
    font-weight: 400 !important;
    color: white !important;
    letter-spacing: 0.4px;
}

/* ===================================================
   MUD SELECT COMPACT (locale switcher in AppBar)
   =================================================== */
.mud-select-compact .mud-input-control      { margin-top: 0 !important; }
.mud-select-compact .mud-input-filled       { padding-top: 4px !important; padding-bottom: 4px !important; min-height: unset !important; }
.mud-select-compact .mud-select-input       { padding-top: 4px !important; padding-bottom: 4px !important; font-size: 0.85rem !important; }
.mud-select-compact .mud-input-adornment-end { padding-bottom: 0 !important; }

/* ===================================================
   BLAZOR ERROR UI
   =================================================== */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}
#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* ===================================================
   LOGIN PAGE — layout a due pannelli
   =================================================== */
.login-panel-brand {
    width: 44%;
    min-width: 320px;
    background: linear-gradient(150deg, #9B1313 0%, #C62828 50%, #E53935 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 48px 40px;
    position: relative;
    overflow: hidden;
}

/* Cerchi decorativi sfondo */
.login-panel-brand::before {
    content: '';
    position: absolute;
    top: -70px; right: -70px;
    width: 260px; height: 260px;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
}
.login-panel-brand::after {
    content: '';
    position: absolute;
    bottom: -90px; left: -50px;
    width: 320px; height: 320px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
}

.login-panel-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 48px 40px;
    animation: loginFadeIn 0.5s ease-out both;
}

@keyframes loginFadeIn {
    from { opacity: 0; transform: translateX(24px); }
    to   { opacity: 1; transform: translateX(0);    }
}

.login-feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    color: rgba(255,255,255,0.88);
    font-size: 0.93rem;
}

.login-btn-primary {
    background: linear-gradient(135deg, #B71C1C 0%, #C62828 100%) !important;
    color: white !important;
    border-radius: 10px !important;
    height: 48px !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    letter-spacing: 0.3px;
    transition: box-shadow 0.2s ease, transform 0.2s ease !important;
}
.login-btn-primary:hover {
    box-shadow: 0 8px 20px rgba(198,40,40,0.45) !important;
    transform: translateY(-2px) !important;
}

@media (max-width: 767.98px) {
    .login-panel-brand { display: none !important; }
    .login-panel-form  { padding: 32px 24px; }
}

/* ===================================================
   PAGE HEADER (titolo + icona)
   =================================================== */
.page-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.5rem;
}

/* ===================================================
   FORM CARD HEADERS COLORATI
   =================================================== */
.form-header-income {
    background: linear-gradient(135deg, #1B5E20 0%, #43A047 100%);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.form-header-expense {
    background: linear-gradient(135deg, #B71C1C 0%, #E53935 100%);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ===================================================
   MINI STAT CARDS (totali Entrate/Spese)
   =================================================== */
.mini-stat-income,
.mini-stat-cash,
.mini-stat-card-pay,
.mini-stat-expense {
    border-radius: 12px !important;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.mini-stat-income   { background: linear-gradient(135deg, #1B5E20 0%, #43A047 100%) !important; }
.mini-stat-cash     { background: linear-gradient(135deg, #2E7D32 0%, #66BB6A 100%) !important; }
.mini-stat-card-pay { background: linear-gradient(135deg, #01579B 0%, #1976D2 100%) !important; }
.mini-stat-expense  { background: linear-gradient(135deg, #B71C1C 0%, #E53935 100%) !important; }

.mini-stat-income:hover,
.mini-stat-cash:hover,
.mini-stat-card-pay:hover,
.mini-stat-expense:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 10px 24px rgba(0,0,0,0.2) !important;
}

/* ===================================================
   ALERT CARDS (Impostazioni)
   =================================================== */
.alert-card-warning {
    border-left: 5px solid #FF9800 !important;
    border-radius: 12px !important;
}

.alert-card-error {
    border-left: 5px solid #C62828 !important;
    border-radius: 12px !important;
}

/* ===================================================
   QUICK INSERT DIALOG (Dashboard +)
   =================================================== */
.quick-insert-dialog {
    border-radius: 18px !important;
    overflow: hidden !important;
}

.quick-insert-dialog .mud-dialog-title {
    padding: 0 !important;
}

.quick-insert-dialog .mud-dialog-content {
    padding: 16px 24px 8px !important;
}

.quick-insert-dialog .mud-dialog-actions {
    padding: 8px 20px 18px !important;
    gap: 8px;
}

.quick-dialog-header-income {
    background: linear-gradient(135deg, #1B5E20 0%, #43A047 100%);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
}

.quick-dialog-header-expense {
    background: linear-gradient(135deg, #B71C1C 0%, #E53935 100%);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
}

.quick-toggle-wrap {
    display: flex;
    background: rgba(128,128,128,0.10);
    border-radius: 999px;
    padding: 4px;
    gap: 2px;
    width: fit-content;
}

.quick-toggle-btn {
    padding: 7px 22px;
    border: none;
    background: transparent;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    color: #888;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.22s ease, color 0.22s ease, box-shadow 0.22s ease;
}

.quick-toggle-active-income {
    background: linear-gradient(135deg, #2E7D32, #43A047) !important;
    color: white !important;
    box-shadow: 0 3px 10px rgba(46,125,50,0.28);
}

.quick-toggle-active-expense {
    background: linear-gradient(135deg, #B71C1C, #E53935) !important;
    color: white !important;
    box-shadow: 0 3px 10px rgba(183,28,28,0.28);
}

/* ===================================================
   CONFIRM DELETE DIALOG
   =================================================== */
.confirm-dialog {
    border-radius: 18px !important;
    overflow: hidden !important;
}

.confirm-dialog .mud-dialog-title {
    padding: 0 !important;
    background: linear-gradient(135deg, #B71C1C 0%, #E53935 100%);
}

.confirm-dialog .mud-dialog-content {
    padding: 20px 24px 12px !important;
}

.confirm-dialog .mud-dialog-actions {
    padding: 8px 20px 18px !important;
    gap: 8px;
}

.confirm-dialog-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
}

.confirm-dialog-icon-wrap {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ===================================================
   LOCALE CARDS (Impostazioni — Locali)
   =================================================== */
.locale-card {
    border-radius: 12px !important;
    border-left: 4px solid #C62828 !important;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.locale-card:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 10px 24px rgba(0,0,0,0.12) !important;
}

/* ===================================================
   RESPONSIVE
   =================================================== */
@media (max-width: 767.98px) {
    .main .top-row:not(.auth) { display: none; }
    .main .top-row.auth       { justify-content: space-between; }
    .main .top-row a,
    .main .top-row .btn-link  { margin-left: 0; }
}

@media (min-width: 768px) {
    app { flex-direction: row; }
    .sidebar { width: 250px; height: 100vh; position: sticky; top: 0; }
    .main .top-row { position: sticky; top: 0; }
    .main > div { padding-left: 2rem !important; padding-right: 1.5rem !important; }
    .navbar-toggler { display: none; }
    .sidebar .collapse { display: block; }
}

/* ===================================================
   SCORTE PAGE
   =================================================== */
.page-body-scorte .page-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.form-header-scorte {
    background: linear-gradient(135deg, #006064, #00838F);
    padding: 20px 24px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ===================================================
   SNACKBAR — stile personalizzato
   =================================================== */

/* Card snackbar */
.mud-snackbar {
    border-radius: 14px !important;
    box-shadow: 0 8px 28px rgba(0,0,0,0.22) !important;
    min-width: 260px !important;
    max-width: 380px !important;
    padding: 0 !important;
    overflow: hidden !important;
    animation: snack-slide-in 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes snack-slide-in {
    from { opacity: 0; transform: translateX(60px) scale(0.92); }
    to   { opacity: 1; transform: translateX(0)    scale(1);    }
}

/* Contenuto interno */
.mud-snackbar .mud-snackbar-content {
    padding: 14px 16px 14px 18px !important;
    align-items: center !important;
    gap: 12px !important;
}

/* Testo messaggio */
.mud-snackbar .mud-snackbar-content-message {
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.2px !important;
}

/* Icona */
.mud-snackbar .mud-snackbar-content .mud-icon-root {
    font-size: 1.3rem !important;
    flex-shrink: 0;
}

/* Pulsante chiudi (X) — rientrato di qualche px */
.mud-snackbar .mud-button-root {
    color: inherit !important;
    opacity: 0.75;
    min-width: 28px !important;
    width: 28px !important;
    height: 28px !important;
    padding: 0 !important;
    margin-right: 4px !important;
    border-radius: 50% !important;
    flex-shrink: 0;
}
.mud-snackbar .mud-button-root:hover {
    opacity: 1;
    background: rgba(255,255,255,0.18) !important;
}

/* ===================================================
   INPUT FIELDS — Stile moderno globale
   =================================================== */

/* Bordi arrotondati su tutti gli input outlined */
.mud-input-outlined .mud-input-outlined-border {
    border-radius: 12px !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

/* Ombra sottile al focus */
.mud-input-outlined.mud-input-focused .mud-input-outlined-border {
    box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.08) !important;
}

/* Label arrotondata (gap nel bordo) */
.mud-input-outlined .mud-input-label-outlined {
    border-radius: 12px !important;
}

/* Select outlined */
.mud-select .mud-input-outlined .mud-input-outlined-border {
    border-radius: 12px !important;
}

/* Autocomplete */
.mud-autocomplete .mud-input-outlined .mud-input-outlined-border {
    border-radius: 12px !important;
}

/* DatePicker */
.mud-datepicker .mud-input-outlined .mud-input-outlined-border {
    border-radius: 12px !important;
}

/* NumericField */
.mud-numeric-field .mud-input-outlined .mud-input-outlined-border {
    border-radius: 12px !important;
}

/* Popup della select — angoli arrotondati */
.mud-popover-paper {
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12) !important;
    overflow: hidden !important;
}

/* Autocomplete dropdown */
.mud-autocomplete-popover {
    border-radius: 12px !important;
}

/* Adornment colorato di default (icona a sinistra) */
.mud-input-adornment-start .mud-icon-root {
    transition: color 0.2s ease !important;
}
.mud-input-outlined.mud-input-focused .mud-input-adornment-start .mud-icon-root {
    color: var(--mud-palette-primary, #C62828) !important;
}
