/* Think Fluent v113 · Refined design system drawn from original Think Fluent artwork.
   These are presentation overrides; booking, contract and student score functions remain intact. */
:root {
  --tf113-ink:#102b4e; --tf113-muted:#506987; --tf113-paper:#f6f9ff;
  --tf113-field:#f4f8fe; --tf113-focus:#2275ba; --tf113-red:#ea172b;
  --tf113-stroke:#d7e2f1; --tf113-surface:#fff; --tf113-soft:#f0f5fc;
  --tf113-depth:0 12px 32px rgba(8,40,81,.065),0 1px 1px rgba(12,56,110,.04);
  --tf-surface-top:#fff; --tf-surface-bottom:#f8faff;
  --tf-surface-border:#d7e3f1; --tf-surface-shadow:var(--tf113-depth);
  --panel:#fff; --ink:#102b4e; --muted:#536c87; --line:#d8e4f2;
}
html[data-theme="dark"]{
  --tf113-ink:#f5f8fe; --tf113-muted:#c1d0e4; --tf113-paper:#081529;
  --tf113-field:#152741; --tf113-focus:#8acbff; --tf113-red:#fa344b;
  --tf113-stroke:#334863; --tf113-surface:#14253d; --tf113-soft:#1a304b;
  --tf113-depth:0 18px 40px rgba(1,9,24,.26),0 1px 0 rgba(225,240,255,.025) inset;
  --tf-surface-top:#20334d; --tf-surface-bottom:#172940;
  --tf-surface-border:#37516c; --tf-surface-shadow:var(--tf113-depth);
  --panel:#182b44; --ink:#f5f8ff; --muted:#bbcee1; --line:#3a526e;
}
/* Less busy than the old repeated wallpaper: brand-inspired ambient illumination,
   subtle line texture and navy/red accents. The background never obstructs text. */
