/* ARA-Training SMART — UI Kit (dark performance) */
:root{
  --bg0:#0b0b0b;
  --bg1:#111111;
  --panel:#141414;
  --panel2:#1b1b1b;
  --text:#ffffff;
  --muted:#cfcfcf;
  --muted2:#9b9b9b;
  --gold:#E0A800;
  --gold2:#F2B705;
  --line:#2A2A2A;
  --danger:#EB5757;
  --ok:#27AE60;
  --shadow: 0 10px 30px rgba(0,0,0,.55);
  --radius:14px;
  --radius2:18px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  --ara-brand-icon:url("/assets/img/brand/ara-app-icon-dark-1024.png");
  --ara-brand-icon-light:url("/assets/img/brand/ara-app-icon-light-1024.png");
  --ara-brand-horizontal:url("/assets/img/brand/ara-logo-horizontal-dark.png");
}

body[data-theme="light"]{
  --bg0:#f4f6f9;
  --bg1:#ffffff;
  --panel:#ffffff;
  --panel2:#f7f8fb;
  --text:#121417;
  --muted:#4b5563;
  --muted2:#6b7280;
  --line:#d8dee8;
  --shadow:0 12px 28px rgba(28,35,48,.12);
  background:linear-gradient(180deg,#f7f9fc 0%,#edf1f7 100%);
  color:var(--text);
}

body[data-theme="light"] .card,
body[data-theme="light"] .card2,
body[data-theme="light"] .panel,
body[data-theme="light"] .subtle,
body[data-theme="light"] .nav,
body[data-theme="light"] .topbar,
body[data-theme="light"] .pbControlPanel,
body[data-theme="light"] .pbWizardShell,
body[data-theme="light"] .pbAssignPanel,
body[data-theme="light"] .pbAssignCard,
body[data-theme="light"] .pbQuickAction{
  background:#ffffff!important;
  color:var(--text)!important;
  border-color:rgba(17,24,39,.12)!important;
  box-shadow:var(--shadow);
}

body[data-theme="light"] input,
body[data-theme="light"] select,
body[data-theme="light"] textarea{
  background:#ffffff!important;
  color:#111827!important;
  border-color:rgba(17,24,39,.18)!important;
}

body[data-theme="light"] input::placeholder,
body[data-theme="light"] textarea::placeholder{color:#7b8494!important;}

body[data-theme="light"] .h1,
body[data-theme="light"] .h2,
body[data-theme="light"] .pbControlTitle,
body[data-theme="light"] .pbWizardTitle,
body[data-theme="light"] .pbWizardDialogTitle,
body[data-theme="light"] .pbCreateLauncherTitle,
body[data-theme="light"] .pbStepTitle,
body[data-theme="light"] .pbQuickTitle,
body[data-theme="light"] .coach-sidebar-link-title{
  color:#111827!important;
}

body[data-theme="light"] .p,
body[data-theme="light"] .small,
body[data-theme="light"] .hint,
body[data-theme="light"] .pbControlSub,
body[data-theme="light"] .pbWizardSub,
body[data-theme="light"] .pbWizardStepText,
body[data-theme="light"] .pbCreateLauncherText,
body[data-theme="light"] .pbStepText,
body[data-theme="light"] .pbQuickSub,
body[data-theme="light"] .coach-sidebar-link-sub{
  color:#4b5563!important;
}

body[data-theme="light"] .pbWizardDialog{
  background:#ffffff!important;
  color:var(--text)!important;
}

body[data-theme="light"] .pbWizardStep,
body[data-theme="light"] .pbSummaryRow,
body[data-theme="light"] .pbCreateProgressStep{
  background:#f7f8fb!important;
  border-color:rgba(17,24,39,.10)!important;
}

.smartThemeToggle{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:12000;
  display:inline-flex;
  align-items:center;
  gap:8px;
  border:1px solid rgba(255,255,255,.16);
  border-radius:999px;
  padding:10px 12px;
  background:rgba(18,18,18,.88);
  color:#fff;
  box-shadow:0 14px 34px rgba(0,0,0,.34);
  backdrop-filter:blur(10px);
  cursor:pointer;
  font-weight:850;
  font-size:12px;
}
.smartThemeToggle:hover{border-color:rgba(242,183,5,.55);}
body[data-theme="light"] .smartThemeToggle{background:#ffffff; color:#111827; border-color:rgba(17,24,39,.15);}

/* ------------------------------------------------------------
   Polarization Bar (VT1 / Media / Alta)
   ------------------------------------------------------------ */
.polarWrap{margin:10px 0 12px 0; padding:10px; border-radius:14px; border:1px solid rgba(255,255,255,.10); background:rgba(255,255,255,.03);}
.polarWrap .polarTitle{font-weight:900; margin-bottom:8px;}
.polarBar{display:flex; width:100%; overflow:hidden; border-radius:12px; border:1px solid rgba(255,255,255,.10);}
.polarBar .seg{display:flex; align-items:center; justify-content:center; gap:6px; padding:8px 10px; font-weight:900; font-size:12px; color:#0c0c0c; white-space:nowrap;}
.polarBar .seg span{font-weight:800; font-size:11px; opacity:.85;}
.polarBar .seg.low{background:#27ae60;}
.polarBar .seg.mid{background:#f2994a;}
.polarBar .seg.high{background:#eb5757;}
.polarMeta{margin-top:8px; color:var(--muted2);}
.polarWarn{border-color: rgba(235,87,87,.55); box-shadow: 0 0 0 2px rgba(235,87,87,.10) inset;}
.polarAlert{margin-top:10px; padding:10px 12px; border-radius:12px; border:1px solid rgba(235,87,87,.45); background:rgba(235,87,87,.12); color:#fff; font-size:12px;}

.polarBar.polarCompact .seg{padding:6px 8px; font-size:11px;}
.polarBar.polarCompact .seg span{display:none;}

/* Mobile: compact labels */
@media (max-width: 540px){
  .polarBar .seg{padding:7px 8px; font-size:11px;}
  .polarBar .seg span{display:none;}
}

*{box-sizing:border-box;}
html,body{height:100%;}
body{
  margin:0;
  font-family:var(--font);
  background: radial-gradient(1200px 900px at 20% 10%, #1b1b1b 0%, var(--bg0) 55%, #000 100%);
  color:var(--text);
}

/* ------------------------------------------------------------
   Athlete Topbar (Facebook-like)
   ------------------------------------------------------------ */
.topbar{
  position:sticky;
  top:0;
  z-index:50;
  backdrop-filter: blur(10px);
  background: rgba(10,10,10,.75);
  border:1px solid rgba(255,255,255,.10);
  box-shadow: var(--shadow);
  border-radius: 18px;
  margin: 10px auto 0 auto;
}
.topbarInner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding: 12px 14px;
}
.topbarLeft{display:flex; align-items:center; gap:12px; min-width:260px;}
.topbarBrand{display:flex; align-items:center; gap:10px;}
.topbarBrand .logo{
  width:34px;
  height:34px;
  border-radius:10px;
  background-color:#08090c;
  background-image:var(--ara-brand-icon);
  background-size:cover;
  background-position:center;
  box-shadow:0 0 0 1px rgba(255,255,255,.16) inset, 0 10px 20px rgba(0,0,0,.18);
}
body[data-theme="light"] .topbarBrand .logo{background-image:var(--ara-brand-icon-light);}
.topbarBrand .title{font-weight:950; letter-spacing:.2px;}
.topbarBrand .sub{font-size:12px;color:var(--muted2); margin-top:2px;}

.topbarSearch{position:relative; flex:1; max-width:420px;}
.topbarSearch input{
  width:100%;
  padding: 10px 12px 10px 40px;
  border-radius: 999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color:#fff;
  outline:none;
}
.topbarSearch input:focus{border-color: rgba(224,168,0,.55); box-shadow: 0 0 0 3px rgba(224,168,0,.10);}

.tbSearchIcon{
  position:absolute;
  left:10px;
  top:50%;
  transform: translateY(-50%);
  width:28px;
  height:28px;
  border-radius:999px;
  border:0;
  background:transparent;
  color:#fff;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:.9;
}
.tbSearchIcon:hover{background:rgba(255,255,255,.08); opacity:1;}
.topbarSearch .typeahead{position:absolute; left:0; right:0; top:46px; z-index:70;}

.topbarCenter{display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:center;}
.navlink{
  display:flex;
  align-items:center;
  gap:8px;
  padding: 10px 12px;
  border-radius: 12px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  color: var(--muted);
  font-weight:900;
  cursor:pointer;
  user-select:none;
  text-decoration:none;
}
.navlink:hover{border-color: rgba(224,168,0,.35); color:#fff; text-decoration:none;}
.navlink.active{border-color: rgba(224,168,0,.55); background: rgba(224,168,0,.12); color:#fff;}
.navlink .ico{width:18px; text-align:center; opacity:.95;}
.navlink .txt{font-size:13px;}

.topbarRight{display:flex; align-items:center; gap:10px; justify-content:flex-end; min-width:260px;}
.iconBtn{
  position:relative;
  display:flex;
  align-items:center;
  gap:8px;
  padding: 10px 12px;
  border-radius: 12px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  color:#fff;
  cursor:pointer;
  user-select:none;
}
.iconBtn:hover{border-color: rgba(224,168,0,.35);}
.badgeDot{
  position:absolute;
  top:6px;
  right:6px;
  min-width:18px;
  height:18px;
  padding:0 6px;
  border-radius:999px;
  background:#EB5757;
  color:#fff;
  font-weight:950;
  font-size:11px;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow: 0 6px 16px rgba(0,0,0,.35);
}

.dropdown{
  position:relative;
}
.dropdownMenu{
  position:absolute;
  right:0;
  top:46px;
  width: 380px;
  max-width: calc(100vw - 34px);
  border-radius: 16px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(16,16,16,.96);
  box-shadow: var(--shadow);
  overflow:hidden;
  display:none;
  z-index:80;
}
.dropdownMenu.open{display:block;}
.dropdownHeader{padding:12px 14px; font-weight:950; border-bottom:1px solid rgba(255,255,255,.08); display:flex; align-items:center; justify-content:space-between;}
.dropdownBody{max-height:420px; overflow:auto;}
.dropdownItem{padding:12px 14px; border-bottom:1px solid rgba(255,255,255,.06);}
.dropdownItem:last-child{border-bottom:none;}
.miniActions{display:flex; gap:8px; margin-top:10px; flex-wrap:wrap;}
.miniBtn{padding:8px 10px; border-radius:10px; border:1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); color:#fff; font-weight:900; cursor:pointer;}
.miniBtn.ok{border-color: rgba(39,174,96,.45); background: rgba(39,174,96,.14);}
.miniBtn.danger{border-color: rgba(235,87,87,.45); background: rgba(235,87,87,.12);}
.miniBtn.secondary{color: var(--muted);}

@media (max-width: 980px){
  .topbarInner{flex-wrap:wrap;}
  .topbarLeft{min-width:unset; width:100%;}
  .topbarRight{min-width:unset; width:100%; justify-content:space-between;}
  .topbarCenter{width:100%; justify-content:flex-start;}
}

a{color:var(--gold2); text-decoration:none;}
a:hover{text-decoration:underline;}
.container{max-width:1200px; margin:0 auto; padding:22px;}
.container.container-fullwidth{max-width:100%; width:100%; padding:0 18px; box-sizing:border-box;}

/* ------------------------------------------------------------
   Social UI blocks (Dashboard Athlete v2)
   ------------------------------------------------------------ */
.layout{
  display:grid;
  grid-template-columns: 420px 1fr;
  gap:18px;
  margin-top:18px;
}

.layout.layout-single{grid-template-columns:1fr;}
@media (max-width: 980px){
  .layout{grid-template-columns:1fr;}
}

.sectionTitle{display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:10px;}
.sectionTitle .h1{margin:0;}

.tabs{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.tab{
  padding:8px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.03);
  color:var(--muted);
  font-weight:900;
  cursor:pointer;
  user-select:none;
}
.tab.active{
  border-color:rgba(224,168,0,.55);
  background:rgba(224,168,0,.12);
  color:#fff;
}

.avatar{
  width:44px; height:44px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.06);
  display:flex; align-items:center; justify-content:center;
  overflow:hidden;
  flex:0 0 auto;
}
.avatar.avatar-lg{width:74px; height:74px; border-radius:20px;}
.avatar img{width:100%; height:100%; object-fit:cover;}

.personRow{display:flex; align-items:center; gap:12px;}
.personMeta{min-width:0;}
.personName{font-weight:950; font-size:14px; line-height:1.1;}
.personSub{font-size:12px; color:var(--muted2); margin-top:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.pill{
  display:inline-flex; align-items:center; gap:8px;
  padding:7px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);
  color:var(--muted);
  font-size:12px;
  font-weight:900;
  white-space:nowrap;
}
.pill.ok{border-color:rgba(39,174,96,.35); background:rgba(39,174,96,.10);}
.pill.warn{border-color:rgba(242,183,5,.35); background:rgba(242,183,5,.10);}
.pill.danger{border-color:rgba(235,87,87,.35); background:rgba(235,87,87,.10);}

.cardList{display:grid; gap:10px;}
.requestCard{
  padding:12px;
  border-radius:16px;
  border:1px solid var(--line);
  background:rgba(0,0,0,.22);
}
.requestCard .actions{display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; margin-top:10px;}
.requestCard .actions .btn{padding:8px 10px; font-size:12px;}

.searchBox{position:relative;}
.searchInput{
  padding:14px 14px;
  border-radius:14px;
  font-weight:800;
}
.typeahead{
  position:absolute;
  left:0; right:0;
  top:calc(100% + 8px);
  background:#0f0f0f;
  border:1px solid var(--line);
  border-radius:18px;
  box-shadow:var(--shadow);
  overflow:hidden;
  z-index:50;
  display:none;
}
.typeahead.show{display:block;}
.typeaheadItem{
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px 12px;
  border-bottom:1px solid rgba(255,255,255,.06);
  cursor:pointer;
}
.typeaheadItem:hover{background:rgba(255,255,255,.04);}
.typeaheadItem:last-child{border-bottom:none;}
.typeaheadItem .meta{min-width:0;}
.typeaheadItem .meta .t{font-weight:950; font-size:13px;}
.typeaheadItem .meta .s{font-size:12px; color:var(--muted2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}

.hero{
  border-radius:22px;
  border:1px solid var(--line);
  overflow:hidden;
  background:linear-gradient(135deg, rgba(224,168,0,.18), rgba(0,0,0,.65));
}
.hero .heroCover{height:120px; background:radial-gradient(900px 420px at 20% 0%, rgba(242,183,5,.25), transparent 55%), linear-gradient(180deg, rgba(0,0,0,.1), rgba(0,0,0,.55));}
.hero .heroBody{padding:16px; display:flex; gap:14px; align-items:flex-end; justify-content:space-between;}
.hero .heroLeft{display:flex; gap:14px; align-items:flex-end;}
.hero .heroTitle{font-weight:950; font-size:20px; margin:0;}
.hero .heroSub{color:var(--muted2); font-size:12px; margin-top:4px;}
.hero .heroActions{display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end;}

.nav{
  display:flex; align-items:center; justify-content:space-between;
  gap:14px; padding:16px 18px; background:linear-gradient(180deg, #141414, #0f0f0f);
  border:1px solid var(--line); border-radius:var(--radius2); box-shadow:var(--shadow);
}
.brand{display:flex; align-items:center; gap:10px;}
.brand .logo{
  width:36px;height:36px;border-radius:12px;
  background-color:#08090c;
  background-image:var(--ara-brand-icon);
  background-size:cover;
  background-position:center;
  box-shadow:0 10px 18px rgba(0,0,0,.16);
}
body[data-theme="light"] .brand .logo{background-image:var(--ara-brand-icon-light);}
.brand .title{font-weight:800; letter-spacing:.5px;}
.badge{
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 10px; border:1px solid var(--line); border-radius:999px;
  background:rgba(255,255,255,.03); color:var(--muted);
  font-size:12px;
}

/* ===== Carga de Entrenamiento ===== */
.loadBadge{
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.04);
  color:rgba(255,255,255,.92);
  font-size:12px;
  font-weight:900;
  letter-spacing:.3px;
  white-space:nowrap;
}
.loadBadge .loadVal{opacity:.85; font-weight:900;}
.loadBadge.baja{background:rgba(46,204,113,.14); border-color:rgba(46,204,113,.35);}
.loadBadge.mant{background:rgba(148,163,184,.14); border-color:rgba(148,163,184,.35);} /* gris/azul */
.loadBadge.desa{background:rgba(243,156,18,.16); border-color:rgba(243,156,18,.35);} /* naranja */
.loadBadge.impacto{background:rgba(235,87,87,.16); border-color:rgba(235,87,87,.38);} /* rojo */
.loadBadge.loss{background:rgba(99,102,241,.14); border-color:rgba(99,102,241,.35);} /* perdida */
.loadBadge.nodata{background:rgba(255,255,255,.06); border-color:rgba(255,255,255,.14); color:var(--muted);}
.loadBadge.muted{background:rgba(255,255,255,.04); border-color:rgba(255,255,255,.12); color:var(--muted);}
.btn{
  border:1px solid rgba(224,168,0,.45);
  background:linear-gradient(180deg, var(--gold2), var(--gold));
  color:#111;
  padding:10px 14px;
  border-radius:12px;
  font-weight:800;
  cursor:pointer;
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
  box-shadow: 0 10px 22px rgba(224,168,0,.15);
}
.btn:hover{transform: translateY(-1px); filter:brightness(1.04);}
.btn:active{transform: translateY(0px); filter:brightness(.98);}
.btn.secondary{
  background:transparent;
  color:var(--text);
  border:1px solid var(--line);
  box-shadow:none;
}
.btn.danger{
  background:transparent;
  color:var(--danger);
  border:1px solid rgba(235,87,87,.55);
  box-shadow:none;
}
.grid{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:18px;
  margin-top:18px;
}
@media (max-width: 980px){
  .grid{grid-template-columns:1fr;}
}
.card{
  background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border:1px solid var(--line);
  border-radius:var(--radius2);
  box-shadow:var(--shadow);
  padding:18px;
}
.h1{font-size:22px; font-weight:900; margin:0 0 8px 0;}
.h2{font-size:16px; font-weight:800; margin:0 0 10px 0; color:var(--muted);}
.p{margin:0; color:var(--muted); line-height:1.45;}
.form{display:grid; gap:12px; margin-top:12px;}
.field{display:grid; gap:6px;}
label{font-size:12px; color:var(--muted2);}
input,select,textarea{
  width:100%;
  padding:12px 12px;
  border-radius:12px;
  border:1px solid var(--line);
  background:rgba(0,0,0,.35);
  color:var(--text);
  outline:none;
}
textarea{min-height:90px; resize:vertical;}
.row{display:flex; gap:10px; flex-wrap:wrap;}
.row > * {flex:1;}
.hr{height:1px; background:var(--line); margin:14px 0;}
.note{
  padding:12px 14px; border-radius:12px;
  border:1px solid rgba(224,168,0,.35);
  background:rgba(224,168,0,.08);
  color:var(--muted);
}
.table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  overflow:hidden;
  border-radius:16px;
  border:1px solid var(--line);
}
.table th, .table td{
  padding:10px 10px;
  border-bottom:1px solid var(--line);
  vertical-align:top;
}
.table th{
  background:rgba(255,255,255,.05);
  color:var(--muted);
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.7px;
}
.table tr:last-child td{border-bottom:none;}
.small{font-size:12px; color:var(--muted2);}
.kpi{display:flex; gap:12px; flex-wrap:wrap;}
.kpi .pill{
  padding:10px 12px; border-radius:14px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.03);
  min-width:170px;
}
.kpi .pill b{display:block; font-size:18px; color:#fff;}
.kpi .pill span{font-size:12px; color:var(--muted2);}
.toast{
  position:fixed; right:18px; bottom:18px;
  background:#0f0f0f; border:1px solid var(--line);
  color:var(--text); padding:12px 14px; border-radius:14px;
  box-shadow:var(--shadow);
  display:none;
  max-width:420px;
  z-index:9999;
}
.toast.show{display:block;}
.excel{
  width:100%;
  border:1px solid var(--line);
  border-radius:18px;
  overflow:auto;
  background:rgba(0,0,0,.25);
}
.excel table{
  width:100%;
  min-width:1100px;
  border-collapse:separate;
  border-spacing:0;
}
.excel th{
  position:sticky; top:0;
  background:#111;
  z-index:2;
}
.excel th, .excel td{
  border-right:1px solid var(--line);
  border-bottom:1px solid var(--line);
  padding:10px;
  vertical-align:top;
}
.excel tr:last-child td{border-bottom:none;}
.excel td:last-child, .excel th:last-child{border-right:none;}
.tag{
  display:inline-flex; align-items:center; gap:6px;
  padding:4px 8px; border-radius:999px;
  font-size:11px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.03);
  color:var(--muted);
  margin:2px 4px 2px 0;
}
.tag .dot{width:8px;height:8px;border-radius:99px; background:var(--gold2);}

.nav-full{
  width:100%;
  max-width:none;
  margin:0;
  border-radius:0;
  border-left:none;
  border-right:none;
}

.nav .row{
  justify-content:flex-end;
}
.nav .row > *{
  flex:0 0 auto;
}

/* Microcycles page refinements */
.page-intro{
  margin:0 0 16px 0;
  font-size:14px;
  color:var(--muted2);
}
.badge-legend{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:8px;
}
.badge-legend span{
  font-size:11px;
  padding:4px 8px;
  border-radius:999px;
  background:#181818;
  border:1px solid var(--line);
}
.table-compact th,
.table-compact td{
  font-size:12px;
  padding:6px 8px;
}
@media (max-width: 920px){
  .coach-kpis{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

/* Active nav button */
.nav .btn.active{
  background:#c9a44a;
  color:#000;
  border-color:#c9a44a;
}

.badge.ok{background:#1f7a1f;color:#fff;font-size:11px;padding:3px 8px;border-radius:999px;}
.badge.warn{background:#9a7b00;color:#fff;}

/* Microcycles status badges */

.badge-status{
  display:inline-flex;
  align-items:center;
  padding:2px 8px;
  border-radius:999px;
  font-size:11px;
  border:1px solid var(--line);
  background:#181818;
}
.badge-status--active{
  border-color:#2c8a3b;
  background:#102814;
  color:#b4f0c2;
}
.badge-status--trash{
  border-color:#8a2c2c;
  background:#281010;
  color:#f0b4b4;
}


/* Ocultar bloque de microciclos en vista Atletas (ya existe módulo específico) */
body.only-athletes #secMicro{
  display:none;
}


/* Layout específico para gestión de atletas: aprovechar ancho completo */
body.only-athletes .container{
  max-width: 100%;
  width: 100%;
}

/* Plan Builder: navegación interna tipo pestañas */
.planbuilder-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:-4px 0 16px 0;
}
.planbuilder-tabs .tab-link{
  flex:1 1 200px;
  text-align:left;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid var(--line-soft);
  background:rgba(255,255,255,0.02);
  font-size:13px;
  line-height:1.3;
  cursor:pointer;
  transition:background .15s ease, border-color .15s ease, transform .1s ease;
}
.planbuilder-tabs .tab-link:hover{
  background:rgba(255,255,255,0.06);
  border-color:var(--accent-soft);
  transform:translateY(-1px);
}
.planbuilder-tabs .tab-sub{
  display:block;
  font-size:11px;
  opacity:.7;
}
@media (max-width:900px){
  .planbuilder-tabs{
    flex-direction:column;
  }
}


/* Plan Builder: tabs como submenú superior */
.planbuilder-tabs-top{
  max-width:1200px;
  margin:0 auto 12px;
}



/* Plan Builder sidebar layout */
.planbuilder-container-wide {
  max-width: 1320px;
}

.planbuilder-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: flex-start;
}

@media (max-width: 1024px) {
  .planbuilder-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.planbuilder-sidebar {
  background: #111111;
  border-radius: 18px;
  padding: 18px 18px 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.65);
  position: sticky;
  top: 88px;
}

.planbuilder-sidebar-header {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 10px;
}

.planbuilder-sidebar-link {
  width: 100%;
  text-align: left;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: radial-gradient(circle at 0% 0%, rgba(255, 215, 0, 0.18), rgba(0, 0, 0, 0.96));
  padding: 10px 14px;
  margin-bottom: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out, border-color 0.15s ease-out, background 0.15s ease-out;
}

.planbuilder-sidebar-link .pb-link-title {
  font-size: 14px;
  font-weight: 600;
  color: #ffe082;
}

.planbuilder-sidebar-link .pb-link-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.65);
}

.planbuilder-sidebar-link:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 215, 0, 0.85);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.9);
}

.planbuilder-sidebar-link:active {
  transform: translateY(0);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.85);
}

.planbuilder-main {
  min-width: 0;
}

/* Mobile: show links above card instead of sticky side */
@media (max-width: 1024px) {
  .planbuilder-sidebar {
    position: static;
  }

  .planbuilder-sidebar-link {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}


/* === Plan Builder / Exercise modal (temporary UX safeguard) ===
   Hide generic modal overlays by default so they don't block Plan Builder.
   When we implement the exercise viewer, we'll toggle a .pbModal--open class via JS. */
.pbModal {
  display: none;
}


/* ===== Layout con sidebar para vistas de entrenador (Atletas, Tests, PMC) ===== */
.coach-container-wide{
  max-width: 1400px;
  margin: 0 auto;
  padding: 22px 18px 32px;
}

.coach-layout{
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: flex-start;
  gap: 1.75rem;
}

.coach-sidebar{
  background: rgba(10,10,10,0.9);
  border-radius: 18px;
  padding: 1.1rem 1rem 1.4rem;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.02), 0 18px 40px rgba(0,0,0,0.8);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: calc(100vh - 140px);
}

.coach-sidebar-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}

.coach-sidebar-title{
  font-size: .92rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #f5f5f5;
}

.coach-sidebar-links{
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.coach-sidebar-link{
  width: 100%;
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.01);
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-align: left;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .12s ease;
  font-size: .86rem;
}

.coach-sidebar-link:hover{
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.2);
  transform: translateX(1px);
}

.coach-sidebar-link-icon{
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top left, var(--gold), #f29e1f);
  color: #111;
  font-size: .92rem;
  flex-shrink: 0;
}

.coach-sidebar-link-label{
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.coach-sidebar-link-title{
  font-weight: 600;
  color: #f8f8f8;
  font-size: .86rem;
}

.coach-sidebar-link-sub{
  font-size: .74rem;
  color: rgba(255,255,255,0.65);
}

.coach-sidebar-link.active{
  border-color: rgba(242,201,76,0.9);
  background: radial-gradient(circle at top left, rgba(242,201,76,0.18), rgba(0,0,0,0.8));
}

/* Sidebar específico para Tests: lista de deportes */
.tests-sidebar-link{
  justify-content: flex-start;
}

/* Responsive */
@media (max-width: 1024px){
  .coach-layout{
    grid-template-columns: minmax(0,1fr);
  }
  .coach-sidebar{
    order: -1;
    flex-direction: row;
    align-items: stretch;
    gap: .5rem;
    padding: .7rem .8rem;
    min-height: auto;
    overflow-x: auto;
  }
  .coach-sidebar-links{
    flex-direction: row;
    gap: .35rem;
  }
  .coach-sidebar-link{
    min-width: 150px;
  }
}


/* Sidebar flotante para vistas de entrenador (ocupa espacio vacío lateral) */
.coach-float-sidebar{
  position: fixed;
  left: 18px;
  top: 84px;
  bottom: 12px;
  width: 240px;
  background: rgba(10,10,10,0.96);
  border-radius: 18px;
  padding: 0.9rem 0.85rem 1.1rem;
  box-shadow: 0 18px 40px rgba(0,0,0,0.85);
  border: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  z-index: 15;
  transition: width 0.16s ease, padding 0.16s ease;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}
.coach-float-sidebar::-webkit-scrollbar{width:0;height:0;display:none;}

@media (min-width: 861px){
  .coach-float-sidebar{
    position: fixed !important;
    left: 18px !important;
    top: 84px !important;
    bottom: 12px !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: none !important;
    z-index: 950 !important;
  }
  .coach-float-sidebar::-webkit-scrollbar{
    width: 0 !important;
    height: 0 !important;
    display: none !important;
  }
  body.ara-coach-layout-ready .coach-float-sidebar,
  body.ara-coach-layout-ready .coach-float-sidebar.ara-coach-generated{
    position: fixed !important;
    left: 18px !important;
    top: 84px !important;
    bottom: 12px !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: none !important;
    z-index: 950 !important;
  }
  body.ara-coach-layout-ready .coach-float-sidebar::-webkit-scrollbar,
  body.ara-coach-layout-ready .coach-float-sidebar.ara-coach-generated::-webkit-scrollbar{
    width: 0 !important;
    height: 0 !important;
    display: none !important;
  }
}

/* Botón de colapsar/expandir en sidebar flotante */
.coach-sidebar-toggle{
  border-radius: 999px;
  border: 1px solid rgba(242,201,76,0.9);
  background: radial-gradient(circle at top left, #ffcc33, #ff9f00);
  color: #111;
  padding: 0.18rem 0.55rem;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(0,0,0,0.75);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.coach-sidebar-toggle:hover{
  background: radial-gradient(circle at top left, #ffe27a, #ffae1a);
  border-color: rgba(255,255,255,0.95);
  transform: translateX(-1px);
  box-shadow: 0 14px 26px rgba(0,0,0,0.9);
}

.coach-sidebar-toggle-icon{
  font-size: 1.05rem;
  line-height: 1;
}

/* Estado colapsado: sólo íconos */
.coach-float-sidebar.collapsed{
  width: 64px;
  padding: 0.85rem 0.3rem 0.95rem;
}

.coach-float-sidebar.collapsed .coach-sidebar-title,
.coach-float-sidebar.collapsed .coach-sidebar-link-label{
  display: none;
}

.coach-float-sidebar.collapsed .coach-sidebar-link{
  justify-content: center;
  min-height: 40px;
  border-radius: 12px;
}

/* Coach shell spacing: when sidebar is present on desktop,
   reserve visual space for the main content to avoid overlap and keep
   horizontal overflow under control. */
body.ara-coach-sidebar-visible{
  --ara-coach-sidebar-offset: 72px;
}
body.ara-coach-sidebar-visible:not(.ara-coach-sidebar-collapsed){
  --ara-coach-sidebar-offset: 240px;
}
body.ara-coach-sidebar-visible.ara-coach-sidebar-collapsed{
  --ara-coach-sidebar-offset: 72px;
}
body.ara-coach-sidebar-visible:not(.ara-coach-mobile-shell-ready) > .coach-dashboard-shell,
body.ara-coach-sidebar-visible:not(.ara-coach-mobile-shell-ready) > .coach-layout,
body.ara-coach-sidebar-visible:not(.ara-coach-mobile-shell-ready) > .coach-container-wide,
body.ara-coach-sidebar-visible:not(.ara-coach-mobile-shell-ready) > .cm-shell,
body.ara-coach-sidebar-visible:not(.ara-coach-mobile-shell-ready) > .chrono-shell,
body.ara-coach-sidebar-visible:not(.ara-coach-mobile-shell-ready) > .cmg-shell,
body.ara-coach-sidebar-visible:not(.ara-coach-mobile-shell-ready) > .tl-wrap,
body.ara-coach-sidebar-visible:not(.ara-coach-mobile-shell-ready) > .wrap,
body.ara-coach-sidebar-visible:not(.ara-coach-mobile-shell-ready) > .layout,
body.ara-coach-sidebar-visible:not(.ara-coach-mobile-shell-ready) > main.container,
body.ara-coach-sidebar-visible:not(.ara-coach-mobile-shell-ready) > .coach-main{
  box-sizing: border-box;
  padding-left: calc(var(--ara-coach-sidebar-offset) + 22px) !important;
}

@media (max-width: 1200px){
  body.ara-coach-sidebar-visible:not(.ara-coach-mobile-shell-ready) > .coach-dashboard-shell,
  body.ara-coach-sidebar-visible:not(.ara-coach-mobile-shell-ready) > .coach-layout,
  body.ara-coach-sidebar-visible:not(.ara-coach-mobile-shell-ready) > .coach-container-wide,
  body.ara-coach-sidebar-visible:not(.ara-coach-mobile-shell-ready) > .cm-shell,
  body.ara-coach-sidebar-visible:not(.ara-coach-mobile-shell-ready) > .chrono-shell,
  body.ara-coach-sidebar-visible:not(.ara-coach-mobile-shell-ready) > .cmg-shell,
  body.ara-coach-sidebar-visible:not(.ara-coach-mobile-shell-ready) > .tl-wrap,
  body.ara-coach-sidebar-visible:not(.ara-coach-mobile-shell-ready) > .wrap,
  body.ara-coach-sidebar-visible:not(.ara-coach-mobile-shell-ready) > .layout,
  body.ara-coach-sidebar-visible:not(.ara-coach-mobile-shell-ready) > main.container,
  body.ara-coach-sidebar-visible:not(.ara-coach-mobile-shell-ready) > .coach-main{
    padding-left: 22px !important;
    padding-right: 22px !important;
  }
}

@media (max-width: 860px){
  body.ara-coach-mobile-shell-ready .coach-float-sidebar,
  body.ara-coach-mobile-shell-ready #topbarMount{
    display: none !important;
  }
}


/* Submenús dentro del sidebar (p.ej. Configuración, Atletas, Plan Builder, Tests, PMC) */
.coach-sidebar-group{
  margin-top: 4px;
  margin-bottom: 4px;
}
.coach-sidebar-submenu{
  margin-top: 4px;
  padding-left: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.coach-sidebar-sub{
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(6,6,6,0.9);
  color: #f6f6f6;
  padding: 6px 10px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  text-align: left;
}
.coach-sidebar-sub span{
  pointer-events: none;
}
.coach-sidebar-sub .coach-sidebar-sub-label{
  flex: 1;
  white-space: nowrap;
}
.coach-sidebar-sub.active{
  border-color: var(--gold2);
  box-shadow: 0 0 0 1px rgba(255,195,0,0.45);
  background: radial-gradient(circle at top left, #ffe27a, #ffae1a);
  color: #111;
}
.coach-sidebar-sub-dot{
  font-size: 10px;
  opacity: 0.85;
}
@media (max-width: 1200px){
  .coach-float-sidebar{
    display: none;
  }
}

/* Cards full width for main content */

/* ------------------------------------------------------------
   Unified desktop rail for role shells
   Applies the same fixed left menu behavior to coach/super-admin
   pages that use the generated coach shell. The rail reserves only
   its collapsed width; hover/focus expands over the page without
   pushing content.
   ------------------------------------------------------------ */
@media (min-width: 861px){
  body.ara-coach-sidebar-visible{
    --ara-coach-sidebar-offset: 92px !important;
  }
  body.ara-coach-sidebar-visible:not(.ara-coach-sidebar-collapsed),
  body.ara-coach-sidebar-visible.ara-coach-sidebar-collapsed{
    --ara-coach-sidebar-offset: 92px !important;
  }
  body.ara-coach-sidebar-visible:not(.ara-coach-mobile-shell-ready) > .container.container-fullwidth,
  body.ara-coach-sidebar-visible:not(.ara-coach-mobile-shell-ready) > .coach-dashboard-shell,
  body.ara-coach-sidebar-visible:not(.ara-coach-mobile-shell-ready) > .coach-layout,
  body.ara-coach-sidebar-visible:not(.ara-coach-mobile-shell-ready) > .coach-container-wide,
  body.ara-coach-sidebar-visible:not(.ara-coach-mobile-shell-ready) > .cm-shell,
  body.ara-coach-sidebar-visible:not(.ara-coach-mobile-shell-ready) > .chrono-shell,
  body.ara-coach-sidebar-visible:not(.ara-coach-mobile-shell-ready) > .cmg-shell,
  body.ara-coach-sidebar-visible:not(.ara-coach-mobile-shell-ready) > .tl-wrap,
  body.ara-coach-sidebar-visible:not(.ara-coach-mobile-shell-ready) > .wrap,
  body.ara-coach-sidebar-visible:not(.ara-coach-mobile-shell-ready) > .layout,
  body.ara-coach-sidebar-visible:not(.ara-coach-mobile-shell-ready) > main.container,
  body.ara-coach-sidebar-visible:not(.ara-coach-mobile-shell-ready) > .coach-main{
    max-width:none !important;
    width:100% !important;
    box-sizing:border-box !important;
    padding-left:calc(var(--ara-coach-sidebar-offset) + 18px) !important;
    padding-right:18px !important;
  }
  body.ara-coach-layout-ready .topbarCenter{display:none!important;}
  body.ara-coach-layout-ready .topbarInner{justify-content:space-between;}
  body.ara-coach-layout-ready .topbarLeft{flex:1 1 auto;min-width:0;}
  body.ara-coach-layout-ready .topbarSearch{max-width:360px;}

  body.ara-coach-layout-ready .coach-float-sidebar,
  body.ara-coach-layout-ready .coach-float-sidebar.ara-coach-generated{
    left:0 !important;
    top:0 !important;
    bottom:0 !important;
    width:92px !important;
    max-height:none !important;
    border-radius:0 26px 26px 0 !important;
    border:0 !important;
    border-right:1px solid rgba(255,255,255,.10) !important;
    padding:18px 12px !important;
    gap:10px !important;
    background:linear-gradient(180deg,rgba(13,18,25,.98),rgba(5,7,10,.99)) !important;
    box-shadow:18px 0 48px rgba(0,0,0,.34) !important;
    z-index:1200 !important;
    transition:width .2s ease,box-shadow .2s ease !important;
    overflow-x:hidden !important;
    overflow-y:auto !important;
  }
  body.ara-coach-layout-ready .coach-float-sidebar:hover,
  body.ara-coach-layout-ready .coach-float-sidebar:focus-within{
    width:268px !important;
    box-shadow:22px 0 58px rgba(0,0,0,.44) !important;
  }
  body.ara-coach-layout-ready .coach-sidebar-head{
    min-height:54px;
    display:flex;
    align-items:center;
    gap:11px;
    padding:0 6px 12px;
    margin-bottom:4px;
    border-bottom:1px solid rgba(255,255,255,.08);
  }
  body.ara-coach-layout-ready .coach-sidebar-head:before{
    content:"";
    width:42px;
    height:42px;
    flex:0 0 42px;
    border-radius:14px;
    background-color:#08090c;
    background-image:var(--ara-brand-icon);
    background-size:cover;
    background-position:center;
    box-shadow:0 0 0 1px rgba(255,255,255,.16) inset;
  }
  body[data-theme="light"].ara-coach-layout-ready .coach-sidebar-head:before{background-image:var(--ara-brand-icon-light);}
  body.ara-coach-layout-ready .coach-sidebar-toggle{display:none!important;}
  body.ara-coach-layout-ready .coach-sidebar-title{
    min-width:150px;
    opacity:0;
    transform:translateX(-6px);
    transition:opacity .16s ease,transform .16s ease;
    color:#fff!important;
    font-size:13px;
    line-height:1.1;
    text-transform:none;
    letter-spacing:0;
    white-space:nowrap;
  }
  body.ara-coach-layout-ready .coach-float-sidebar:hover .coach-sidebar-title,
  body.ara-coach-layout-ready .coach-float-sidebar:focus-within .coach-sidebar-title{
    opacity:1;
    transform:translateX(0);
  }
  body.ara-coach-layout-ready .coach-sidebar-nav,
  body.ara-coach-layout-ready .coach-sidebar-links{
    display:flex;
    flex-direction:column;
    gap:8px;
    min-height:0;
    padding:0 0 10px;
  }
  body.ara-coach-layout-ready .coach-sidebar-group{margin:0;}
  body.ara-coach-layout-ready .coach-sidebar-link{
    min-height:48px;
    border-radius:16px;
    border:1px solid rgba(255,255,255,.08);
    background:rgba(255,255,255,.035);
    color:#D1D5DB;
    display:flex;
    align-items:center;
    gap:12px;
    padding:0 12px;
    font-weight:900;
    text-decoration:none;
    white-space:nowrap;
  }
  body.ara-coach-layout-ready .coach-sidebar-link:hover{
    background:rgba(255,255,255,.075);
    border-color:rgba(255,255,255,.18);
    transform:translateX(1px);
    text-decoration:none;
  }
  body.ara-coach-layout-ready .coach-sidebar-link.active{
    background:linear-gradient(135deg,#F2B705,#FFD35A) !important;
    border-color:rgba(242,183,5,.75) !important;
    color:#111827 !important;
    box-shadow:0 10px 22px rgba(242,183,5,.16);
  }
  body.ara-coach-layout-ready .coach-sidebar-icon,
  body.ara-coach-layout-ready .coach-sidebar-link-icon{
    width:42px;
    height:auto;
    flex:0 0 42px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:0;
    background:transparent;
    color:inherit;
    font-size:19px;
    line-height:1;
  }
  body.ara-coach-layout-ready .coach-sidebar-copy,
  body.ara-coach-layout-ready .coach-sidebar-link-label{
    min-width:162px;
    opacity:0;
    transform:translateX(-6px);
    transition:opacity .16s ease,transform .16s ease;
    display:flex;
    flex-direction:column;
    gap:1px;
  }
  body.ara-coach-layout-ready .coach-float-sidebar:hover .coach-sidebar-copy,
  body.ara-coach-layout-ready .coach-float-sidebar:focus-within .coach-sidebar-copy,
  body.ara-coach-layout-ready .coach-float-sidebar:hover .coach-sidebar-link-label,
  body.ara-coach-layout-ready .coach-float-sidebar:focus-within .coach-sidebar-link-label{
    opacity:1;
    transform:translateX(0);
  }
  body.ara-coach-layout-ready .coach-sidebar-copy b,
  body.ara-coach-layout-ready .coach-sidebar-link-title{
    font-size:14px;
    font-weight:950;
    color:inherit;
  }
  body.ara-coach-layout-ready .coach-sidebar-copy small,
  body.ara-coach-layout-ready .coach-sidebar-link-sub{
    font-size:11px;
    color:rgba(255,255,255,.62);
  }
  body.ara-coach-layout-ready .coach-sidebar-link.active small,
  body.ara-coach-layout-ready .coach-sidebar-link.active .coach-sidebar-link-sub{
    color:rgba(17,24,39,.72)!important;
  }
  body.ara-coach-layout-ready .coach-sidebar-submenu{
    display:none;
    margin:8px 0 0 54px;
    padding:0;
    gap:6px;
  }
  body.ara-coach-layout-ready .coach-float-sidebar:hover .coach-sidebar-submenu,
  body.ara-coach-layout-ready .coach-float-sidebar:focus-within .coach-sidebar-submenu{
    display:flex;
  }
}
.card.fullwidth{
  width:100%;
  max-width:100%;
}

/* Plan Builder: align main content with sidebar so it doesn't hug the left edge */
body.builder-with-sidebar .planbuilder-container-wide {
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px 32px 40px 88px; /* extra left padding to clear the floating sidebar */
  box-sizing: border-box;
}

@media (max-width: 1024px) {
  body.builder-with-sidebar .planbuilder-container-wide {
    padding: 16px 16px 32px 16px; /* normal padding on small screens */
  }
}


/* Generic dark card layout for main panels */
.card2{
  background: var(--panel);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: var(--shadow);
  padding: 12px 14px;
}

.card2 + .card2{
  margin-top: 12px;
}



/* === Mental Training Lab – Phase 6: premium modal & UX tweaks === */

.mtl-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
}

/* utility used by JS to hide the modal */
.mtl-modal.hidden,
.hidden {
  display: none !important;
}

.mtl-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}

/* main card for unlocked badge */
.mtl-modal-content {
  position: relative;
  max-width: 420px;
  width: calc(100% - 2rem);
  padding: 1.75rem 1.75rem 1.5rem;
  border-radius: 1.25rem;
  background:
    radial-gradient(circle at top, rgba(250, 204, 21, 0.18) 0, transparent 55%),
    linear-gradient(135deg, #111827 0%, #020617 70%);
  border: 1px solid rgba(250, 204, 21, 0.28);
  box-shadow:
    0 22px 60px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(15, 23, 42, 0.9);
  color: #f9fafb;
  animation: mtl-pop-in 260ms ease-out;
}

/* tiny glow dot behind the emoji icon */
.mtl-modal-content .mtl-badge-icon-wrap {
  position: relative;
}

.mtl-modal-content .mtl-badge-icon-wrap::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: inherit;
  background: radial-gradient(circle at 30% 0%, rgba(255, 255, 255, 0.55), transparent 60%);
  opacity: 0.6;
}

/* primary CTA button */
.mtl-btn-primary {
  background-image: linear-gradient(90deg, #fbbf24, #f59e0b);
  color: #111827;
  border-radius: 999px;
  border: none;
  padding-inline: 1.6rem;
  padding-block: 0.6rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow:
    0 12px 30px rgba(234, 179, 8, 0.4),
    0 0 0 1px rgba(15, 23, 42, 0.9);
  transition:
    transform 120ms ease-out,
    box-shadow 120ms ease-out,
    filter 120ms ease-out;
}

.mtl-btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow:
    0 16px 40px rgba(234, 179, 8, 0.5),
    0 0 0 1px rgba(15, 23, 42, 0.9);
}

.mtl-btn-primary:active {
  transform: translateY(0);
  filter: brightness(0.98);
  box-shadow:
    0 8px 18px rgba(234, 179, 8, 0.35),
    0 0 0 1px rgba(15, 23, 42, 0.9);
}

/* subtle animation for the card */
@keyframes mtl-pop-in {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Small tweak: when there is an active mission card, keep it visually strong */
.mental-lab-main-card {
  border-radius: 1.25rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow:
    0 22px 45px rgba(15, 23, 42, 0.68);
}

/* highlight the main "Ejercicio del día" button when mission still has exercises */
.mental-lab-main-card .cta-main {
  position: relative;
  overflow: hidden;
}

.mental-lab-main-card .cta-main::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 0% 0%, rgba(250, 204, 21, 0.35), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(59, 130, 246, 0.25), transparent 55%);
  opacity: 0;
  transition: opacity 200ms ease-out;
}

.mental-lab-main-card .cta-main:not([disabled]):hover::before {
  opacity: 1;
}
