/* =========================================================
   ClubIQ Segreteria - Components CSS
   Versione stabile
========================================================= */

:root{
    --primary:#2563eb;
    --primary-dark:#1d4ed8;
    --secondary:#0f172a;
    --success:#16a34a;
    --warning:#f59e0b;
    --danger:#dc2626;
    --bg:#f4f7fb;
    --panel:#ffffff;
    --text:#0f172a;
    --muted:#64748b;
    --line:#e2e8f0;
    --soft:#f8fafc;
    --radius:18px;
    --shadow:0 18px 50px rgba(15,23,42,.08);
}

/* ================================
   Messaggi
================================ */

.message{
    padding:13px 15px;
    border-radius:14px;
    font-size:14px;
    font-weight:800;
    margin-bottom:16px;
}

.message.hidden,
.hidden{
    display:none !important;
}

.message.info{
    background:#eff6ff;
    color:#1d4ed8;
    border:1px solid #bfdbfe;
}

.message.success{
    background:#ecfdf5;
    color:#166534;
    border:1px solid #bbf7d0;
}

.message.error{
    background:#fef2f2;
    color:#991b1b;
    border:1px solid #fecaca;
}

/* ================================
   Bottoni
================================ */

.primary-btn,
.secondary-btn,
.ghost-btn,
.mini-btn{
    border:0;
    cursor:pointer;
    text-decoration:none;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    transition:.18s ease;
    font-family:inherit;
}

.primary-btn{
    background:var(--primary);
    color:#fff;
    border-radius:14px;
    padding:12px 16px;
    font-weight:900;
    box-shadow:0 12px 24px rgba(37,99,235,.20);
}

.primary-btn:hover{
    background:var(--primary-dark);
    transform:translateY(-1px);
}

.secondary-btn{
    background:#e0ecff;
    color:#1d4ed8;
    border-radius:14px;
    padding:12px 16px;
    font-weight:900;
}

.secondary-btn:hover{
    background:#bfdbfe;
}

.ghost-btn{
    width:100%;
    background:rgba(255,255,255,.08);
    color:#e5e7eb;
    border:1px solid rgba(255,255,255,.14);
    border-radius:14px;
    padding:12px 14px;
    font-weight:900;
}

.ghost-btn:hover{
    background:rgba(255,255,255,.14);
}

.mini-btn{
    background:#e0ecff;
    color:#1d4ed8;
    border-radius:10px;
    padding:8px 10px;
    font-size:12px;
    font-weight:900;
}

.mini-btn.success{
    background:#dcfce7;
    color:#166534;
}

.mini-btn.danger{
    background:#fee2e2;
    color:#991b1b;
}

/* ================================
   Card statistiche
================================ */

.stats-grid{
    display:grid;
    grid-template-columns:repeat(5, minmax(0, 1fr));
    gap:14px;
    margin-bottom:20px;
}

.stat-card{
    background:var(--panel);
    border:1px solid var(--line);
    border-radius:var(--radius);
    padding:18px;
    box-shadow:var(--shadow);
}

.stat-card span{
    display:block;
    color:var(--muted);
    font-size:12px;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.04em;
}

.stat-card strong{
    display:block;
    margin-top:8px;
    font-size:30px;
    line-height:1;
    color:var(--text);
}

.stat-card small{
    display:block;
    margin-top:8px;
    color:var(--muted);
    font-size:13px;
}

/* ================================
   Pannelli
================================ */

.panel{
    background:var(--panel);
    border:1px solid var(--line);
    border-radius:22px;
    padding:22px;
    box-shadow:var(--shadow);
    margin-bottom:20px;
}

.section-heading{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    margin-bottom:18px;
}

.section-heading h2{
    margin:0;
    color:var(--text);
    letter-spacing:-.03em;
}

.eyebrow{
    margin:0 0 4px;
    color:var(--primary);
    font-size:12px;
    font-weight:900;
    letter-spacing:.08em;
    text-transform:uppercase;
}

.subsection{
    margin-top:22px;
}

.subsection h3{
    margin:0 0 12px;
    color:var(--text);
}

.subsection-title-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-bottom:14px;
}

.subsection-title-row h3{
    margin:0;
}

/* ================================
   Form
================================ */

.grid-form{
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:14px;
}

.grid-form label,
.filter-field label,
.auth-form label{
    display:block;
    font-size:13px;
    font-weight:900;
    color:#334155;
}

.grid-form input,
.grid-form select,
.grid-form textarea,
.filter-field input,
.filter-field select,
.auth-form input{
    width:100%;
    margin-top:6px;
    border:1px solid var(--line);
    border-radius:14px;
    padding:12px 13px;
    font-size:14px;
    outline:none;
    background:#fff;
    color:var(--text);
}

.grid-form input:focus,
.grid-form select:focus,
.grid-form textarea:focus,
.filter-field input:focus,
.filter-field select:focus,
.auth-form input:focus{
    border-color:#93c5fd;
    box-shadow:0 0 0 4px rgba(37,99,235,.12);
}

.grid-form .full{
    grid-column:1 / -1;
}

