.partite-page {
    max-width: 1000px;
    margin: auto;
    padding: 20px;

    /* SFONDO CAMPO */
    background-image: url('/admin/assets/campo.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    /* spazio footer */
    margin-bottom: 80px;

    /* overlay leggero per leggibilità */
    box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0.35);
}

/* ===== TITOLO ===== */
.partite-page h1,
.section-title {
    margin-top: 50px;   /* DISTANZA DALLA SEZIONE SOPRA */
    margin-bottom: 16px;



    color: #fff;
}
.section-title::before {
    content: "";
    display: block;
    height: 1px;
    background: rgba(255,255,255,0.15);
    margin-bottom: 18px;
}

/* ===== RIGA PARTITA ===== */
.seriea-row {
    display: grid;
    grid-template-columns: 1fr 60px 1fr 220px;
    align-items: center;
    background: linear-gradient(90deg, #0b3c78, #0a2c5a);
    margin-bottom: 6px;
    padding: 10px 12px;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
}

/* ===== SQUADRE ===== */
.team {
    display: flex;
    align-items: center;
    gap: 70px;              /* più spazio logo ↔ testo */
    font-weight: 700;
    text-transform: uppercase;
    font-size: 18px;        /* TESTO PIÙ GRANDE */
    line-height: 1;
}


.team.left {
    justify-content: flex-start;
}

.team.right {
    justify-content: flex-end;
    text-align: right;
}

.team img {
    width: 65px;
    height: 65px;
    object-fit: contain;
    background: #fff;
    border-radius: 6px;
    padding: 4px;
}


/* ===== VS ===== */
.vs {
    text-align: center;
    background: #fff;
    color: #0b3c78;
    font-weight: bold;
    padding: 4px 0;
    border-radius: 2px;
    font-size: 13px;
}

/* ===== META INFO ===== */
.meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;

    font-size: 15px;          /* PIÙ GRANDE */
    font-weight: 700;
    text-transform: uppercase; /* MAIUSCOLO FORZATO */
    letter-spacing: 0.3px;

    color: #ffffff;
    margin-left: 20px; /* PIÙ VICINO AI LOGHI */
}
.meta span:first-child {
    font-size: 16px;
}

.meta span:nth-child(2) {
    font-size: 15px;
}

.meta span:last-child {
    font-size: 13px;
    opacity: 0.9;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    .seriea-row {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 8px;
    }

    .team {
        justify-content: center;
    }

    .meta {
        align-items: center;
    }

    .vs {
        width: 60px;
        margin: auto;
    }
}
@media (max-width: 768px) {
    .team {
        font-size: 16px;
    }
}
/* ===== TESTO SQUADRA GRN (DUE RIGHE) ===== */
.team.grn {
    align-items: center;
}

.team.grn .team-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.team.grn .team-main {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.team.grn .team-sub {
    font-size: 13px;
    font-weight: 500;
    opacity: 0.85;
}
@media (max-width: 768px) {
    .meta {
        align-items: center;
        margin-left: 0;
        font-size: 14px;
    }
}
/* ===== GESTIONE PARTITE (weekend) ===== */
.dashboard-box.weekend-page {
    max-width: 1180px;
    padding: 36px 32px 40px;
}

.wk-page-head {
    text-align: center;
    margin-bottom: 28px;
    background: none;
    padding: 0;
    box-shadow: none;
}

.wk-kicker {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: #aa0505;
}

.wk-page-head h1,
.dashboard-box.weekend-page h1 {
    margin: 0;
    font-size: 34px;
    letter-spacing: 0.4px;
    color: #aa0505;
    text-shadow: none;
}

.wk-lead {
    margin: 8px 0 0;
    color: #667;
    font-size: 15px;
}

.wk-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.wk-nav .btn {
    width: auto;
    border: 0;
    cursor: pointer;
    font-family: inherit;
}

.wk-nav-bottom {
    margin-top: 28px;
    padding-top: 8px;
}

.wk-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 22px;
    align-items: stretch;
}

