/* FM27 V10.66 | Spieltag, Verein & Fussballwelt — presentation only.
   Builds on V10.62 (Midnight), V10.64 (Portal), V10.65.1 (Squad).
   Never changes form payloads, calculations, simulation state or AJAX events. */
body.fm27-midnight:is(.fm27-matchday-page,.fm27-club-page,.fm27-world-page){
  --fm-domain-accent:#a58aff;
  --fm-domain-accent-soft:rgba(165,138,255,.13);
  --fm-domain-border:#475171;
  --fm-domain-surface:#1a243a;
}
body.fm27-midnight.fm27-matchday-page{--fm-domain-accent:#b29aff;--fm-domain-accent-soft:rgba(178,154,255,.13)}
body.fm27-midnight.fm27-club-page{--fm-domain-accent:#8cb7ff;--fm-domain-accent-soft:rgba(140,183,255,.12)}
body.fm27-midnight.fm27-world-page{--fm-domain-accent:#b8a0ff;--fm-domain-accent-soft:rgba(184,160,255,.12)}
/* Page identity. The H1 remains the exact original Twig page_title. */
body.fm27-midnight .fm27-domain-page-header{
 position:relative;overflow:hidden;isolation:isolate;
 background:linear-gradient(110deg,#202b46 0%,#1a2540 60%,#252341 100%);
 border:1px solid var(--fm-domain-border);border-radius:17px;
 padding:1.35rem 1.55rem!important;margin:0 0 1.35rem!important;
 box-shadow:0 12px 34px rgba(5,10,24,.12);
}
body.fm27-midnight .fm27-domain-page-header:after{
 content:'';position:absolute;right:-75px;top:-120px;width:310px;height:310px;
 background:radial-gradient(circle,var(--fm-domain-accent-soft),transparent 67%);
 pointer-events:none;z-index:-1;
}
body.fm27-midnight .fm27-domain-page-header .fm27-domain-kicker{
 display:inline-flex;align-items:center;gap:.42rem;color:var(--fm-domain-accent);
 font-size:.69rem;font-weight:800;line-height:1.5;letter-spacing:.11em;text-transform:uppercase;margin-bottom:.45rem;
}
body.fm27-midnight .fm27-domain-page-header .fm27-domain-kicker .bi{font-size:.95rem}
body.fm27-midnight .fm27-domain-page-header h1{
 margin:0!important;font-size:clamp(1.45rem,2.2vw,2rem)!important;
 line-height:1.25;letter-spacing:-.035em;color:#f4f4ff!important;font-weight:780;
 overflow-wrap:anywhere;
}
body.fm27-midnight .fm27-domain-page-header .fm27-domain-subtitle{
 margin:.55rem 0 0;color:#bfcae1;line-height:1.55;font-size:.9rem;max-width:78ch;
}
/* Cohesive section content without replacing individual Twig views. */
body.fm27-midnight:is(.fm27-matchday-page,.fm27-club-page,.fm27-world-page) #pagecontent{
 min-width:0;
}
body.fm27-midnight:is(.fm27-matchday-page,.fm27-club-page,.fm27-world-page) #pagecontent h2,
body.fm27-midnight:is(.fm27-matchday-page,.fm27-club-page,.fm27-world-page) #pagecontent h3{
 letter-spacing:-.02em;color:#eff0ff;font-weight:760;
}
body.fm27-midnight:is(.fm27-matchday-page,.fm27-club-page,.fm27-world-page) #pagecontent hr{
 border-color:#3c4a65;opacity:1;
}
/* Tables: do not alter cells, sorting, event handlers or paginator logic. */
body.fm27-midnight:is(.fm27-matchday-page,.fm27-club-page,.fm27-world-page) #pagecontent .table{
 width:100%;border-color:#394861;margin-bottom:1rem;
}
body.fm27-midnight:is(.fm27-matchday-page,.fm27-club-page,.fm27-world-page) #pagecontent .table thead th{
 color:#b6c5e0;background:#1c2941;letter-spacing:.025em;
 font-size:.79rem;font-weight:760;border-color:#44516c;
 padding:.8rem .75rem;vertical-align:middle;
}
body.fm27-midnight:is(.fm27-matchday-page,.fm27-club-page,.fm27-world-page) #pagecontent .table tbody td{
 padding:.72rem .75rem;border-color:#35435d;vertical-align:middle;color:#e3eafd;
}
body.fm27-midnight:is(.fm27-matchday-page,.fm27-club-page,.fm27-world-page) #pagecontent .table tbody tr:hover>td{
 background-color:#283550;
}
body.fm27-midnight:is(.fm27-matchday-page,.fm27-club-page,.fm27-world-page) #pagecontent .table td a:not(.btn){font-weight:650}
/* Classic OWS tabs are sometimes AJAX loaded. Keep hooks and Bootstrap semantics. */
body.fm27-midnight:is(.fm27-matchday-page,.fm27-club-page,.fm27-world-page) #pagecontent .nav-tabs{
 display:flex;gap:.3rem;flex-wrap:nowrap;max-width:100%;overflow-x:auto;overflow-y:hidden;
 scrollbar-width:thin;border-bottom:1px solid #43516b;margin-bottom:.35rem;
}
body.fm27-midnight:is(.fm27-matchday-page,.fm27-club-page,.fm27-world-page) #pagecontent .nav-tabs .nav-link{
 border:0;border-bottom:2px solid transparent;border-radius:8px 8px 0 0;
 white-space:nowrap;color:#b7c4df;padding:.65rem .85rem;font-weight:650;
}
body.fm27-midnight:is(.fm27-matchday-page,.fm27-club-page,.fm27-world-page) #pagecontent .nav-tabs .nav-link:hover{
 background:#283454;color:#f5f2ff;
}
body.fm27-midnight:is(.fm27-matchday-page,.fm27-club-page,.fm27-world-page) #pagecontent .nav-tabs .nav-link.active{
 color:#f7f5ff!important;border-bottom-color:var(--fm-domain-accent);
 background:var(--fm-domain-accent-soft);
}
/* Accordion structure: preserve all Bootstrap collapse data attributes. */
body.fm27-midnight:is(.fm27-matchday-page,.fm27-club-page,.fm27-world-page) #pagecontent .accordion-item{
 background:#1c273c;border:1px solid #394762;overflow:hidden;
}
body.fm27-midnight:is(.fm27-matchday-page,.fm27-club-page,.fm27-world-page) #pagecontent .accordion-item+.accordion-item{border-top:0}
body.fm27-midnight:is(.fm27-matchday-page,.fm27-club-page,.fm27-world-page) #pagecontent .accordion-button{
 background:#202c45;color:#e9edfa;font-weight:680;
}
body.fm27-midnight:is(.fm27-matchday-page,.fm27-club-page,.fm27-world-page) #pagecontent .accordion-button:not(.collapsed){
 background:#302c53;color:#fff;box-shadow:inset 0 -1px #544879;
}
body.fm27-midnight:is(.fm27-matchday-page,.fm27-club-page,.fm27-world-page) #pagecontent .accordion-body{
 background:#19243a;color:#d8e0f2;
}
/* Inputs, dates, ranges & pagination remain the original functional controls. */
body.fm27-midnight:is(.fm27-matchday-page,.fm27-club-page,.fm27-world-page) #pagecontent :is(.form-control,.form-select){
 background-color:#141d30;border-color:#43516a;color:#edf2ff;border-radius:9px;
}
body.fm27-midnight:is(.fm27-matchday-page,.fm27-club-page,.fm27-world-page) #pagecontent :is(.form-control,.form-select):focus{
 border-color:var(--fm-domain-accent);box-shadow:0 0 0 .18rem var(--fm-domain-accent-soft);
}
body.fm27-midnight:is(.fm27-matchday-page,.fm27-club-page,.fm27-world-page) #pagecontent .pagination .page-link{
 border-color:#465373;background:#1e2942;color:#c8baff;
}
body.fm27-midnight:is(.fm27-matchday-page,.fm27-club-page,.fm27-world-page) #pagecontent .pagination .active .page-link{
 color:#fff;border-color:#8f6bdf;background:#5d47a4;
}
/* MATCHDAY: result and live-score cards. Keep existing simulation controls. */
body.fm27-matchday-page #report_result{
 background:linear-gradient(135deg,#1b2a47,#1b2039);
 border:1px solid #4a5377;border-radius:16px;padding:1.35rem 1rem;
 margin:.75rem 0 1.3rem;text-align:center;
}
body.fm27-matchday-page #report_result :is(#report_goals_home,#report_goals_guest){
 font-size:clamp(1.7rem,3.1vw,2.75rem);font-weight:820;line-height:1.3;color:#f1efff;
 font-variant-numeric:tabular-nums;
}
body.fm27-matchday-page #report_result #report_goals_separator{color:#ae9be5;opacity:.85}
body.fm27-matchday-page #report_result img.ws-match-img-120{
 max-height:94px;max-width:94px;object-fit:contain;vertical-align:middle;
}
body.fm27-matchday-page #report_result .ws-match-goals-row{
 padding:1rem .6rem 0;margin-top:1rem;border-top:1px solid #3e4a69;color:#ced8ef;
}
body.fm27-matchday-page #reporttable :is(td,th){vertical-align:top}
body.fm27-matchday-page #reporttable .report_minute{color:#ccb8ff;font-weight:780;font-variant-numeric:tabular-nums}
body.fm27-matchday-page #matchReportRefresh{display:inline-flex;align-items:center;gap:.3rem}
body.fm27-matchday-page .ws-match-img-120{object-fit:contain}
body.fm27-matchday-page .ws-match-goals-row .fw-bold{font-weight:670!important}
/* CLUB: data has financial meaning; never change or recolor amount values incorrectly. */
body.fm27-club-page #budgetHeading{
 display:flex;flex-wrap:wrap;align-items:baseline;gap:.55rem;
 background:linear-gradient(120deg,#232f4a,#252344);
 border:1px solid #475475;border-radius:14px;
 padding:1.25rem 1.35rem;margin-bottom:1.3rem;
 color:#efeaff!important;font-size:clamp(1.25rem,2vw,1.8rem)!important;
 font-variant-numeric:tabular-nums;
}
body.fm27-club-page #accountStatementTable td:last-child{
 font-variant-numeric:tabular-nums;text-align:right;white-space:nowrap;font-weight:710;
}
body.fm27-club-page #accountStatementTable th:last-child{text-align:right}
body.fm27-club-page #accountStatementTable .text-danger{color:#ff91a3!important}
body.fm27-club-page #stadiumUpgradesTable,
body.fm27-club-page #existingBuildingsTable{border:1px solid #45516b;border-radius:10px;}
body.fm27-club-page .ws-stadium-canvas{max-width:100%;border-radius:14px;overflow:hidden}
body.fm27-club-page #ticketsForm,
body.fm27-club-page #pagecontent form:has(.form-select){min-width:0}
body.fm27-club-page #pagecontent .card{
 background:#1c2840;border:1px solid #43516f;border-radius:13px;color:#edf0ff;
}
/* WORLD: standings, league cards, national/world tables. */
body.fm27-world-page #pagecontent .ws-logo-max-120,
body.fm27-world-page #pagecontent .ws-logo-max-40{object-fit:contain}
body.fm27-world-page #pagecontent .nav-tabs+.tab-content{padding-top:1rem}
body.fm27-world-page #pagecontent .table tbody td:first-child strong{
 color:#d9c9ff;font-variant-numeric:tabular-nums;
}
body.fm27-world-page #pagecontent :is(.ws-league-table,.league-table) td:first-child{
 font-variant-numeric:tabular-nums;font-weight:750;
}
body.fm27-world-page #pagecontent .card{
 background:#1d2942;border:1px solid #455373;border-radius:14px;color:#f0f4fe;
}
/* Universal screenreader/focus; never hide controls on small screens. */
body.fm27-midnight:is(.fm27-matchday-page,.fm27-club-page,.fm27-world-page) #pagecontent :is(a,button,input,select,textarea):focus-visible{
 outline:2px solid #cdb9ff;outline-offset:2px;
}
@media(max-width:768px){
 body.fm27-midnight .fm27-domain-page-header{padding:1.1rem 1.15rem!important;border-radius:13px}
 body.fm27-midnight .fm27-domain-page-header .fm27-domain-subtitle{font-size:.85rem}
 body.fm27-matchday-page #report_result{padding:1rem .5rem}
 body.fm27-matchday-page #report_result img.ws-match-img-120{max-width:62px;max-height:62px}
 body.fm27-club-page #accountStatementTable{min-width:580px}
 body.fm27-club-page #accountStatementTable{display:block;max-width:100%;overflow-x:auto}
 body.fm27-midnight:is(.fm27-matchday-page,.fm27-club-page,.fm27-world-page) #pagecontent .nav-tabs{scrollbar-width:thin}
}
@media(prefers-reduced-motion:reduce){
 body.fm27-midnight:is(.fm27-matchday-page,.fm27-club-page,.fm27-world-page) #pagecontent *{scroll-behavior:auto!important}
}
