@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

/*
|==============================================================================
| GESTIONALE MONTENETTO STABLES - design system
|==============================================================================
| Non è il layout "a card" del portale pubblico iscrizioni: qui il
| contenuto è davvero cronologico (le lezioni di un giorno), quindi
| la struttura è una linea del tempo verticale, non una griglia di
| card identiche. Un solo colore d'accento (l'oro del brand); gli
| stati (vuota / non pagata / chiusa) usano toni terrosi distinti,
| mai rosso/verde semaforo.
*/

:root {
    --gd-ink: #211f1f;
    --gd-ink-2: #322e2d;
    --gd-ink-gradient: linear-gradient(155deg, #292625 0%, #1a1818 100%);
    --gd-paper: #f7f3ec;
    --gd-panel: #ffffff;
    --gd-gold: #b9955d;
    --gd-gold-soft: rgba(185, 149, 93, .16);
    --gd-line: rgba(33, 31, 31, .12);
    --gd-text: #211f1f;
    --gd-muted: #7a7168;

    --gd-full: #4b6b4f;
    --gd-full-soft: rgba(75, 107, 79, .14);
    --gd-empty: #9b5348;
    --gd-empty-soft: rgba(155, 83, 72, .10);
    --gd-unpaid: #a6762d;
    --gd-unpaid-soft: rgba(166, 118, 45, .14);
    --gd-closed: #8a8378;
    --gd-closed-soft: rgba(138, 131, 120, .12);

    --gd-radius: 16px;
    --gd-radius-sm: 10px;
    --gd-shadow: 0 10px 28px rgba(33, 25, 18, .07);
    --gd-shadow-hover: 0 14px 32px rgba(33, 25, 18, .13);
    --gd-shadow-lg: 0 24px 60px rgba(20, 16, 12, .22);

    --gd-sidebar-w: 244px;
    --gd-transition: .16s cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; }

html { height: 100%; -webkit-text-size-adjust: 100%; }

body.gd-body {
    margin: 0;
    min-height: 100%;

    background: var(--gd-paper);
    color: var(--gd-text);

    font-family: 'Inter', Arial, Helvetica, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }

h1, h2, h3 {
    margin: 0;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    color: var(--gd-ink);
}

h1 { font-size: 1.7rem; }
h2 { font-size: 1.25rem; }

p { margin: 0; }

.gd-muted { color: var(--gd-muted); font-size: .88rem; line-height: 1.5; }

.gd-eyebrow {
    margin: 0 0 4px;
    font-size: .78rem;
    color: var(--gd-muted);
}

/*
|------------------------------------------------------------------
| SHELL
|------------------------------------------------------------------
*/

.gd-app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-bottom: 24px;
}

.gd-container {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    padding: 0 14px;
}

@media (min-width: 900px) {
    .gd-app {
        margin-left: var(--gd-sidebar-w);
        padding-bottom: 48px;
    }

    .gd-container {
        max-width: 1080px;
        padding: 0 40px;
    }
}

/*
|------------------------------------------------------------------
| TOPBAR (giorno / titolo pagina)
|------------------------------------------------------------------
*/

.gd-topbar {
    position: sticky;
    top: 0;
    z-index: 20;

    background: var(--gd-ink-gradient);
    color: #fff;

    padding: max(14px, env(safe-area-inset-top)) 14px 14px;
}

.gd-topbar__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    max-width: 640px;
    margin: 0 auto;
}

.gd-topbar__brand {
    display: none;
}

.gd-topbar__link {
    font-size: .85rem;
    color: rgba(255,255,255,.75);
    transition: color var(--gd-transition);
}

.gd-topbar__link:hover { color: #fff; }

@media (min-width: 900px) {
    .gd-topbar {
        position: static;
        margin: 24px 40px 0;
        padding: 22px 28px;
        border-radius: var(--gd-radius);
        box-shadow: var(--gd-shadow);
    }

    .gd-topbar__row, .gd-daynav__label { max-width: none; }
}

/* Header specifico della vista Oggi: navigazione tra i giorni */
.gd-daynav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    margin-top: 10px;
}

.gd-daynav__arrow {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: 1.2rem;
}

.gd-daynav__label {
    flex: 1 1 auto;
    text-align: center;
}

.gd-daynav__date {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.15;
}