.wk-panel {
    display: flex;
    flex-direction: column;
    min-height: 440px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid #eef1f5;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.wk-panel-top {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 14px 14px 0;
    padding: 16px 18px;
    border-radius: 16px;
}

.wk-panel-soon .wk-panel-top,
.wk-panel-amichevoli .wk-panel-top {
    background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
    color: #fff;
}

.wk-panel-live .wk-panel-top {
    background: linear-gradient(135deg, #aa0505 0%, #7a0303 58%, #1a1a1a 100%);
    color: #fff;
}

.wk-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 22px;
    background: rgba(255, 255, 255, 0.16);
    flex-shrink: 0;
}

.wk-panel-top h2 {
    margin: 0;
    font-size: 22px;
    color: #fff;
    font-family: 'Oswald', sans-serif;
    letter-spacing: 0.4px;
}

.wk-panel-top p {
    margin: 2px 0 0;
    font-size: 13px;
    opacity: 0.85;
}

.wk-badge {
    margin-left: auto;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    white-space: nowrap;
}

.wk-badge-soon {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.wk-badge-count {
    background: #fff;
    color: #7a0303;
}

.wk-soon-body,
.wk-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 36px 28px;
}

.wk-soon-mark,
.wk-empty-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 30px;
    margin-bottom: 14px;
}

.wk-soon-mark {
    background: #f1f5f9;
}

.wk-empty-icon {
    background: #fff1f1;
}

.wk-soon-body h3,
.wk-empty h3 {
    margin: 0 0 8px;
    font-size: 18px;
    color: #1e293b;
}

.wk-soon-body p,
.wk-empty p {
    margin: 0;
    max-width: 320px;
    color: #64748b;
    line-height: 1.55;
}

.wk-empty .btn {
    margin-top: 18px;
}

.wk-ami-body {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 22px 20px 24px;
}

.wk-ami-card {
    width: 100%;
    background: #f8fafc;
    border: 1px solid #e8eef5;
    border-radius: 16px;
    padding: 22px 20px;
    text-align: left;
}

.wk-ami-card h3 {
    margin: 0 0 8px;
    font-size: 17px;
    color: #1e293b;
}

.wk-ami-card p {
    margin: 0 0 16px;
    color: #64748b;
    line-height: 1.55;
    font-size: 14px;
}

.wk-ami-card .btn {
    width: auto;
}

.weekend-page .wk-ami-card .btn {
    width: auto;
}

.wk-toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding: 16px 20px 0;
}

.wk-pending-note {
    margin: 10px 20px 0;
    color: #92400e;
    font-size: 13px;
    font-weight: 700;
}

.wk-pending-note a {
    color: #7a0303;
    text-decoration: underline;
}

.wk-flow {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    padding: 16px 20px 0;
}

.wk-flow-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 12px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    color: #1e293b;
    min-height: 132px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wk-flow-card:hover {
    border-color: #aa0505;
    box-shadow: 0 6px 16px rgba(170, 5, 5, 0.12);
}

.wk-flow-card.is-alert {
    background: #fff7ed;
    border-color: #f59e0b;
}

.wk-flow-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #aa0505;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    display: grid;
    place-items: center;
}

.wk-flow-card strong {
    font-size: 14px;
}

.wk-flow-card span {
    font-size: 12px;
    line-height: 1.35;
    color: #64748b;
}

.wk-flow-card em {
    margin-top: auto;
    font-style: normal;
    font-size: 12px;
    font-weight: 800;
    color: #b45309;
}

@media (max-width: 900px) {
    .wk-flow {
        grid-template-columns: 1fr;
    }
}

.weekend-page .wk-toolbar .btn {
    width: auto;
}

.wk-matches {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 20px 20px;
}

.wk-match {
    display: grid;
    grid-template-columns: 68px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid #edf0f4;
    border-radius: 14px;
    background: #f8fafc;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.wk-match:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    background: #fff;
}

.wk-match-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
    border-radius: 12px;
    background: #0b3c78;
    color: #fff;
    line-height: 1;
}

