@font-face{
  font-family:"ALS Sirius";
  src:url("../fonts/ALSSirius.otf") format("opentype");
  font-weight:400;
  font-style:normal;
  font-display:swap;
}
@font-face{
  font-family:"ALS Sirius";
  src:url("../fonts/ALS_Sirius_Bold_0.95.otf") format("opentype");
  font-weight:700;
  font-style:normal;
  font-display:swap;
}

:root{
  --bg:#eef4f7;
  --bg-soft:#f7fafc;
  --card:rgba(255,255,255,.68);
  --card-strong:rgba(255,255,255,.82);
  --glass:rgba(255,255,255,.56);
  --text:#102033;
  --muted:#607086;
  --line:rgba(170,191,207,.42);
  --line-strong:rgba(145,170,188,.58);
  --primary:#1f8f64;
  --primary-strong:#166647;
  --blue:#2d78d7;
  --orange:#ef9a34;
  --danger:#d24b4b;
  --danger-soft:rgba(255,240,240,.82);
  --success-soft:rgba(235,255,244,.82);
  --shadow:0 18px 40px rgba(15, 37, 58, .08);
  --shadow-soft:0 10px 22px rgba(15, 37, 58, .06);
  --radius:16px;
  --radius-sm:10px;
  --topbar:78px;
  --transition:.18s ease;
}

*{box-sizing:border-box}
html,body{min-height:100%}
body{
  margin:0;
  font:15px/1.45 "ALS Sirius", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color:var(--text);
  background:linear-gradient(180deg,#f5f7f9 0%, #edf2f5 100%);
  overflow-x:hidden;
  letter-spacing:normal;
}
button,input,textarea,select{font:inherit; letter-spacing:normal}
button{cursor:pointer}
[hidden]{display:none !important}

.page-bg{position:fixed; inset:0; pointer-events:none; overflow:hidden}
.page-bg::after{content:""; position:absolute; inset:0; background:linear-gradient(180deg, rgba(255,255,255,.30), rgba(255,255,255,.08));}
.page-orb{position:absolute; border-radius:999px; filter:blur(110px); opacity:.20}
.orb-a{width:460px; height:460px; top:-140px; right:-80px; background:rgba(60,138,226,.16)}
.orb-b{width:380px; height:380px; left:-140px; top:28%; background:rgba(31,143,100,.10)}
.orb-c{display:none}
.desktop-guard{display:none !important}

.app-shell{position:relative; min-height:100vh}
.topbar{
  position:sticky;
  top:0;
  z-index:60;
  height:var(--topbar);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:0 clamp(16px, 2.4vw, 28px);
  backdrop-filter:blur(22px) saturate(125%);
  -webkit-backdrop-filter:blur(22px) saturate(125%);
  background:rgba(255,255,255,.44);
  border-bottom:1px solid rgba(255,255,255,.35);
  box-shadow:0 8px 22px rgba(15,37,58,.05);
}
.topbar-left,.topbar-right{display:flex; align-items:center; gap:14px; min-width:0}
.topbar-brand{min-width:0}
.topbar-logo{height:34px; width:auto; display:block}
.topbar-title{font-size:18px; font-weight:700; line-height:1.15}
.topbar-subtitle{display:none}

.icon-btn,.ghost-btn,.primary-btn,.mini-btn,.block-nav-item,.nav-card{
  border:none;
  transition:transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition), color var(--transition), opacity var(--transition);
}
.icon-btn:hover,.ghost-btn:hover,.primary-btn:hover,.mini-btn:hover,.block-nav-item:hover,.nav-card:hover{transform:translateY(-1px)}
.icon-btn{
  width:40px;
  height:40px;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:rgba(255,255,255,.72);
  border:1px solid rgba(255,255,255,.48);
  box-shadow:var(--shadow-soft);
  color:var(--text);
}
.date-open-btn{flex:0 0 auto}
.user-chip{
  padding:11px 14px;
  border-radius:12px;
  background:rgba(255,255,255,.58);
  border:1px solid rgba(255,255,255,.45);
  box-shadow:var(--shadow-soft);
  color:var(--primary-strong);
  font-weight:700;
  white-space:nowrap;
}
.ghost-btn,.primary-btn,.mini-btn{
  min-height:44px;
  padding:11px 16px;
  border-radius:12px;
}
.ghost-btn{
  background:rgba(255,255,255,.66);
  border:1px solid rgba(255,255,255,.44);
  color:var(--text);
  box-shadow:var(--shadow-soft);
}
.primary-btn{
  color:#fff;
  background:linear-gradient(135deg, #1f8f64 0%, #287ccf 100%);
  box-shadow:0 16px 30px rgba(40,124,207,.18);
}
.mini-btn{
  min-height:38px;
  padding:8px 14px;
  background:rgba(255,255,255,.7);
  border:1px solid rgba(255,255,255,.45);
  color:var(--text);
  box-shadow:var(--shadow-soft);
}
.primary-btn[disabled],.ghost-btn[disabled],.mini-btn[disabled]{opacity:.45; cursor:not-allowed; transform:none; box-shadow:none}

.page-main{padding:22px clamp(14px, 2.2vw, 28px) 36px}
.screen-login{min-height:calc(100vh - 44px); display:flex; align-items:center}
.login-shell{
  width:min(1840px, 100%);
  margin:0 auto;
}
.login-frame,.cabinet-shell,.workspace-panel,.block-card,.programs-shell,.accounting-shell,.management-shell,.nav-card,.subcard{
  position:relative;
  border:1px solid rgba(255,255,255,.52);
  background:rgba(255,255,255,.58);
  backdrop-filter:blur(14px) saturate(112%);
  -webkit-backdrop-filter:blur(14px) saturate(112%);
  box-shadow:var(--shadow);
}
.login-frame::before,.cabinet-shell::before,.workspace-panel::before,.block-card::before,.programs-shell::before,.accounting-shell::before,.management-shell::before,.nav-card::before,.subcard::before{
  content:"";
  position:absolute;
  inset:1px 1px auto 1px;
  height:24%;
  border-radius:inherit;
  background:linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,0));
  pointer-events:none;
}
.login-frame,.cabinet-shell,.programs-shell,.accounting-shell,.management-shell{border-radius:16px}
.workspace-panel,.block-card,.nav-card,.subcard{border-radius:14px}
.login-frame{
  display:grid;
  grid-template-columns:minmax(0,1.95fr) minmax(500px,.95fr);
  align-items:stretch;
  overflow:hidden;
}
.login-side{
  padding:38px 36px;
  min-width:0;
}
.login-card{
  padding:42px 34px;
  border-left:1px solid rgba(174,191,204,.48);
  background:rgba(255,255,255,.24);
  min-width:0;
}
.login-side h1{margin:22px 0 28px; font-size:36px; line-height:1.12; max-width:1180px}
.login-logo{width:210px; max-width:100%}
.goal-card{
  max-width:100%;
  padding:26px 28px;
  border-radius:14px;
  background:rgba(255,255,255,.32);
  border:1px solid rgba(255,255,255,.42);
}
.goal-title{font-weight:700; margin-bottom:10px}
.goal-list{margin:0; padding-left:22px; display:grid; gap:14px}
.eyebrow{display:block; margin-bottom:10px; font-size:12px; color:var(--blue); font-weight:700}
.login-card h2,.content-head h2,.programs-shell h2,.accounting-shell h2,.management-shell h2{margin:0; font-size:27px; line-height:1.18}
.form-grid,.section-grid{display:grid; gap:16px}
.form-grid{margin-top:20px}
.section-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.field{display:flex; flex-direction:column; gap:8px; min-width:0}
.field span,.table-head span{font-size:13px; font-weight:700}
.helper,.muted-note{font-size:13px; color:var(--muted)}
.input,.table-input{
  width:100%;
  border:1px solid rgba(158,181,198,.44);
  border-radius:12px;
  padding:13px 14px;
  outline:none;
  background:rgba(255,255,255,.76);
  color:var(--text);
  transition:border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.input:focus,.table-input:focus{
  border-color:rgba(31,143,100,.48);
  box-shadow:0 0 0 4px rgba(31,143,100,.10);
  background:rgba(255,255,255,.92);
}
.input.is-error,.table-input.is-error{
  border-color:var(--danger);
  background:var(--danger-soft);
  box-shadow:0 0 0 4px rgba(210,75,75,.10);
}
.input[readonly],.table-input[readonly]{background:rgba(247,250,252,.88)}
.textarea{min-height:110px; resize:vertical}
.textarea.lg{min-height:150px}
.textarea.xl{min-height:220px}
.inline-error{
  padding:12px 14px;
  border-radius:12px;
  background:var(--danger-soft);
  color:var(--danger);
  border:1px solid rgba(210,75,75,.22);
  font-weight:700;
}
.span-2{grid-column:1 / -1}
.date-row{display:flex; gap:10px; align-items:center}
.date-row .input{flex:1 1 auto}
.native-date-input{position:absolute; opacity:0; pointer-events:none; width:1px; height:1px}

.screen-cabinet,.screen-programs,.screen-accounting,.screen-management{max-width:1800px; margin:0 auto}
.cabinet-shell,.programs-shell,.accounting-shell,.management-shell{padding:24px}
.nav-grid{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px}
.nav-card{
  min-height:182px;
  padding:24px;
  text-align:left;
  display:flex;
  flex-direction:column;
  gap:18px;
  background:rgba(255,255,255,.60);
}
.nav-card-primary{background:rgba(255,255,255,.68)}
.nav-card-top{display:flex; align-items:center; justify-content:space-between}
.nav-card-icon{
  width:100%;
  min-height:64px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  border-radius:14px;
  background:rgba(255,255,255,.68);
  border:1px solid rgba(255,255,255,.54);
  color:var(--blue);
  font-weight:700;
  padding:14px 16px;
}
.nav-card-num{font-size:28px; line-height:1; color:var(--text)}
.nav-card-icon svg{width:26px; height:26px; stroke:currentColor; stroke-width:1.8; fill:none; stroke-linecap:round; stroke-linejoin:round}
.nav-card-title{font-size:21px; font-weight:700; line-height:1.16}
.nav-card-status{margin-top:auto; font-size:13px; color:var(--muted)}

.workspace{display:grid; grid-template-columns:320px minmax(0,1fr); gap:18px; align-items:start}
.workspace-nav{position:sticky; top:calc(var(--topbar) + 18px); display:grid; gap:14px}
.workspace-panel{padding:18px; background:rgba(255,255,255,.48)}
.compact-panel{padding:16px 18px}
.panel-soft{background:rgba(241,248,245,.54)}
.workspace-title{font-size:19px; font-weight:700}
.block-nav{display:grid; gap:10px}
.block-nav-item{
  position:relative;
  width:100%;
  text-align:left;
  display:grid;
  gap:3px;
  padding:16px 18px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.46);
  background:rgba(255,255,255,.64);
  box-shadow:var(--shadow-soft);
}
.block-nav-item::after{
  content:"↗";
  position:absolute;
  right:16px;
  top:14px;
  width:24px;
  height:24px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:rgba(255,255,255,.66);
  border:1px solid rgba(255,255,255,.52);
  color:var(--blue);
  font-size:12px;
}
.block-nav-item span{font-size:12px; color:var(--blue)}
.block-nav-item strong{font-size:15px; line-height:1.26; padding-right:32px}
.block-nav-item em{font-style:normal; color:var(--muted); font-size:13px; font-weight:700}
.block-nav-item.is-active{
  background:rgba(255,255,255,.82);
  border-color:rgba(48,124,215,.28);
  box-shadow:0 18px 34px rgba(45,120,215,.11);
}
.block-nav-status{display:flex; align-items:center; gap:8px}
.block-nav-check{
  width:22px;
  height:22px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:rgba(255,255,255,.74);
  border:1px solid rgba(175,196,211,.64);
  color:transparent;
  font-size:13px;
}
.block-nav-item.is-complete .block-nav-check{
  background:rgba(31,143,100,.14);
  border-color:rgba(31,143,100,.26);
  color:var(--primary);
}
.block-nav-item.is-complete em{color:var(--primary-strong);}

