/*
  ClubIQ Segreteria - Dashboard
  V1.2
  Desktop SaaS polish + responsive safe
*/

body{
    background:#f4f7fb;
}

.stats-grid{
    display:grid;
    grid-template-columns:repeat(5, minmax(150px, 1fr));
    gap:18px;
    margin-top:18px;
}

.stat-card{
    min-height:132px;
    background:linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border:1px solid var(--line);
    border-radius:24px;
    padding:22px;
    box-shadow:0 14px 34px rgba(15,23,42,.07);
}

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

.stat-card strong{
    display:block;
    font-size:34px;
    margin:12px 0 8px;
    line-height:1;
    letter-spacing:-.055em;
}

.stat-card small{
    color:var(--muted);
    font-size:14px;
}

.stat-card:nth-child(2) strong{
    color:var(--success);
}

.stat-card:nth-child(3) strong,
.stat-card:nth-child(4) strong{
    color:var(--danger);
}

.stat-card:nth-child(5) strong{
    color:var(--warning);
}

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

.athlete-card,
.data-card{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:18px;
    border:1px solid var(--line);
    background:#f8fafc;
    border-radius:18px;
    padding:17px;
    transition:.18s ease;
}

.athlete-card:hover,
.data-card:hover{
    background:#fff;
    box-shadow:0 12px 28px rgba(15,23,42,.07);
    transform:translateY(-1px);
}

.athlete-card strong,
.data-card strong{
    display:block;
    font-size:16px;
}

.athlete-card span,
.athlete-card small,
.data-card span{
    display:block;
    color:var(--muted);
    margin-top:4px;
}

.data-card span{
    font-size:14px;
}

.data-card-right{
    text-align:right;
    min-width:150px;
}

.data-card-right b{
    display:block;
    font-size:19px;
}

.data-card-right small{
    color:var(--muted);
}

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

.grid-form label{
    display:grid;
    gap:8px;
    color:#334155;
    font-size:13px;
    font-weight:900;
}

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

.grid-form textarea{
    resize:vertical;
}

.grid-form input:focus,
.grid-form textarea:focus,
.grid-form select:focus{
    border-color:var(--primary);
    box-shadow:0 0 0 4px rgba(37,99,235,.10);
}

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

.subsection{
    margin-top:26px;
    padding-top:20px;
    border-top:1px solid var(--line);
}

.subsection h3{
    margin:0 0 14px;
    font-size:20px;
    letter-spacing:-.03em;
}

.card-actions{
    display:flex;
    justify-content:flex-end;
    flex-wrap:wrap;
    gap:8px;
    margin-top:10px;
}

.athlete-card .card-actions{
    margin-top:0;
    min-width:220px;
}

.mini-btn{
    border:0;
    border-radius:11px;
    padding:9px 12px;
    font-size:12px;
    font-weight:1000;
    background:#e0ecff;
    color:#1d4ed8;
    transition:.16s ease;
}

.mini-btn:hover{
    background:#bfdbfe;
    transform:translateY(-1px);
}

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

.mini-btn.success:hover{
    background:#bbf7d0;
}

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

.mini-btn.danger:hover{
    background:#fecaca;
}

.status-success{
    color:var(--success);
}

.status-warning{
    color:var(--warning);
}

.status-danger{
    color:var(--danger);
}

.status-muted{
    color:var(--muted);
}

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

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

.detail-box span{
    display:block;
    color:var(--muted);
    font-size:12px;
    font-weight:1000;
    text-transform:uppercase;
    letter-spacing:.08em;
    margin-bottom:8px;
}

.detail-box strong{
    display:block;
    font-size:19px;
}

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

.detail-columns h3{
    margin:0 0 12px;
    font-size:20px;
    letter-spacing:-.03em;
}

.mini-record{
    border:1px solid var(--line);
    border-radius:16px;
    background:#fff;
    padding:15px;
}

.mini-record strong,
.mini-record span,
.mini-record small{
    display:block;
}

.mini-record span{
    color:var(--muted);
    margin-top:5px;
}

.mini-record small{
    color:var(--muted);
    margin-top:5px;
    font-size:12px;
}

.empty{
    color:var(--muted);
    padding:18px;
    border:1px dashed var(--line);
    border-radius:18px;
    background:#f8fafc;
}

.empty.error{
    color:var(--danger);
    background:#fef2f2;
    border-color:#fecaca;
}

/* Filtri atleti */
.filters-bar{
    display:grid;
    grid-template-columns:2fr 1fr 1fr;
    gap:14px;
    margin:18px 0 18px;
    padding:14px;
    border:1px solid var(--line);
    border-radius:18px;
    background:#f8fafc;
}

.filter-field label{
    display:block;
    margin-bottom:8px;
    font-size:12px;
    font-weight:1000;
    color:var(--muted);
    text-transform:uppercase;
    letter-spacing:.06em;
}

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

.filter-field input:focus,
.filter-field select:focus{
    border-color:var(--primary);
    box-shadow:0 0 0 3px rgba(37,99,235,.12);
}