.gd-daynav__weekday {
    display: block;
    margin-top: 2px;
    font-size: .78rem;
    color: rgba(255,255,255,.6);
}

.gd-daynav__today {
    display: block;
    margin-top: 6px;
    font-size: .78rem;
    text-align: center;
    color: var(--gd-gold);
}

/*
|------------------------------------------------------------------
| TIMELINE (vista lezioni del giorno)
|------------------------------------------------------------------
*/

.gd-timeline {
    position: relative;
    margin: 18px 0 0;
    padding-left: 26px;
}

.gd-timeline::before {
    content: '';
    position: absolute;
    left: 9px;
    top: 6px;
    bottom: 6px;
    width: 1px;
    background: var(--gd-line);
}

.gd-timeline-entry {
    position: relative;
    display: block;
    padding: 0 0 22px;
}

.gd-timeline-entry:last-child { padding-bottom: 4px; }

.gd-timeline-entry__dot {
    position: absolute;
    left: -26px;
    top: 3px;
    width: 19px;
    height: 19px;
    border-radius: 50%;

    background: var(--gd-panel);
    border: 3px solid var(--gd-closed);
}

.gd-timeline-entry__dot--full { border-color: var(--gd-full); }
.gd-timeline-entry__dot--partial { border-color: var(--gd-gold); }
.gd-timeline-entry__dot--empty { border-color: var(--gd-empty); }
.gd-timeline-entry__dot--closed { border-color: var(--gd-closed); background: var(--gd-closed-soft); }

.gd-timeline-entry__time {
    font-family: 'Inter', Arial, sans-serif;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    letter-spacing: -.01em;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--gd-ink);
}

.gd-timeline-entry__body {
    margin-top: 4px;
    padding: 12px 14px;

    background: var(--gd-panel);
    border: 1px solid var(--gd-line);
    border-radius: var(--gd-radius-sm);

    transition: box-shadow var(--gd-transition), border-color var(--gd-transition), transform var(--gd-transition);
}

a.gd-timeline-entry:hover .gd-timeline-entry__body {
    box-shadow: var(--gd-shadow-hover);
    border-color: rgba(185, 149, 93, .35);
    transform: translateY(-1px);
}

.gd-timeline-entry__body--empty { background: var(--gd-empty-soft); border-color: rgba(155,83,72,.25); }
.gd-timeline-entry__body--closed { background: var(--gd-closed-soft); border-color: transparent; }

.gd-timeline-entry__head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.gd-timeline-entry__corso {
    font-weight: 700;
    font-size: .95rem;
}

.gd-timeline-entry__names {
    margin-top: 6px;
    font-size: .85rem;
    color: var(--gd-muted);
}

.gd-timeline-entry__names--empty-text {
    font-style: italic;
}

/*
|------------------------------------------------------------------
| TAG / BADGE
|------------------------------------------------------------------
*/

.gd-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 999px;

    font-size: .72rem;
    font-weight: 600;

    background: var(--gd-gold-soft);
    color: var(--gd-gold);
}

.gd-tag--muted { background: var(--gd-closed-soft); color: var(--gd-muted); }

.gd-count {
    margin-left: auto;
    font-size: .78rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
    white-space: nowrap;
}

.gd-count--full { background: var(--gd-full-soft); color: var(--gd-full); }
.gd-count--partial { background: var(--gd-gold-soft); color: var(--gd-gold); }
.gd-count--empty { background: var(--gd-empty-soft); color: var(--gd-empty); }
.gd-count--closed { background: var(--gd-closed-soft); color: var(--gd-muted); }

/*
|------------------------------------------------------------------
| NAVIGAZIONE - burger + drawer su mobile, sidebar fissa su desktop
|------------------------------------------------------------------
*/

.gd-burger {
    position: fixed;
    top: 14px; right: 14px;
    z-index: 45;

    width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;

    background: var(--gd-ink);
    color: #fff;
    border: none;
    border-radius: 11px;
    box-shadow: var(--gd-shadow);
}

.gd-burger svg { width: 21px; height: 21px; }

.gd-nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 35;

    background: rgba(20, 16, 12, .45);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--gd-transition);
}

