/* MaxFantacalcio - Rose Squadre V1: presentation-only overrides */
html { background:#20282c; }
body {background:#20282c !important; color:#f4f6f7 !important; font-family:Arial,Helvetica,sans-serif !important; margin:0; padding:16px 16px 50px; box-sizing:border-box;}
*, *::before, *::after {box-sizing:border-box;}
a {color:#ffc36a;}
.mf-roster-hero {max-width:1240px; margin:8px auto 28px; padding:25px 20px; text-align:center; background:#182e31; border:1px solid #355458; border-radius:15px;}
.mf-eyebrow {color:#95d2dd; font-size:12px; letter-spacing:2px; font-weight:800;}
.mf-roster-hero h1 {margin:12px 0; color:#ffc36a; font-size:32px; letter-spacing:.3px;}
.mf-roster-hero p {margin:0; font-size:14px; color:#fff;}
/* The original login form and links stay untouched; only styling is adapted. */
body > center:first-of-type {max-width:1240px; margin:auto;}
body > center:first-of-type p {color:#fff !important;}
body > center:first-of-type a {color:#ffc36a !important;}
body > center:first-of-type hr {border:0; border-top:1px solid #3c5a5f;}
.mf-roster-container {width:100%; max-width:1500px; margin:0 auto;}
.mf-roster-grid {display:block !important; width:100% !important; background:transparent !important; border:0 !important; border-spacing:0 !important;}
.mf-roster-grid > tbody {display:block !important; width:100%;}
.mf-roster-grid > tbody > tr {display:flex !important; flex-wrap:wrap; align-items:stretch; justify-content:center; gap:20px; width:100%;}
.mf-roster-grid > tbody > tr > td {display:block !important; flex:0 1 calc(33.333% - 16px); min-width:0; padding:0 !important; vertical-align:top; background:#182e31 !important; border:1px solid #355458 !important; border-radius:12px; overflow:hidden;}
.mf-roster-grid table[bgcolor="#00FFFF"] {width:100% !important; background:#182e31 !important; border:0 !important; border-collapse:collapse !important; font-size:12.5px; table-layout:fixed;}
.mf-roster-grid table[bgcolor="#00FFFF"] td {padding:7px 5px !important; color:#f4f6f7 !important; background:#203e42 !important; border:1px solid #38585d !important; overflow-wrap:anywhere; line-height:1.35;}
.mf-roster-grid table[bgcolor="#00FFFF"] tr:nth-child(odd) > td {background:#1b3538 !important;}
.mf-roster-grid table[bgcolor="#00FFFF"] > tbody > tr:first-child > td {background:#702d3c !important; color:#fff !important; font-size:16px; padding:11px 7px !important; text-align:center;}
.mf-roster-grid table[bgcolor="#00FFFF"] > tbody > tr:first-child > td b, .mf-roster-grid table[bgcolor="#00FFFF"] > tbody > tr:first-child > td font {color:#fff !important;}
.mf-roster-grid table[bgcolor="#00FFFF"] tr:has(td[id^="r_"]) td[id^="r_"] {width:32px; font-weight:800; text-align:center; color:#ffc36a !important;}
.mf-roster-grid table[bgcolor="#00FFFF"] tr:has(td[id^="n_"]) td[id^="n_"] {width:42%; text-align:left; font-weight:600;}
.mf-roster-grid table[bgcolor="#00FFFF"] tr:has(td[id^="v_"]) td[id^="v_"] ,
.mf-roster-grid table[bgcolor="#00FFFF"] tr:has(td[id^="a_"]) td[id^="a_"] {width:38px; text-align:center; font-variant-numeric:tabular-nums;}
.mf-roster-grid table[bgcolor="#00FFFF"] tr[bgcolor="#000011"] td {background:#152a2d !important; color:#ffc36a !important; padding:12px 5px !important; text-align:center; font-weight:700;}
.mf-roster-grid input[type=submit], .mf-roster-container input[type=submit], input[type=button] {background:#254448; border:1px solid #ae853e; color:#ffc36a; padding:10px 16px; border-radius:8px; cursor:pointer; font-weight:700;}
/* Instruction table for vincoli mode */
center > table[bgcolor="#00FF00"] {max-width:940px; margin:5px auto; background:#182e31 !important; border:1px solid #355458 !important; color:#fff; border-radius:10px;}
center > table[bgcolor="#00FF00"] td {padding:16px; line-height:1.65;}
@media(max-width:1120px){.mf-roster-grid > tbody > tr > td {flex-basis:calc(50% - 12px);}}
@media(max-width:680px){body {padding:12px 8px 40px;}.mf-roster-grid > tbody > tr > td {flex-basis:100%;}.mf-roster-hero h1{font-size:25px;}.mf-roster-grid table[bgcolor="#00FFFF"] {font-size:12px;}}

/* V1.1 - rose piu compatte, quattro colonne, elimina fascia vuota */
.mf-roster-hero { max-width:1180px; padding:18px 18px; margin:6px auto 20px; }
.mf-roster-hero h1 { font-size:29px; margin:8px 0; }
.mf-roster-container { max-width:1580px; }
.mf-roster-grid > tbody > tr { gap:12px !important; align-items:flex-start; }
.mf-roster-grid > tbody > tr > td { flex:0 1 calc(25% - 10px) !important; }
.mf-roster-grid table[bgcolor="#00FFFF"] { font-size:11.5px; }
.mf-roster-grid table[bgcolor="#00FFFF"] td { padding:5px 4px !important; line-height:1.25; }
.mf-roster-grid table[bgcolor="#00FFFF"] > tbody > tr:first-child > td { padding:8px 5px !important; font-size:14px; }
.mf-roster-grid table[bgcolor="#00FFFF"] tr:has(td[id^="r_"]) td[id^="r_"] { width:24px; }
.mf-roster-grid table[bgcolor="#00FFFF"] tr:has(td[id^="v_"]) td[id^="v_"],
.mf-roster-grid table[bgcolor="#00FFFF"] tr:has(td[id^="a_"]) td[id^="a_"] { width:29px; }
/* L'originale inserisce colori direttamente nei link e nel saluto */
body > center:first-of-type p[align="right"],
body > center:first-of-type p[align="right"] i,
body > center:first-of-type p[align="right"] b,
body > center:first-of-type p[align="right"] font { color:#fff !important; }
body > center:first-of-type p[align="right"] a,
body > center:first-of-type p[align="right"] a * { color:#ffc36a !important; }
@media(max-width:1340px){ .mf-roster-grid > tbody > tr > td { flex-basis:calc(33.333% - 10px) !important; } }
@media(max-width:920px){ .mf-roster-grid > tbody > tr > td { flex-basis:calc(50% - 10px) !important; } }
@media(max-width:560px){ .mf-roster-grid > tbody > tr > td { flex-basis:100% !important; } }

/* V1.2 - saluto bianco anche con regole inline; selezione testo non blu */
body p[align="right"], body p[align="right"] i, body p[align="right"] b,
body p[align="right"] font, body p[align="right"] span { color:#ffffff !important; }
body p[align="right"] a, body p[align="right"] a * {color:#ffc36a !important;}
body p[align="right"]::selection, body p[align="right"] *::selection { background:#38585d; color:#ffffff; }

/* Una riga per nome e cognome: tre schede per riga danno spazio ai nomi completi */
.mf-roster-grid > tbody > tr > td {flex-basis:calc(33.333% - 10px) !important;}
.mf-roster-grid table[bgcolor="#00FFFF"] {table-layout:auto !important; font-size:11px !important;}
.mf-roster-grid table[bgcolor="#00FFFF"] td {padding:4px 3px !important; line-height:1.15 !important;}
.mf-roster-grid table[bgcolor="#00FFFF"] tr td[id^="n_"] {
  white-space:nowrap !important; overflow-wrap:normal !important;
  word-break:normal !important; font-weight:600;
}
.mf-roster-grid table[bgcolor="#00FFFF"] tr td[id^="r_"] {width:22px !important; min-width:22px;}
.mf-roster-grid table[bgcolor="#00FFFF"] tr td[id^="v_"],
.mf-roster-grid table[bgcolor="#00FFFF"] tr td[id^="a_"] {width:27px !important; min-width:27px;}
/* Squadra calcistica e numeri: celle compatte senza tagliare il testo */
.mf-roster-grid table[bgcolor="#00FFFF"] tr:has(td[id^="n_"]) td {font-size:11px;}
@media(max-width:1180px){.mf-roster-grid > tbody > tr > td {flex-basis:calc(50% - 10px) !important;}}
@media(max-width:680px){.mf-roster-grid > tbody > tr > td {flex-basis:100% !important;}}

/* V1.3 - centra esclusivamente i valori dentro le celle di ogni rosa. */
.mf-roster-grid table[bgcolor="#00FFFF"] tr > td {
  text-align:center !important;
  vertical-align:middle !important;
}
.mf-roster-grid table[bgcolor="#00FFFF"] tr td[id^="n_"] {
  text-align:center !important;
  white-space:nowrap !important;
}
.mf-roster-grid table[bgcolor="#00FFFF"] tr td[id^="r_"],
.mf-roster-grid table[bgcolor="#00FFFF"] tr td[id^="v_"],
.mf-roster-grid table[bgcolor="#00FFFF"] tr td[id^="a_"] {
  text-align:center !important;
}

/* V1.4 - consultazione pubblica, link di navigazione */
.mf-roster-nav {text-align:center; margin: -13px auto 30px; padding:0 10px;}
.mf-roster-nav a { display:inline-block; padding:11px 22px; border:1px solid #ae853e; border-radius:9px; background:#254448; color:#ffc36a !important; text-decoration:none; font-size:14px; font-weight:700;}
.mf-roster-nav a:hover,.mf-roster-nav a:focus { background:#315459; outline-offset:3px;}
.mf-roster-grid table[bgcolor="#00FFFF"] tr > td {text-align:center!important; vertical-align:middle!important;}
