/* ═══════════════════════════════════════════════════════════
   AC Milan — Settore Giovanile · main.css
   ═══════════════════════════════════════════════════════════ */

/* ── FONT ──────────────────────────────────────────────────── */
@font-face {
    font-family: MilanTypeRev;
    src: url(https://www.acmilan.com/fonts/MilanTypeRev.otf);
}
@font-face {
    font-family: HelveticaNowTextLight;
    src: url(https://assets-eu-01.kc-usercontent.com/1293c890-579f-01b7-8480-902cca7de55e/d28bf819-761a-47dc-aed7-82078795f4de/HelveticaNowTextLight.otf);
}

/* ── VARIABILI ─────────────────────────────────────────────── */
:root {
    --red:      #e31e25;
    --red-dark: #ba0014;
    --red-light:#fff0ef;
    --dark:     #1a1c1c;
    --gray:     #5d5d5d;
    --border:   #e2e2e2;
    --surface:  #f9f9f9;
}

/* ── RESET BASE ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: HelveticaNowTextLight, Helvetica, Arial, sans-serif;
    background: var(--surface);
    color: var(--dark);
    min-height: 100vh;
}

/* ── TIPOGRAFIA ────────────────────────────────────────────── */
.milan {
    font-family: MilanTypeRev, sans-serif;
}

/* ── ICONE MATERIAL ────────────────────────────────────────── */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
    font-size: 20px;
    vertical-align: middle;
}

/* ── FORM ──────────────────────────────────────────────────── */
.form-input {
    width: 100%;
    border: 1px solid var(--border);
    background: #fff;
    padding: 10px 14px;
    font-family: HelveticaNowTextLight, Helvetica, Arial, sans-serif;
    font-size: 14px;
    color: var(--dark);
    border-radius: 2px;
    outline: none;
    transition: border-color 0.2s;
}
.form-input:focus { border-color: var(--red); }
.form-input.error { border-color: var(--red); background: #fff8f8; }

.form-label {
    display: block;
    font-family: MilanTypeRev, sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 6px;
}

.req { color: var(--red); margin-left: 2px; }

/* ── BOTTONI ───────────────────────────────────────────────── */
.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--red);
    color: #fff;
    font-family: MilanTypeRev, sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 13px 24px;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
    text-decoration: none;
}
.btn-primary:hover { background: var(--red-dark); }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    color: var(--dark);
    font-family: MilanTypeRev, sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 9px 16px;
    border: 1px solid var(--border);
    border-radius: 2px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    text-decoration: none;
}
.btn-secondary:hover { border-color: var(--dark); background: var(--surface); }

/* ── SEZIONI ───────────────────────────────────────────────── */
.section-label {
    font-family: MilanTypeRev, sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--red);
    padding-bottom: 8px;
    border-bottom: 2px solid var(--red);
    margin-bottom: 16px;
    display: block;
}
.section-label.dark { color: var(--dark); border-bottom-color: var(--dark); }

/* ── CARD ──────────────────────────────────────────────────── */
.card {
    background: #fff;
    border: 1px solid #eeeeee;
    border-radius: 2px;
    padding: 28px;
    margin-bottom: 20px;
}
.card-red  { border-top: 3px solid var(--red); }
.card-dark { border-top: 3px solid var(--dark); }

/* ── BADGE STATUS ──────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: MilanTypeRev, sans-serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 2px;
}
.badge-sent     { background: #FEF3C7; color: #854F0B; }
.badge-approved { background: #D1FAE5; color: #065F46; }
.badge-rejected { background: #FEE2E2; color: #991B1B; }
.badge-draft    { background: #F3F4F6; color: #6B7280; }

/* ── HEADER ────────────────────────────────────────────────── */
.site-header {
    background: #0a0a0a;
    padding: 0 28px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-header-stripe { height: 3px; background: var(--red); }

/* ── SIDEBAR (segreteria) ──────────────────────────────────── */
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 2px;
    font-family: MilanTypeRev, sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: var(--gray);
    text-decoration: none;
    margin-bottom: 2px;
    transition: background 0.15s, color 0.15s;
}
.sidebar-link:hover { background: var(--surface); color: var(--dark); }
.sidebar-link.active { background: var(--red-light); color: var(--red); font-weight: 700; }
.sidebar-link .material-symbols-outlined { font-size: 18px; }

/* ── GRIGLIA ───────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.field  { margin-bottom: 14px; }

/* ── RADIO PILL ────────────────────────────────────────────── */
.radio-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
    padding: 9px 14px;
    border: 1px solid var(--border);
    border-radius: 2px;
    transition: all 0.15s;
}
.radio-pill:has(input:checked) { border-color: var(--red); background: var(--red-light); }

/* ── MODAL ─────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10,10,10,0.6);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.modal-overlay.open { display: flex; }
.modal-box { background: #fff; border-radius: 2px; max-width: 480px; width: 100%; border-top: 3px solid var(--red); }
.modal-head { padding: 20px 24px; border-bottom: 1px solid #eeeeee; display: flex; align-items: center; justify-content: space-between; }
.modal-body { padding: 24px; }
.modal-foot { padding: 16px 24px; border-top: 1px solid #eeeeee; display: flex; justify-content: flex-end; gap: 10px; }

/* ── DICHIARAZIONE SOSTITUTIVA ─────────────────────────────── */
.dichiarazione-box {
    background: #fff;
    border: 1px solid var(--border);
    border-left: 3px solid var(--dark);
    border-radius: 2px;
    padding: 24px 28px;
    font-size: 13px;
    line-height: 1.9;
    color: var(--dark);
}
.dichiarazione-box .titolo { font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--dark); margin-bottom: 4px; }
.dichiarazione-box .sottotitolo { font-size: 11px; color: var(--gray); margin-bottom: 20px; }
.dichiarazione-box .dichiaro { font-weight: 800; font-size: 15px; letter-spacing: 0.25em; text-align: center; margin: 20px 0; color: var(--dark); }
.dichiarazione-box .punto { margin-bottom: 16px; }
.dichiarazione-box .chiusura { border-top: 1px solid var(--border); padding-top: 18px; margin-top: 18px; }
.radio-dichiarazione { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; cursor: pointer; padding: 5px 0; line-height: 1.6; }
.radio-dichiarazione input { margin-top: 3px; accent-color: var(--dark); flex-shrink: 0; }
.precompilato { font-weight: 600; color: var(--dark); border-bottom: 1px dashed var(--border); padding: 0 2px; }

/* ── UTILITIES ─────────────────────────────────────────────── */
.hidden { display: none !important; }
@keyframes fadeIn { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }
.fade-in { animation: fadeIn 0.25s ease; }

.badge-eta { display: inline-flex; align-items: center; gap: 6px; font-family: MilanTypeRev, sans-serif; font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; padding: 4px 10px; border-radius: 2px; margin-left: 10px; }
.badge-minore   { background: #EFF6FF; color: #1D4ED8; }
.badge-maggiore { background: #F0FDF4; color: #065F46; }

/* ── ALERT / ERROR ─────────────────────────────────────────── */
.alert-error {
    background: #fff8f8;
    border: 1px solid #FECACA;
    border-left: 3px solid var(--red);
    border-radius: 2px;
    padding: 12px 16px;
    margin-bottom: 24px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 13px;
    color: #991B1B;
}
.alert-success {
    background: #F0FDF4;
    border: 1px solid #A7F3D0;
    border-left: 3px solid #065F46;
    border-radius: 2px;
    padding: 12px 16px;
    margin-bottom: 24px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 13px;
    color: #065F46;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}