/* FM27 V10.67 — Squad & tactics detail round 1.
   Only presentation and read-only roster filtering. No game-engine selectors removed. */
body.fm27-squad-page {
  --fm27-work-bg:#131d31;
  --fm27-work-panel:#1a2740;
  --fm27-work-border:#344563;
  --fm27-work-violet:#bba5ff;
  --fm27-work-muted:#aebedb;
}
body.fm27-squad-page .fm27-roster-hero{background:linear-gradient(112deg,#222a47,#2d2753 65%,#1c3151);border-color:#535078}
body.fm27-squad-page .fm27-roster-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.8rem;margin:1.05rem 0 1.35rem}
body.fm27-squad-page .fm27-roster-metric{min-width:0;display:flex;flex-direction:column;gap:.2rem;padding:1.1rem 1.15rem;background:linear-gradient(145deg,#1d2b45,#17233a);border:1px solid #384869;border-radius:14px;box-shadow:0 9px 25px #070c1836}
body.fm27-squad-page .fm27-roster-metric>span{color:#afbcda;font-size:.77rem;letter-spacing:.02em;font-weight:650}
body.fm27-squad-page .fm27-roster-metric>strong{color:#f8f6ff;font-size:clamp(1.25rem,2vw,1.72rem);font-weight:810;line-height:1.28;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
body.fm27-squad-page .fm27-roster-metric>strong small{font-size:.72rem;color:#aebdd8}
body.fm27-squad-page .fm27-roster-metric>small{color:#9baac9;font-size:.71rem;line-height:1.35}
body.fm27-squad-page .fm27-roster-panel{background:#17233a;border:1px solid #374765;border-radius:17px;overflow:hidden;margin-bottom:1.5rem;box-shadow:0 12px 30px #03071324}
body.fm27-squad-page .fm27-roster-panel-head{display:flex;justify-content:space-between;align-items:end;gap:1.3rem;padding:1.25rem 1.4rem;background:linear-gradient(110deg,#1c2a44,#242746);border-bottom:1px solid #3d4969}
body.fm27-squad-page .fm27-roster-panel-head h3{color:#f8f7ff;margin:.25rem 0;font-size:1.15rem;letter-spacing:-.02em;font-weight:760}
body.fm27-squad-page .fm27-roster-panel-head p{color:#aebcdb;font-size:.78rem;margin:0;line-height:1.4}
body.fm27-squad-page .fm27-roster-eyebrow{font-size:.67rem;letter-spacing:.12em;font-weight:780;color:#bca8ff}
body.fm27-squad-page .fm27-roster-controls{display:flex;flex-wrap:wrap;gap:.6rem;align-items:center;justify-content:flex-end}
body.fm27-squad-page .fm27-roster-controls .form-select,body.fm27-squad-page .fm27-roster-controls .form-control{height:37px;font-size:.81rem;border-radius:9px;background:#111c30!important;border:1px solid #51617d!important;color:#eff1ff!important}
body.fm27-squad-page .fm27-roster-controls .form-select{max-width:175px;padding-right:2.2rem}
body.fm27-squad-page .fm27-roster-search{position:relative}
body.fm27-squad-page .fm27-roster-search i{position:absolute;left:.82rem;top:50%;transform:translateY(-50%);color:#a79cdb;pointer-events:none}
body.fm27-squad-page .fm27-roster-search input{padding-left:2.15rem;width:205px}
body.fm27-squad-page .fm27-roster-controls :is(input,select):focus{outline:2px solid #a98efe;outline-offset:1px;box-shadow:none}
body.fm27-squad-page .fm27-roster-table-scroll{overflow-x:auto;overflow-y:visible}
body.fm27-squad-page #playerTable.fm27-roster-table{margin:0!important;width:100%;min-width:950px;border-collapse:collapse}
body.fm27-squad-page #playerTable.fm27-roster-table th{font-size:.69rem;font-weight:800;letter-spacing:.045em;white-space:nowrap;color:#b8c7e4;background:#15233a!important;border-bottom:1px solid #405173;padding:.75rem .58rem;text-transform:uppercase}
body.fm27-squad-page #playerTable.fm27-roster-table td{vertical-align:middle;font-size:.85rem;padding:.62rem .6rem;border-bottom:1px solid #2b3a55;color:#e2e8f7;background:#1a2740;line-height:1.3}
body.fm27-squad-page #playerTable.fm27-roster-table tbody tr:nth-of-type(even)>td{background:#1d2a44}
body.fm27-squad-page #playerTable.fm27-roster-table tbody tr:hover>td{background:#293456!important}
body.fm27-squad-page #playerTable.fm27-roster-table tbody tr.table-danger>td{background:#3f293c!important}
body.fm27-squad-page #playerTable.fm27-roster-table tbody tr[data-fm27-player-row][hidden]{display:none!important}
body.fm27-squad-page #playerTable.fm27-roster-table .fm27-roster-pos{width:84px;max-width:100px;text-align:center}
body.fm27-squad-page .fm27-roster-pos-icon{display:inline-flex;justify-content:center;align-items:center;border:1px solid #49557b;border-radius:8px;background:#242e4d;min-width:35px;min-height:34px;padding:3px}
body.fm27-squad-page .fm27-roster-pos-icon img{display:block;max-width:26px;max-height:27px;object-fit:contain}
body.fm27-squad-page #playerTable.fm27-roster-table .fm27-roster-pos p{font-size:.69rem;line-height:1.2;margin:.28rem 0 0;color:#aebcda}
body.fm27-squad-page #playerTable.fm27-roster-table td.fm27-roster-player-cell{min-width:235px;width:33%}
body.fm27-squad-page .fm27-roster-identity{display:flex;gap:.65rem;align-items:center;min-width:0}
body.fm27-squad-page .fm27-roster-avatar{display:flex;align-items:center;justify-content:center;flex:0 0 43px;width:43px;height:46px;overflow:hidden;border-radius:9px;background:linear-gradient(160deg,#3b4168,#212f47);border:1px solid #54557c;color:#b7acd8}
body.fm27-squad-page .fm27-roster-avatar img{display:block;width:100%;height:100%;object-fit:contain;object-position:center bottom}
body.fm27-squad-page .fm27-roster-avatar i{font-size:1.35rem}
body.fm27-squad-page .fm27-roster-identity-copy{min-width:0}
body.fm27-squad-page .fm27-roster-name{margin:0 0 .1rem;font-size:.85rem;line-height:1.5;font-weight:730}
body.fm27-squad-page .fm27-roster-name a{color:#e9e0ff!important;text-decoration:none}
body.fm27-squad-page .fm27-roster-name a:hover{color:#fff!important;text-decoration:underline}
body.fm27-squad-page .fm27-roster-name>.bi,body.fm27-squad-page .fm27-roster-name>a .bi{margin-left:.2rem;font-size:.78rem}
body.fm27-squad-page .fm27-roster-player-subline{display:block;color:#afbfde;font-size:.69rem;margin-top:.15rem}
body.fm27-squad-page .fm27-roster-player-cell .btn-group{margin-top:.25rem}
body.fm27-squad-page .fm27-roster-player-cell .btn.btn-sm{font-size:.69rem;padding:.22rem .5rem}
body.fm27-squad-page .fm27-roster-table th.fm27-rating-head{text-align:center}
body.fm27-squad-page .fm27-roster-table td.fm27-roster-score{text-align:center;font-variant-numeric:tabular-nums;min-width:69px}
body.fm27-squad-page .fm27-stat-pill{display:inline-flex;justify-content:center;align-items:center;min-width:38px;min-height:29px;border-radius:7px;border:1px solid #515578;background:#2b3052;color:#f1ebff;font-size:.88rem;font-weight:790;padding:2px 5px}
body.fm27-squad-page .fm27-roster-wage,body.fm27-squad-page .fm27-roster-age,body.fm27-squad-page .fm27-roster-contract{font-variant-numeric:tabular-nums;white-space:nowrap}
body.fm27-squad-page .fm27-roster-wage small{color:#abbad7;font-size:.69rem}
body.fm27-squad-page .fm27-roster-contract .bi-exclamation-triangle{color:#ff9aa7}
body.fm27-squad-page .fm27-roster-table tfoot td{background:#242c49!important;padding:.78rem .6rem!important;border-top:1px solid #586085;color:#f0efff!important}
body.fm27-squad-page .fm27-roster-panel-bottom{display:flex;justify-content:space-between;gap:1rem;flex-wrap:wrap;padding:.75rem 1.15rem;border-top:1px solid #374866;color:#abbad7;font-size:.73rem}
body.fm27-squad-page .fm27-roster-no-results{padding:1.1rem;text-align:center;color:#c8cfeb}
body.fm27-squad-page .fm27-roster-no-results[hidden]{display:none!important}
/* Formation. Preserve original pitch geometries (position coordinates, images and sprites). */
body.fm27-squad-page .fm27-lineup-tips{display:flex;gap:.55rem;flex-wrap:wrap;margin:.75rem 0 1rem}
body.fm27-squad-page .fm27-lineup-tips span{padding:.44rem .8rem;border-radius:999px;border:1px solid #445474;background:#1c2941;color:#c2cdec;font-size:.75rem;font-weight:620}
body.fm27-squad-page .fm27-lineup-tips i{color:#b49cf5;margin-right:.3rem}
body.fm27-squad-page .fm27-lineup-layout{align-items:stretch;margin:0 0 1rem}
body.fm27-squad-page #formationForm .fm27-lineup-layout>.pitchColumn,body.fm27-squad-page #formationForm .fm27-lineup-layout>.playersColumn{min-width:0;border:1px solid #394968;background:linear-gradient(140deg,#1a2740,#16223a);border-radius:15px;padding:1rem 1.1rem;box-shadow:0 14px 32px #050b1830}
body.fm27-squad-page #formationForm .fm27-lineup-layout>.pitchColumn{background:linear-gradient(150deg,#1d2b43,#18253c)}
body.fm27-squad-page .fm27-tactics-heading{display:flex;align-items:center;justify-content:space-between;gap:.6rem;margin:0 0 .85rem}
body.fm27-squad-page .fm27-tactics-heading h3{font-size:1.06rem;font-weight:770;color:#f4f2ff;margin:.1rem 0 0}
body.fm27-squad-page .fm27-tactics-overline{font-size:.66rem;color:#b7a0f6;letter-spacing:.105em;font-weight:800}
body.fm27-squad-page .fm27-tactics-mini-label{font-size:.69rem;color:#aabbd8;text-align:right}
body.fm27-squad-page .fm27-bench-heading{margin-top:1.2rem}
body.fm27-squad-page .fm27-tactics-pool-note{font-size:.78rem;color:#aebbda;margin:0 0 1rem}
body.fm27-squad-page #formationForm .fm27-lineup-layout #pitch{max-width:100%;margin:auto;box-shadow:0 20px 38px #050c1a4d;border-radius:10px}
body.fm27-squad-page #formationForm .fm27-lineup-layout .ws-formation-table{background:#1b2a43;border-color:#3f4e6b}
body.fm27-squad-page #formationForm .fm27-lineup-layout .ws-formation-table th{background:#202d47;font-size:.74rem}
body.fm27-squad-page #formationForm .fm27-lineup-layout .benchposition>td{background:#19283f;border-bottom:1px solid #3a4962}
body.fm27-squad-page #formationForm .fm27-lineup-layout .accordion-item{background:#1b2943;border:1px solid #3e4c68;margin:0 0 .4rem;border-radius:10px;overflow:hidden}
body.fm27-squad-page #formationForm .fm27-lineup-layout .accordion-button{background:#26314f;color:#e9e4ff;padding:.78rem 1rem;font-size:.9rem;font-weight:720;box-shadow:none}
body.fm27-squad-page #formationForm .fm27-lineup-layout .accordion-button:not(.collapsed){background:#322d57;color:#fff}
body.fm27-squad-page #formationForm .fm27-lineup-layout .accordion-button:focus{box-shadow:inset 0 0 0 2px #ae91fc}
body.fm27-squad-page #formationForm .fm27-lineup-layout .accordion-body{padding:.65rem}
body.fm27-squad-page #formationForm .fm27-lineup-layout .playerinfo{border:1px solid #41516f;border-radius:9px;background:#202f49;margin:.45rem 0;overflow:visible}
body.fm27-squad-page #formationForm .fm27-lineup-layout .playerBlocked{opacity:.68}
body.fm27-squad-page .fm27-tactics-help{display:flex;gap:.7rem;padding:.9rem 1rem;margin:1rem 0;background:#1b2942;border:1px solid #3c4d6a;border-radius:12px;color:#c5cfeb;font-size:.8rem}
body.fm27-squad-page .fm27-tactics-help>.bi{color:#bba4ff;margin-top:2px}
body.fm27-squad-page .fm27-tactics-help strong{display:block;margin-bottom:.2rem;color:#e3e8fb}
body.fm27-squad-page .fm27-tactics-help p{margin:0;line-height:1.45}
@media(max-width:1180px){body.fm27-squad-page .fm27-roster-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:991px){body.fm27-squad-page .fm27-roster-panel-head{align-items:stretch;flex-direction:column}body.fm27-squad-page .fm27-roster-controls{justify-content:flex-start}body.fm27-squad-page #formationForm .fm27-lineup-layout>.pitchColumn,body.fm27-squad-page #formationForm .fm27-lineup-layout>.playersColumn{margin-bottom:1rem}}
@media(max-width:540px){body.fm27-squad-page .fm27-roster-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem}body.fm27-squad-page .fm27-roster-metric{padding:.9rem}body.fm27-squad-page .fm27-roster-panel-head{padding:1rem}body.fm27-squad-page .fm27-roster-controls{flex-direction:column;align-items:stretch}body.fm27-squad-page .fm27-roster-search input,body.fm27-squad-page .fm27-roster-controls .form-select{width:100%;max-width:none}body.fm27-squad-page #formationForm .fm27-lineup-layout>.pitchColumn,body.fm27-squad-page #formationForm .fm27-lineup-layout>.playersColumn{padding:.6rem}}
@media(prefers-reduced-motion:reduce){body.fm27-squad-page .fm27-roster-table tbody tr{transition:none}}