.gd-nav-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.gd-tabbar {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    z-index: 40;

    width: min(82vw, 300px);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 3px;

    background: var(--gd-ink-gradient);
    box-shadow: var(--gd-shadow-lg);

    padding: 22px 16px calc(20px + env(safe-area-inset-bottom));
    overflow-y: auto;

    transform: translateX(100%);
    transition: transform var(--gd-transition);
}

.gd-tabbar.is-open {
    transform: translateX(0);
}

.gd-nav-brand {
    display: flex;
    align-items: center;
    justify-content: center;

    padding: 10px 10px 22px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.gd-nav-brand img {
    width: 100%;
    max-width: 190px;
    object-fit: contain;

    background: var(--gd-paper);
    border-radius: 10px;
    padding: 10px 14px;
}

.gd-tabbar__item {
    flex: 0 0 auto;

    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 13px;

    padding: 11px 12px;
    border-radius: 11px;

    font-size: .92rem;
    font-weight: 500;
    color: rgba(255,255,255,.7);

    transition: color var(--gd-transition), background var(--gd-transition);
}

.gd-tabbar__item svg { width: 19px; height: 19px; flex: 0 0 auto; }

.gd-tabbar__item:hover {
    background: rgba(255,255,255,.06);
    color: #fff;
}

.gd-tabbar__item--active {
    background: rgba(185, 149, 93, .14);
    color: var(--gd-gold);
    box-shadow: inset 3px 0 0 var(--gd-gold);
}

.gd-tabbar__spacer { flex: 1 1 auto; }

.gd-tabbar__logout {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 11px 12px;
    border-radius: 11px;
    font-size: .89rem;
    color: rgba(255,255,255,.5);
    border-top: 1px solid rgba(255,255,255,.08);
    margin-top: 10px;
    padding-top: 18px;
}

.gd-tabbar__logout:hover { color: #fff; }
.gd-tabbar__logout svg { width: 17px; height: 17px; }

@media (min-width: 900px) {

    .gd-burger, .gd-nav-overlay { display: none; }

    .gd-tabbar {
        left: 0; right: auto;
        width: var(--gd-sidebar-w);

        transform: none;

        border-right: 1px solid rgba(255,255,255,.06);
        padding: 28px 16px;
    }

    .gd-nav-brand {
        padding: 0 10px 26px;
        margin-bottom: 10px;
    }

    .gd-nav-brand img {
        max-width: 100%;
        padding: 8px 12px;
    }

    .gd-tabbar__item {
        padding: 11px 12px;
        font-size: .89rem;
    }
}


/*
|------------------------------------------------------------------
| CARD / LISTE GENERICHE (slot, chiusure, iscrizioni)
|------------------------------------------------------------------
*/

.gd-section {
    padding: 16px 0 4px;
}

.gd-section__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.gd-card {
    padding: 16px;
    margin-bottom: 12px;

    background: var(--gd-panel);
    border: 1px solid var(--gd-line);
    border-radius: var(--gd-radius);
    box-shadow: var(--gd-shadow);
}

.gd-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gd-list-row {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 13px 14px;

    background: var(--gd-panel);
    border: 1px solid var(--gd-line);
    border-radius: var(--gd-radius-sm);

    transition: box-shadow var(--gd-transition), border-color var(--gd-transition), transform var(--gd-transition);
}

a.gd-list-row:hover {
    box-shadow: var(--gd-shadow-hover);
    border-color: rgba(185, 149, 93, .35);
    transform: translateY(-1px);
}

.gd-list-row__main {
    flex: 1 1 auto;
    min-width: 0;
}

.gd-list-row__title {
    font-weight: 600;
    font-size: .92rem;
}

.gd-list-row__sub {
    margin-top: 2px;
    font-size: .8rem;
    color: var(--gd-muted);
}

.gd-list-row__chevron {
    flex: 0 0 auto;
    color: var(--gd-muted);
    font-size: 1rem;
}

/*
|------------------------------------------------------------------
| PERSONE IN UNA LEZIONE (dettaglio)
|------------------------------------------------------------------
*/

.gd-person-row {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 12px 0;
    border-bottom: 1px solid var(--gd-line);
}

.gd-person-row:last-child { border-bottom: none; }

.gd-person-row__name {
    flex: 1 1 auto;
    font-weight: 600;
    font-size: .92rem;
}

.gd-person-row__note {
    display: block;
    margin-top: 2px;
    font-size: .78rem;
    color: var(--gd-muted);
    font-weight: 400;
}

.gd-switch {
    position: relative;
    flex: 0 0 auto;
    width: 42px;
    height: 24px;
}

.gd-switch input {
    position: absolute;
    opacity: 0;
    width: 100%; height: 100%;
    margin: 0;
    cursor: pointer;
}

.gd-switch__track {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: var(--gd-unpaid-soft);
    border: 1px solid rgba(166,118,45,.35);
    transition: background .15s, border-color .15s;
}

.gd-switch__track::before {
    content: '';
    position: absolute;
    top: 2px; left: 2px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--gd-unpaid);
    transition: transform .15s;
}

.gd-switch input:checked + .gd-switch__track {
    background: var(--gd-full-soft);
    border-color: rgba(75,107,79,.4);
}

.gd-switch input:checked + .gd-switch__track::before {
    transform: translateX(18px);
    background: var(--gd-full);
}

.gd-icon-btn {
    flex: 0 0 auto;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
    color: var(--gd-empty);
    font-size: .95rem;
}

/*
|------------------------------------------------------------------
| FORM
|------------------------------------------------------------------
*/

.gd-field { margin-bottom: 14px; }

.gd-label {
    display: block;
    margin-bottom: 6px;
    font-size: .82rem;
    font-weight: 600;
    color: var(--gd-ink);
}

.gd-input, .gd-select, .gd-textarea {
    width: 100%;
    min-height: 48px;
    padding: 11px 13px;

    border: 1px solid var(--gd-line);
    border-radius: var(--gd-radius-sm);
    background: var(--gd-panel);
    color: var(--gd-text);

    font-size: 16px;
    min-width: 0;
    max-width: 100%;

    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.gd-input:focus, .gd-select:focus, .gd-textarea:focus {
    border-color: var(--gd-gold);
    box-shadow: 0 0 0 4px var(--gd-gold-soft);
}

input[type="date"].gd-input,
input[type="time"].gd-input {
    -webkit-appearance: none;
    appearance: none;
}

.gd-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    padding: 12px 14px;
    border: 1px solid var(--gd-line);
    border-radius: var(--gd-radius-sm);
    background: var(--gd-panel);
}

/*
|------------------------------------------------------------------
| BOTTONI
|------------------------------------------------------------------
*/

.gd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    min-height: 48px;
    padding: 0 20px;

    border: 1px solid transparent;
    border-radius: var(--gd-radius-sm);

    font-size: .92rem;
    font-weight: 600;

    cursor: pointer;
    transition: transform var(--gd-transition), box-shadow var(--gd-transition), background var(--gd-transition), border-color var(--gd-transition), opacity var(--gd-transition);
}

