/* FCE approved UI refresh – parent and trainer dashboards only.
 * Visual approval: 2026-11-06. Preserve current role permissions, form
 * semantics, color overrides, navigation destinations and existing APIs.
 * Loaded AFTER all legacy styles, so selectors are deliberately narrow.
 */
:root{
  --fce-ui-radius:16px;
  --fce-ui-border:#d9e4e1;
  --fce-ui-ink:#192a27;
  --fce-ui-muted:#536a63;
  --fce-ui-shadow:0 9px 24px rgba(20,57,48,.075);
  --fce-ui-green:#146b46;
  --fce-ui-green-dark:#0c5639;
  --fce-ui-cream:#f4f8f6;
}
body.theme-parent .site-shell.role-parent,
body.theme-admin .site-shell.role-admin{color:var(--fce-ui-ink)}
body.theme-parent .site-shell.role-parent :is(button,a,input,select,textarea,summary):focus-visible,
body.theme-admin .site-shell.role-admin :is(button,a,input,select,textarea,summary):focus-visible{
  outline:3px solid #eaa944;
  outline-offset:3px;
}
body.theme-parent .site-shell.role-parent :is(.btn,button):disabled,
body.theme-admin .site-shell.role-admin :is(.btn,button):disabled{
  opacity:.66;
  cursor:not-allowed;
}
/* Keep burgundy parent brand and blue/green approved trainer aesthetic. */
@media(min-width:761px){
  body.theme-parent .site-shell.role-parent .fce-desktop-nav-link.is-current{
    border-radius:9px;
    background:rgba(255,255,255,.17);
    color:#fff;
  }
  body.theme-admin .site-shell.role-admin .fce-desktop-nav-link.is-current{
    border-radius:9px;
    background:#126b45;
    color:#fff;
  }
}
/* --- Parent home: smaller team card, genuine dates/status --- */
body.theme-parent .site-shell.role-parent #main-content[data-parent-page="overview"]{
  --fce-parent-ink:#162b24;
}
body.theme-parent .site-shell.role-parent #main-content[data-parent-page="overview"] .parent-hero.fce-approved-parent-hero{
  isolation:isolate;
  box-sizing:border-box;
  min-height:158px;
  margin:0 0 14px;
  padding:22px 26px 19px;
  border:1px solid #d5e4d9;
  border-radius:var(--fce-ui-radius);
  color:#143827;
  background:linear-gradient(104deg,#e9f5ed 1%,#f3faf6 62%,#dcefdc 100%);
  box-shadow:var(--fce-ui-shadow);
  overflow:hidden;
}
body.theme-parent .site-shell.role-parent #main-content[data-parent-page="overview"] .fce-approved-parent-hero .eyebrow{
  color:#355b43;
  letter-spacing:.08em;
  font-size:11px;
  font-weight:850;
  margin-bottom:8px;
  max-width:calc(100% - 120px);
}
body.theme-parent .site-shell.role-parent #main-content[data-parent-page="overview"] .fce-approved-parent-hero h1{
  font-size:clamp(24px,3vw,34px);
  line-height:1.16;
  letter-spacing:-.027em;
  margin:0 0 8px;
  color:#193a2c;
  white-space:normal;
  overflow-wrap:anywhere;
  max-width:calc(100% - 175px);
  text-shadow:none;
}
body.theme-parent .site-shell.role-parent #main-content[data-parent-page="overview"] .fce-approved-parent-hero p{
  font-size:13px;
  line-height:1.45;
  color:#52705f;
  max-width:calc(100% - 170px);
  margin:0;
}
body.theme-parent .site-shell.role-parent #main-content[data-parent-page="overview"] .fce-approved-parent-hero .parent-player-alias{
  color:#2b5c40;
  padding:0 0 5px;
  margin:0;
  font-size:13px;
}
body.theme-parent .site-shell.role-parent #main-content[data-parent-page="overview"] .fce-approved-parent-hero .parent-team-ball{
  width:clamp(115px,13vw,160px);
  height:auto;
  right:22px;
  top:49%;
  opacity:.88;
  z-index:1;
}
body.theme-parent .site-shell.role-parent #main-content[data-parent-page="overview"] .fce-approved-parent-hero .parent-team-ribbon{
  position:relative;
  inset:auto;
  z-index:4;
  display:inline-flex;
  align-items:center;
  box-sizing:border-box;
  width:max-content;
  max-width:calc(100% - 170px);
  height:auto;
  min-height:29px;
  padding:7px 13px;
  margin-top:12px;
  border-radius:9px;
  background:color-mix(in srgb,var(--team-color,#a44d45) 72%,#5c1f2d);
  box-shadow:none;
}
body.theme-parent .site-shell.role-parent #main-content[data-parent-page="overview"] .fce-approved-parent-hero .parent-team-ribbon strong{
  font-size:11px;
  letter-spacing:.035em;
  white-space:normal;
}
/* One summary group, all values sourced from existing /api/me data. */
body.theme-parent .site-shell.role-parent .fce-approved-parent-summary{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin:0 0 16px;
}
body.theme-parent .site-shell.role-parent .fce-approved-summary-card{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
  padding:14px 16px;
  border:1px solid var(--fce-ui-border);
  border-radius:13px;
  background:#fff;
  box-shadow:0 4px 13px rgba(17,55,41,.045);
  color:var(--fce-ui-ink);
  text-decoration:none;
}
body.theme-parent .site-shell.role-parent a.fce-approved-summary-card:hover{
  background:#f0f7f2;
  border-color:#82b79a;
}
body.theme-parent .site-shell.role-parent .fce-approved-summary-icon{
  display:grid;
  place-items:center;
  flex:0 0 36px;
  height:36px;
  border-radius:10px;
  color:#0d6d47;
  background:#e2f2e9;
  font-size:20px;
}
body.theme-parent .site-shell.role-parent .fce-approved-summary-card:nth-child(2) .fce-approved-summary-icon{
  background:#fff2d9;
  color:#9b670a;
}
body.theme-parent .site-shell.role-parent .fce-approved-summary-card small{
  display:block;
  font-size:11px;
  color:var(--fce-ui-muted);
  line-height:1.25;
}
body.theme-parent .site-shell.role-parent .fce-approved-summary-card strong{
  display:block;
  margin-top:4px;
  font-size:14px;
  font-weight:850;
  line-height:1.25;
  overflow-wrap:anywhere;
}
body.theme-parent .site-shell.role-parent .parent-important-strip{
  margin-bottom:15px;
  border-radius:12px;
  border-color:#b5d1bf;
  background:#f0f8f3;
  box-shadow:0 3px 9px rgba(21,62,37,.035);
}
body.theme-parent .site-shell.role-parent #main-content[data-parent-page="overview"] .parent-training-absence-section{
  min-width:0;
  margin:0 0 14px;
}
body.theme-parent .site-shell.role-parent #main-content[data-parent-page="overview"] .parent-training-absence-section .parent-training-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr);
}
body.theme-parent .site-shell.role-parent #main-content[data-parent-page="overview"] .parent-training-absence-section .section-head{
  margin:0 0 10px;
}
body.theme-parent .site-shell.role-parent .parent-training-card,
body.theme-parent .site-shell.role-parent .parent-next-tournament-card{
  border-radius:var(--fce-ui-radius);
  border-width:1px;
  background:linear-gradient(180deg,#fff 0%,#fbfdfc 100%);
  box-shadow:var(--fce-ui-shadow);
  min-width:0;
}
body.theme-parent .site-shell.role-parent .parent-training-card{
  border-color:#a9cdb5;
}
body.theme-parent .site-shell.role-parent .parent-training-card .card-row{
  flex-wrap:wrap;
  gap:10px;
}
body.theme-parent .site-shell.role-parent .parent-training-card .training-parent-status{
  border-radius:12px;
}
body.theme-parent .site-shell.role-parent .parent-training-card .save-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}
body.theme-parent .site-shell.role-parent .parent-training-card .save-row button,
body.theme-parent .site-shell.role-parent .fce-approved-detail-link{
  min-height:44px;
}
body.theme-parent .site-shell.role-parent .fce-approved-detail-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 15px;
  border:1px solid #92b7a1;
  border-radius:10px;
  background:#fff;
  color:#134f32;
  font-size:13px;
  font-weight:800;
  line-height:1.3;
  text-decoration:none;
  text-align:center;
  overflow-wrap:anywhere;
}
body.theme-parent .site-shell.role-parent .fce-approved-detail-link:hover{
  background:#e8f5ee;
}
body.theme-parent .site-shell.role-parent .fce-approved-tournament-action{
  margin-top:13px;
}
body.theme-parent .site-shell.role-parent .parent-next-tournament-wrapper{
  min-width:0;
  margin:0 0 20px;
}
body.theme-parent .site-shell.role-parent .parent-next-tournament-card{
  border-color:#b6d0e9;
  background:linear-gradient(120deg,#fff 0%,#f2f7fc 100%);
}
body.theme-parent .site-shell.role-parent .parent-next-tournament-card h2{
  font-size:clamp(17px,2vw,23px);
  line-height:1.28;
}
body.theme-parent .site-shell.role-parent .parent-next-tournament-status{
  font-weight:750;
}
/* --- Trainer dashboard: KPI first, then two equally weighted key cards --- */
body.theme-admin .site-shell.role-admin .fce-approved-trainer-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  margin:0 0 16px;
}
body.theme-admin .site-shell.role-admin .fce-approved-quick-action{
  display:inline-flex;
  gap:8px;
  align-items:center;
  justify-content:center;
  box-sizing:border-box;
  min-height:45px;
  min-width:0;
  padding:11px 18px;
  border:1px solid #9ebead;
  border-radius:11px;
  background:#fff;
  color:#11633e;
  font-size:13px;
  font-weight:800;
  text-align:center;
  line-height:1.25;
  cursor:pointer;
}
body.theme-admin .site-shell.role-admin .fce-approved-quick-action.is-primary{
  background:#146d43;
  color:white;
  border-color:#146d43;
}
body.theme-admin .site-shell.role-admin .fce-approved-quick-action:hover{
  background:#e9f5ed;
  border-color:#2d9160;
}
body.theme-admin .site-shell.role-admin .fce-approved-quick-action.is-primary:hover{
  background:#0e5736;
  color:white;
}
body.theme-admin .site-shell.role-admin .trainer-dashboard-only .trainer-status-board{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  min-width:0;
}
body.theme-admin .site-shell.role-admin .trainer-dashboard-only .trainer-status-board>.trainer-status-tile{
  order:1;
  min-width:0;
  min-height:110px;
  border:1px solid #dce5e1;
  border-radius:13px;
  background:#fff;
  box-shadow:var(--fce-ui-shadow);
  color:var(--fce-ui-ink);
}
body.theme-admin .site-shell.role-admin .trainer-dashboard-only .trainer-status-board>.trainer-status-tile strong{
  font-size:clamp(20px,2.1vw,28px);
  font-weight:900;
}
body.theme-admin .site-shell.role-admin .trainer-dashboard-only .trainer-status-board>.trainer-status-headliners{
  order:2;
  grid-column:1/-1;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
body.theme-admin .site-shell.role-admin .trainer-dashboard-only .trainer-status-current{
  border:1px solid #d4e4dd;
  border-radius:var(--fce-ui-radius);
  box-shadow:var(--fce-ui-shadow);
  overflow:hidden;
  min-width:0;
  background:#fff;
}
body.theme-admin .site-shell.role-admin .trainer-dashboard-only .trainer-status-current .trainer-status-head{
  border-radius:9px;
  gap:8px;
}
body.theme-admin .site-shell.role-admin .trainer-dashboard-only .trainer-status-current .trainer-status-kicker{
  color:#0a6540;
}
body.theme-admin .site-shell.role-admin .trainer-dashboard-only .trainer-status-current h3{
  font-size:clamp(16px,1.8vw,21px);
  line-height:1.28;
  overflow-wrap:anywhere;
}
body.theme-admin .site-shell.role-admin .trainer-dashboard-only .trainer-status-current .trainer-status-jump:not(.fce-approved-quick-action){
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:10px 14px;
  border-radius:10px;
  border:1px solid #117043;
  background:#117043;
  color:#fff;
  font-size:13px;
  font-weight:850;
  cursor:pointer;
}
body.theme-admin .site-shell.role-admin .trainer-dashboard-only .trainer-status-current .trainer-status-jump:hover{
  background:#0d5935;
}
body.theme-admin .site-shell.role-admin .trainer-dashboard-only .trainer-upcoming-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  margin-top:14px;
}
body.theme-admin .site-shell.role-admin .trainer-dashboard-only .trainer-upcoming-panel{
  border:1px solid #d6e4dc;
  border-radius:var(--fce-ui-radius);
  box-shadow:var(--fce-ui-shadow);
}
body.theme-admin .site-shell.role-admin .trainer-dashboard-only .trainer-upcoming-row{
  min-height:48px;
  gap:9px;
}
body.theme-admin .site-shell.role-admin .trainer-dashboard-only .trainer-upcoming-row:focus-visible{
  background:#e3f5e8;
}
/* Layout guardrails for both approved role dashboards. */
@media(max-width:960px){
  body.theme-admin .site-shell.role-admin .trainer-dashboard-only .trainer-status-board{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  body.theme-admin .site-shell.role-admin .trainer-dashboard-only .trainer-status-board>.trainer-status-headliners{
    grid-template-columns:1fr;
  }
}
@media(max-width:760px){
  body.theme-parent .site-shell.role-parent #main-content[data-parent-page="overview"] .parent-hero.fce-approved-parent-hero{
    min-height:132px;
    padding:18px 18px 17px;
    border-radius:14px;
  }
  body.theme-parent .site-shell.role-parent #main-content[data-parent-page="overview"] .fce-approved-parent-hero h1{
    max-width:calc(100% - 104px);
    font-size:clamp(21px,5.8vw,29px);
  }
  body.theme-parent .site-shell.role-parent #main-content[data-parent-page="overview"] .fce-approved-parent-hero .eyebrow{
    max-width:calc(100% - 102px);
  }
  body.theme-parent .site-shell.role-parent #main-content[data-parent-page="overview"] .fce-approved-parent-hero p{
    max-width:calc(100% - 100px);
    font-size:11px;
  }
  body.theme-parent .site-shell.role-parent #main-content[data-parent-page="overview"] .fce-approved-parent-hero .parent-team-ball{
    width:100px;
    right:6px;
    opacity:.85;
  }
  body.theme-parent .site-shell.role-parent #main-content[data-parent-page="overview"] .fce-approved-parent-hero .parent-team-ribbon{
    max-width:calc(100% - 100px);
    margin-top:10px;
    min-height:26px;
    padding:6px 10px;
  }
  body.theme-parent .site-shell.role-parent .fce-approved-parent-summary{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
  }
  body.theme-parent .site-shell.role-parent .fce-approved-summary-card{
    padding:12px 10px;
    gap:7px;
  }
  body.theme-parent .site-shell.role-parent .fce-approved-summary-icon{
    width:31px;
    height:31px;
    flex-basis:31px;
    font-size:18px;
  }
  body.theme-parent .site-shell.role-parent .fce-approved-summary-card strong{
    font-size:12px;
  }
  body.theme-parent .site-shell.role-parent .fce-approved-summary-card:last-child{
    grid-column:1/-1;
  }
  body.theme-admin .site-shell.role-admin .fce-approved-trainer-actions{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
  }
  body.theme-admin .site-shell.role-admin .fce-approved-quick-action{
    width:100%;
    padding:11px 9px;
    font-size:12px;
    white-space:normal;
  }
  body.theme-admin .site-shell.role-admin .fce-approved-quick-action.is-primary{
    grid-column:1/-1;
  }
  body.theme-admin .site-shell.role-admin .trainer-dashboard-only .trainer-upcoming-grid{
    grid-template-columns:1fr;
  }
  body.theme-parent .site-shell.role-parent .parent-training-card .save-row .fce-approved-detail-link{
    flex:1 1 auto;
  }
}
@media(max-width:360px){
  body.theme-parent .site-shell.role-parent .fce-approved-parent-summary{
    grid-template-columns:1fr;
  }
  body.theme-parent .site-shell.role-parent .fce-approved-summary-card:last-child{
    grid-column:auto;
  }
}
@media print{
  body.theme-parent .site-shell.role-parent .fce-approved-parent-summary a,
  body.theme-parent .site-shell.role-parent .fce-approved-detail-link,
  body.theme-admin .site-shell.role-admin .fce-approved-trainer-actions{
    display:none;
  }
}