.form-actions{
    display:flex;
    align-items:center;
    justify-content:flex-start;
    flex-wrap:wrap;
    gap:10px;
}

.form-actions .primary-btn,
.form-actions .secondary-btn{
    min-width:190px;
}

/* ================================
   Filtri
================================ */

.filters-bar{
    display:grid;
    grid-template-columns:2fr 1fr 1fr;
    gap:12px;
    margin-bottom:16px;
}

.compact-filters{
    margin-top:12px;
}

.filter-summary{
    margin:-4px 0 14px;
    color:var(--muted);
    font-size:13px;
    font-weight:800;
}

/* ================================
   Liste / record
================================ */

.athletes-list,
.records-list{
    display:grid;
    gap:12px;
}

.empty{
    background:#f8fafc;
    border:1px dashed #cbd5e1;
    color:var(--muted);
    border-radius:16px;
    padding:18px;
    text-align:center;
    font-weight:800;
}

.record-card,
.athlete-card,
.request-card{
    background:#fff;
    border:1px solid var(--line);
    border-radius:18px;
    padding:16px;
    box-shadow:0 10px 28px rgba(15,23,42,.05);
}

.request-card{
    border-left:5px solid #dbeafe;
}

/* ================================
   Scheda atleta
================================ */

.detail-actions{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    flex-wrap:wrap;
    gap:10px;
}

.detail-grid{
    display:grid;
    grid-template-columns:repeat(5, minmax(0, 1fr));
    gap:12px;
    margin-bottom:18px;
}

.detail-box{
    border:1px solid var(--line);
    border-radius:16px;
    padding:14px;
    background:#f8fafc;
}

.detail-box span{
    display:block;
    color:var(--muted);
    font-size:12px;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.04em;
}

.detail-box strong{
    display:block;
    margin-top:6px;
    color:var(--text);
}

.detail-columns{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:18px;
}

/* ================================
   Richieste genitori
================================ */

.request-summary-grid{
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:12px;
    margin:16px 0;
}

.request-summary-card{
    border:1px solid var(--line);
    border-radius:16px;
    background:#f8fafc;
    padding:14px;
}

.request-summary-card span{
    display:block;
    color:var(--muted);
    font-size:12px;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.04em;
}

.request-summary-card strong{
    display:block;
    margin-top:6px;
    font-size:28px;
    color:var(--text);
}

/* ================================
   Login / Landing
================================ */