.gd-btn--primary { background: var(--gd-ink); color: #fff; }
.gd-btn--primary:hover { box-shadow: var(--gd-shadow-hover); transform: translateY(-1px); }

.gd-btn--gold { background: var(--gd-gold); color: #fff; }
.gd-btn--gold:hover { box-shadow: 0 10px 24px rgba(185, 149, 93, .35); transform: translateY(-1px); }

.gd-btn--ghost { background: transparent; border-color: var(--gd-line); color: var(--gd-text); }
.gd-btn--ghost:hover { background: var(--gd-paper); border-color: rgba(33,31,31,.22); }

.gd-btn--danger { background: transparent; border-color: rgba(155,83,72,.4); color: var(--gd-empty); }
.gd-btn--danger:hover { background: var(--gd-empty-soft); }

.gd-btn:active { transform: translateY(0) scale(.98); }

.gd-btn--block { width: 100%; }

.gd-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 18px;
}

.gd-fab {
    position: fixed;
    right: 16px;
    bottom: calc(84px + env(safe-area-inset-bottom));
    z-index: 25;

    width: 54px; height: 54px;
    border-radius: 50%;

    background: var(--gd-ink);
    color: var(--gd-gold);

    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem;
    line-height: 1;

    box-shadow: var(--gd-shadow);
    transition: box-shadow var(--gd-transition), transform var(--gd-transition);
}

.gd-fab:hover {
    box-shadow: var(--gd-shadow-lg);
    transform: translateY(-2px) scale(1.04);
}

@media (min-width: 900px) {
    .gd-fab { right: 40px; bottom: 40px; }
}

/*
|------------------------------------------------------------------
| PAGINE STANDALONE (login, errore, conferma)
|------------------------------------------------------------------
*/

.gd-standalone {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;

    background: var(--gd-ink-gradient);
}

.gd-standalone__card {
    width: 100%;
    max-width: 380px;
    padding: 28px 24px;

    background: var(--gd-panel);
    border-radius: 20px;
    box-shadow: var(--gd-shadow-lg);
}

.gd-standalone__card--error { border-top: 4px solid var(--gd-empty); }

.gd-standalone__logo {
    display: block;
    width: 130px;
    margin: 0 auto 20px;
}

.gd-error-list {
    margin: 12px 0 0;
    padding-left: 18px;
    color: var(--gd-muted);
    font-size: .88rem;
    line-height: 1.6;
}

/*
|------------------------------------------------------------------
| MISC
|------------------------------------------------------------------
*/

.gd-empty-state {
    padding: 30px 16px;
    text-align: center;
    color: var(--gd-muted);
    font-size: .9rem;
}

.gd-stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
}