.status-badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:6px 10px;
    border-radius:999px;
    font-size:11px;
    font-weight:1000;
    text-transform:uppercase;
    letter-spacing:.04em;
}

.status-ok{
    background:#dcfce7;
    color:#166534;
}

.status-payment-open{
    background:#fef3c7;
    color:#92400e;
}

.status-certificate-expiring{
    background:#ffedd5;
    color:#9a3412;
}

.status-certificate-expired{
    background:#fee2e2;
    color:#991b1b;
}

/* Desktop medio: più respiro senza rompere */
@media (max-width: 1180px){
    .stats-grid{
        grid-template-columns:repeat(3, 1fr);
    }

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

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

@media (max-width: 980px){
    .stats-grid{
        grid-template-columns:1fr 1fr;
    }

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

    .athlete-card,
    .data-card{
        flex-direction:column;
        align-items:flex-start;
    }

    .athlete-card .card-actions,
    .data-card-right{
        width:100%;
        min-width:0;
        text-align:left;
    }

    .card-actions{
        justify-content:flex-start;
    }

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

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

@media (max-width: 760px){
    .filters-bar{
        grid-template-columns:1fr;
    }
}

@media (max-width: 560px){
    .stats-grid{
        grid-template-columns:1fr;
    }

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

    .stat-card{
        min-height:auto;
    }
}

/* ================================
   Controlli rapidi dashboard
================================ */

.today-checks-panel{
    border-color:#dbeafe;
    background:
        radial-gradient(circle at top right, rgba(37,99,235,.08), transparent 32%),
        #ffffff;
}

.today-checks-summary{
    margin:8px 0 0;
    color:var(--muted);
    line-height:1.45;
    font-weight:800;
}

.today-checks-summary.success{
    color:#166534;
}

.today-checks-summary.warning{
    color:#92400e;
}

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

.today-check-card{
    text-decoration:none;
    display:block;
    border:1px solid var(--line);
    border-radius:20px;
    background:#f8fafc;
    padding:18px;
    transition:.18s ease;
}

.today-check-card:hover{
    background:#ffffff;
    box-shadow:0 14px 30px rgba(15,23,42,.08);
    transform:translateY(-1px);
}

.today-check-card span{
    display:block;
    color:var(--muted);
    font-size:12px;
    font-weight:1000;
    text-transform:uppercase;
    letter-spacing:.08em;
}

.today-check-card strong{
    display:block;
    margin:10px 0 6px;
    font-size:34px;
    line-height:1;
    color:var(--primary);
    letter-spacing:-.04em;
}

.today-check-card small{
    display:block;
    color:var(--muted);
    font-size:13px;
    line-height:1.35;
}

.today-check-card.danger strong{
    color:var(--danger);
}

.today-check-card.warning strong{
    color:var(--warning);
}

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

@media (max-width: 560px){
    .today-checks-grid{
        grid-template-columns:1fr;
    }

    .today-check-card{
        padding:16px;
        border-radius:18px;
    }

    .today-check-card strong{
        font-size:30px;
    }
}


/* ================================
   Link iscrizione professionale
================================ */

.club-link-heading{
    align-items:flex-start;
}

.club-link-description{
    margin:8px 0 0;
    max-width:680px;
    color:var(--muted);
    line-height:1.5;
    font-weight:800;
}

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

#clubRegistrationLink{
    font-weight:800;
    color:#1d4ed8;
    background:#f8fafc;
}

@media (max-width: 760px){
    .club-link-actions{
        width:100%;
        display:grid;
        grid-template-columns:1fr;
    }

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


/* ================================
   Box link pubblico genitori
================================ */

.club-link-box{
    display:grid;
    gap:16px;
    margin-bottom:22px;
}

.club-link-meta{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:16px;
}

.club-public-link{
    display:grid;
    gap:8px;
    border:1px solid #dbeafe;
    border-radius:22px;
    background:linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
    padding:18px;
}

.club-public-link span{
    color:#1d4ed8;
    font-size:12px;
    font-weight:1000;
    text-transform:uppercase;
    letter-spacing:.08em;
}

.club-public-link small{
    color:var(--muted);
    font-size:13px;
    font-weight:800;
    line-height:1.45;
}

.club-public-link input{
    width:100%;
    border:1px solid #bfdbfe;
    border-radius:16px;
    padding:14px 15px;
    background:#ffffff;
    color:#1d4ed8;
    font-size:15px;
    font-weight:900;
    outline:none;
}

.club-public-link input:focus{
    border-color:var(--primary);
    box-shadow:0 0 0 4px rgba(37,99,235,.12);
}

@media (max-width: 760px){
    .club-link-meta{
        grid-template-columns:1fr;
    }

    .club-public-link{
        padding:16px;
        border-radius:20px;
    }

    .club-public-link input{
        min-height:48px;
        font-size:14px;
    }
}


/* ================================
   Documenti richieste genitori
================================ */

.request-documents{
    display:grid;
    gap:10px;
    margin-top:12px;
    padding:12px;
    border:1px solid #dbeafe;
    border-radius:16px;
    background:#ffffff;
}

.request-documents-title{
    margin:0 !important;
    color:var(--muted) !important;
    font-size:11px !important;
    font-weight:1000 !important;
    text-transform:uppercase;
    letter-spacing:.08em;
}

.request-documents-actions{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
}

.document-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    min-height:38px;
    padding:10px 13px;
    border-radius:13px;
    text-decoration:none;
    font-size:13px;
    font-weight:1000;
    line-height:1;
    transition:.16s ease;
}

.document-btn:hover{
    transform:translateY(-1px);
    box-shadow:0 10px 22px rgba(15,23,42,.10);
}

.document-btn-icon{
    font-size:15px;
    line-height:1;
}

.document-btn-certificate{
    background:#dbeafe;
    color:#1d4ed8;
    border:1px solid #bfdbfe;
}

.document-btn-certificate:hover{
    background:#bfdbfe;
}

.document-btn-receipt{
    background:#dcfce7;
    color:#166534;
    border:1px solid #bbf7d0;
}

.document-btn-receipt:hover{
    background:#bbf7d0;
}

@media (max-width: 560px){
    .request-documents-actions{
        display:grid;
        grid-template-columns:1fr;
    }

    .document-btn{
        width:100%;
        justify-content:flex-start;
        min-height:44px;
        padding:12px 14px;
    }
}


/* ================================
   WhatsApp V1
================================ */

.mini-btn.whatsapp{
    background:#dcfce7;
    color:#166534;
    border:1px solid #bbf7d0;
}

.mini-btn.whatsapp:hover{
    background:#bbf7d0;
}

@media (max-width: 560px){
    .mini-btn.whatsapp{
        min-height:44px;
    }
}


/* ================================
   Comunicazioni rapide V1.2
================================ */

.communications-panel{
    border-color:#bbf7d0;
    background:
        radial-gradient(circle at top right, rgba(34,197,94,.10), transparent 34%),
        #ffffff;
}

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

.quick-communication-card{
    display:grid;
    gap:11px;
    border:1px solid var(--line);
    border-radius:20px;
    background:#f8fafc;
    padding:18px;
}

.quick-communication-card span{
    color:#16a34a;
    font-size:12px;
    font-weight:1000;
    text-transform:uppercase;
    letter-spacing:.08em;
}

.quick-communication-card strong{
    color:var(--text);
    font-size:18px;
    letter-spacing:-.03em;
}

.quick-communication-card p{
    margin:0;
    color:var(--muted);
    line-height:1.45;
    font-size:13px;
    font-weight:800;
}

.quick-communication-card label{
    display:grid;
    gap:7px;
    color:#334155;
    font-size:13px;
    font-weight:900;
}

.quick-communication-card input,
.quick-communication-card textarea{
    width:100%;
    border:1px solid var(--line);
    border-radius:14px;
    padding:12px 13px;
    background:#fff;
    color:var(--text);
    outline:none;
    font-size:14px;
    font-family:inherit;
}

.quick-communication-card textarea{
    resize:vertical;
}

.quick-communication-card input:focus,
.quick-communication-card textarea:focus{
    border-color:#22c55e;
    box-shadow:0 0 0 4px rgba(34,197,94,.12);
}

.quick-communication-card .mini-btn{
    width:100%;
    min-height:44px;
}

@media (max-width: 980px){
    .quick-communications-grid{
        grid-template-columns:1fr;
    }
}


/* ================================
   Storico comunicazioni WhatsApp V1.3
================================ */

.communication-history-panel{
    border-color:#bbf7d0;
    background:linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
}

.communication-history-list{
    display:grid;
    gap:12px;
}

.communication-history-card{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:14px;
    border:1px solid #dbeafe;
    border-radius:18px;
    padding:15px;
    background:#ffffff;
    box-shadow:0 10px 24px rgba(15,23,42,.05);
}

.communication-history-card span{
    display:inline-flex;
    width:max-content;
    padding:5px 9px;
    border-radius:999px;
    background:#dcfce7;
    color:#166534;
    font-size:11px;
    font-weight:1000;
    text-transform:uppercase;
    letter-spacing:.05em;
}

.communication-history-card strong{
    display:block;
    margin-top:8px;
    color:var(--text);
    font-size:16px;
}

.communication-history-card small{
    display:block;
    margin-top:4px;
    color:var(--muted);
    font-weight:800;
}

.communication-history-card p{
    margin:8px 0 0;
    color:#475569;
    line-height:1.45;
    font-size:13px;
    font-weight:700;
}

.communication-history-meta{
    min-width:130px;
    text-align:right;
    color:#166534;
    font-size:13px;
}

@media (max-width: 760px){
    .communication-history-card{
        flex-direction:column;
    }

    .communication-history-meta{
        width:100%;
        min-width:0;
        text-align:left;
    }
}


/* ================================
   Export storico comunicazioni
================================ */

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

@media (max-width: 560px){
    .communication-history-actions{
        width:100%;
        display:grid;
        grid-template-columns:1fr;
    }

    .communication-history-actions .secondary-btn{
        width:100%;
    }
}


/* ================================
   Filtri storico comunicazioni WhatsApp
================================ */

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

.communication-history-filters{
    display:grid;
    grid-template-columns:2fr 1fr;
    gap:14px;
    margin:18px 0 12px;
    padding:14px;
    border:1px solid var(--line);
    border-radius:18px;
    background:#f8fafc;
}

.communication-history-summary{
    margin:0 0 14px;
    color:var(--muted);
    font-weight:900;
}

.communication-history-card small{
    display:block;
    margin-top:8px;
    color:var(--muted);
    line-height:1.45;
}

@media (max-width: 760px){
    .communication-history-actions,
    .communication-history-filters{
        display:grid;
        grid-template-columns:1fr;
        width:100%;
    }

    .communication-history-actions .secondary-btn{
        width:100%;
    }
}


/* Report segreteria PDF */
.topbar-actions{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:10px;
    flex-wrap:wrap;
}
@media (max-width: 760px){
    .topbar-actions{
        width:100%;
        display:grid;
        grid-template-columns:1fr;
    }
    .topbar-actions .primary-btn,
    .topbar-actions .secondary-btn{
        width:100%;
    }
}


/* ================================
   Report Segreteria PDF pulito
================================ */
.secretary-report-print-area{
    display:block;
    max-width:980px;
    margin:24px auto;
}

.secretary-report-print-area.hidden{
    display:none;
}

.secretary-report-page{
    background:#ffffff;
    color:#0f172a;
    border:1px solid #dbeafe;
    border-radius:24px;
    padding:34px;
    box-shadow:0 18px 40px rgba(15,23,42,.08);
    font-family:Arial, sans-serif;
}

.secretary-report-header{
    display:flex;
    justify-content:space-between;
    gap:20px;
    border-bottom:2px solid #dbeafe;
    padding-bottom:18px;
    margin-bottom:22px;
}

.secretary-report-eyebrow{
    margin:0 0 6px;
    color:#2563eb;
    font-size:12px;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.08em;
}

.secretary-report-header h1{
    margin:0;
    font-size:32px;
    letter-spacing:-.04em;
}

.secretary-report-header p{
    margin:8px 0 0;
    color:#64748b;
    font-weight:700;
}

.secretary-report-brand{
    align-self:flex-start;
    padding:10px 14px;
    border-radius:16px;
    background:#eff6ff;
    color:#1d4ed8;
    font-weight:1000;
}

.secretary-report-section{
    margin-top:22px;
    break-inside:avoid;
}

.secretary-report-section h2{
    margin:0 0 12px;
    font-size:18px;
}

.secretary-report-grid{
    display:grid;
    gap:12px;
}

.secretary-report-grid.two{ grid-template-columns:repeat(2, 1fr); }
.secretary-report-grid.five{ grid-template-columns:repeat(5, 1fr); }

.secretary-report-grid div{
    border:1px solid #e2e8f0;
    border-radius:16px;
    padding:14px;
    background:#f8fafc;
}

.secretary-report-grid span{
    display:block;
    color:#64748b;
    font-size:11px;
    text-transform:uppercase;
    font-weight:900;
    letter-spacing:.06em;
}

.secretary-report-grid strong{
    display:block;
    margin-top:7px;
    font-size:18px;
}

.secretary-report-table{
    width:100%;
    border-collapse:collapse;
    overflow:hidden;
    border-radius:14px;
    border:1px solid #e2e8f0;
}

.secretary-report-table th,
.secretary-report-table td{
    padding:11px 12px;
    border-bottom:1px solid #e2e8f0;
    text-align:left;
    font-size:13px;
}

.secretary-report-table th{
    background:#eff6ff;
    color:#1e3a8a;
    font-weight:1000;
}

.secretary-report-empty{
    padding:14px;
    border:1px dashed #cbd5e1;
    border-radius:14px;
    color:#64748b;
    background:#f8fafc;
}

@media print{
    body.printing-secretary-report *{
        visibility:hidden !important;
    }

    body.printing-secretary-report #secretaryReportPrintArea,
    body.printing-secretary-report #secretaryReportPrintArea *{
        visibility:visible !important;
    }

    body.printing-secretary-report #secretaryReportPrintArea{
        display:block !important;
        position:absolute !important;
        left:0 !important;
        top:0 !important;
        width:100% !important;
        max-width:none !important;
        margin:0 !important;
        padding:0 !important;
    }

    body.printing-secretary-report .secretary-report-page{
        box-shadow:none !important;
        border:0 !important;
        border-radius:0 !important;
        padding:16mm !important;
    }

    body.printing-secretary-report .secretary-report-grid.five{
        grid-template-columns:repeat(5, 1fr) !important;
    }

    @page{
        margin:12mm;
    }
}/* ================================
   Report PDF - Hotfix pagine vuote
================================ */