.block-nav-item.is-error{
  border-color:rgba(210,75,75,.42);
  box-shadow:0 0 0 1px rgba(210,75,75,.18), 0 14px 24px rgba(210,75,75,.08);
}
.block-nav-item.is-error::after{
  color:var(--danger);
  border-color:rgba(210,75,75,.32);
}
.block-nav-item.is-error span,
.block-nav-item.is-error em{
  color:var(--danger);
}
.block-card.has-errors{
  border-color:rgba(210,75,75,.34);
  box-shadow:0 0 0 1px rgba(210,75,75,.12), var(--shadow);
}
.workspace-content{display:grid; gap:16px}

.filters-row{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  margin-bottom:14px;
}
.filter-field{min-width:0}
.sentence-card{
  padding:16px 18px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.42);
  background:rgba(255,255,255,.40);
  display:grid;
  gap:12px;
}
.sentence-wrap{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
  line-height:1.6;
  font-weight:700;
}
.inline-select{
  width:auto;
  min-width:260px;
  max-width:100%;
}
.programs-shell .content-head{margin-bottom:14px}

.programs-filters{
  grid-template-columns:repeat(3,minmax(0,240px));
  align-items:end;
}
.programs-table-wrap{overflow:auto}
.programs-table{min-width:1240px}
.programs-table thead th{
  white-space:normal;
  line-height:1.25;
}
.programs-table tbody td{
  vertical-align:middle;
}
.program-col-number{width:180px}
.program-col-title{min-width:320px; font-weight:700}
.program-col-type{width:80px; text-align:center}
.program-col-status{width:170px}
.program-col-action{width:500px}
.program-actions{display:flex; align-items:center; justify-content:flex-end; gap:8px; flex-wrap:nowrap}
.program-actions .ghost-btn{min-width:136px; white-space:nowrap}
.program-actions .ghost-btn:nth-child(2){min-width:190px}
.program-actions .ghost-btn:nth-child(3){min-width:168px}

.program-col-title strong{display:block; font-weight:700}
.program-col-title .muted-note{margin-top:6px}
.period-picker,.term-range-picker{position:relative; display:flex; gap:10px; align-items:center}
.period-picker .input,.term-range-picker .input{flex:1 1 auto}
.calendar-popover{
  position:absolute;
  top:calc(100% + 8px);
  left:0;
  z-index:40;
  width:320px;
  padding:14px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.46);
  background:rgba(255,255,255,.94);
  box-shadow:var(--shadow);
}
.calendar-head,.calendar-weekdays,.calendar-footer{display:grid; align-items:center}
.calendar-head{grid-template-columns:40px 1fr 40px; gap:8px; margin-bottom:12px}
.calendar-title{text-align:center; font-weight:700; text-transform:capitalize}
.calendar-nav-btn{width:40px; height:40px}
.calendar-weekdays{grid-template-columns:repeat(7,1fr); gap:6px; margin-bottom:8px}
.calendar-weekdays span{font-size:12px; text-align:center; color:var(--muted); font-weight:700}
.calendar-grid{display:grid; grid-template-columns:repeat(7,1fr); gap:6px}
.calendar-day{
  min-height:38px;
  border:none;
  border-radius:10px;
  background:rgba(247,250,252,.92);
  color:var(--text);
  font:inherit;
}
.calendar-day.is-empty{visibility:hidden}
.calendar-day.is-in-range{background:rgba(45,120,215,.10)}
.calendar-day.is-selected{background:rgba(45,120,215,.18); color:var(--blue); font-weight:700}
.calendar-footer{margin-top:12px}
.calendar-clear-btn{width:100%}

.content-head,.content-head-actions,.stack-actions,.choice-row,.repeat-head,.table-head,.mismatch-card,.footer-actions,.table-bottom-actions{
  display:flex;
  align-items:center;
}
.content-head{justify-content:space-between; gap:16px}
.content-head-actions,.stack-actions,.footer-actions{gap:10px; flex-wrap:wrap}
.table-head,.repeat-head,.mismatch-card{justify-content:space-between; gap:12px}
.table-bottom-actions{justify-content:flex-start; margin-top:12px}
.notice-banner{
  padding:13px 15px;
  border-radius:12px;
  background:rgba(255,255,255,.56);
  border:1px solid rgba(255,255,255,.42);
}
.block-card{display:none; padding:22px; background:rgba(255,255,255,.52)}
.block-card.active{display:block}

.goal-phrase{
  display:grid;
  gap:10px;
  padding:18px;
  border-radius:14px;
  background:rgba(255,255,255,.46);
  border:1px solid rgba(255,255,255,.42);
}
.goal-line{font-weight:700}
.goal-inline{display:flex; align-items:center; gap:10px; flex-wrap:wrap}
.goal-inline-main{flex-wrap:nowrap}
.goal-inline-main .goal-line,.goal-static{font-size:15px; font-weight:700; white-space:nowrap}
.goal-select{width:220px; max-width:100%}
.goal-area-input{min-width:260px; flex:1 1 320px}
.goal-static{font-weight:700}
.goal-textarea{min-height:92px}

.checkbox-field{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:46px;
  padding:12px 14px;
  border-radius:12px;
  background:rgba(255,255,255,.46);
  border:1px solid rgba(255,255,255,.42);
  font-weight:700;
}
.checkbox-field input{
  width:18px;
  height:18px;
  accent-color:var(--primary);
  flex:0 0 auto;
}
.checkbox-field span{font-size:14px}
.inline-add-text-btn{min-height:36px; padding:7px 12px}
.extra-text-wrap{display:grid; gap:8px}