.wk-dow,
.wk-mon {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    opacity: 0.8;
}

.wk-day {
    font-size: 22px;
    font-weight: 800;
    margin: 4px 0;
}

.wk-match-cat {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #aa0505;
}

.wk-match-teams {
    margin: 3px 0 6px;
    font-size: 15px;
    font-weight: 800;
    color: #111;
}

.wk-match-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
}

.wk-chip {
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.wk-chip.is-home {
    background: #dcfce7;
    color: #166534;
}

.wk-match.is-pending {
    border-color: #f59e0b;
    background: #fffbeb;
}

.wk-chip.is-ok {
    background: #dcfce7;
    color: #166534;
}

.wk-chip.is-wait {
    background: #fef3c7;
    color: #92400e;
}

.wk-chip.is-rest {
    background: #ffedd5;
    color: #9a3412;
}

.wk-match.is-riposo {
    border-color: #fdba74;
    background: #fff7ed;
}

.wkview-row.is-riposo {
    background: #fff7ed;
}

.wk-match-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: stretch;
}

.wk-match-actions .inline-form {
    margin: 0;
}

.wk-approve,
.wk-adesione {
    display: inline-block;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    text-align: center;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
}

.wk-approve {
    background: #166534;
    color: #fff;
    border-color: #166534;
}

.wk-adesione {
    background: #fff;
    color: #0b3c78;
    border-color: #bfdbfe;
}

.btn-success {
    background: #166534;
    color: #fff;
}

.btn-success:hover {
    background: #14532d;
}

.ami-submit-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.ami-hint {
    margin-top: 16px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}

.ami-form .autocomplete {
    position: relative;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-top: 4px;
    display: none;
    z-index: 5;
    overflow: hidden;
}
.ami-form .autocomplete-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    cursor: pointer;
}
.ami-form .autocomplete-item:hover {
    background: #f1f5f9;
}
.ami-form .autocomplete-item.has-thumb {
    display: flex;
    align-items: center;
    gap: 10px;
}
.ami-form .ac-thumb {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #f1f5f9;
    display: grid;
    place-items: center;
    overflow: hidden;
    flex-shrink: 0;
    font-size: 12px;
    color: #94a3b8;
    border: 1px solid #e2e8f0;
}
.ami-form .ac-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}
.ami-form .ac-label {
    flex: 1;
    font-weight: 700;
}
.ami-form .autocomplete-item small {
    color: #64748b;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 800;
}
.ami-logo-preview {
    margin: 10px 0 12px;
    min-height: 88px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px dashed #94a3b8;
    border-radius: 10px;
    background: #fff;
}
.ami-logo-preview[hidden] {
    display: none !important;
}
.ami-logo-preview.is-found {
    border-color: #16a34a;
    background: #f0fdf4;
}
.ami-logo-preview.is-missing {
    border-color: #f59e0b;
    background: #fffbeb;
}
.ami-logo-preview img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.ami-logo-preview span {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}

.dashboard-box .info {
    background: #ecfdf5;
    color: #166534;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    text-align: center;
}

.wk-field {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 220px;
}

.wk-delete {
    justify-self: end;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    color: #b00020;
    text-decoration: none;
    background: #fff;
    border: 1px solid #fecaca;
}

.wk-delete:hover {
    background: #b00020;
    color: #fff;
    text-decoration: none;
}

.weekend-page .wk-match-actions button.wk-delete[type="submit"] {
    all: unset;
    box-sizing: border-box;
    display: block;
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    color: #b00020;
    background: #fff;
    border: 1px solid #fecaca;
    text-align: center;
    cursor: pointer;
    margin: 0;
    font-family: inherit;
}

.weekend-page .wk-match-actions button.wk-delete[type="submit"]:hover {
    background: #b00020;
    color: #fff;
}

.wk-campionato-list {
    margin: 16px 20px 8px;
}

.wk-campionato-list .wk-gironi-label {
    margin: 0 0 10px;
}