@media print{
    html,
    body{
        width:100% !important;
        height:auto !important;
        min-height:0 !important;
        margin:0 !important;
        padding:0 !important;
        background:#ffffff !important;
        overflow:visible !important;
    }

    body *{
        visibility:hidden !important;
    }

    #secretaryReportPrintArea,
    #secretaryReportPrintArea *{
        visibility:visible !important;
    }

    #secretaryReportPrintArea{
        display:block !important;
        position:absolute !important;
        left:0 !important;
        top:0 !important;
        width:100% !important;
        max-width:none !important;
        min-height:0 !important;
        height:auto !important;
        margin:0 !important;
        padding:0 !important;
        background:#ffffff !important;
        overflow:visible !important;
    }

    .secretary-report-document{
        width:100% !important;
        max-width:190mm !important;
        min-height:0 !important;
        height:auto !important;
        margin:0 auto !important;
        padding:10mm !important;
        box-shadow:none !important;
        border:0 !important;
        page-break-after:auto !important;
        break-after:auto !important;
    }

    .secretary-report-section,
    .secretary-report-grid,
    .secretary-report-table,
    .secretary-report-card{
        page-break-inside:avoid !important;
        break-inside:avoid !important;
    }

    .app-shell,
    .sidebar,
    .main-content{
        min-height:0 !important;
        height:auto !important;
    }

    @page{
        size:A4 portrait;
        margin:8mm;
    }
}