.results-intro{
  margin-bottom:6px;
  padding:14px 16px;
  border-radius:12px;
  background:rgba(255,255,255,.46);
  border:1px solid rgba(255,255,255,.4);
  font-weight:700;
}
.repeat-group{display:grid; gap:10px; margin-top:16px}
.repeat-list{display:grid; gap:12px}
.repeat-head strong{font-size:15px}
.repeat-head-left{justify-content:flex-start; gap:10px}
.repeat-row{display:grid; grid-template-columns:minmax(0,1fr) 42px; gap:10px; align-items:start}

.person-fields{
  display:grid;
  gap:12px;
  padding:16px;
  border-radius:14px;
  background:rgba(255,255,255,.34);
  border:1px solid rgba(255,255,255,.42);
}
.person-fields-title{font-size:16px; font-weight:800}
.person-fields-grid{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px}
.person-fields-grid .span-2{grid-column:1/-1}

.icon-remove{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:rgba(255,255,255,.72);
  border:1px solid rgba(255,255,255,.46);
  box-shadow:var(--shadow-soft);
  color:var(--danger);
  font-size:20px;
}

.table-wrap{
  overflow:auto;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.46);
  background:rgba(255,255,255,.44);
}
.data-table{width:100%; min-width:780px; border-collapse:separate; border-spacing:0}
.data-table th,.data-table td{
  padding:14px 12px;
  border-bottom:1px solid rgba(186,204,216,.38);
  text-align:left;
  vertical-align:top;
}
.data-table thead th{
  position:sticky;
  top:0;
  z-index:1;
  background:rgba(247,250,252,.86);
  font-size:13px;
  font-weight:700;
}
.data-table tfoot th{background:rgba(247,250,252,.84)}
.data-table tr:last-child td,.data-table tr:last-child th{border-bottom:none}
.table-input{
  min-width:110px;
  padding:11px 12px;
  background:rgba(255,255,255,.82);
}
.data-table textarea.table-input{min-height:72px; resize:vertical}
.teacher-row{
  display:grid;
  grid-template-columns:1.3fr 1fr 1fr 42px;
  gap:10px;
  margin-top:10px;
}
.teacher-row-main{grid-template-columns:1.3fr 1fr 1fr}
.subcard{
  padding:18px;
  display:grid;
  gap:14px;
  background:rgba(255,255,255,.52);
}
.subcard-title{font-size:16px; font-weight:700}
.mismatch-card{
  border-radius:14px;
  padding:16px 18px;
  background:rgba(255,255,255,.5);
  border:1px solid rgba(255,255,255,.46);
}
.mismatch-card.is-danger{
  border-color:rgba(210,75,75,.36);
  background:rgba(255,240,240,.72);
}
.mismatch-label{font-size:13px; font-weight:700}
.mismatch-value{font-size:24px; font-weight:700}
.footer-actions{
  justify-content:flex-start;
  padding:12px 4px 0;
}
.empty-state{
  margin-top:14px;
  padding:18px;
  border-radius:14px;
  background:rgba(255,255,255,.52);
  border:1px solid rgba(255,255,255,.46);
}
.status-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:34px;
  padding:6px 12px;
  border-radius:999px;
  font-size:13px;
  font-weight:700;
  background:rgba(255,255,255,.74);
}
.status-draft{color:var(--blue)}
.status-review{color:var(--orange)}
.status-approved{color:var(--primary)}
.status-implementation{color:#6f55bd}
.status-completed,.status-finished{color:var(--muted)}
.save-state{
  min-height:44px;
  display:flex;
  align-items:center;
  padding:10px 14px;
  border-radius:12px;
  background:rgba(255,255,255,.58);
  border:1px solid rgba(255,255,255,.44);
  font-weight:700;
}
.save-state.is-success{background:var(--success-soft); color:var(--primary-strong)}
.save-state.is-error{background:var(--danger-soft); color:var(--danger)}
.save-state.is-working{background:rgba(255,255,255,.7)}

.toast{
  position:fixed;
  right:18px;
  bottom:122px;
  z-index:95;
  max-width:min(460px, calc(100vw - 28px));
  padding:13px 16px;
  border-radius:12px;
  background:rgba(16,32,51,.92);
  color:#fff;
  box-shadow:var(--shadow);
}


.field-hint{display:block; margin-top:4px; font-size:12px; color:var(--muted)}
.attachments-grid{grid-template-columns:1fr; gap:16px}
.attachment-card{
  display:grid;
  gap:10px;
  padding:16px;
  border-radius:14px;
  background:rgba(255,255,255,.4);
  border:1px solid rgba(255,255,255,.46);
}
.attachment-actions{display:flex; flex-wrap:wrap; gap:10px}
.attachment-file-info{display:flex; flex-wrap:wrap; gap:10px; align-items:center; font-size:13px}
.attachment-file-info a{color:var(--blue); text-decoration:none; font-weight:700}
.attachment-file-info a:hover{text-decoration:underline}
.inline-input{min-width:320px; max-width:100%}
.sr-only{position:absolute !important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0}
.budget-group-heading td{
  padding:11px 14px;
  font-weight:800;
  border-bottom:1px solid rgba(255,255,255,.2);
}
.budget-group-heading.budget-group-basic td,.budget-item-row.budget-group-basic td{background:rgba(232,221,187,.68)}
.budget-group-heading.budget-group-development td,.budget-item-row.budget-group-development td{background:rgba(207,221,200,.75)}
.budget-group-heading.budget-group-earned td,.budget-item-row.budget-group-earned td{background:rgba(214,225,238,.78)}
.budget-item-row td{border-top:1px solid rgba(255,255,255,.18)}
.budget-check-card{
  display:grid;
  gap:10px;
  padding:16px;
  border-radius:14px;
  background:rgba(255,255,255,.5);
  border:1px solid rgba(255,255,255,.46);
}
.budget-check-title{font-size:16px; font-weight:800}
.budget-check-row{
  display:grid;
  grid-template-columns:minmax(180px,1fr) auto minmax(260px,1.25fr);
  gap:8px 12px;
  align-items:center;
  padding:12px 14px;
  border-radius:10px;
  border:2px solid transparent;
}
.budget-check-basic{background:rgba(232,221,187,.68)}
.budget-check-development{background:rgba(207,221,200,.75)}
.budget-check-earned{background:rgba(214,225,238,.78)}
.budget-check-row strong{font-size:17px}
.budget-check-row em{font-style:normal; font-size:13px; color:var(--muted); text-align:right}
.budget-check-details{grid-column:1/-1; font-size:12px; color:var(--muted)}
.budget-check-row.is-valid{border-color:rgba(28,129,91,.75)}
.budget-check-row.is-valid em{color:var(--primary-strong)}
.budget-check-row.is-invalid{border-color:rgba(210,75,75,.78)}
.budget-check-row.is-invalid em{color:var(--danger)}
@media (max-width:1220px){
  .nav-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .workspace{grid-template-columns:1fr}
  .workspace-nav{position:static}
}
@media (max-width:980px){
  .page-main{padding:14px 12px 32px}
  .login-frame{grid-template-columns:1fr}
  .login-side{padding:22px}
  .login-card{padding:24px 22px; border-left:none; border-top:1px solid rgba(174,191,204,.48)}
  .login-side h1{font-size:28px}
  .topbar{height:auto; min-height:var(--topbar); padding:12px}
  .topbar{flex-wrap:wrap}
  .topbar-right{width:100%; justify-content:space-between}
  .nav-grid,.section-grid,.filters-row{grid-template-columns:1fr}
  .teacher-row,.teacher-row-main{grid-template-columns:1fr}
  .content-head{align-items:stretch; flex-direction:column}
  .content-head-actions{width:100%}
  .content-head-actions > *{flex:1 1 100%}
  .footer-actions > *{flex:1 1 100%}
  .goal-inline{flex-direction:column; align-items:stretch}
  .goal-inline-main .goal-line,.goal-static{white-space:normal}
  .term-range-picker{flex-wrap:wrap}
  .term-range-picker .date-open-btn{width:100%}
  .goal-select{width:100%}
  .toast{right:12px; bottom:102px}
}
@media (max-width:720px){
  .budget-check-row{grid-template-columns:1fr auto}
  .budget-check-row em{grid-column:1/-1; text-align:left}
  .login-side h1{font-size:24px}
  .nav-grid{grid-template-columns:1fr}
  .data-table{min-width:680px}
  .user-chip{font-size:13px}
  .topbar-title{font-size:16px}
}

/* DPO form enhancements */
.topbar-home-link{
  display:inline-flex;
  align-items:center;
  padding:0;
  border:0;
  background:transparent;
  color:inherit;
  text-align:left;
  cursor:pointer;
}
.topbar-home-link:hover{color:var(--primary-strong)}
.italic-placeholder::placeholder{font-style:italic}
.field-meta{display:flex; align-items:center; justify-content:space-between; gap:12px; color:var(--muted)}
.field-meta small{font-size:12px}
.static-info-card{
  padding:14px 16px;
  border-radius:12px;
  background:rgba(255,255,255,.56);
  border:1px solid rgba(255,255,255,.44);
  font-weight:700;
}
.term-periods-section,.term-periods-list{display:grid; gap:10px}
.term-period-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) 42px;
  gap:10px;
  align-items:end;
}
.term-date-field{display:grid; gap:6px}
.term-date-field span{font-size:12px; color:var(--muted); font-weight:700}
.term-period-remove[disabled]{opacity:.35; cursor:not-allowed}
.basis-field{padding:16px; border-radius:14px; background:rgba(255,255,255,.34); border:1px solid rgba(255,255,255,.4)}
.basis-actions{display:flex; align-items:center; gap:12px; flex-wrap:wrap}
.directory-link{font-size:13px; font-weight:700; color:var(--blue); text-decoration:none}
.directory-link:hover{text-decoration:underline}
.approval-panel{display:grid; gap:10px}
.approval-side-btn{width:100%; white-space:normal; line-height:1.25}

