/* Ritocco grafico approvato: stessa applicazione, stessi colori e loghi. */
body { background: #f2f5f9 !important; }
#league-deadline-bar { background: #e7eef7 !important; color: #405976 !important; border-bottom: 1px solid #dce5ef; box-shadow: none; }
#league-deadline-bar i { color: #a78725; }
#league-deadline-bar #countdown-timer { background: #f5f8fc !important; color: #786533 !important; border-color: #dbe4ef; }
#league-deadline-bar .text-amber-200 { color: #a78725 !important; }
#league-sidebar { background: #fff !important; border-right: 1px solid #e0e7ef !important; box-shadow: none !important; }
#league-sidebar h1 { color: #143859 !important; }
#league-sidebar p { color: #718299 !important; }
#league-sidebar > div::after { display: none; }
#league-sidebar nav button { transition: background .18s, color .18s; }
#league-sidebar nav button.bg-orange-600 { background: #edf3fb !important; color: #123c65 !important; box-shadow: inset 3px 0 #e2af20 !important; }
#league-sidebar nav button:hover { background: #f0f4f9 !important; color: #062d5b !important; }
#league-sidebar nav button i { width: 18px; text-align: center; }
#league-sidebar .league-logo-frame { box-shadow: 0 3px 10px #0e315313; border-width: 1px; border-radius: 14px; }
#league-sidebar .league-logo-frame img { object-fit: contain; transform: none; }
.home-page-intro { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.home-page-intro > div > span, .statistics-intro > span { font-size: 10px; font-weight: 800; letter-spacing: .14em; color: #7a8a9f; }
.home-page-intro h2 { margin: 6px 0 0; font-size: 24px; font-weight: 800; letter-spacing: -.7px; color: #153557; }
.home-page-intro > button { color: #496584; font-size: 12px; font-weight: 600; }
.home-page-intro > button i { margin-left: 8px; }
.home-arena .league-hero { min-height: 270px; padding: 32px 36px !important; border-radius: 19px !important; background-image: linear-gradient(90deg, rgba(3,24,49,.94), rgba(3,24,49,.55) 60%, rgba(3,24,49,.06)), url('/assets/arena-home.png') !important; background-position: center 54% !important; border: 1px solid #143654 !important; box-shadow: 0 12px 30px #082b4b15 !important; }
.home-arena .league-hero > .relative { max-width: 66% !important; padding-top: 0; }
.home-arena .league-hero h2 { font-size: clamp(28px, 2.9vw, 42px); line-height: 1.12; letter-spacing: -1px; }
.home-arena .league-hero h2::before { font-size: 10px; letter-spacing: .15em; margin-bottom: 14px; }
.home-arena .league-hero .home-hero-subtitle { color: #dbe6f2 !important; font-size: 13px !important; margin: 10px 0 20px; }
.home-arena .league-hero #dashboard-actions button { padding: .7rem 1rem !important; font-size: 12px; }
.home-arena .league-hero #dashboard-actions button:not(.home-lineup-action) { color: #17314d !important; }
.home-arena .home-bet-banner { min-height: 72px; padding: 14px 22px; background: linear-gradient(105deg, #15233e, #24315a 65%, #17233f); border: 1px solid #34405e; border-radius: 13px; box-shadow: 0 5px 15px #0d2c4b0d; }
.home-arena .home-bet-banner::before { display: none; }
.home-arena .home-bet-icon { width: 38px; height: 38px; border: 1px solid #d6b54f55; background: #e3bd3420; border-radius: 10px; font-size: 19px; transform: rotate(-8deg); }
.home-arena .home-bet-copy strong { font-size: 23px; }
.home-arena .home-bet-copy small { color: #c8d2e5; font-size: 11px; }
.home-arena .home-bet-cta { color: #f2d277; background: transparent; }
.home-kpi { min-height: 106px; background: #fff; border: 1px solid #e0e7ef; border-radius: 13px; box-shadow: 0 3px 8px #10335403; }
.home-kpi > i { width: 32px; height: 32px; font-size: 15px; }
.home-kpi strong { font-variant-numeric: tabular-nums; }
/* Give the upcoming fixture room for both full names and the original team logos. */
#home-kpis { grid-template-columns: repeat(3,minmax(0,1fr)); }
.home-kpi.home-kpi-match { grid-column: 1 / -1; grid-template-columns: minmax(0,1fr); grid-template-rows: auto auto auto; gap: 12px; padding: 18px; background: #fff; }
.home-next-heading { display: flex; align-items: center; gap: 9px; }
.home-next-heading > i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: #fff2cb; color: #a76f00; font-size: 14px; }
.home-kpi-match #home-next-match { display: grid; grid-template-columns: minmax(0,1fr) 36px minmax(0,1fr); align-items: stretch; gap: 14px; text-transform: none; letter-spacing: normal; }
.home-kpi-match .home-next-team { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 14px 18px; border: 1px solid #e0e8f2; border-radius: 12px; background: #f5f8fc; text-transform: none; letter-spacing: normal; }
.home-kpi-match .home-next-logo { display: block; width: 52px; height: 58px; flex: 0 0 52px; object-fit: contain; }
.home-kpi-match .home-next-logo-default { display: grid; place-items: center; color: #3569a3; font-size: 29px; }
.home-kpi-match .home-next-identity { min-width: 0; text-transform: none; letter-spacing: normal; }
.home-kpi-match .home-next-name { display: block; margin-top: 5px; color: #163b62; font-size: 18px; line-height: 1.35; white-space: normal; overflow: visible; overflow-wrap: anywhere; text-overflow: clip; text-wrap: balance; }
.home-kpi-match .home-next-venue { display: block; color: #687e98; font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.home-kpi-match .home-next-vs { align-self: center; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #fff1c0; color: #896717; font-size: 11px; font-weight: 900; }
.home-kpi-match #home-next-match-note { white-space: normal; overflow: visible; font-size: 11px; }
.home-kpi-match #home-next-arena { display: flex; align-items: center; justify-content: center; gap: 10px; min-width: 0; padding: 10px 12px; border: 1px solid #e0e8f2; border-radius: 10px; background: #f5f8fc; color: #163b62; text-align: center; text-transform: none; letter-spacing: normal; }
.home-kpi-match #home-next-arena[hidden] { display: none; }
.home-kpi-match #home-next-arena.is-neutral { background: #fff9e6; border-color: #eee3bd; }
.home-kpi-match #home-next-arena > i { flex-shrink: 0; font-size: 17px; }
.home-kpi-match #home-next-arena > span { min-width: 0; overflow-wrap: anywhere; }
.home-kpi-match #home-next-arena small { display: block; margin: 0; color: #687e98; font-size: 10px; line-height: 1.4; }
.home-kpi-match #home-next-arena strong { display: block; margin: 3px 0; color: #163b62; font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; text-transform: none; letter-spacing: normal; }
.home-kpi-match #home-next-arena > span > span { display: block; color: #687e98; font-size: 11px; line-height: 1.4; text-transform: none; letter-spacing: normal; }
.home-kpi-match #home-next-match.is-empty { display: block; padding: 12px 0; font-size: 16px; color: #163b62; }
@media (max-width: 639px) {
    #home-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
    #home-kpis > .home-kpi:nth-child(3) { grid-column: 1 / -1; }
    .home-kpi.home-kpi-match { padding: 14px 11px; gap: 10px; }
    .home-kpi-match #home-next-match { grid-template-columns: minmax(0,1fr) 28px minmax(0,1fr); gap: 6px; }
    .home-kpi-match .home-next-team { flex-direction: column; justify-content: flex-start; padding: 12px 6px; gap: 8px; text-align: center; }
    .home-kpi-match .home-next-logo { width: 42px; height: 46px; flex-basis: 46px; }
    .home-kpi-match .home-next-name { font-size: 13px; line-height: 1.4; }
    .home-kpi-match .home-next-vs { width: 28px; height: 28px; font-size: 9px; }
}
.home-editorial-results { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.25fr); gap: 20px; align-items: start; }
.home-editorial-results:has(details[open]) { grid-template-columns: 1fr; }
.weekly-editorial { position: relative; margin: 0; padding: 27px; min-height: 300px; background: #fffdf8; border: 1px solid #e9e1d0; border-radius: 15px; box-shadow: 0 4px 12px #17355503; }
.weekly-editorial::before { content: '“'; position: absolute; top: 8px; right: 18px; font-family: Georgia, serif; font-size: 120px; line-height: 1; color: #dfca963d; pointer-events: none; }
.weekly-editorial .editorial-kicker { position: relative; color: #967633; font-size: 9px; line-height: 1.8; }
.weekly-editorial h2 { position: relative; font-family: Georgia, 'Times New Roman', serif; font-size: 34px; line-height: 1.1; color: #162f4c; letter-spacing: -.7px; margin: 20px 0 12px; }
.weekly-editorial > p { color: #6c7480; font-size: 12px; line-height: 1.8; }
.weekly-editorial > .editorial-subtitle { color: #334a65; font-size: 14px; }
.weekly-editorial .editorial-details { border-color: #e9e1d0; }
.weekly-editorial .editorial-details summary { color: #896723; }
.home-panel { min-height: 0; border: 1px solid #e0e7ef; border-radius: 15px; box-shadow: 0 4px 12px #17355503; }
.home-panel-title { min-height: 64px; padding: 14px 20px; gap: 12px; border-color: #edf1f5; }
.home-panel-title h3 { font-size: 14px; letter-spacing: -.2px; }
.home-panel-title button { font-size: 10px; flex-shrink: 0; }
.home-result { padding: 14px 2px; gap: 9px; font-size: 11px; border-color: #edf1f5; }
.home-result-team { display: flex; align-items: center; gap: 8px; min-width: 0; }
.home-result-team > img { width: 28px; height: 28px; flex: 0 0 28px; object-fit: contain; }
.home-result-team > span { overflow-wrap: anywhere; }
.home-result-away { justify-content: flex-end; text-align: right; }
.home-result strong { padding: 7px 8px; background: #f1f5fa; color: #163b62; font-size: 12px; font-variant-numeric: tabular-nums; }
.home-league-teams { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 8px; padding: 15px 15px 22px; }
.home-league-team { min-width: 0; display: grid; justify-items: center; align-content: start; gap: 10px; padding: 10px 3px; border-radius: 10px; }
.home-league-team:hover { background: #f4f7fb; }
.home-league-team img { width: 48px; height: 48px; object-fit: contain; }
.home-league-team span { color: #61758e; font-size: 10px; line-height: 1.45; overflow-wrap: anywhere; text-align: center; }
.statistics-intro { padding: 3px 0 7px; }
.statistics-intro h2 { color: #153557; font-size: clamp(27px, 3vw, 38px); font-weight: 800; letter-spacing: -1px; margin: 8px 0; }
.statistics-intro p, .statistics-note { color: #687e98; font-size: 13px; line-height: 1.7; }
.statistics-section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.statistics-section-heading h3 { color: #173a5e; font-size: 20px; font-weight: 800; letter-spacing: -.5px; }
.statistics-section-heading > span { color: #637c97; font-size: 11px; }
.statistics-weekly-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
#view-statistics .home-panel-title { padding: 17px 16px; flex-wrap: wrap; gap: 8px; }
#view-statistics .home-panel-title h3 { font-size: 14px; }
#view-statistics .home-player-strip, #view-statistics .home-efficiency-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 12px; overflow: visible; }
#view-statistics .home-player-card, #view-statistics .home-efficiency-card { min-width: 0; padding: 13px 12px; background: #f7f9fc; border-color: #e7edf4; border-radius: 10px; box-shadow: none; }
#view-statistics .home-player-card h4 { font-size: 12px; white-space: normal; overflow-wrap: anywhere; }
#view-statistics .home-player-card h4 { display: flex; align-items: center; gap: 6px; }
#view-statistics .home-player-card h4 .player-portrait { display: inline-grid; margin: 0; flex-shrink: 0; }
#view-statistics [aria-label="Italia"] { display: inline !important; }
#view-statistics > div { box-shadow: none; }
#view-statistics .home-player-card p, #view-statistics .home-player-card > span { font-size: 10px; white-space: normal; }
#view-statistics .home-player-card, #view-statistics .home-efficiency-card { min-height: 92px; }
#view-statistics .home-player-card { font-size: 10px; line-height: 15px; }
#view-statistics .home-player-card-head, #view-statistics .home-efficiency-card-head { min-height: 36px; }
#view-statistics .home-player-card-head { margin-bottom: 9px; }
#view-statistics .home-player-card > p, #view-statistics .home-player-card > span { display: inline; margin: 0; line-height: 15px; }
#view-statistics .home-player-card > span::before { content: ' · '; }
#view-statistics .home-player-value { font-size: 20px; }
#view-statistics .home-efficiency-card strong { font-size: 12px; white-space: normal; overflow-wrap: anywhere; }
#view-statistics .home-efficiency-card span { font-size: 10px; white-space: normal; }
#view-statistics .home-efficiency-card b { font-size: 16px; }
#view-statistics .home-efficiency-card b small { font-size: 8px; }
#view-statistics .home-efficiency-card p { font-size: 10px; white-space: normal; }
.statistics-season-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.statistics-season-category .home-panel-title > span { color: #7187a0; font-size: 10px; }
.statistics-season-list { list-style: none; margin: 0; padding: 0 16px 12px; }
.statistics-season-list .home-season-leader { display: grid; grid-template-columns: 20px auto minmax(0, 1fr) auto; gap: 10px; min-width: 0; padding: 15px 2px; background: transparent; border: 0; border-bottom: 1px solid #edf1f5; border-radius: 0; box-shadow: none; }
.statistics-season-list .home-season-leader:last-child { border-bottom: 0; }
.statistics-rank { font-size: 12px; font-weight: 800; color: #8c9bb0; }
.statistics-season-list li:first-child .statistics-rank { color: #ac8425; }
.statistics-season-list .home-season-leader-name { font-size: 13px; white-space: normal; overflow-wrap: anywhere; }
.statistics-season-list .home-season-leader-team { font-size: 10px; white-space: normal; }
.statistics-season-list .home-season-leader-value { font-size: 19px; font-variant-numeric: tabular-nums; }
.statistics-season-list .home-season-leader-value small { font-size: 9px; }
#view-statistics .home-empty { font-size: 12px; line-height: 1.7; }
@media (min-width: 1024px) {
    #league-sidebar { width: 246px; }
    #league-sidebar > div { overflow-y: auto; padding: 26px 20px !important; gap: 20px; }
    #league-sidebar h1 { font-size: 14px !important; line-height: 1.4; }
    #league-sidebar > div > div:first-child { min-width: 0; gap: 10px; }
    #league-sidebar > div > div:first-child > div:last-child { min-width: 0; }
    #league-sidebar > div > div:first-child > div:last-child > div { flex-wrap: wrap; gap: 6px; }
    #league-sidebar #admin-badge { margin-left: 0; font-size: 8px; }
    #league-sidebar p { font-size: 9px; line-height: 1.6; }
    #league-sidebar .league-logo-frame { width: 48px; height: 48px; flex-basis: 48px; }
    #league-sidebar > div > div:nth-child(2) > button { min-height: 36px; padding: 9px 12px; background: #f5f7fa !important; border-color: #e2e8f0 !important; color: #123556 !important; font-size: 10px; }
    #league-sidebar #current-username { color: #123556 !important; }
    #league-sidebar nav { gap: 3px; margin-top: 10px !important; }
    #league-sidebar nav button { min-height: 40px; padding: 10px 12px; color: #61718a !important; font-size: 12px; }
    #league-sidebar nav button.bg-orange-600 { color: #123c65 !important; }
    #league-deadline-bar { left: 246px; }
    main { margin-left: 246px !important; width: calc(100% - 246px) !important; }
}
@media (min-width: 1024px) and (max-width: 1250px) {
    .home-editorial-results { grid-template-columns: 1fr; }
    .statistics-weekly-grid { grid-template-columns: 1fr; }
    #view-statistics .home-player-strip, #view-statistics .home-efficiency-list { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .home-league-teams { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
    .home-page-intro h2 { font-size: 22px; }
    .home-page-intro > button { max-width: 100px; font-size: 10px; text-align: right; }
    .home-page-intro > div > span { font-size: 8px; }
    .home-arena .league-hero { min-height: 280px; padding: 26px 25px !important; }
    .home-arena .league-hero > .relative { max-width: 78% !important; padding-top: 0; }
    .home-arena .league-hero h2 { font-size: 32px; }
    .home-editorial-results { grid-template-columns: 1fr; gap: 18px; }
    .home-league-teams { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .statistics-weekly-grid { grid-template-columns: 1fr; }
    #view-statistics .home-player-strip, #view-statistics .home-efficiency-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #league-sidebar nav button.bg-orange-600 { box-shadow: none !important; }
    #league-sidebar nav #nav-more.mobile-more-active, #mobile-nav-links button.active { background: #edf3fb !important; color: #123c65 !important; }
}
@media (max-width: 639px) {
    #league-sidebar > div { height: auto; min-height: 76px; padding: 10px 12px; gap: 10px; }
    #league-sidebar > div > div:first-child { flex: 1; min-width: 0; gap: 9px; }
    #league-sidebar .league-logo-frame { width: 40px; height: 40px; flex-basis: 40px; }
    #league-sidebar > div > div:first-child > div:last-child { min-width: 0; margin-left: 0; }
    #league-sidebar > div > div:first-child > div:last-child > div { flex-wrap: wrap; gap: 3px; }
    #league-sidebar h1 { font-size: 12px; line-height: 1.25; max-width: none; }
    #league-sidebar p { display: none; }
    #league-sidebar #admin-badge { margin-left: 0; padding: 1px 5px; font-size: 7px; }
    #league-sidebar > div > div:nth-child(2) { flex-shrink: 0; gap: 6px; }
    #league-sidebar #login-nav-btn { width: 82px; max-width: 82px; margin-left: 0; }
    #league-sidebar #current-username { max-width: 49px; font-size: 10px; }
    #league-sidebar #live-sync-btn { margin-left: 0; }
    .home-page-intro h2 { font-size: 20px; }
    .home-arena .league-hero { min-height: 300px; background-position: 61% center !important; padding: 24px 22px !important; }
    .home-arena .league-hero > .relative { max-width: 100% !important; }
    .home-arena .league-hero h2 { font-size: 29px; }
    .home-arena .league-hero h2::before { font-size: 8px; letter-spacing: .14em; }
    .home-arena .league-hero #dashboard-actions { align-items: center; }
    .home-arena .league-hero .home-team-logo { width: 62px; height: 62px; }
    .home-arena .home-bet-banner { padding: 13px 15px; gap: 10px; }
    .home-arena .home-bet-icon { width: 30px; height: 30px; font-size: 15px; }
    .home-arena .home-bet-copy strong { font-size: 21px; }
    .home-arena .home-bet-copy small { font-size: 10px; }
    .home-arena .home-bet-cta { background: #f0c95e; color: #1b3357; }
    .home-kpi { min-height: 102px; padding: 13px 11px; grid-template-columns: 26px minmax(0, 1fr); gap: 5px 8px; }
    .home-kpi > i { width: 26px; height: 28px; font-size: 12px; }
    .home-kpi span { font-size: 9px; }
    .home-kpi small { font-size: 8px; }
    .weekly-editorial { min-height: 0; padding: 23px; }
    .weekly-editorial h2 { font-size: 31px; }
    .home-panel-title { padding: 16px 14px; gap: 8px; }
    .home-panel-title h3 { font-size: 13px; }
    .home-panel-title button { font-size: 9px; }
    .home-result { gap: 6px; font-size: 9px; }
    .home-result-team { gap: 5px; }
    .home-result-team > img { width: 22px; height: 22px; flex-basis: 22px; }
    .home-result strong { font-size: 11px; padding: 7px 5px; }
    .home-league-teams { padding: 10px 10px 18px; gap: 6px; }
    .home-league-team img { width: 38px; height: 38px; }
    .home-league-team span { font-size: 8px; }
    .statistics-intro h2 { font-size: 28px; }
    .statistics-intro p, .statistics-note { font-size: 12px; }
    #view-statistics .home-player-strip, #view-statistics .home-efficiency-list { grid-template-columns: minmax(0, 1fr); }
    .statistics-season-grid { grid-template-columns: minmax(0, 1fr); }
    .statistics-season-list .home-season-leader { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) { #league-sidebar nav button { transition: none; } }