/* ================================
   Notifiche operative dashboard V1
================================ */

.operative-notifications-panel{
    border-color:#bfdbfe;
    background:
        radial-gradient(circle at top right, rgba(37,99,235,.10), transparent 34%),
        #ffffff;
}

.operative-notifications-summary{
    margin:8px 0 0;
    color:var(--muted);
    line-height:1.45;
    font-weight:900;
}

.operative-notifications-summary.success{ color:#166534; }
.operative-notifications-summary.warning{ color:#92400e; }

.operative-notifications-list{
    display:grid;
    grid-template-columns:repeat(4, minmax(0, 1fr));
    gap:14px;
}

.operative-notification-card{
    display:grid;
    gap:7px;
    min-height:96px;
    padding:16px;
    border:1px solid var(--line);
    border-radius:18px;
    background:#f8fafc;
    text-decoration:none;
    transition:.18s ease;
}

.operative-notification-card:hover{
    transform:translateY(-1px);
    background:#ffffff;
    box-shadow:0 14px 30px rgba(15,23,42,.08);
}

.operative-notification-card strong{
    color:#0f172a;
    font-size:15px;
    line-height:1.2;
}

.operative-notification-card span{
    color:var(--muted);
    font-size:13px;
    line-height:1.4;
    font-weight:800;
}

.operative-notification-card.success{
    background:#f0fdf4;
    border-color:#bbf7d0;
}

.operative-notification-card.warning{
    background:#fffbeb;
    border-color:#fde68a;
}

.operative-notification-card.danger{
    background:#fef2f2;
    border-color:#fecaca;
}

@media (max-width: 1180px){
    .operative-notifications-list{
        grid-template-columns:repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px){
    .operative-notifications-list{
        grid-template-columns:1fr;
    }
}


/* ================================
   Dati pagamento società V1
================================ */

#clubIbanInput{
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    letter-spacing:.03em;
    font-weight:800;
}

#clubPaymentNotesInput{
    min-height:86px;
}

@media (max-width: 760px){
    #clubPaymentNotesInput{
        min-height:110px;
    }
}


