/* FM27 V10.85.11 – live overview and manager position pitch. Additive; no game logic. */
.fm27-p2-match .fm27-v8511-report-toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 16px;padding:10px 14px;border:1px solid #354869;border-radius:13px;background:linear-gradient(110deg,#192943,#142238);margin:16px 0 4px}
.fm27-p2-match .fm27-v8511-report-toolbar .fm27-p2-report-tabs{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin:0;border:0}
.fm27-p2-match .fm27-v8511-report-toolbar .nav-link{display:flex;align-items:center;gap:8px;border:0;border-radius:9px 9px 5px 5px;background:transparent;color:#c2d2ec;padding:10px 16px;font-weight:750;box-shadow:inset 0 -3px transparent}
.fm27-p2-match .fm27-v8511-report-toolbar .nav-link.active{background:rgba(128,101,255,.16);box-shadow:inset 0 -3px #a38aff;color:#fff}
.fm27-p2-match .fm27-v8511-report-toolbar .nav-link:hover:not(.active){background:#223755;color:#fff}
.fm27-v8511-report-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px}
.fm27-v8511-report-actions .btn{margin:0;white-space:nowrap;font-weight:700}
.fm27-v8511-goal-summary{padding:15px 17px;margin:0 0 16px;border:1px solid #35476c;border-radius:13px;background:linear-gradient(165deg,#182640,#111d32);color:#eaf2ff}
.fm27-v8511-goal-summary-title{color:#c4b5ff;font-size:.82rem;font-weight:800;text-transform:uppercase;letter-spacing:.06em;margin-bottom:9px;display:flex;align-items:center;gap:8px}
.fm27-v8511-goal-headings{display:grid;grid-template-columns:minmax(0,1fr) 96px minmax(0,1fr);gap:8px;align-items:center;padding:5px 5px 10px;border-bottom:1px solid #344662;color:#b5c7df;font-size:.81rem;font-weight:750}
.fm27-v8511-goal-headings span:nth-child(2){text-align:center;font-size:.72rem;color:#91a4c3}
.fm27-v8511-goal-headings span:last-child{text-align:right}
.fm27-v8511-goal-events{display:flex;flex-direction:column;gap:0}
.fm27-v8511-goal-event{display:grid;grid-template-columns:minmax(0,1fr) 96px minmax(0,1fr);gap:8px;align-items:center;padding:8px 5px;border-bottom:1px solid #283d58;font-size:.87rem}
.fm27-v8511-goal-event:last-child{border-bottom:0}
.fm27-v8511-goal-side{display:flex;gap:8px;align-items:center;min-width:0;font-weight:700;overflow-wrap:anywhere}
.fm27-v8511-goal-side i{flex:none;font-size:.48rem;color:#aa91ff}
.fm27-v8511-goal-side small{font-weight:650;color:#91a9c7;white-space:nowrap}
.fm27-v8511-goal-guest{justify-content:flex-end;text-align:right}
.fm27-v8511-goal-score{width:100%;text-align:center;padding:5px 8px;border:1px solid #516585;border-radius:7px;background:#0c172a;font-weight:850;white-space:nowrap;font-variant-numeric:tabular-nums;letter-spacing:.05em}
/* manager-only live pitch: native player position controls still submit to existing PHP action */
.fm27-v8511-pitch-shell{position:relative;width:min(100%,730px);margin:0 auto 8px}
.fm27-v8511-pitch-help{color:#a9c4d7;font-size:.78rem;margin:3px 2px 9px}
.fm27-v8511-pitch{position:relative;width:100%;height:435px;border-radius:14px;border:2px solid #466c71;overflow:hidden;background:repeating-linear-gradient(0deg,rgba(198,255,226,.045) 0,rgba(198,255,226,.045) 48px,transparent 48px,transparent 96px),linear-gradient(155deg,#185149,#0f353b 65%,#0d2533)}
.fm27-v8511-field-lines{position:absolute;inset:13px;border:1px solid rgba(199,248,221,.48);pointer-events:none}
.fm27-v8511-field-lines:after{content:"";position:absolute;top:50%;left:0;right:0;border-top:1px solid rgba(199,248,221,.48)}
.fm27-v8511-field-circle{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:96px;height:96px;border:1px solid rgba(199,248,221,.42);border-radius:50%;pointer-events:none}
.fm27-v8511-field-box{position:absolute;bottom:13px;left:29%;right:29%;height:49px;border:1px solid rgba(199,248,221,.48);border-bottom:0;pointer-events:none}
.fm27-v8511-player{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:91px;min-height:60px;border:1px solid rgba(167,211,219,.55);border-radius:10px;background:linear-gradient(165deg,rgba(22,38,65,.94),rgba(18,29,52,.94));color:#f7fbff;box-shadow:0 3px 12px #001b2980;padding:4px 5px;z-index:2;display:flex;flex-direction:column;gap:2px;align-items:stretch;justify-content:center;cursor:pointer;transition:left .26s ease,top .26s ease,border-color .14s,background .14s}
.fm27-v8511-player:hover,.fm27-v8511-player:focus-visible,.fm27-v8511-player.is-selected{border-color:#bd9dff;background:#28365b;z-index:6;outline:0;box-shadow:0 0 0 2px rgba(178,150,255,.38),0 7px 18px #001322aa}
.fm27-v8511-player-top{display:flex;align-items:center;justify-content:space-between;gap:3px;height:34px}
.fm27-v8511-player-top img{width:30px;height:33px;min-width:30px;border-radius:6px;object-fit:cover;object-position:center top;background:#d5e3ee}
.fm27-v8511-player-position{font-size:.72rem;font-weight:850;color:#ace7dd}
.fm27-v8511-player-grade{font-size:.66rem;font-weight:800;border:1px solid #48677d;border-radius:20px;padding:2px 4px;background:#0b1726;color:#fff}
.fm27-v8511-player-name{display:block;text-align:center;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:750;font-size:.7rem;line-height:1.1}
.fm27-v8511-position-choice{position:absolute;z-index:12;right:12px;top:44px;width:min(260px,80%);padding:12px;background:#152541;border:1px solid #8b75ee;border-radius:11px;box-shadow:0 13px 40px #030c18db;color:#e7f1ff}
.fm27-v8511-position-choice[hidden]{display:none!important}
.fm27-v8511-position-choice-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:9px}
.fm27-v8511-position-choice-head strong{font-size:.86rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fm27-v8511-position-choice-head button{color:#c0cbe0;background:transparent;border:0;padding:4px}
.fm27-v8511-position-choice label{display:block;font-size:.76rem;margin-bottom:5px;color:#c9d8ec;font-weight:700}
.fm27-v8511-position-choice small{display:block;font-size:.69rem;color:#9babc7;margin-top:8px}
.fm27-v8511-native-positions{position:absolute!important;width:1px!important;height:1px!important;clip-path:inset(100%);overflow:hidden!important;pointer-events:none!important;white-space:nowrap}
/* Keep visible native controls if scripts fail. */
.fm27-v8511-pitch-shell:not(.is-ready) + .fm27-v8511-native-positions{position:static!important;width:auto!important;height:auto!important;clip-path:none;overflow:visible!important;pointer-events:auto!important;white-space:normal}
.fm27-v8511-pitch-shell:not(.is-ready) + .fm27-v8511-native-positions .fm27-v8511-native-row{display:flex;gap:8px;margin:6px 0}
@media(max-width:690px){.fm27-p2-match .fm27-v8511-report-toolbar{padding:9px}.fm27-v8511-report-actions{width:100%;justify-content:stretch}.fm27-v8511-report-actions .btn{flex:1}.fm27-p2-match .fm27-v8511-report-toolbar .nav-link{padding:8px 10px;font-size:.8rem}.fm27-v8511-goal-headings,.fm27-v8511-goal-event{grid-template-columns:minmax(0,1fr) 67px minmax(0,1fr);gap:5px;font-size:.75rem}.fm27-v8511-goal-summary{padding:12px}.fm27-v8511-player{width:72px;padding:3px;min-height:55px}.fm27-v8511-player-top img{height:27px;width:24px;min-width:24px}.fm27-v8511-player-name{font-size:.59rem}.fm27-v8511-pitch{height:385px}.fm27-v8511-player-grade{font-size:.58rem}.fm27-v8511-position-choice{right:5px;top:32px}}
@media(prefers-reduced-motion:reduce){.fm27-v8511-player{transition:none}}

/* V10.85.12 refinements: flatter live panel, goal flow rows, and save feedback. */
.fm27-v8512-live-panel{margin:16px 0 0;border:1px solid #334766;border-radius:14px;background:linear-gradient(180deg,#16233a,#121d31 62%,#10192b);overflow:hidden}
.fm27-p2-match .fm27-v8511-report-toolbar{margin:0;padding:0 18px;min-height:60px;border:0;border-radius:0;background:transparent;border-bottom:1px solid #31445f}
.fm27-p2-match .fm27-v8511-report-toolbar .fm27-p2-report-tabs{gap:0}
.fm27-p2-match .fm27-v8511-report-toolbar .nav-item{margin:0}
.fm27-p2-match .fm27-v8511-report-toolbar .nav-link{padding:16px 14px;border-radius:0;background:transparent;box-shadow:none;border-bottom:3px solid transparent}
.fm27-p2-match .fm27-v8511-report-toolbar .nav-link.active{background:transparent;box-shadow:none;border-bottom-color:#a38aff;color:#fff}
.fm27-p2-match .fm27-v8511-report-toolbar .nav-link:hover:not(.active){background:rgba(255,255,255,.03)}
.fm27-v8512-live-tab-content{padding:0}
.fm27-v8512-goal-flow{padding:2px 18px 0;margin:0;border-bottom:1px solid #2c3f5b}
.fm27-v8512-goal-row{display:grid;grid-template-columns:minmax(0,1fr) 72px minmax(0,1fr);gap:14px;align-items:center;padding:8px 0;border-bottom:1px solid rgba(70,95,129,.45)}
.fm27-v8512-goal-row:last-child{border-bottom:0}
.fm27-v8512-goal-home,.fm27-v8512-goal-guest{display:flex;align-items:baseline;gap:10px;font-size:.96rem;font-weight:760;color:#eef5ff;min-width:0}
.fm27-v8512-goal-home{justify-content:flex-end;text-align:right;padding-right:8px}
.fm27-v8512-goal-guest{justify-content:flex-start;text-align:left;padding-left:8px}
.fm27-v8512-goal-home span,.fm27-v8512-goal-guest span{overflow-wrap:anywhere}
.fm27-v8512-goal-home small,.fm27-v8512-goal-guest small{font-size:.88rem;color:#78b9ff;font-weight:780;white-space:nowrap}
.fm27-v8512-goal-score{justify-self:center;min-width:72px;text-align:center;padding:4px 8px;border-radius:5px;background:#050b14;border:1px solid #25354b;color:#fff;font-weight:850;letter-spacing:.04em}
.fm27-v8512-report-grid{padding:14px 18px 18px;align-items:start}
.fm27-v8512-commentary{padding-right:14px;border-right:1px solid #30425d}
.fm27-v8512-statistics{padding-left:18px}
.fm27-v8512-commentary h3{display:none}
.fm27-v8512-statistics h3{margin-top:0;font-size:1.22rem;letter-spacing:.02em}
.fm27-v8512-live-save-status{min-height:24px;margin:8px 8px 0;padding:0 8px;color:#b9cae3;font-size:.84rem;font-weight:700}
.fm27-v8512-live-save-status.is-dirty{color:#f2d07d}
.fm27-v8512-live-save-status.is-saving{color:#8dcfff}
.fm27-v8512-live-save-status.is-success{color:#91e0b2}
.fm27-v8512-live-save-status.is-error{color:#ff9a9a}
.fm27-r8314-live-actions [data-live-save-button].is-saving{pointer-events:none;opacity:.82}
@media(max-width:900px){.fm27-v8512-report-grid{padding:12px 12px 16px}.fm27-v8512-commentary{padding-right:0;border-right:0;border-bottom:1px solid #30425d;padding-bottom:12px;margin-bottom:12px}.fm27-v8512-statistics{padding-left:0}.fm27-v8512-goal-flow{padding:2px 12px 0}}
@media(max-width:690px){.fm27-p2-match .fm27-v8511-report-toolbar{padding:0 10px 10px}.fm27-p2-match .fm27-v8511-report-toolbar .nav-link{padding:12px 10px}.fm27-v8512-goal-row{grid-template-columns:minmax(0,1fr) 62px minmax(0,1fr);gap:8px;padding:7px 0}.fm27-v8512-goal-home,.fm27-v8512-goal-guest{font-size:.8rem;gap:6px}.fm27-v8512-goal-home small,.fm27-v8512-goal-guest small{font-size:.73rem}}

/* FM27 V10.85.14 - controlled hybrid of accepted V10.85.12 and rejected V10.85.13.
   Only match-details live tabs are targeted; no form, match or simulation logic is changed. */

/* Two softly delimited surfaces, rather than either heavily nested cards or no cards. */
body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel .fm27-v8512-report-grid {
  gap:12px;
  padding:12px 15px 17px;
}
body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel .fm27-v8512-report-grid > section {
  min-width:0;
  background:linear-gradient(180deg,rgba(29,46,74,.78),rgba(19,33,56,.77));
  border:1px solid rgba(100,126,164,.28);
  border-radius:11px;
  box-shadow:none;
  padding:13px 14px;
}
body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel .fm27-v8512-report-grid > .fm27-v8512-commentary {
  padding-right:14px;
  border-right:1px solid rgba(100,126,164,.28);
  border-bottom:1px solid rgba(100,126,164,.28);
}
body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel .fm27-v8512-report-grid > .fm27-v8512-statistics {
  padding-left:14px;
}
/* Keep the ticker chronology, icons and scroll, but tone down legacy per-event card treatment. */
body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel #reporttable.fm27-r83-live-ticker {
  width:100%;
  border-collapse:collapse;
  border-spacing:0;
}
body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel #reporttable.fm27-r83-live-ticker td {
  background:transparent;
  border:0;
  border-bottom:1px solid rgba(117,143,176,.20);
  border-radius:0;
  box-shadow:none;
  padding:10px 7px;
  vertical-align:top;
}
body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel #reporttable.fm27-r83-live-ticker tbody tr:nth-child(odd) {
  background:rgba(75,96,130,.075);
}
body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel #reporttable.fm27-r83-live-ticker tbody tr:last-child td {
  border-bottom:0;
}
/* Statistics keep their useful grouped structure, but soften the bulky sub-panels. */
body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel .fm27-v8512-statistics .fm27-p2-stats-top {
  box-shadow:none;
  border-color:rgba(102,128,164,.24);
  background:rgba(11,24,43,.30);
}
body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel .fm27-v8512-statistics .fm27-p2-stat-row {
  border-bottom-color:rgba(102,128,164,.16);
}
/* Compact goal progression - scorer names remain aligned toward the center. */
body.fm27-midnight .fm27-p2-match .fm27-v8512-goal-flow {
  padding:3px 15px 5px;
}
body.fm27-midnight .fm27-p2-match .fm27-v8512-goal-row {
  width:100%;
  max-width:910px;
  margin-inline:auto;
  grid-template-columns:minmax(0,1fr) 66px minmax(0,1fr);
  gap:9px;
  padding:4px 0;
  border-bottom-color:rgba(86,112,150,.32);
}
body.fm27-midnight .fm27-p2-match .fm27-v8512-goal-home,
body.fm27-midnight .fm27-p2-match .fm27-v8512-goal-guest {
  font-size:.89rem;
  gap:7px;
}
body.fm27-midnight .fm27-p2-match .fm27-v8512-goal-home {padding-right:3px}
body.fm27-midnight .fm27-p2-match .fm27-v8512-goal-guest {padding-left:3px}
body.fm27-midnight .fm27-p2-match .fm27-v8512-goal-home small,
body.fm27-midnight .fm27-p2-match .fm27-v8512-goal-guest small {font-size:.8rem}
body.fm27-midnight .fm27-p2-match .fm27-v8512-goal-score {
  min-width:66px;
  padding:2px 6px;
  border-color:rgba(98,124,166,.32);
}
/* Live -> Aufstellung only. Increase swaps + reservebank share from ~32% to ~39%.
   Do not affect manager formation page or the compact pitch inside Eingreifen. */
body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel #players .fm27-r833-grid {
  grid-template-columns:minmax(0,1.57fr) minmax(350px,1fr) !important;
  gap:14px;
}
@media (max-width:980px) {
  body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel #players .fm27-r833-grid {
    grid-template-columns:minmax(0,1fr) !important;
  }
}
@media (max-width:900px) {
  body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel .fm27-v8512-report-grid {
    gap:10px;padding:10px;
  }
  body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel .fm27-v8512-report-grid > section {
    min-height:0;
    padding:12px;
  }
  body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel .fm27-v8512-report-grid > .fm27-v8512-commentary {
    border-right:1px solid rgba(100,126,164,.28);
    border-bottom:1px solid rgba(100,126,164,.28);
    padding-right:12px;
  }
  body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel .fm27-v8512-report-grid > .fm27-v8512-statistics {
    padding-left:12px;
  }
}
@media (max-width:690px) {
  body.fm27-midnight .fm27-p2-match .fm27-v8512-goal-flow {padding:3px 10px 5px}
  body.fm27-midnight .fm27-p2-match .fm27-v8512-goal-row {grid-template-columns:minmax(0,1fr) 58px minmax(0,1fr);gap:6px;padding:4px 0}
  body.fm27-midnight .fm27-p2-match .fm27-v8512-goal-home,
  body.fm27-midnight .fm27-p2-match .fm27-v8512-goal-guest {font-size:.77rem;gap:4px}
  body.fm27-midnight .fm27-p2-match .fm27-v8512-goal-score {min-width:58px}
}
/* Legacy OWS used !important on the old event-card caps; neutralize these only
   inside the two softly framed V10.85.14 sections. */
body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel #reporttable.fm27-r83-live-ticker {
  border-collapse:collapse!important;
  border-spacing:0!important;
}
body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel #reporttable.fm27-r83-live-ticker td:first-child,
body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel #reporttable.fm27-r83-live-ticker td:last-child {
  background:transparent!important;
  border-left:0!important;
  border-radius:0!important;
}

/* V10.85.22 – Aufstellung 70/30 (desktop), compact minute-first goals. */
body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel #players .fm27-r833-grid {
  grid-template-columns:minmax(0,7fr) minmax(260px,3fr)!important;
}
body.fm27-midnight .fm27-p2-match .fm27-v8512-goal-flow {padding:1px 10px 3px;border-bottom-color:rgba(86,112,150,.23)}
body.fm27-midnight .fm27-p2-match .fm27-v8512-goal-row {
  grid-template-columns:minmax(0,1fr) 54px minmax(0,1fr);
  gap:6px;max-width:900px;padding:2px 0;min-height:23px;
  border:0!important;background:none;box-shadow:none;
}
body.fm27-midnight .fm27-p2-match .fm27-v8512-goal-home,
body.fm27-midnight .fm27-p2-match .fm27-v8512-goal-guest {font-size:.74rem;line-height:1.15;gap:5px;font-weight:650}
body.fm27-midnight .fm27-p2-match .fm27-v8512-goal-home small,
body.fm27-midnight .fm27-p2-match .fm27-v8512-goal-guest small {font-size:.69rem}
body.fm27-midnight .fm27-p2-match .fm27-v8512-goal-score {
  min-width:54px;font-size:.76rem;line-height:1.2;padding:2px 4px;border-radius:2px;
}
body.fm27-midnight .fm27-p2-match .fm27-v8522-half-time {
  display:flex;align-items:center;justify-content:center;gap:9px;
  width:min(100%,900px);margin:4px auto 3px;color:#b2c1d5;font-size:.64rem;letter-spacing:.04em;
}
body.fm27-midnight .fm27-p2-match .fm27-v8522-half-time:before,
body.fm27-midnight .fm27-p2-match .fm27-v8522-half-time:after {
  content:"";height:1px;flex:1;background:rgba(124,150,183,.32);
}
@media(max-width:980px){
  body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel #players .fm27-r833-grid{grid-template-columns:minmax(0,1fr)!important}
}
@media(max-width:690px){
  body.fm27-midnight .fm27-p2-match .fm27-v8512-goal-row{grid-template-columns:minmax(0,1fr) 49px minmax(0,1fr);gap:4px;min-height:21px}
  body.fm27-midnight .fm27-p2-match .fm27-v8512-goal-home,
  body.fm27-midnight .fm27-p2-match .fm27-v8512-goal-guest{font-size:.68rem}
  body.fm27-midnight .fm27-p2-match .fm27-v8512-goal-score{min-width:49px;font-size:.72rem}
}

/* V10.85.23: top tabs belong to the single enclosing panel; no second underline. */
body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel .fm27-v8511-report-toolbar {border-bottom:0!important;}
body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel .fm27-p2-report-tabs,
body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel .fm27-p2-report-tabs .nav-link {border-top:0!important;border-left:0!important;border-right:0!important;}
body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel .fm27-p2-report-tabs .nav-link:not(.active){border-bottom-color:transparent!important;}
/* Slight breathing room between goal scorers and the commentary/statistics columns. */
body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel .fm27-v8512-report-grid {padding-top:20px!important;}

body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel .fm27-p2-report-tabs.nav-tabs{border-bottom:0!important;}
body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel .fm27-p2-report-tabs .nav-link.active{border-bottom:0!important;background:rgba(116,95,174,.20)!important;border-radius:8px!important;}

/* FM27 V10.85.24 – visual refinements only; no live-action logic changed. */
/* Remove only the line under the goal list. Keep its existing bottom padding
   and the gap to the ticker/statistics surfaces completely unchanged. */
body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel .fm27-v8512-goal-flow {
  border-bottom:0!important;
}
/* FM27 V10.85.25 – make the top tabs behave like a flat header navigation:
   slightly lower header, no filled active pill, underline on hover/active. */
body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel .fm27-v8511-report-toolbar {
  align-items:center;
  min-height:52px;
  padding:0 16px;
}
body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel .fm27-p2-report-tabs {
  align-self:stretch;
  align-items:stretch;
  min-height:52px;
  margin-bottom:0;
  padding-left:0;
}
body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel .fm27-p2-report-tabs .nav-item {
  display:flex;
  align-items:stretch;
  margin-bottom:0;
}
body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel .fm27-p2-report-tabs .nav-link {
  display:flex;
  align-items:center;
  height:100%;
  padding:0 14px;
  box-shadow:none!important;
  border-radius:0!important;
  border-bottom:3px solid transparent!important;
  background:transparent!important;
  color:#d6e4f8;
}
body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel .fm27-p2-report-tabs .nav-link:hover,
body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel .fm27-p2-report-tabs .nav-link:focus {
  background:transparent!important;
  border-bottom-color:transparent!important;
  color:#fff;
}
body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel .fm27-p2-report-tabs .nav-link.active {
  background:transparent!important;
  border-bottom-color:transparent!important;
  color:#fff;
}
body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel .fm27-v8511-report-actions .btn {
  padding:.34rem .78rem;
  font-size:.92rem;
}
/* Keep a single, real Save/Cancel pair above all three panes. It remains
   inside #formationForm so native submit, CSRF and existing JS hooks survive. */
.fm27-r8315-live-controls .fm27-r8315-live-main {position:relative;}
.fm27-r8315-live-controls .fm27-v8524-title-actions {
  position:absolute;
  z-index:5;
  top:8px;
  right:13px;
  margin:0;
  white-space:nowrap;
  align-items:center;
}
.fm27-r8315-live-controls .fm27-r8315-live-main .fm27-r8315-pane-head {
  min-height:46px;
  padding-right:195px;
  align-items:center;
}
@media(max-width:700px) {
  body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel .fm27-p2-report-tabs {min-height:44px;}
  body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel .fm27-p2-report-tabs .nav-link {padding:0 9px;}
  .fm27-r8315-live-controls .fm27-v8524-title-actions {
    position:static;
    padding:0 0 10px!important;
    flex-wrap:wrap;
  }
  .fm27-r8315-live-controls .fm27-r8315-live-main .fm27-r8315-pane-head {
    min-height:0;
    padding-right:0;
  }
}

/* V10.85.25a: visible selected-tab underline, closer to the text.
   Pseudo-element avoids older border-bottom:0 overrides. UI only. */
body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel .fm27-p2-report-tabs .nav-link {
  position:relative;
}
body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel .fm27-p2-report-tabs .nav-link::after {
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:8px;
  height:2px;
  border-radius:2px;
  background:#a38aff;
  opacity:0;
  pointer-events:none;
  transition:opacity .12s ease;
}
body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel .fm27-p2-report-tabs .nav-link:hover::after,
body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel .fm27-p2-report-tabs .nav-link:focus-visible::after {
  opacity:1;
}
body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel .fm27-p2-report-tabs .nav-link.active::after,
body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel .fm27-p2-report-tabs .nav-link[aria-selected="true"]::after {
  opacity:1;
}
@media(max-width:700px) {
  body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel .fm27-p2-report-tabs .nav-link::after {
    left:0;
    right:0;
    bottom:6px;
  }
}
@media(prefers-reduced-motion:reduce) {
  body.fm27-midnight .fm27-p2-match .fm27-v8512-live-panel .fm27-p2-report-tabs .nav-link::after {
    transition:none;
  }
}