.gd-stat {
    padding: 16px 14px;
    background: var(--gd-panel);
    border: 1px solid var(--gd-line);
    border-radius: var(--gd-radius-sm);
    text-align: center;

    transition: box-shadow var(--gd-transition), transform var(--gd-transition), border-color var(--gd-transition);
}

a.gd-stat:hover {
    box-shadow: var(--gd-shadow-hover);
    border-color: rgba(185, 149, 93, .35);
    transform: translateY(-2px);
}

.gd-stat__num {
    font-family: 'Inter', Arial, sans-serif;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    font-size: 1.7rem;
    font-weight: 600;
    color: var(--gd-ink);
}

.gd-stat__label {
    margin-top: 2px;
    font-size: .74rem;
    color: var(--gd-muted);
}

@media (min-width: 760px) {
    .gd-container { padding: 0 24px; }
}

/*
|--------------------------------------------------------------------------
| SUGGERITORE (fornitore, categoria, ...) - vedi assets/js/suggerimenti.js
|--------------------------------------------------------------------------
*/

.gd-suggest-wrap { position: relative; }

.gd-suggest {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 40;

    margin: 0;
    padding: 6px;
    list-style: none;

    background: var(--gd-panel);
    border: 1px solid var(--gd-line);
    border-radius: var(--gd-radius-sm);
    box-shadow: var(--gd-shadow-lg);
    max-height: 60vh;
    overflow-y: auto;
}

.gd-suggest[hidden] { display: none; }

.gd-suggest__titolo {
    pointer-events: none; /* informativo: un tocco passa al campo sotto */
    padding: 6px 10px 2px;
    font-size: .7rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--gd-muted);
}

.gd-suggest__item {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 2px 12px;

    padding: 10px;
    border-radius: 8px;
    cursor: pointer;

    font-size: .95rem;
    color: var(--gd-text);
}

.gd-suggest__item:hover,
.gd-suggest__item[aria-selected="true"] { background: var(--gd-gold-soft); }

.gd-suggest__meta { font-size: .75rem; color: var(--gd-muted); }

.gd-suggest__nuovo {
    pointer-events: none; /* informativo: un tocco passa al campo sotto */
    margin-top: 4px;
    padding: 9px 10px 4px;
    border-top: 1px dashed var(--gd-line);
    font-size: .8rem;
    color: var(--gd-muted);
}

/*
|--------------------------------------------------------------------------
| REPORT E GRAFICI - vedi assets/js/grafici.js e assets/js/report.js
|--------------------------------------------------------------------------
*/

/* Navigazione tra le sezioni del report: una riga di "pillole" che scorre su mobile */
.gd-report-nav {
    display: flex;
    gap: 8px;
    margin: 0 0 14px;
    padding: 2px 0 6px;
    overflow-x: auto;
    scrollbar-width: none;
}
.gd-report-nav::-webkit-scrollbar { display: none; }

.gd-report-nav a {
    flex: 0 0 auto;
    padding: 9px 15px;
    border: 1px solid var(--gd-line);
    border-radius: 999px;
    background: var(--gd-panel);
    color: var(--gd-ink);
    font-size: .86rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}