.wk-gironi {
    margin: 16px 20px 0;
    padding: 14px 16px;
    background: #fff7f7;
    border: 1px solid #fecaca;
    border-radius: 14px;
}

.wk-gironi-label {
    margin: 0 0 10px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: #7f1d1d;
}

.wk-gironi-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wk-girone-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #fecaca;
    border-radius: 10px;
    text-decoration: none;
    color: #7f1d1d;
    font-weight: 800;
    font-size: 13px;
    line-height: 1.2;
}

.wk-girone-badge small {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #fee2e2;
    color: #7f1d1d;
    font-size: 11px;
    font-weight: 800;
}

.wk-girone-badge:hover {
    background: #aa0505;
    border-color: #aa0505;
    color: #fff;
}

.wk-girone-badge.is-incomplete {
    border-style: dashed;
    color: #9a3412;
    background: #fff7ed;
}
.wk-girone-badge.is-incomplete small {
    background: #ffedd5;
    color: #9a3412;
}

.wk-confirm-btn {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 16px 20px 0;
    padding: 16px 18px;
    background: linear-gradient(135deg, #aa0505 0%, #7a0303 100%);
    color: #fff;
    border-radius: 14px;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(170, 5, 5, 0.22);
}

.wk-confirm-btn strong {
    font-size: 16px;
}

.wk-confirm-btn span {
    font-size: 13px;
    opacity: 0.9;
}

.wk-confirm-btn:hover {
    filter: brightness(1.06);
    color: #fff;
}

.wk-weeks {
    margin: 16px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wk-week-card {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-decoration: none;
    color: #111827;
}

.wk-week-card strong {
    font-size: 14px;
}

.wk-week-card span {
    font-size: 12px;
    color: #64748b;
}

.wk-week-card.is-now {
    border-color: #aa0505;
    background: #fff7f7;
}

.wk-week-card.is-alert {
    border-color: #f59e0b;
}

.wk-week-card.is-past {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #475569;
}

.wk-week-card.is-past strong {
    color: #334155;
}

.wk-week-card.is-past span {
    color: #64748b;
}

.wk-gironi-label-past {
    margin-top: 10px;
    color: #64748b;
}

.wk-week-card:hover {
    border-color: #aa0505;
}

.wk-week-card.is-past:hover {
    border-color: #64748b;
}

@media (max-width: 980px) {
    .wk-grid {
        grid-template-columns: 1fr;
    }

    .wk-panel {
        min-height: 0;
    }
}

@media (max-width: 640px) {
    .dashboard-box.weekend-page {
        padding: 24px 16px 28px;
    }

    .wk-panel-top {
        flex-wrap: wrap;
    }

    .wk-badge {
        margin-left: 0;
    }

    .wk-match {
        grid-template-columns: 60px 1fr;
    }

    .wk-match-actions,
    .wk-delete {
        grid-column: 1 / -1;
        text-align: center;
        justify-self: stretch;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: stretch;
    }

    .wk-field {
        max-width: 140px;
    }
}

/* ===== HEADER ADMIN PARTITE ===== */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.admin-actions {
    display: flex;
    gap: 12px;
}

/* ===== BOTTONI ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 700;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s ease;
}

.btn-primary {
    background: #0b3c78;
    color: #fff;
}

.btn-primary:hover {
    background: #092f5e;
}

.btn-secondary {
    background: #e5e5e5;
    color: #333;
}

.btn-secondary:hover {
    background: #d5d5d5;
}
.btn-delete {
    display: inline-block;
    margin-top: 8px;
    color: #b00020;
    font-weight: 700;
    text-decoration: none;
}

.btn-delete:hover {
    text-decoration: underline;
}
@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-actions {
        width: 100%;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}
/* ===== GRIGLIA PARTITE WEEKEND ===== */
.admin-match-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.admin-match-card {
    background: #fafafa;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.admin-match-card:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
@media (max-width: 768px) {
    .admin-match-grid {
        grid-template-columns: 1fr;
    }
}