/* Use existing vector glyphs instead of OS-dependent emoji fonts. */
body.theme-parent .site-shell.role-parent .fce-approved-summary-icon svg{
  width:22px;height:22px;display:block;
}
body.theme-admin .site-shell.role-admin .fce-approved-quick-action svg{
  width:17px;height:17px;flex:none;display:block;
}
body.theme-admin .site-shell.role-admin .trainer-dashboard-only .trainer-status-icon svg{
  width:22px;height:22px;display:block;
}
/* Approved 2×2 KPI grid on narrow devices. Overrides the legacy
   single-column !important mobile rule without affecting other pages. */
@media(max-width:640px){
  body.theme-admin .site-shell.role-admin .trainer-dashboard-only .trainer-status-board{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:9px;
  }
  body.theme-admin .site-shell.role-admin .trainer-dashboard-only
    .trainer-status-board>.trainer-status-tile{
    display:flex!important;
    flex-direction:column!important;
    align-items:center;
    justify-content:center;
    grid-column:auto!important;
    min-height:116px;
    width:100%;
    padding:12px 8px;
    gap:6px;
    text-align:center;
  }
  body.theme-admin .site-shell.role-admin .trainer-dashboard-only
    .trainer-status-board>.trainer-status-tile>.trainer-status-icon{
    width:33px;height:33px;flex:0 0 33px;
    display:grid;place-items:center;
  }
  body.theme-admin .site-shell.role-admin .trainer-dashboard-only
    .trainer-status-board>.trainer-status-tile>strong{
    font-size:clamp(19px,5.5vw,24px);
    margin:0;
    line-height:1.04;
  }
  body.theme-admin .site-shell.role-admin .trainer-dashboard-only
    .trainer-status-board>.trainer-status-tile>span:not(.trainer-status-icon){
    font-size:11px;
    line-height:1.25;
    max-width:100%;
    text-align:center;
  }
  body.theme-admin .site-shell.role-admin .trainer-dashboard-only
    .trainer-status-board>.trainer-status-tile>small{
    display:none;
  }
}