.gd-report-nav a:hover { border-color: rgba(185, 149, 93, .5); }
.gd-report-nav a[aria-current="page"] {
    background: var(--gd-ink);
    border-color: var(--gd-ink);
    color: #fff;
}

.gd-report-filtri {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: end;
    margin-bottom: 14px;
}
.gd-report-filtri label {
    display: block;
    margin-bottom: 4px;
    font-size: .72rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--gd-muted);
}
.gd-report-filtri select {
    min-height: 42px;
    padding: 8px 32px 8px 12px;
    border: 1px solid var(--gd-line);
    border-radius: var(--gd-radius-sm);
    background-color: var(--gd-panel);
    color: var(--gd-text);
    font-size: 15px;
}

/* Riquadri numerici */
.gd-kpi-griglia {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}
@media (min-width: 760px) { .gd-kpi-griglia { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.gd-kpi {
    padding: 14px 14px 12px;
    background: var(--gd-panel);
    border: 1px solid var(--gd-line);
    border-radius: var(--gd-radius-sm);
    border-top: 3px solid var(--gd-gold);
}
.gd-kpi--verde { border-top-color: var(--gd-full); }
.gd-kpi--rosso { border-top-color: var(--gd-empty); }
.gd-kpi--ocra { border-top-color: var(--gd-unpaid); }
.gd-kpi--grigio { border-top-color: var(--gd-closed); }

.gd-kpi__etichetta {
    font-size: .72rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--gd-muted);
}
.gd-kpi__valore {
    margin-top: 4px;
    font-variant-numeric: tabular-nums;
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.15;
    color: var(--gd-ink);
    overflow-wrap: anywhere;
}
.gd-kpi__valore--positivo { color: var(--gd-full); }
.gd-kpi__valore--negativo { color: var(--gd-empty); }
.gd-kpi__nota {
    margin-top: 3px;
    font-size: .76rem;
    color: var(--gd-muted);
}

/* Schede dei grafici */
.gd-report-griglia {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}
@media (min-width: 1100px) {
    .gd-report-griglia { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gd-grafico-card--larga { grid-column: 1 / -1; }
}

.gd-grafico-card {
    padding: 16px;
    margin: 0;
    background: var(--gd-panel);
    border: 1px solid var(--gd-line);
    border-radius: var(--gd-radius);
    box-shadow: var(--gd-shadow);
    min-width: 0;
}
.gd-grafico-card__titolo {
    margin: 0;
    font-size: 1.02rem;
    color: var(--gd-ink);
}
.gd-grafico-card__sottotitolo {
    margin: 2px 0 12px;
    font-size: .8rem;
    color: var(--gd-muted);
}

.gd-report-titolo-sezione {
    margin: 22px 0 10px;
    font-size: 1.15rem;
    color: var(--gd-ink);
}
.gd-report-titolo-sezione:first-child { margin-top: 4px; }

.gd-report-note {
    margin-top: 18px;
    padding: 14px 16px;
    border: 1px dashed var(--gd-line);
    border-radius: var(--gd-radius-sm);
    font-size: .82rem;
    line-height: 1.55;
    color: var(--gd-muted);
}
.gd-report-note strong { color: var(--gd-ink); }

/* Grafici */
.gd-grafico-area { position: relative; }

.gd-grafico-svg {
    display: block;
    width: 100%;
    height: auto;
    touch-action: pan-y;
}

.gd-grafico-barra { animation: gd-appare .45s ease-out both; }
@keyframes gd-appare {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .gd-grafico-barra { animation: none; } }

.gd-grafico-vuoto {
    padding: 34px 10px;
    text-align: center;
    font-size: .88rem;
    color: var(--gd-muted);
    background: rgba(33, 31, 31, .025);
    border-radius: var(--gd-radius-sm);
}

.gd-grafico-tip {
    position: absolute;
    z-index: 5;
    min-width: 130px;
    max-width: 240px;
    padding: 9px 11px;
    background: rgba(33, 31, 31, .95);
    color: #fff;
    border-radius: 9px;
    font-size: .78rem;
    box-shadow: var(--gd-shadow-lg);
    pointer-events: none;
}
.gd-grafico-tip[hidden] { display: none; }
.gd-grafico-tip__titolo { margin-bottom: 5px; font-weight: 700; color: #e6d3ae; }
.gd-grafico-tip__riga { display: flex; align-items: center; gap: 7px; padding: 1px 0; }
.gd-grafico-tip__nome { flex: 1; color: rgba(255, 255, 255, .78); }
.gd-grafico-tip__pallino { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; }

.gd-grafico-legenda {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-top: 10px;
    font-size: .78rem;
    color: var(--gd-muted);
}
.gd-grafico-legenda__voce { display: inline-flex; align-items: center; gap: 6px; }
.gd-grafico-legenda__pallino { display: inline-block; flex: 0 0 10px; width: 10px; height: 10px; border-radius: 3px; }
.gd-grafico-legenda__pallino--linea { height: 3px; border-radius: 2px; width: 14px; flex-basis: 14px; }

/* Ciambella */
.gd-ciambella { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 22px; }
.gd-ciambella__disegno { position: relative; flex: 0 0 180px; width: 180px; height: 180px; }
.gd-ciambella__svg { display: block; width: 180px; height: 180px; }
.gd-ciambella__fetta { transition: opacity .15s; }
.gd-ciambella__centro {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    pointer-events: none;
}
.gd-ciambella__centro strong { font-size: 1.2rem; font-variant-numeric: tabular-nums; color: var(--gd-ink); }
.gd-ciambella__centro span { font-size: .72rem; color: var(--gd-muted); }
.gd-ciambella__legenda { flex: 1 1 200px; margin: 0; padding: 0; list-style: none; min-width: 0; }
.gd-ciambella__voce {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr) auto 38px;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(33, 31, 31, .06);
    font-size: .84rem;
}
.gd-ciambella__voce:last-child { border-bottom: 0; }
.gd-ciambella__nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gd-ciambella__voce strong { font-variant-numeric: tabular-nums; }
.gd-ciambella__voce em { font-style: normal; text-align: right; font-size: .76rem; color: var(--gd-muted); }

/* Classifiche (barre orizzontali) */
.gd-classifica { display: flex; flex-direction: column; gap: 8px; }
.gd-classifica__riga {
    display: grid;
    grid-template-columns: minmax(70px, 34%) minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    font-size: .84rem;
}
.gd-classifica__nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gd-classifica__pista {
    display: flex;
    height: 14px;
    background: rgba(33, 31, 31, .05);
    border-radius: 7px;
    overflow: hidden;
}
.gd-classifica__barra { display: block; height: 100%; min-width: 2px; transition: width .4s ease-out; }
.gd-classifica__valore { font-variant-numeric: tabular-nums; text-align: right; min-width: 52px; }

/* Mappa di calore */
.gd-calore { display: grid; gap: 3px; font-size: .72rem; }
.gd-calore__testa, .gd-calore__riga { display: flex; align-items: center; color: var(--gd-muted); }
.gd-calore__testa { justify-content: center; padding-bottom: 2px; }
.gd-calore__cella {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    border-radius: 6px;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

/*
|--------------------------------------------------------------------------
| COMPLEANNI (dashboard)
|--------------------------------------------------------------------------
*/

.gd-compleanni {
    margin: 0 0 20px;
    padding: 12px 14px;
    background: var(--gd-panel);
    border: 1px solid var(--gd-line);
    border-radius: var(--gd-radius-sm);
}

.gd-compleanni__oggi {
    margin: 0 0 10px;
    padding: 9px 12px;
    background: var(--gd-gold-soft);
    border-left: 3px solid var(--gd-gold);
    border-radius: 8px;
    font-size: .92rem;
    line-height: 1.45;
    color: var(--gd-ink);
}
.gd-compleanni__oggi:last-child { margin-bottom: 0; }

.gd-compleanni__titolo {
    margin: 0 0 2px;
    font-size: .72rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--gd-muted);
}

.gd-compleanni__elenco { margin: 0; padding: 0; list-style: none; }

.gd-compleanni__voce {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 2px 12px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(33, 31, 31, .06);
    font-size: .88rem;
}
.gd-compleanni__voce:last-child { border-bottom: 0; padding-bottom: 0; }

.gd-compleanni__quando { font-size: .78rem; color: var(--gd-muted); white-space: nowrap; }