@media (max-width: 760px){
  .term-period-row{grid-template-columns:1fr}
  .term-period-remove{width:100%}
  .basis-actions>*{width:100%}
}

@media (max-width: 760px){
  .person-fields-grid{grid-template-columns:1fr}
  .person-fields-grid .span-2{grid-column:auto}
}

/* 2026-08-21: updated DPO builder fields */
.static-info-inline{display:inline-flex; align-items:center; gap:6px; width:100%}
.optional-label{font-weight:500; color:var(--muted); font-size:12px}
.basis-multiselect{display:grid; gap:12px; margin-top:8px}
.basis-option{
  border:1px solid rgba(119,139,154,.28);
  border-radius:14px;
  background:rgba(255,255,255,.62);
  overflow:hidden;
}
.basis-checkbox{padding:13px 14px; margin:0}
.basis-option-body{display:grid; gap:10px; padding:0 14px 14px}
.basis-directory-select{width:100%}
.basis-option:has([data-basis-toggle]:checked){border-color:rgba(32,126,190,.45); box-shadow:0 0 0 2px rgba(32,126,190,.07)}
.soud-person-card{
  min-height:64px;
  display:flex;
  align-items:center;
  padding:13px 15px;
  border:1px dashed rgba(94,117,133,.35);
  border-radius:12px;
  background:rgba(255,255,255,.45);
}
.soud-person-grid{display:grid; grid-template-columns:minmax(220px,1.2fr) repeat(3,minmax(160px,1fr)); gap:8px 16px; width:100%; align-items:center}
.soud-person-grid strong{font-size:14px}
.soud-person-grid span{font-size:13px; color:var(--text)}
.soud-not-found{font-size:13px; color:#a63c3c; font-weight:700}
.curriculum-upload-card{
  padding:16px;
  border:1px solid rgba(111,132,148,.28);
  border-radius:14px;
  background:rgba(255,255,255,.42);
}
.attestation-summary-row{display:grid; gap:5px; margin-bottom:12px}
.attestation-summary-row strong{font-size:14px}
.budget-sheet{
  border:1px solid rgba(95,112,127,.34);
  border-radius:12px;
  overflow:hidden;
  background:rgba(255,255,255,.48);
}
#block-budget{padding:16px}
#block-budget>.section-grid{gap:10px}
#block-budget .subcard{padding:12px;gap:10px}
.budget-sheet-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:6px 8px;background:#f8ebbc;border-bottom:1px solid rgba(95,112,127,.34)}
.budget-sheet-section-title{
  padding:2px 4px;
  font-weight:800;
  letter-spacing:.01em;
}
.budget-standard-btn{min-height:34px;padding:6px 11px;white-space:nowrap;background:rgba(255,255,255,.72)}
.budget-table-wrap{overflow:auto}
.budget-expense-table{width:100%;min-width:980px;border-collapse:collapse;table-layout:fixed;font-size:13px}
.budget-expense-table th,.budget-expense-table td{padding:5px 7px;border-right:1px solid rgba(76,90,102,.32);border-bottom:1px solid rgba(76,90,102,.32);vertical-align:middle}
.budget-expense-table th:last-child,.budget-expense-table td:last-child{border-right:0}
.budget-expense-table tbody tr:last-child>*{border-bottom:0}
.budget-expense-table thead th{padding:7px;background:rgba(255,255,255,.72);text-align:center;font-weight:800}
.budget-expense-table thead th:nth-child(1){width:28%}
.budget-expense-table thead th:nth-child(2){width:15%}
.budget-expense-table thead th:nth-child(3){width:16%}
.budget-expense-table thead th:nth-child(4){width:15%}
.budget-expense-table thead th:nth-child(5){width:26%}
.budget-expense-table tbody th{text-align:left;line-height:1.25}
.budget-expense-table .input{min-height:32px;padding:5px 7px;border-radius:7px;font-size:13px}
.budget-expense-table .icon-remove{width:30px;height:30px}
.budget-expense-row.budget-group-basic>*,.budget-group-heading.budget-group-basic>*,.budget-add-row.budget-group-basic>*{background:rgba(255,239,184,.48)}
.budget-expense-row.budget-group-development>*{background:rgba(213,233,203,.66)}
.budget-expense-row.budget-group-earned>*{background:rgba(207,220,239,.7)}
.budget-group-heading th{font-size:14px}
.budget-group-heading td{font-weight:600;text-align:center}
.budget-tariff-cell,.budget-special-cell,.budget-readonly-amount,.budget-row-actions{text-align:center}
.budget-price-cell .input{text-align:right;font-variant-numeric:tabular-nums}
.budget-price-cell .input[readonly]{background:rgba(255,255,255,.45);color:var(--text);font-weight:700}
.budget-readonly-amount{font-weight:800;font-variant-numeric:tabular-nums}
.budget-cell-dash{color:var(--muted)}
.budget-add-row td{padding:4px 7px}
.budget-add-actions{display:flex;gap:7px;flex-wrap:wrap}
.budget-special-btn{width:100%;min-height:31px;padding:5px 7px}
.budget-special-btn.is-pending{background:rgba(255,231,172,.72);color:#755314}
.budget-special-btn.is-approved{background:rgba(205,235,210,.8);color:#276a36}
.budget-special-btn.is-rejected{background:rgba(248,220,220,.8);color:#8d2c2c}
.budget-expense-row.has-inline-error>*{box-shadow:inset 0 0 0 2px rgba(190,54,54,.72)}
.budget-expense-table.is-error{outline:2px solid rgba(190,54,54,.72);outline-offset:-2px}
.budget-justification{
  display:grid;
  gap:5px;
  align-items:start;
}
.budget-justification.is-required>strong{font-size:11px;line-height:1.25;color:#9f3535}
.budget-justification .attachment-actions{gap:4px;flex-wrap:nowrap}
.budget-justification .mini-btn{width:100%;min-height:30px;padding:4px 6px;font-size:11px}
.budget-justification .attachment-file-info{font-size:11px;overflow-wrap:anywhere}
.budget-special-request-form{display:grid;gap:12px;padding:18px 20px}
.budget-special-request-form .textarea{min-height:130px}
.budget-expense-directory-body{padding:18px 20px}
.budget-totals-card{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px}
.budget-totals-card>div{display:grid; gap:3px; padding:10px 12px; border-radius:12px; border:1px solid rgba(95,112,127,.22); background:rgba(255,255,255,.62)}
.budget-totals-card span{font-size:12px; color:var(--muted)}
.budget-totals-card strong{font-size:16px}
.budget-totals-card strong.is-negative{color:#a43232}
.budget-totals-card.is-error>div{border-color:#c84d4d;box-shadow:0 0 0 2px rgba(200,77,77,.1)}
.program-check-section{display:grid; gap:8px; padding:12px; border-radius:14px; border:1px solid rgba(32,126,190,.22); background:rgba(232,244,252,.54)}
.program-check-btn{width:100%; min-height:46px}
.program-check-result{padding:13px 14px; border-radius:11px; font-weight:750; line-height:1.45}
.program-check-result.is-success{background:rgba(205,235,210,.75); color:#276a36; border:1px solid rgba(63,128,73,.28)}
.program-check-result.is-error{background:rgba(248,220,220,.72); color:#8d2c2c; border:1px solid rgba(160,55,55,.25)}
.program-check-result ul{margin:7px 0 0;padding-left:20px;display:grid;gap:4px}
.input.is-error,[data-basis-toggle].is-error,.js-gph-teacher.is-error,.js-gph-amount.is-error,.js-other-expense-name.is-error,.js-other-expense-amount.is-error{border-color:#c84d4d!important; box-shadow:0 0 0 2px rgba(200,77,77,.1)!important}

@media (max-width:900px){
  .soud-person-grid{grid-template-columns:1fr 1fr}
  .budget-totals-card{grid-template-columns:1fr}
}
@media (max-width:620px){
  .soud-person-grid{grid-template-columns:1fr}
  .budget-sheet-head{align-items:stretch;flex-direction:column}
  .budget-standard-btn{width:100%}
}

/* 2026-08-21: directory modal, editable SOUD contacts and parsed curriculum */
.directory-link-button{
  padding:0;
  border:0;
  background:transparent;
  cursor:pointer;
  font-family:inherit;
}
.modal-backdrop{
  position:fixed;
  inset:0;
  z-index:3000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:rgba(16,28,38,.52);
  backdrop-filter:blur(5px);
}
.modal-backdrop[hidden]{display:none!important}
.directory-modal{
  width:min(720px,100%);
  max-height:min(760px,calc(100vh - 48px));
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
  border-radius:18px;
  overflow:hidden;
  background:#f8fbfd;
  border:1px solid rgba(115,137,153,.35);
  box-shadow:0 28px 90px rgba(15,31,43,.28);
}
.directory-modal-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  padding:18px 20px;
  border-bottom:1px solid rgba(95,112,127,.18);
}
.directory-modal-head>div{display:grid;gap:4px}
.directory-modal-head strong{font-size:18px}
.directory-modal-head span{font-size:13px;color:var(--muted)}
.directory-modal-options{display:grid;gap:9px;padding:16px 20px;overflow:auto}
.directory-choice{
  display:flex;
  align-items:flex-start;
  gap:11px;
  padding:13px 14px;
  border-radius:12px;
  border:1px solid rgba(101,124,141,.25);
  background:#fff;
  cursor:pointer;
}
.directory-choice:hover{border-color:rgba(32,126,190,.46)}
.directory-choice input{margin-top:2px}
.directory-choice span{line-height:1.4}
.directory-modal-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:15px 20px;
  border-top:1px solid rgba(95,112,127,.18);
  background:rgba(235,243,248,.72);
}
.directory-modal-actions{display:flex;gap:8px;flex-wrap:wrap}
.directory-source-link{font-size:13px;font-weight:700;color:var(--blue);text-decoration:none}
.directory-source-link:hover{text-decoration:underline}
.soud-editable-contacts{min-height:112px}
.soud-lookup-status{min-height:20px;font-size:12px;color:var(--muted)}
.soud-lookup-status.is-found{color:#2e7544;font-weight:700}
.soud-lookup-status.is-error{color:#a23b3b;font-weight:700}
.soud-lookup-status.is-warning{color:#9a6618;font-weight:700}
.curriculum-parse-info{
  margin-top:8px;
  padding:10px 12px;
  border-radius:10px;
  background:rgba(222,237,247,.72);
  font-size:12px;
  color:var(--text);
}
.curriculum-parse-info.is-error{background:rgba(248,220,220,.68);color:#8d2c2c}
.curriculum-table-wrap{max-width:100%;overflow:auto}
.curriculum-table{min-width:2380px}
.curriculum-table th{vertical-align:middle;text-align:center;white-space:normal;min-width:72px}
.curriculum-table th:nth-child(2){min-width:260px}
.curriculum-table th:nth-child(4){min-width:300px}
.curriculum-table th:nth-child(5){min-width:240px}
.curriculum-table th:nth-child(17){min-width:160px}
.curriculum-table td{vertical-align:top}
.curriculum-table .table-input{min-width:72px}
.curriculum-table textarea.table-input{min-height:64px;resize:vertical}

@media (max-width:760px){
  .modal-backdrop{padding:10px}
  .directory-modal-footer{align-items:stretch;flex-direction:column}
  .directory-modal-actions>*{flex:1}
}

/* 2026-08-28: учет ДПОУ */
.accounting-shell{display:grid;gap:18px;background:rgba(255,255,255,.58)}
.accounting-head{padding-bottom:2px}
.accounting-dashboard-link{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  min-height:72px;
  padding:17px 20px;
  border:1px solid rgba(45,120,215,.24);
  border-radius:14px;
  background:linear-gradient(135deg,rgba(235,246,255,.86),rgba(238,249,243,.8));
  box-shadow:var(--shadow-soft);
  color:var(--blue);
  font-size:19px;
  font-weight:700;
  text-decoration:none;
  transition:transform var(--transition),box-shadow var(--transition),border-color var(--transition);
}
.accounting-dashboard-link:hover{transform:translateY(-1px);border-color:rgba(45,120,215,.42);box-shadow:0 14px 28px rgba(45,120,215,.11)}
.accounting-dashboard-arrow{
  width:38px;
  height:38px;
  flex:0 0 38px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:rgba(255,255,255,.78);
  border:1px solid rgba(45,120,215,.2);
  font-size:19px;
}
.accounting-panel{
  display:grid;
  gap:14px;
  padding:18px;
  border:1px solid rgba(151,175,192,.35);
  border-radius:14px;
  background:rgba(255,255,255,.46);
}
.accounting-panel-head{display:block}
.accounting-panel-head h3{margin:0;font-size:21px;line-height:1.3}
.accounting-table-wrap{overflow:auto;border-color:rgba(145,170,188,.42);background:rgba(255,255,255,.72)}
.accounting-table{min-width:1080px;table-layout:fixed;font-variant-numeric:tabular-nums}
.accounting-table th,.accounting-table td{padding:11px 12px;vertical-align:middle}
.accounting-table thead th{white-space:normal;text-align:center;line-height:1.3}
.accounting-table thead th:first-child{width:25%;text-align:left}
.accounting-table thead th:nth-child(2){width:14%}
.accounting-table thead th:nth-child(3){width:15%}
.accounting-table thead th:nth-child(4){width:15%}
.accounting-table thead th:nth-child(5){width:13%}
.accounting-table thead th:nth-child(6){width:18%}
.accounting-table tbody td:first-child{font-weight:700;white-space:nowrap}
.accounting-table tbody td:nth-child(n+2),.accounting-table tfoot td{text-align:right}
.accounting-table tbody td:nth-child(5){text-align:center}
.accounting-table tbody tr:hover td{background:rgba(235,245,252,.48)}
.accounting-table tfoot th,.accounting-table tfoot td{font-weight:800;background:rgba(231,239,247,.86);vertical-align:middle}
.accounting-table tfoot th{text-align:right}
.accounting-table tfoot td:nth-child(5){text-align:center}
.accounting-cell-empty{color:var(--muted)}

/* 2026-08-28: управление утвержденной программой */
.management-shell{display:grid; gap:18px; background:rgba(255,255,255,.58)}
.management-head{padding-bottom:2px}
.management-overview{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}
.management-overview-row{
  min-height:82px;
  display:grid;
  align-content:center;
  gap:5px;
  padding:13px 15px;
  border:1px solid rgba(145,170,188,.35);
  border-radius:12px;
  background:rgba(255,255,255,.66);
}
.management-overview-row span{font-size:12px;color:var(--muted);font-weight:700}
.management-overview-row strong{font-size:15px;line-height:1.35}
.management-overview-wide{grid-column:span 2}
.program-stage-progress{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}
.program-stage-progress li{
  position:relative;
  min-height:90px;
  display:grid;
  grid-template-columns:42px minmax(0,1fr);
  align-items:center;
  gap:10px;
  padding:13px;
  border-radius:13px;
  border:1px solid rgba(151,175,192,.42);
  background:rgba(255,255,255,.57);
  color:var(--muted);
}
.program-stage-progress li span{
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:rgba(234,240,245,.95);
  font-weight:800;
}
.program-stage-progress li strong{font-size:13px;line-height:1.3}
.program-stage-progress li:not(:last-child)::after{content:"›";position:absolute;right:-10px;top:50%;z-index:2;transform:translate(50%,-50%);font-size:24px;font-weight:800;color:rgba(96,112,134,.58)}
.program-stage-progress li.is-complete{border-color:rgba(31,143,100,.34);background:rgba(231,248,239,.78);color:var(--primary-strong)}
.program-stage-progress li.is-complete span{background:rgba(31,143,100,.16);color:var(--primary)}
.program-stage-progress li.is-active{border-color:rgba(45,120,215,.46);background:rgba(230,241,254,.82);color:var(--blue);box-shadow:0 10px 24px rgba(45,120,215,.09)}
.program-stage-progress li.is-active span{background:rgba(45,120,215,.15);color:var(--blue)}
.management-enrollment-card{
  display:grid;
  gap:14px;
  padding:18px;
  border-radius:14px;
  border:1px solid rgba(151,175,192,.35);
  background:rgba(255,255,255,.46);
}
.management-section-head{display:flex;align-items:center;justify-content:space-between;gap:14px}
.management-section-head h3{margin:0;font-size:21px}
.stream-tabs{display:flex;gap:8px;overflow:auto;padding:1px 1px 4px}
.stream-tab{
  min-width:210px;
  display:grid;
  gap:3px;
  padding:11px 13px;
  text-align:left;
  border:1px solid rgba(145,170,188,.38);
  border-radius:11px;
  background:rgba(255,255,255,.65);
  color:var(--text);
}
.stream-tab strong{font-size:14px}
.stream-tab span{font-size:12px;color:var(--muted)}
.stream-tab.is-active{border-color:rgba(45,120,215,.48);background:rgba(232,243,255,.9);color:var(--blue)}
.listener-filters{display:grid;grid-template-columns:minmax(240px,1fr) minmax(200px,260px) minmax(190px,240px);gap:10px;align-items:end}
.listeners-table-wrap{border-color:rgba(145,170,188,.42);background:rgba(255,255,255,.7)}
.listeners-table{min-width:2450px;font-size:13px}
.listeners-table th,.listeners-table td{padding:10px 9px;vertical-align:middle}
.listeners-table th{line-height:1.25;text-align:center}
.listeners-table th:nth-child(1){width:62px}
.listeners-table th:nth-child(2){min-width:220px}
.listeners-table th:nth-child(3){min-width:140px}
.listeners-table th:nth-child(4){min-width:150px}
.listeners-table th:nth-child(5){min-width:190px}
.listeners-table th:nth-child(n+6):nth-child(-n+12){min-width:140px}
.listeners-table th:nth-child(13){min-width:190px}
.listeners-table th:nth-child(14){min-width:250px}
.listeners-table td:nth-child(1){text-align:center}
.listener-name-cell strong{line-height:1.35}
.listener-state{display:inline-flex;justify-content:center;min-width:68px;padding:5px 8px;border-radius:999px;font-size:12px;font-weight:700;text-align:center}
.listener-state.is-positive{background:rgba(31,143,100,.12);color:var(--primary-strong)}
.listener-state.is-negative{background:rgba(210,75,75,.11);color:#9e3434}
.listener-state.is-neutral{background:rgba(96,112,134,.1);color:var(--muted)}
.listeners-table tr.is-manual-listener td{background:rgba(255,224,224,.78)}
.listeners-table tr.is-pending-ono td{background:rgba(255,211,211,.88)}
.ono-pending-label,.ono-approved-label{display:block;margin-top:5px;font-size:11px;font-weight:700}
.ono-pending-label{color:#a12f2f}
.ono-approved-label{color:#8b4747}
.listener-comment{min-width:230px;min-height:64px;padding:8px 10px;resize:vertical;font-size:12px}
.management-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.management-notice{padding:13px 15px;border-radius:11px;border:1px solid rgba(145,170,188,.36);font-weight:700;line-height:1.45}
.management-notice.is-warning{background:rgba(255,232,226,.86);border-color:rgba(210,75,75,.28);color:#8f3131}
.management-notice.is-success{background:rgba(226,246,234,.86);border-color:rgba(31,143,100,.25);color:var(--primary-strong)}
.compact-dialog{width:min(620px,100%);grid-template-rows:auto auto auto}
.manual-listener-warning{padding:24px 22px;font-size:16px;line-height:1.55;background:rgba(255,235,232,.72);color:#7e2929}
.manual-confirm-actions{justify-content:flex-end}
.manual-listener-dialog{width:min(760px,100%);grid-template-rows:auto minmax(0,1fr)}
.manual-listener-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding:18px 20px;overflow:auto}
.manual-listener-form-actions{display:flex;justify-content:flex-end;gap:10px}

@media (max-width:1100px){
  .management-overview{grid-template-columns:repeat(2,minmax(0,1fr))}
  .program-stage-progress{grid-template-columns:repeat(2,minmax(0,1fr))}
  .program-stage-progress li::after{display:none}
}
@media (max-width:760px){
  .accounting-shell,.management-shell{padding:16px}
  .accounting-panel{padding:14px}
  .management-overview,.program-stage-progress,.listener-filters,.manual-listener-form{grid-template-columns:1fr}
  .management-overview-wide{grid-column:auto}
  .management-section-head{align-items:stretch;flex-direction:column}
  .management-actions>*{width:100%}
  .manual-listener-form .span-2{grid-column:auto}
  .manual-listener-form-actions{flex-direction:column}
.manual-listener-form-actions>*{width:100%}
}

/* Builder footer: compact navigation that stays on one line when it fits.
   The final actions wrap together to the next line when there is not enough room. */
.curriculum-template-download{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
}
.builder-footer{
  --floating-progress-safe-inline:88px;
  --floating-progress-safe-block:118px;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-start;
  gap:12px 14px;
  width:100%;
  min-width:0;
  max-width:100%;
  padding:14px calc(var(--floating-progress-safe-inline) + env(safe-area-inset-right, 0px)) 0 4px;
  margin-bottom:calc(var(--floating-progress-safe-block) + env(safe-area-inset-bottom, 0px));
}
.builder-footer-navigation{
  display:flex;
  flex:0 1 auto;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  width:auto;
  min-width:0;
  max-width:100%;
}
.builder-footer-navigation > #manualSaveBtnBottom{
  flex:0 0 auto;
  width:auto;
  max-width:100%;
  min-height:42px;
  padding:9px 14px;
  font-size:13px;
  white-space:nowrap;
}
.builder-progress-blocks{
  display:flex;
  flex:0 0 auto;
  flex-wrap:nowrap;
  align-items:center;
  justify-content:flex-start;
  gap:8px;
  width:max-content;
  min-width:0;
  max-width:100%;
  margin:0;
  padding:0;
  list-style:none;
}
.builder-progress-blocks li{
  display:flex;
  flex:0 0 auto;
  align-items:center;
  min-width:0;
  list-style:none;
}
.builder-progress-step{
  width:auto;
  min-width:0;
  display:inline-flex;
  align-items:baseline;
  justify-content:center;
  gap:6px;
  min-height:42px;
  padding:9px 11px;
  border:1px solid rgba(255,255,255,.55);
  border-radius:12px;
  background:rgba(255,255,255,.7);
  box-shadow:var(--shadow-soft);
  white-space:nowrap;
  color:var(--text);
  transition:transform var(--transition),box-shadow var(--transition),background var(--transition),border-color var(--transition),color var(--transition);
}
.builder-progress-step:hover{
  transform:translateY(-1px);
  border-color:rgba(45,120,215,.34);
  box-shadow:0 12px 24px rgba(45,120,215,.1);
}
.builder-progress-step span{color:var(--blue);font-size:13px;font-weight:800}
.builder-progress-step strong{font-size:13px;color:var(--text)}
.builder-progress-step.is-complete{
  border-color:rgba(31,143,100,.3);
  background:rgba(231,248,239,.82);
}
.builder-progress-step.is-complete span,
.builder-progress-step.is-complete strong{color:var(--primary-strong)}
.builder-progress-step.is-active{
  border-color:rgba(45,120,215,.5);
  background:rgba(230,241,254,.88);
  box-shadow:0 12px 26px rgba(45,120,215,.12);
}
.builder-progress-step.is-error{
  border-color:rgba(210,75,75,.4);
  box-shadow:0 0 0 1px rgba(210,75,75,.12),var(--shadow-soft);
}
.builder-progress-final-actions{
  display:flex;
  flex:0 0 auto;
  flex-wrap:nowrap;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  width:max-content;
  min-width:0;
  max-width:100%;
}
.builder-progress-final-actions[hidden]{display:none !important}
.builder-progress-final-actions > button{
  flex:0 0 auto;
  width:auto;
  min-width:0;
  min-height:42px;
  max-width:100%;
  padding-top:9px;
  padding-bottom:9px;
  font-size:13px;
  white-space:nowrap;
}
.builder-download-btn{min-width:0}
.builder-approval-btn{
  min-width:0;
  padding-left:18px;
  padding-right:18px;
  font-weight:800;
}
.builder-approval-btn:not([disabled]){
  box-shadow:0 18px 36px rgba(40,124,207,.24);
}
.floating-progress{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:90;
  width:88px;
  height:88px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:conic-gradient(var(--blue) calc(var(--progress, 0) * 1%), rgba(255,255,255,.42) 0);
  box-shadow:0 18px 32px rgba(15,37,58,.16);
  border:1px solid rgba(255,255,255,.54);
  backdrop-filter:blur(16px) saturate(125%);
  -webkit-backdrop-filter:blur(16px) saturate(125%);
  pointer-events:none;
}
.floating-progress-inner{
  width:66px;
  height:66px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:rgba(255,255,255,.82);
  color:var(--text);
  font-size:18px;
  font-weight:700;
}
@media (max-width:980px){
  .floating-progress{width:78px;height:78px;right:12px;bottom:12px}
  .floating-progress-inner{width:58px;height:58px;font-size:16px}
  .builder-footer{
    --floating-progress-safe-inline:82px;
    --floating-progress-safe-block:104px;
  }
  .builder-footer > .builder-footer-navigation{flex:0 1 auto}
  .builder-footer > .builder-progress-final-actions{flex:0 0 auto}
}
@media (max-width:860px){
  .builder-footer{
    --floating-progress-safe-inline:0px;
    --floating-progress-safe-block:104px;
    padding-right:4px;
  }
}
@media (max-width:840px){
  .builder-footer-navigation{flex-basis:100%;width:100%}
  .builder-progress-blocks{
    flex-wrap:wrap;
    width:auto;
  }
}
@media (max-width:620px){
  .builder-footer{
    gap:12px;
    padding-left:0;
    padding-right:0;
  }
  .builder-footer-navigation > #manualSaveBtnBottom{
    white-space:normal;
  }
}
@media (max-width:520px){
  .builder-progress-final-actions{
    flex-wrap:wrap;
    width:100%;
  }
  .builder-progress-final-actions > button{
    white-space:normal;
  }
}
@media (max-width:420px){
  .builder-progress-step{padding:10px 12px}
  .builder-progress-blocks,
  .builder-progress-final-actions{gap:8px}
}

/* 2026-09-02: управление программами, классификаторы, учебный план и поддержка */
.classification-section{display:grid;gap:10px}
.classification-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.classification-card{
  min-width:0;
  display:grid;
  grid-template-rows:auto minmax(72px,1fr) auto;
  gap:10px;
  padding:15px;
  border:1px solid rgba(145,170,188,.34);
  border-radius:14px;
  background:rgba(255,255,255,.46);
}
.classification-card>strong{font-size:14px;line-height:1.35}
.classification-value{
  min-width:0;
  padding:11px 12px;
  border-radius:11px;
  background:rgba(255,255,255,.72);
  color:var(--muted);
  font-size:13px;
  line-height:1.45;
  overflow-wrap:anywhere;
}
.classification-value.has-value{color:var(--text);font-weight:650}
.classification-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.classification-modal-options{
  min-height:0;
  max-height:min(62vh,620px);
  overflow:auto;
  display:grid;
  gap:8px;
  padding:16px 20px;
}
.classification-choice{align-items:flex-start}
.classification-choice input{margin-top:3px;flex:0 0 auto}
.analog-programs-field{display:flex;align-items:flex-start;justify-content:flex-start;gap:12px;flex-wrap:wrap}
.analog-programs-btn{width:auto;align-self:flex-start}
.analog-programs-results{display:grid;gap:8px;padding:18px 20px;overflow:auto}
.analog-program-link{
  display:grid;
  grid-template-columns:34px minmax(0,1fr);
  align-items:center;
  gap:10px;
  padding:12px 14px;
  border:1px solid rgba(145,170,188,.34);
  border-radius:12px;
  background:rgba(255,255,255,.62);
  color:var(--text);
  text-decoration:none;
}
.analog-program-link:hover{border-color:rgba(45,120,215,.45);box-shadow:var(--shadow-soft)}
.analog-program-link span{display:grid;place-items:center;width:30px;height:30px;border-radius:999px;background:rgba(45,120,215,.1);color:var(--blue);font-weight:800}
.analog-program-link strong{line-height:1.4}

.outcome-repeat-list{gap:9px}
.outcome-repeat-row{grid-template-columns:44px minmax(0,1fr) 42px;align-items:center}
.outcome-code{font-weight:800;color:var(--blue);text-align:right;white-space:nowrap}
.module-result-cell{vertical-align:middle!important;text-align:center!important}
.module-result-open-btn{width:100%;max-width:178px;padding:8px 9px;font-size:12px;line-height:1.2}
.module-result-codes{display:flex;align-items:center;justify-content:center;gap:5px;flex-wrap:wrap;margin-top:7px}
.module-result-code-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:34px;
  min-height:28px;
  padding:4px 8px;
  border:1px solid rgba(45,120,215,.25);
  border-radius:8px;
  background:rgba(45,120,215,.09);
  color:var(--blue);
  font-size:12px;
  font-weight:800;
  line-height:1;
}
.module-result-empty{margin-top:6px;color:var(--muted);font-size:11px}
.module-result-modal{width:min(780px,100%)}
.module-result-modal-options{
  min-height:0;
  max-height:min(64vh,650px);
  overflow:auto;
  display:grid;
  gap:18px;
  padding:18px 20px;
}
.module-result-modal-group{display:grid;gap:9px}
.module-result-modal-group-title{font-size:14px;color:var(--text)}
.module-result-modal-group-options{display:grid;gap:8px}
.module-result-modal-choice{display:grid;grid-template-columns:20px minmax(0,1fr);align-items:start}
.module-result-modal-choice input{margin:3px 0 0;accent-color:var(--primary)}
.module-result-modal-choice-content{display:grid;grid-template-columns:42px minmax(0,1fr);align-items:start;gap:9px;line-height:1.4}
.module-result-modal-choice-content>strong{color:var(--blue);font-size:13px}
.module-result-modal-choice-content>span{overflow-wrap:anywhere}
.module-result-modal-empty{padding:18px;border-radius:12px;background:rgba(255,255,255,.66);color:var(--muted);text-align:center}
.module-result-modal-footer{justify-content:space-between}
.module-result-modal-count{font-size:13px;font-weight:800;color:var(--blue)}

.curriculum-table{min-width:1830px;table-layout:fixed}
.curriculum-table col.curriculum-col-number{width:62px}
.curriculum-table col.curriculum-col-name{width:280px}
.curriculum-table col.curriculum-col-lesson{width:102px}
.curriculum-table col.curriculum-col-summary{width:310px}
.curriculum-table col.curriculum-col-result{width:190px}
.curriculum-table col.curriculum-col-hour{width:62px}
.curriculum-table col.curriculum-col-control{width:135px}
.curriculum-table col.curriculum-col-action{width:54px}
.curriculum-table th{min-width:0!important;padding:9px 5px;line-height:1.2}
.curriculum-table td{padding:7px 4px;text-align:center;vertical-align:top}
.curriculum-table .table-input{width:100%;min-width:0;padding:8px 5px}
.curriculum-table .hour-input{text-align:center;font-variant-numeric:tabular-nums}
.curriculum-table .hour-input.is-calculated{background:rgba(235,242,248,.84);font-weight:800;color:var(--text)}
.curriculum-table .module-number-input,.curriculum-table .module-lesson-input{text-align:center}
.curriculum-table textarea.table-input{min-height:58px}
.curriculum-table .module-control-select{padding-left:4px;padding-right:4px;text-align:center}
.curriculum-table .curriculum-sector-head,
.curriculum-table .curriculum-sector-subhead{font-weight:800}
.curriculum-table .curriculum-sector-classroom{background:rgba(45,157,101,.12)}
.curriculum-table thead .curriculum-sector-classroom{background:rgba(45,157,101,.22);color:#17633f}
.curriculum-table .curriculum-sector-dot{background:rgba(45,120,215,.10)}
.curriculum-table thead .curriculum-sector-dot{background:rgba(45,120,215,.20);color:#225f9f}
.curriculum-table td.curriculum-sector-cell{vertical-align:middle}
.curriculum-table td.curriculum-sector-classroom .table-input{border-color:rgba(45,157,101,.24);background:rgba(255,255,255,.74)}
.curriculum-table td.curriculum-sector-dot .table-input{border-color:rgba(45,120,215,.22);background:rgba(255,255,255,.74)}
.curriculum-table .curriculum-sector-classroom.curriculum-sector-start{border-left:2px solid rgba(45,157,101,.32)}
.curriculum-table .curriculum-sector-classroom.curriculum-sector-end{border-right:2px solid rgba(45,157,101,.32)}
.curriculum-table .curriculum-sector-dot.curriculum-sector-start{border-left:2px solid rgba(45,120,215,.28)}
.curriculum-table .curriculum-sector-dot.curriculum-sector-end{border-right:2px solid rgba(45,120,215,.28)}
.curriculum-bottom-actions{gap:14px;align-items:center;flex-wrap:wrap}
.curriculum-warning{font-size:13px;line-height:1.4;color:#8b5f16}
.curriculum-hours-check{
  margin-top:12px;
  padding:12px 14px;
  border:1px solid rgba(145,170,188,.35);
  border-radius:11px;
  background:rgba(255,255,255,.5);
  font-size:13px;
  font-weight:700;
  line-height:1.45;
}
.curriculum-hours-check.is-success{border-color:rgba(31,143,100,.32);background:rgba(226,246,234,.76);color:var(--primary-strong)}
.curriculum-hours-check.is-error{border-color:rgba(210,75,75,.32);background:rgba(255,240,240,.72);color:var(--danger)}
.attestation-extra-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.attestation-extra-list{display:grid;gap:10px}
.attestation-extra-row{display:grid;grid-template-columns:minmax(0,1fr) 42px;gap:10px;align-items:start}
.attestation-form-textarea{min-height:150px;line-height:1.55}

.budget-period-switcher{display:grid;gap:10px}
.budget-period-tabs{display:flex;align-items:stretch;gap:8px;overflow-x:auto;padding:2px 1px 5px}
.budget-period-tab{
  flex:0 0 auto;
  min-width:245px;
  max-width:360px;
  min-height:46px;
  padding:9px 12px;
  border:1px solid rgba(145,170,188,.4);
  border-radius:11px;
  background:rgba(255,255,255,.65);
  color:var(--text);
  font:inherit;
  font-size:12px;
  font-weight:750;
  line-height:1.35;
  text-align:left;
}
.budget-period-tab.is-active{border-color:rgba(45,120,215,.52);background:rgba(232,243,255,.92);color:var(--blue)}
.budget-period-tab.has-error{border-color:rgba(210,75,75,.5)}
.budget-row-person{display:block;margin-top:4px;color:var(--blue);font-size:12px;font-weight:700;line-height:1.35}

.support-shell{width:min(980px,100%);margin:0 auto;display:grid;gap:16px}
.support-card{display:grid;gap:18px;padding:22px;border-radius:18px;border:1px solid rgba(255,255,255,.5);background:rgba(255,255,255,.52);box-shadow:var(--shadow-soft)}
.support-card h3{margin:0 0 6px;font-size:22px}
.support-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.support-actions{display:flex;justify-content:flex-end}
.support-result{padding:12px 14px;border-radius:11px;border:1px solid rgba(31,143,100,.3);background:rgba(226,246,234,.78);color:var(--primary-strong);font-weight:700;line-height:1.45}

/* Compact and centered management table without colored status pills/rows. */
.listeners-table{min-width:2240px;font-size:12px}
.listeners-table th,.listeners-table td{padding:6px 7px!important;text-align:center!important;vertical-align:middle!important;line-height:1.25}
.listeners-table td>*{margin-left:auto;margin-right:auto}
.listener-name-cell strong{display:block;text-align:center}
.listener-state{
  display:inline;
  min-width:0;
  padding:0;
  border:0;
  border-radius:0;
  background:none!important;
  font-size:12px;
  font-weight:700;
  line-height:1.3;
  text-align:center;
}
.listener-state.is-positive{color:var(--primary-strong)}
.listener-state.is-negative{color:#8b4242}
.listener-state.is-neutral{color:var(--muted)}
.listeners-table tr.is-manual-listener td,
.listeners-table tr.is-pending-ono td{background:transparent!important}
.listeners-table tr.is-manual-listener td:first-child{box-shadow:inset 3px 0 0 rgba(45,120,215,.55)}
.listeners-table tr.is-pending-ono td:first-child{box-shadow:inset 3px 0 0 rgba(201,139,41,.62)}
.ono-pending-label{color:#8a641e}
.ono-approved-label{color:var(--primary-strong)}
.listener-comment{min-width:210px;min-height:38px;max-height:82px;padding:6px 8px;font-size:12px}
.listeners-table select.input,.listeners-table input.input{min-height:34px;padding:6px 7px;text-align:center}

.builder-flow-arrow{
  flex:0 0 auto;
  display:inline-grid;
  place-items:center;
  min-width:18px;
  color:var(--muted);
  font-size:17px;
  font-weight:850;
  line-height:1;
  user-select:none;
}

/* Footer: one line only when there is real room; otherwise split into two rows without overlap. */
.builder-footer{
  flex-wrap:wrap;
  align-items:flex-start;
}
.builder-footer-navigation{
  flex:1 1 auto;
  flex-wrap:nowrap;
  min-width:0;
}
.builder-progress-blocks{
  flex:1 1 auto;
  flex-wrap:nowrap!important;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:thin;
}
.builder-progress-final-actions{
  margin-left:auto;
}
@media (min-width:1580px){
  .builder-footer{
    flex-wrap:nowrap;
    align-items:center;
  }
  .builder-footer-navigation{
    flex:1 1 auto;
    width:auto;
  }
  .builder-progress-final-actions{
    flex:0 0 auto;
    width:auto;
    margin-left:auto;
  }
}
@media (max-width:1579px){
  .builder-footer{
    flex-wrap:wrap;
  }
  .builder-footer-navigation{
    flex:1 1 100%;
    width:100%;
    max-width:100%;
  }
  .builder-progress-final-actions{
    flex:1 1 100%;
    width:100%;
    max-width:100%;
    margin-left:0;
    padding-left:0;
  }
}
@media (max-width:900px){
  .classification-grid{grid-template-columns:1fr}
  .support-form{grid-template-columns:1fr}
  .support-form .span-2{grid-column:auto}
  .support-actions{justify-content:stretch}
  .support-actions>*{width:100%}
  .analog-programs-field{align-items:flex-start;flex-direction:column}
}
@media (max-width:620px){
  .builder-footer-navigation{align-items:stretch;gap:8px}
  .builder-flow-arrow{min-width:12px;font-size:14px}
  .builder-footer-navigation>#manualSaveBtnBottom{flex:0 1 48%;font-size:12px}
  .builder-progress-blocks{flex:1 1 52%}
  .builder-progress-final-actions{display:grid;grid-template-columns:auto minmax(0,1fr) auto minmax(0,1.35fr);align-items:center;gap:7px}
  .builder-progress-final-actions>button{width:100%;min-width:0;font-size:12px}
  .outcome-repeat-row{grid-template-columns:38px minmax(0,1fr) 42px}
  .classification-modal-options{padding:12px}
  .module-result-modal-options{padding:12px}
  .module-result-modal-choice-content{grid-template-columns:36px minmax(0,1fr)}
}

/* DPO program templates and current Order No. 266 competency profile */
.dpo-template-open-btn {
  white-space: nowrap;
}

.dpo-profile-card {
  border: 1px solid #cbd8e8;
  border-radius: 14px;
  background: #f7faff;
  padding: 18px;
}

.dpo-profile-head {
  display: grid;
  gap: 5px;
  margin-bottom: 14px;
}

.dpo-profile-head strong {
  font-size: 16px;
}

.dpo-profile-head small {
  color: #56647a;
  line-height: 1.45;
}

.dpo-profile-fields {
  display: grid;
  gap: 14px;
}

.dpo-profile-fields .textarea {
  min-height: 108px;
}

.template-token-warning {
  border: 1px solid #d7a631;
  border-left-width: 5px;
  border-radius: 12px;
  background: #fff9e8;
  padding: 12px 14px;
  color: #6c4b00;
  line-height: 1.45;
}

.template-token-warning code {
  display: inline-block;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
  border-radius: 5px;
  background: rgba(255, 255, 255, .75);
  padding: 1px 5px;
  font-family: inherit;
  font-size: .92em;
}

.template-token-warning.is-error {
  border-color: #b54646;
  box-shadow: 0 0 0 2px rgba(181, 70, 70, .1);
}

.input.is-template-token,
.textarea.is-template-token {
  border-color: #d29a18;
  box-shadow: inset 4px 0 0 #e8b238;
  background-image: linear-gradient(90deg, rgba(255, 244, 205, .65), transparent 34px);
}

.dpo-template-modal {
  width: min(980px, calc(100vw - 32px));
  max-height: min(860px, calc(100vh - 32px));
}

.dpo-template-intro {
  display: grid;
  gap: 5px;
  margin: 0 18px 14px;
  border-radius: 12px;
  background: #edf5ff;
  padding: 12px 14px;
  color: #31435e;
}

.dpo-template-list {
  display: grid;
  gap: 14px;
  overflow: auto;
  padding: 0 18px 18px;
}

.dpo-template-card {
  border: 1px solid #d8e0ec;
  border-radius: 14px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 4px 14px rgba(28, 48, 74, .06);
}

.dpo-template-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.dpo-template-card h3 {
  margin: 8px 0 0;
  font-size: 18px;
  line-height: 1.3;
}

.dpo-template-card p {
  margin: 12px 0 8px;
  color: #435169;
  line-height: 1.5;
}

.dpo-template-badges,
.dpo-template-compliance {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dpo-template-badges span,
.dpo-template-compliance span {
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  line-height: 1.25;
}

.dpo-template-type {
  background: #dff0e7;
  color: #1b6542;
  font-weight: 700;
}

.dpo-template-hours {
  background: #e5efff;
  color: #285a99;
  font-weight: 700;
}

.dpo-template-badge {
  background: #fff2cc;
  color: #775300;
}

.dpo-template-use {
  margin: 8px 0 12px;
  color: #2f3f55;
  line-height: 1.45;
}

.dpo-template-compliance span {
  border: 1px solid #d8e1ee;
  background: #f7f9fc;
  color: #536278;
}

.dpo-template-footer {
  gap: 12px;
}

.dpo-template-download {
  text-decoration: none;
}

@media (max-width: 720px) {
  .content-head-actions {
    flex-wrap: wrap;
  }

  .dpo-template-card-head {
    display: grid;
  }

  .dpo-template-card-head .primary-btn {
    width: 100%;
  }

  .dpo-template-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .dpo-template-download {
    justify-content: center;
    text-align: center;
  }
}