/* ================================
   Stripe Billing V1
================================ */
.billing-panel{
    border-color:#c7d2fe;
    background:radial-gradient(circle at top right, rgba(79,70,229,.10), transparent 34%), #ffffff;
}
.billing-heading{align-items:flex-start;}
.billing-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end;}
.billing-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:16px;}
.billing-card{border:1px solid var(--line);border-radius:20px;background:#f8fafc;padding:18px;}
.billing-card span{display:block;color:var(--muted);font-size:12px;font-weight:1000;text-transform:uppercase;letter-spacing:.08em;}
.billing-card strong{display:block;margin:8px 0 6px;font-size:24px;letter-spacing:-.04em;}
.billing-card small{color:var(--muted);font-weight:800;line-height:1.4;}
.billing-card.highlighted{border-color:#bfdbfe;background:#eff6ff;}
.billing-card.premium{border-color:#ddd6fe;background:#f5f3ff;}
@media(max-width:760px){.billing-actions{display:grid;width:100%;}.billing-actions .primary-btn,.billing-actions .secondary-btn{width:100%;}.billing-cards{grid-template-columns:1fr;}}


/* Hotfix billing compatto + sidebar */
.billing-compact-panel{border-color:#bfdbfe;background:linear-gradient(180deg,#ffffff 0%,#eff6ff 100%);}
.billing-compact-note{display:flex;justify-content:space-between;gap:14px;align-items:center;border:1px solid #dbeafe;border-radius:18px;background:#fff;padding:16px;}
.billing-compact-note strong{font-size:18px;color:#0f172a;}
.billing-compact-note span{color:#64748b;font-weight:800;}
.billing-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end;}
@media(max-width:760px){.billing-compact-note{display:grid}.billing-actions{width:100%;justify-content:stretch}.billing-actions button{width:100%;}}


/* ================================
   ClubIQ V2.1 - Dashboard Enterprise
================================ */

.topbar{
    position:relative;
    overflow:hidden;
    background:
        radial-gradient(circle at top right, rgba(37,99,235,.22), transparent 36%),
        linear-gradient(135deg,#0f172a 0%,#1e293b 58%,#0b1120 100%);
    color:#ffffff;
    border:1px solid rgba(255,255,255,.10);
    box-shadow:0 24px 70px rgba(15,23,42,.22);
}

.topbar::after{
    content:"";
    position:absolute;
    right:-80px;
    top:-110px;
    width:260px;
    height:260px;
    border-radius:999px;
    background:rgba(34,197,94,.18);
    filter:blur(2px);
}

.topbar-copy,
.topbar-actions{
    position:relative;
    z-index:1;
}

.topbar .eyebrow{
    color:#86efac;
}

.topbar h1{
    color:#ffffff;
    font-size:36px;
    letter-spacing:-.055em;
}

.topbar-subtitle{
    margin:8px 0 0;
    color:#cbd5e1;
    font-weight:800;
}

.executive-dashboard-panel{
    margin-top:20px;
    border-color:#bfdbfe;
    background:
        radial-gradient(circle at top left, rgba(37,99,235,.10), transparent 34%),
        linear-gradient(180deg,#ffffff 0%,#eff6ff 100%);
}

.executive-hero-grid{
    display:grid;
    grid-template-columns:1.05fr .95fr;
    gap:16px;
}

.executive-status-card,
.assistant-card{
    border:1px solid rgba(148,163,184,.32);
    border-radius:24px;
    padding:22px;
    background:rgba(255,255,255,.90);
    box-shadow:0 16px 34px rgba(15,23,42,.08);
}

.executive-status-top,
.assistant-header{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:14px;
}

.executive-kicker,
.assistant-header span{
    color:#2563eb;
    font-size:12px;
    font-weight:1000;
    text-transform:uppercase;
    letter-spacing:.09em;
}

.executive-status-top strong{
    display:block;
    margin-top:6px;
    color:#0f172a;
    font-size:26px;
    letter-spacing:-.045em;
}

.executive-status-card p{
    margin:14px 0 0;
    color:#475569;
    font-weight:800;
    line-height:1.5;
}

.executive-status-footer{
    display:flex;
    justify-content:space-between;
    flex-wrap:wrap;
    gap:10px;
    margin-top:20px;
    align-items:center;
}

.executive-status-footer small{
    color:#64748b;
    font-weight:800;
}

.executive-status-badge{
    display:inline-flex;
    padding:8px 12px;
    border-radius:999px;
    background:#e0f2fe;
    color:#075985;
    font-size:12px;
    font-weight:1000;
    text-transform:uppercase;
    letter-spacing:.05em;
}

.executive-status-badge.success{background:#dcfce7;color:#166534;}
.executive-status-badge.warning{background:#fef3c7;color:#92400e;}
.executive-status-badge.danger{background:#fee2e2;color:#991b1b;}

.assistant-header strong{
    color:#0f172a;
    font-size:13px;
    white-space:nowrap;
}

.assistant-advice-list{
    display:grid;
    gap:10px;
    margin-top:15px;
}

.assistant-advice-item{
    display:grid;
    grid-template-columns:28px 1fr;
    gap:10px;
    align-items:start;
    padding:12px;
    border-radius:16px;
    background:#f8fafc;
    border:1px solid rgba(148,163,184,.24);
}

.assistant-advice-item span{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:28px;
    height:28px;
    border-radius:999px;
    background:#dcfce7;
    color:#166534;
    font-weight:1000;
}

.assistant-advice-item p{
    margin:0;
    color:#334155;
    font-weight:800;
    line-height:1.45;
}

.executive-actions-row{
    display:grid;
    grid-template-columns:repeat(6, minmax(0, 1fr));
    gap:12px;
    margin-top:16px;
}

.executive-action-card{
    display:grid;
    gap:8px;
    text-align:left;
    min-height:128px;
    padding:16px;
    border:1px solid rgba(148,163,184,.35);
    border-radius:20px;
    background:#ffffff;
    text-decoration:none;
    color:#0f172a;
    box-shadow:0 12px 26px rgba(15,23,42,.06);
    transition:.18s ease;
    font-family:inherit;
    cursor:pointer;
}

.executive-action-card:hover{
    transform:translateY(-2px);
    box-shadow:0 16px 34px rgba(15,23,42,.10);
    border-color:#bfdbfe;
}

.executive-action-card span{
    font-size:24px;
}

.executive-action-card strong{
    color:#0f172a;
    font-size:15px;
    letter-spacing:-.03em;
}

.executive-action-card small{
    color:#64748b;
    font-weight:800;
    line-height:1.35;
}

.button-like{
    border-style:solid;
}

.dashboard-insight-grid{
    display:grid;
    grid-template-columns:.9fr 1.1fr;
    gap:18px;
    margin-top:20px;
}

.compact-heading{
    margin-bottom:8px;
}

.money-overview{
    display:grid;
    gap:15px;
}

.money-overview span{
    display:block;
    color:#64748b;
    font-size:12px;
    font-weight:1000;
    text-transform:uppercase;
    letter-spacing:.08em;
}

.money-overview strong{
    display:block;
    margin:6px 0 9px;
    color:#0f172a;
    font-size:22px;
    letter-spacing:-.04em;
}

.progress-line{
    height:10px;
    border-radius:999px;
    background:#e2e8f0;
    overflow:hidden;
}

.progress-line i{
    display:block;
    width:0;
    height:100%;
    border-radius:999px;
    background:linear-gradient(90deg,#2563eb,#22c55e);
    transition:.35s ease;
}

.progress-line.warning i{background:linear-gradient(90deg,#f59e0b,#facc15);}
.progress-line.danger i{background:linear-gradient(90deg,#ef4444,#f97316);}

.dashboard-timeline-list{
    display:grid;
    gap:10px;
}

.timeline-item{
    display:grid;
    gap:4px;
    padding:12px 14px;
    border-radius:16px;
    border:1px solid rgba(148,163,184,.25);
    background:#f8fafc;
    text-decoration:none;
    transition:.18s ease;
}

.timeline-item:hover{
    transform:translateY(-1px);
    background:#ffffff;
    box-shadow:0 10px 22px rgba(15,23,42,.07);
}

.timeline-item span{
    color:#64748b;
    font-size:12px;
    font-weight:900;
}

.timeline-item strong{
    color:#0f172a;
    font-size:15px;
}

.timeline-item small{
    color:#64748b;
    font-weight:800;
}

.timeline-item.success{border-left:4px solid #22c55e;}
.timeline-item.warning{border-left:4px solid #f59e0b;}
.timeline-item.danger{border-left:4px solid #ef4444;}

.timeline-empty{
    padding:16px;
    border:1px dashed #cbd5e1;
    border-radius:16px;
    color:#64748b;
    font-weight:800;
    background:#f8fafc;
}

.stat-card{
    position:relative;
    overflow:hidden;
}

.stat-icon{
    position:absolute;
    right:18px;
    top:18px;
    width:38px;
    height:38px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:15px;
    background:#eff6ff;
    font-size:20px;
}

.stat-money .stat-icon{background:#dcfce7;}
.stat-warning .stat-icon{background:#fef3c7;}
.stat-danger .stat-icon{background:#fee2e2;}

.billing-panel{
    margin-top:20px;
}

@media (max-width:1180px){
    .executive-actions-row{
        grid-template-columns:repeat(3, minmax(0,1fr));
    }
}

@media (max-width:980px){
    .executive-hero-grid,
    .dashboard-insight-grid{
        grid-template-columns:1fr;
    }

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

@media (max-width:560px){
    .topbar h1{
        font-size:27px;
    }

    .executive-status-top,
    .assistant-header,
    .executive-status-footer{
        display:grid;
    }

    .assistant-header strong{
        white-space:normal;
    }

    .executive-actions-row{
        grid-template-columns:1fr;
    }

    .executive-action-card{
        min-height:auto;
    }
}


/* ================================
   ClubIQ V2.3 - Scheda atleta Enterprise
================================ */

.athlete-profile-panel{
    border-color:#bfdbfe;
    background:
        radial-gradient(circle at top right, rgba(37,99,235,.10), transparent 34%),
        linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
}

.athlete-profile-hero{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    padding:18px;
    border:1px solid #dbeafe;
    border-radius:24px;
    background:
        radial-gradient(circle at top right, rgba(34,197,94,.12), transparent 34%),
        linear-gradient(135deg,#0f172a,#1e3a8a);
    color:#ffffff;
    margin-bottom:18px;
    box-shadow:0 18px 45px rgba(15,23,42,.16);
}

.athlete-profile-main{
    display:flex;
    align-items:center;
    gap:16px;
    min-width:0;
}

.athlete-profile-avatar{
    width:74px;
    height:74px;
    border-radius:24px;
    display:grid;
    place-items:center;
    flex:none;
    background:linear-gradient(135deg,#22c55e,#bfdbfe);
    color:#0f172a;
    font-size:26px;
    font-weight:1000;
    box-shadow:0 14px 30px rgba(0,0,0,.22);
}

.athlete-profile-hero .eyebrow{
    color:#86efac;
}

.athlete-profile-hero h2{
    margin:4px 0 8px;
    color:#ffffff;
    font-size:30px;
    letter-spacing:-.055em;
}

.athlete-profile-meta{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    align-items:center;
}

.athlete-profile-meta span:not(.status-badge){
    display:inline-flex;
    padding:6px 10px;
    border-radius:999px;
    background:rgba(255,255,255,.10);
    color:#dbeafe;
    font-size:12px;
    font-weight:900;
}

.athlete-profile-actions{
    display:flex;
    flex-wrap:wrap;
    justify-content:flex-end;
    gap:8px;
}

.athlete-profile-actions .secondary-btn{
    background:rgba(255,255,255,.12);
    color:#ffffff;
    border-color:rgba(255,255,255,.22);
}

.athlete-profile-actions .secondary-btn:hover{
    background:rgba(255,255,255,.20);
}

.athlete-profile-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:14px;
    margin-bottom:18px;
}

.athlete-profile-card{
    border:1px solid var(--line);
    border-radius:22px;
    background:linear-gradient(180deg,#ffffff 0%,#f8fafc 100%);
    padding:18px;
    box-shadow:0 12px 28px rgba(15,23,42,.06);
}

.athlete-profile-card.highlight{
    border-color:#bbf7d0;
    background:linear-gradient(180deg,#f0fdf4 0%,#ffffff 100%);
}

.athlete-profile-card span{
    display:block;
    color:var(--muted);
    font-size:12px;
    font-weight:1000;
    text-transform:uppercase;
    letter-spacing:.08em;
}

.athlete-profile-card strong{
    display:block;
    margin-top:9px;
    font-size:23px;
    color:#0f172a;
    letter-spacing:-.04em;
}

.athlete-profile-card small{
    display:block;
    margin-top:7px;
    color:var(--muted);
    font-weight:800;
    line-height:1.35;
}

.athlete-profile-body{
    display:grid;
    grid-template-columns:1fr 1fr .9fr;
    gap:16px;
    align-items:start;
}

.athlete-profile-column{
    border:1px solid var(--line);
    border-radius:22px;
    background:#ffffff;
    padding:16px;
    box-shadow:0 12px 28px rgba(15,23,42,.05);
}

.compact-heading{
    margin-bottom:12px;
}

.compact-heading h3{
    margin:0;
    font-size:19px;
    letter-spacing:-.04em;
}

.mini-record.success{
    border-color:#bbf7d0;
    background:#f0fdf4;
}

.mini-record.warning{
    border-color:#fde68a;
    background:#fffbeb;
}

.mini-record.expired,
.mini-record.danger{
    border-color:#fecaca;
    background:#fef2f2;
}

.athlete-timeline-list{
    display:grid;
    gap:10px;
}

.athlete-timeline-item{
    position:relative;
    display:grid;
    gap:5px;
    padding:12px 12px 12px 16px;
    border:1px solid var(--line);
    border-radius:16px;
    background:#f8fafc;
}

.athlete-timeline-item::before{
    content:"";
    position:absolute;
    left:0;
    top:14px;
    bottom:14px;
    width:4px;
    border-radius:0 999px 999px 0;
    background:#2563eb;
}

.athlete-timeline-item.success::before{ background:#22c55e; }
.athlete-timeline-item.warning::before{ background:#f59e0b; }
.athlete-timeline-item.danger::before{ background:#ef4444; }

.athlete-timeline-item span{
    color:var(--muted);
    font-size:11px;
    font-weight:1000;
    text-transform:uppercase;
}

.athlete-timeline-item strong{
    color:#0f172a;
    font-size:14px;
}

.athlete-timeline-item small{
    color:var(--muted);
    font-weight:800;
    line-height:1.35;
}

.athlete-notes-box{
    margin-top:16px;
    border:1px solid #dbeafe;
    border-radius:22px;
    padding:16px;
    background:linear-gradient(180deg,#eff6ff 0%,#ffffff 100%);
}

.athlete-notes-box span{
    display:block;
    color:#1d4ed8;
    font-size:12px;
    font-weight:1000;
    text-transform:uppercase;
    letter-spacing:.08em;
    margin-bottom:8px;
}

.athlete-notes-box p{
    margin:0;
    color:#334155;
    line-height:1.45;
    font-weight:800;
}

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

    .athlete-profile-body{
        grid-template-columns:1fr;
    }
}

@media(max-width:760px){
    .athlete-profile-hero{
        display:grid;
        border-radius:22px;
    }

    .athlete-profile-main{
        align-items:flex-start;
    }

    .athlete-profile-avatar{
        width:58px;
        height:58px;
        border-radius:18px;
        font-size:20px;
    }

    .athlete-profile-hero h2{
        font-size:24px;
    }

    .athlete-profile-actions{
        display:grid;
        grid-template-columns:1fr 1fr;
        width:100%;
    }

    .athlete-profile-actions .secondary-btn{
        width:100%;
    }

    .athlete-profile-grid{
        grid-template-columns:1fr;
    }
}