body{
  background-color:#f5f8fd!important;
  background-image:
    radial-gradient(ellipse 52% 35% at 95% 5%,rgba(75,132,218,.13),transparent 86%),
    radial-gradient(ellipse 55% 42% at 2% 100%,rgba(32,103,188,.075),transparent 81%),
    radial-gradient(circle,rgba(36,103,183,.095) .7px,transparent .9px),
    linear-gradient(160deg,#fbfdff,#f1f6fe 84%)!important;
  background-size:auto,auto,24px 24px,auto!important;
  background-attachment:fixed!important;
  color:var(--tf113-ink);
}
html[data-theme="dark"] body{
  background-color:#0a1729!important;
  background-image:
    radial-gradient(ellipse 51% 40% at 96% 5%,rgba(35,84,151,.22),transparent 83%),
    radial-gradient(ellipse 46% 36% at 2% 95%,rgba(215,28,55,.075),transparent 85%),
    radial-gradient(circle,rgba(145,182,222,.055) .7px,transparent .9px),
    linear-gradient(152deg,#0b1b30,#0a1628 74%)!important;
  background-size:auto,auto,26px 26px,auto!important;
  color:var(--tf113-ink);
}
/* Exact original horizontal artwork, recolored from original source pixels.
   Real RGBA transparency: no opaque white logo rectangle in dark mode. */
img[data-tf-logo]{background:transparent!important;filter:none!important;object-fit:contain;}
html[data-theme="dark"] img[data-tf-logo="auto"]{content:url('/assets/tf-logo-horizontal-dark-v113.png');}
html[data-theme="light"] img[data-tf-logo="auto"]{content:url('/assets/tf-logo-horizontal-light-v113.png');}
img[data-tf-logo="always-dark"]{content:url('/assets/tf-logo-horizontal-dark-v113.png');}
/* Keep the logos' exact sizing/position, just remove the light logo's card. */
.tf-admin-home-logo,.tf-student-home-logo,.tf-home-logo,.student-brand-left{background:transparent!important;}
.topbar .tf-admin-home-logo{border-radius:10px;}
@media(min-width:901px){.topbar-logo{height:64px;}.student-brand-bar .student-logo-wide{height:56px;}}
.topbar .tf-admin-home-logo:hover,.student-brand-bar .tf-student-home-logo:hover{filter:brightness(1.08);}
.login-logo-plate{background:transparent!important;box-shadow:none!important;border:0!important;padding:0!important;}
.login-logo-plate .login-logo{filter:drop-shadow(0 4px 13px rgba(0,0,0,.15))!important;}
/* Exact same header height and controls; premium glass treatment and clear boundaries. */
.topbar{background:rgba(255,255,255,.94)!important;border-bottom:1px solid #dfebf7!important;box-shadow:0 4px 26px rgba(10,48,91,.055)!important;}
html[data-theme="dark"] .topbar{background:rgba(12,29,49,.96)!important;border-bottom:1px solid #314962!important;box-shadow:0 7px 28px rgba(0,5,17,.18)!important;background-image:linear-gradient(95deg,rgba(19,58,99,.22),transparent 56%)!important;}
.student-brand-bar{border:1px solid var(--tf113-stroke)!important;background:rgba(255,255,255,.97)!important;box-shadow:0 7px 23px rgba(8,40,81,.05)!important;}
html[data-theme="dark"] .student-brand-bar{background:#15283f!important;border-color:#34506b!important;box-shadow:0 9px 25px rgba(0,7,22,.22)!important;}
.sidebar{background:linear-gradient(165deg,#082b4f,#06203d 70%,#061a32)!important;}
html[data-theme="dark"] .sidebar{background:linear-gradient(167deg,#071c34,#08182d 72%,#0a1b33)!important;border-right:1px solid #294460;}
.sidebar .nav-button.active{background:linear-gradient(95deg,#155695,#184674)!important;color:white!important;box-shadow:inset 3px 0 0 #75bfff,0 6px 18px rgba(0,12,38,.12)!important;}
.nav-button:not(.active):hover{background:rgba(175,210,249,.09)!important;}
/* More coherent geometry and material surfaces without altering existing dimensions. */
:is(.panel,.student-panel,.student-inner-card,.student-summary-card,.student-skill,.report-chart-card,.report-kpi,.report-score-band,.tf-ld-stat,.tf-ld-viz-radar,.tf-ld-chart-wrap,.card,.tf112-maint-home,.tf-maintenance-group){
  background:linear-gradient(156deg,var(--tf-surface-top),var(--tf-surface-bottom))!important;
  border-color:var(--tf113-stroke)!important;
  box-shadow:var(--tf113-depth);
}
html[data-theme="dark"] :is(.panel,.student-panel,.student-inner-card,.student-summary-card,.student-skill,.report-chart-card,.report-kpi,.report-score-band,.tf-ld-stat,.tf-ld-viz-radar,.tf-ld-chart-wrap,.card,.tf112-maint-home,.tf-maintenance-group){
  background:linear-gradient(156deg,#203650,#172a42)!important;
  border-color:#35516d!important;
}
:is(.panel-header,.report-chart-head,.student-inner-card-head,.student-panel-head){border-bottom-color:var(--tf113-stroke)!important;}
:is(.report-chart-card,.student-panel,.panel){position:relative;}
:is(.report-chart-card,.student-panel,.panel)::before{pointer-events:none;}
/* Readable search, filters, selectors and toggles. */
:is(.top-search input,.filter-field select,.report-filter-control select,.report-filter-control input,.tf-v104-select,.tf-v104-input){
 border-color:var(--tf113-stroke)!important;
 background:var(--tf113-field)!important;
 color:var(--tf113-ink)!important;
}
html[data-theme="dark"] :is(.top-search input,.filter-field select,.report-filter-control select,.report-filter-control input,.tf-v104-select,.tf-v104-input){background:#162a42!important;border-color:#3a5774!important;color:#f5f8fe!important;}
:is(input,select,textarea,button):focus-visible{outline:2px solid var(--tf113-focus)!important;outline-offset:2px;}
.tf-theme-toggle{border:1px solid var(--tf113-stroke)!important;background:var(--tf113-soft)!important;color:var(--tf113-ink)!important;box-shadow:none!important;}
.tf-theme-toggle:hover{border-color:var(--tf113-focus)!important;}
html[data-theme="dark"] .tf-theme-toggle{background:#233a55!important;border-color:#44627d!important;color:#fff!important;}
/* Crisp white numerals in dark mode, navy numerals in light mode. */
html[data-theme="dark"] :is(.kpi-card .value,.report-kpi .report-kpi-value-line strong,.report-kpi strong,.report-focus-metric strong,.student-skill-score,.student-progress-kpi strong,.tf-ld-stat-score,.donut-center strong,.report-class-bar-score,.contract-row-head b){color:#fff!important;}
html[data-theme="light"] :is(.kpi-card .value,.report-kpi .report-kpi-value-line strong,.report-kpi strong,.report-focus-metric strong,.student-skill-score,.student-progress-kpi strong,.tf-ld-stat-score,.donut-center strong,.report-class-bar-score,.contract-row-head b){color:#0d294d!important;}
/* Keep TRACE chart category colors, but simplify chart surfaces and control contrast. */
.report-chart-host{background:linear-gradient(180deg,rgba(66,137,224,.027),transparent 72%)!important;}
html[data-theme="dark"] .report-chart-host{background:linear-gradient(180deg,rgba(76,143,212,.065),transparent 72%)!important;}
.report-chart-host svg .report-axis-label{font-weight:700;}
html[data-theme="dark"] .report-chart-host svg .report-axis-label{fill:#e7f2ff;}
/* Auth, maintenance and exceptional states preserve their own safe surfaces. */
.login{background:radial-gradient(ellipse at 18% 14%,rgba(32,95,175,.37),transparent 50%),radial-gradient(ellipse at 95% 84%,rgba(205,27,59,.15),transparent 44%),linear-gradient(140deg,#08152a,#071b34 78%)!important;}
html[data-theme="dark"] .login{background:radial-gradient(ellipse at 15% 18%,rgba(32,100,198,.23),transparent 50%),radial-gradient(ellipse at 94% 88%,rgba(210,18,53,.13),transparent 45%),linear-gradient(145deg,#060f21,#0b1c34 82%)!important;}
.maintenance-overlay{background:radial-gradient(ellipse at 4% 20%,rgba(33,106,198,.27),transparent 52%),linear-gradient(145deg,#071a32,#0c2b50)!important;}
html[data-theme="dark"] .maintenance-card{background:linear-gradient(145deg,#182e49,#10233b)!important;border-color:#385777!important;}
/* Legal pages should share the shell's premium treatment. */
.legal-header,.legal-main{box-shadow:var(--tf113-depth)!important;border-color:var(--tf113-stroke)!important;}
html[data-theme="dark"] .legal-header,html[data-theme="dark"] .legal-main{background:linear-gradient(145deg,#1b314c,#12263f)!important;border-color:#36516e!important;}
html[data-theme="dark"] .legal-header a:has(.legal-logo){padding:0!important;background:transparent!important;}
.legal-hero{background:linear-gradient(115deg,#fff,#f2f7ff)!important;}
html[data-theme="dark"] .legal-hero{background:linear-gradient(115deg,#203650,#182b43)!important;}
/* Avoid animation when requested by the OS. */
@media(prefers-reduced-motion:reduce){.tf-theme-toggle,.nav-button,.student-tab-button{transition:none!important;}}
