/* Training Unit v1.2.5 — 90% typography, wider modals and structured controls */
:root{
  --fs-caption:10.8px;
  --fs-body:12.6px;
  --fs-table:11.7px;
  --fs-subtitle:16.2px;
  --fs-title:21.6px;
  --lh-caption:14.4px;
  --lh-body:18px;
  --lh-subtitle:23.4px;
  --lh-title:28.8px;
}

body,button,input,select,textarea{font-size:12.6px;line-height:18px}
h1{font-size:21.6px;line-height:28.8px}
h2{font-size:16.2px;line-height:23.4px}
h3{font-size:13.5px;line-height:19.8px}
.brand b{font-size:18px;line-height:25.2px}
.nav,.btn,input,select,textarea,label{font-size:12.6px;line-height:18px}
.btn.sm{font-size:10.8px;line-height:14.4px}
.small,.muted,.card .s,.v121-kpi>div,.notice{font-size:10.8px;line-height:14.4px}
.badge,.specialty-tag,.specialty-name-chip,.rule-origin,.v121-rule-type,.v121-rule-status{font-size:9.9px;line-height:14.4px}
table th,table td{font-size:11.7px;line-height:16.2px;padding:6.3px 7.2px}
.stat .n,.v121-kpi strong{font-size:21.6px;line-height:27px}
.stat .l{font-size:11.7px;line-height:16.2px}
.v121-density-compact table th,.v121-density-compact table td{font-size:10.8px;line-height:14.4px}
.v121-density-compact body,.v121-density-compact button,.v121-density-compact input,.v121-density-compact select,.v121-density-compact textarea{font-size:11.7px}

.modal{width:min(1240px,97vw);max-height:94vh;padding:60px 20px 20px}
.modal.small{width:min(820px,97vw)}
.modal.xsmall{width:min(560px,97vw)}
.modal-x{left:14px;top:13px;width:36px;height:36px;z-index:12}
.v124-modal-back{left:58px;top:13px;height:36px;z-index:12}
.modal>.section-title:first-of-type,.modal>h2:first-of-type{margin-top:0}
.v125-specialty-head{margin-top:-3px}
.v125-specialty-main table{min-width:1180px}
.v125-date-cell,.v125-duration-cell{white-space:nowrap;min-width:92px}

.v125-time-control{display:grid;grid-template-columns:minmax(130px,1fr) 64px;gap:7px;position:relative;direction:ltr}
.v125-time-control .time12{grid-column:1;color:transparent!important;caret-color:transparent;text-align:center;letter-spacing:1px;background:#fff;cursor:text;min-height:38px}
.v125-time-display{position:absolute;left:10px;right:81px;top:50%;transform:translateY(-50%);pointer-events:none;text-align:center;color:#111;font-weight:700;font-variant-numeric:tabular-nums;letter-spacing:1px}
.v125-period{grid-column:2;border:1px solid #c9c4ea;background:#342a78;color:#fff;border-radius:9px;font-weight:900;min-height:38px}
.v125-period:hover{background:#4d40a7}
.v125-time-control:focus-within .time12{border-color:#4b3fb4;box-shadow:0 0 0 2px rgba(75,63,180,.13)}
.v125-time-control.invalid .time12{border-color:#c44646;box-shadow:0 0 0 2px rgba(196,70,70,.12)}

.v125-section-buttons{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0 12px}
.v125-plan-button{background:#4b3fb4;color:#fff;border-color:#4b3fb4}
.v125-ledger-button{background:#ef8b2c;color:#fff;border-color:#ef8b2c}
.v125-plan-button:hover,.v125-plan-button.active{background:#382d8d;color:#fff}
.v125-ledger-button:hover,.v125-ledger-button.active{background:#d76f0b;color:#fff}
.v125-plan-row{border-color:#bcb5ec;color:#382d8d;background:#f5f3ff}
.v125-ledger-row{border-color:#f2c38f;color:#96500b;background:#fff7ee}
.v125-work-toggle{border-color:#b9dec8!important;color:#12613a!important;background:#f4fff8!important}
.v125-work-toggle.active{border-color:#efadad!important;color:#a52727!important;background:#fff0f0!important;box-shadow:inset 0 0 0 1px rgba(165,39,39,.08)}
.v125-mode-hint,.v125-reset-preview{margin-top:8px;padding:9px 11px;border:1px solid #ddd7f5;border-radius:10px;background:#f8f6ff;color:#342a78}
.v125-month-reset{margin-top:14px;border-color:#efb3b3;background:#fffafa}
.v125-month-reset h2{color:#a52727}

.v125-conflict-bar{position:fixed;left:18px;right:18px;bottom:16px;z-index:900;display:none;align-items:center;gap:10px;flex-wrap:wrap;padding:11px 13px;border:1px solid #e3a34f;border-radius:12px;background:#fff6dc;color:#4f380b;box-shadow:0 12px 36px rgba(0,0,0,.22)}
.v125-conflict-bar.open{display:flex}
.v125-conflict-bar span{flex:1;min-width:260px}

@media(max-width:900px){
  .modal{width:98vw;padding-inline:14px}
  .v125-specialty-main table{min-width:1120px}
}
@media(max-width:600px){
  body,button,input,select,textarea{font-size:12.6px}
  h1{font-size:18.9px;line-height:25.2px}h2{font-size:15.3px;line-height:21.6px}
  .modal{width:99vw;max-height:96vh;padding:58px 10px 14px}
  .v125-time-control{grid-template-columns:minmax(105px,1fr) 58px}
  .v125-time-display{right:75px}
}