/* Approved desktop overview: the one next training and next tournament
   appear side-by-side, while hero, summary and important info remain full
   width. All other parent pages keep their existing layout. */
@media(min-width:1000px){
  body.theme-parent .site-shell.role-parent #main-content[data-parent-page="overview"]{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    column-gap:15px;
    align-content:start;
  }
  body.theme-parent .site-shell.role-parent #main-content[data-parent-page="overview"]
    > :not(.parent-training-absence-section):not(.parent-next-tournament-wrapper){
    grid-column:1 / -1;
    min-width:0;
  }
  body.theme-parent .site-shell.role-parent #main-content[data-parent-page="overview"]
    > .parent-training-absence-section,
  body.theme-parent .site-shell.role-parent #main-content[data-parent-page="overview"]
    > .parent-next-tournament-wrapper{
    min-width:0;
    align-self:stretch;
  }
  body.theme-parent .site-shell.role-parent #main-content[data-parent-page="overview"]
    > .parent-next-tournament-wrapper{
    margin:0 0 14px;
    padding-top:31px;
  }
  body.theme-parent .site-shell.role-parent #main-content[data-parent-page="overview"]
    .parent-next-tournament-card{
    min-height:100%;
    box-sizing:border-box;
  }
  body.theme-parent .site-shell.role-parent #main-content[data-parent-page="overview"]:not(:has(> .parent-training-absence-section))
    > .parent-next-tournament-wrapper{
    grid-column:1 / -1;
    padding-top:0;
  }
}