.auth-page{
    min-height:100vh;
    background:
        radial-gradient(circle at top left, rgba(37,99,235,.22), transparent 34%),
        radial-gradient(circle at bottom right, rgba(16,185,129,.18), transparent 36%),
        linear-gradient(135deg, #eef2ff 0%, #f8fafc 48%, #ecfeff 100%);
}

.auth-shell,
.landing-shell{
    width:min(1180px, calc(100% - 32px));
    margin:0 auto;
    min-height:100vh;
    display:grid;
    grid-template-columns:1.18fr .82fr;
    align-items:center;
    gap:28px;
    padding:38px 0;
}

.auth-hero,
.landing-hero{
    background:
        linear-gradient(145deg, rgba(15,23,42,.96), rgba(30,41,59,.96)),
        radial-gradient(circle at top right, rgba(37,99,235,.30), transparent 35%);
    color:#fff;
    border-radius:30px;
    padding:36px;
    box-shadow:0 24px 80px rgba(15,23,42,.24);
    position:relative;
    overflow:hidden;
}

.auth-hero::after,
.landing-hero::after{
    content:"";
    position:absolute;
    right:-80px;
    bottom:-80px;
    width:260px;
    height:260px;
    border-radius:50%;
    background:rgba(37,99,235,.24);
}

.auth-hero > *,
.landing-hero > *{
    position:relative;
    z-index:1;
}

.brand-row{
    display:flex;
    align-items:center;
    gap:14px;
    margin-bottom:26px;
}

.brand-mark{
    width:52px;
    height:52px;
    border-radius:18px;
    background:#2563eb;
    display:grid;
    place-items:center;
    font-weight:900;
    color:#fff;
    box-shadow:0 14px 30px rgba(37,99,235,.35);
}

.brand-row small{
    color:#cbd5e1;
    display:block;
    margin-top:4px;
}

.badge,
.section-label{
    display:inline-flex;
    align-items:center;
    width:max-content;
    font-size:12px;
    font-weight:900;
    letter-spacing:.08em;
    text-transform:uppercase;
    color:#93c5fd;
}

.auth-hero h1,
.landing-hero h1{
    font-size:clamp(34px, 5vw, 64px);
    line-height:.98;
    letter-spacing:-.055em;
    margin:0 0 18px;
}

.auth-hero p,
.hero-lead{
    font-size:18px;
    line-height:1.65;
    color:#dbeafe;
    max-width:760px;
    margin:0 0 24px;
}

.hero-actions{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    margin:24px 0;
}

.hero-link{
    text-decoration:none;
}

.hero-grid,
.landing-feature-grid{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:12px;
    margin-top:26px;
}

.hero-grid div,
.landing-feature-grid div{
    background:rgba(255,255,255,.08);
    border:1px solid rgba(255,255,255,.12);
    border-radius:18px;
    padding:16px;
}

.hero-grid strong,
.landing-feature-grid strong{
    display:block;
    color:#fff;
    margin-bottom:7px;
}

.hero-grid span,
.landing-feature-grid span{
    display:block;
    color:#cbd5e1;
    line-height:1.45;
}

.trust-strip{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin-top:22px;
}

.trust-strip span{
    background:rgba(16,185,129,.14);
    border:1px solid rgba(16,185,129,.28);
    color:#bbf7d0;
    border-radius:999px;
    padding:8px 11px;
    font-size:13px;
    font-weight:800;
}

.auth-card,
.landing-auth-card{
    border-radius:28px;
    padding:26px;
    box-shadow:0 24px 70px rgba(15,23,42,.18);
    background:rgba(255,255,255,.92);
    border:1px solid rgba(255,255,255,.7);
    backdrop-filter:blur(18px);
}

.auth-card-header{
    margin-bottom:18px;
}

.auth-card-header h2{
    font-size:30px;
    margin:6px 0 8px;
    letter-spacing:-.035em;
    color:#0f172a;
}

.auth-card-header p{
    color:#64748b;
    line-height:1.5;
    margin:0;
}

.auth-tabs{
    display:grid;
    grid-template-columns:1fr 1fr;
    background:#f1f5f9;
    padding:5px;
    border-radius:16px;
    margin-bottom:16px;
}

.auth-tabs button{
    border:0;
    background:transparent;
    color:#64748b;
    border-radius:12px;
    padding:11px;
    font-weight:900;
    cursor:pointer;
}

.auth-tabs button.active{
    background:#fff;
    color:#1d4ed8;
    box-shadow:0 8px 20px rgba(15,23,42,.08);
}

.auth-form{
    display:grid;
    gap:12px;
}

.auth-form .primary-btn{
    width:100%;
    margin-top:4px;
}

.auth-note{
    margin-top:16px;
    padding:13px;
    border-radius:14px;
    background:#f8fafc;
    color:#475569;
    font-size:13px;
}

.auth-note a{
    color:#2563eb;
    font-weight:900;
    text-decoration:none;
}

/* ================================
   Responsive
================================ */

@media (max-width: 1100px){
    .stats-grid{
        grid-template-columns:repeat(2, minmax(0, 1fr));
    }

    .detail-grid{
        grid-template-columns:repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px){
    .auth-shell,
    .landing-shell{
        grid-template-columns:1fr;
        padding:18px 0 28px;
    }

    .auth-hero,
    .landing-hero{
        padding:24px;
        border-radius:24px;
    }

    .hero-grid,
    .landing-feature-grid{
        grid-template-columns:1fr;
    }

    .auth-card,
    .landing-auth-card{
        border-radius:22px;
    }

    .filters-bar{
        grid-template-columns:1fr;
    }

    .grid-form{
        grid-template-columns:1fr;
    }

    .detail-columns{
        grid-template-columns:1fr;
    }
}

@media (max-width: 760px){
    .stats-grid,
    .request-summary-grid{
        grid-template-columns:1fr;
    }

    .section-heading{
        align-items:flex-start;
        flex-direction:column;
    }

    .detail-actions{
        width:100%;
        justify-content:flex-start;
    }

    .detail-actions .secondary-btn{
        flex:1;
        min-width:160px;
    }

    .form-actions .primary-btn,
    .form-actions .secondary-btn,
    .subsection-title-row .secondary-btn{
        width:100%;
        min-width:0;
    }

    .subsection-title-row{
        align-items:flex-start;
        flex-direction:column;
    }
}

@media (max-width: 520px){
    .auth-shell,
    .landing-shell{
        width:min(100% - 20px, 1180px);
    }

    .hero-actions{
        flex-direction:column;
    }

    .hero-actions .primary-btn,
    .hero-actions .secondary-btn{
        width:100%;
    }

    .auth-hero h1,
    .landing-hero h1{
        font-size:38px;
    }

    .auth-card,
    .landing-auth-card{
        padding:20px;
    }
}


/* ================================
   Brand / Logo ClubIQ ufficiale
================================ */

.brand-logo-img{
    width:42px;
    height:42px;
    border-radius:14px;
    object-fit:contain;
    display:block;
    background:#ffffff;
    box-shadow:0 14px 30px rgba(37,99,235,.25);
    flex:0 0 auto;
}

.brand-row .brand-logo-img{
    width:52px;
    height:52px;
    border-radius:18px;
    box-shadow:0 14px 30px rgba(37,99,235,.35);
}

.logo-dot{
    width:42px;
    height:42px;
    border-radius:14px;
    display:inline-block;
    background:linear-gradient(135deg, #2563eb, #22c55e);
    box-shadow:0 14px 30px rgba(37,99,235,.25);
}

/* Fallback: se l'immagine logo non viene caricata, resta visibile il vecchio segno grafico */
.brand-logo-img[src=""],
.brand-logo-img:not([src]){
    display:none;
}

