:root {
  color-scheme: light;
  --canvas: #f5f6f2;
  --panel: #fff;
  --ink: #1d2722;
  --muted: #59675e;
  --line: #e2e8e0;
  --green: #214e3c;
  --green-soft: #e5efe4;
  --amber: #805321;
  --amber-soft: #faf0dc;
  --purple: #554984;
  --purple-soft: #ece9fa;
  --red: #993e2e;
  --radius: 16px;
  --sidebar: 228px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Arial", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled, input:disabled { cursor: default; opacity: .55; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #6f9e84; outline-offset: 3px; }
a { color: var(--green); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(32px, 4vw, 48px); line-height: 1.05; letter-spacing: -.055em; font-weight: 720; }
h2 { font-size: 19px; line-height: 1.25; letter-spacing: -.025em; }
h3 { font-size: 15px; }
small, .muted { color: var(--muted); }
small { font-size: 12px; }
[hidden] { display: none !important; }
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  padding: 31px 17px 19px; border-right: 1px solid var(--line); background: #fbfcf8;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 11px; }
.brand-mark {
  width: 31px; height: 31px; display: grid; place-items: center; background: var(--green); color: #fff;
  border-radius: 9px; font-size: 19px; font-weight: 740; line-height: 1;
}
.brand-word { font-size: 24px; font-weight: 780; letter-spacing: -.085em; line-height: 1; }
.course-name { margin: 34px 11px 15px; max-width: 160px; font-size: 13px; font-weight: 650; color: var(--muted); line-height: 1.3; }
nav { display: grid; gap: 4px; }
.nav-button, .account-button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: transparent;
  padding: 11px; border-radius: 9px; font-size: 14px; font-weight: 600;
}
.nav-button:hover, .account-button:hover { background: #edf2e9; }
.nav-button[aria-current] { background: var(--green-soft); color: var(--green); }
.nav-icon { display: inline-grid; place-items: center; flex: 0 0 17px; color: var(--green); font-size: 17px; }
.side-footer { margin-top: auto; padding-top: 15px; border-top: 1px solid var(--line); }
.account-button { padding: 8px; }
.account-mark { width: 29px; height: 29px; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); color: var(--green); font-size: 12px; }
.account-close { margin-left: auto; color: var(--muted); }
.content { min-width: 0; padding: 42px clamp(19px, 3.2vw, 50px) 65px; width: 100%; max-width: 1760px; margin-inline: auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 25px; }
.subhead { color: var(--muted); font-size: 14px; margin-top: 8px; }
.actions, .filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.btn, .control {
  border: 1px solid #dfe6dc; background: var(--panel); min-height: 37px; border-radius: 8px;
  padding: 7px 12px; font-size: 13px; font-weight: 600; white-space: nowrap;
}
.btn:hover { background: #f1f5ee; border-color: #c3d2c2; }
.btn.primary { background: var(--green); color: #fff; border-color: var(--green); }
.btn.primary:hover { background: #2e644d; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.danger { color: var(--red); }
.btn.icon { padding-inline: 9px; }
.control { font-weight: 500; max-width: 100%; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 15px; }
.metric { min-height: 115px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.metric:first-child { background: var(--green); border-color: var(--green); color: #fff; }
.metric-label { color: var(--muted); font-size: 12px; font-weight: 680; }
.metric:first-child .metric-label, .metric:first-child .metric-note { color: #e1eee5; }
.metric-date { font-size: 26px; letter-spacing: -.04em; font-weight: 700; margin-top: 8px; white-space: nowrap; }
.metric-note { color: var(--muted); font-size: 12px; margin-top: 4px; }
.banner {
  margin-bottom: 17px; padding: 11px 13px; border-radius: 10px; background: var(--amber-soft); color: #604319;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; line-height: 1.4;
}
.banner.ok { background: var(--green-soft); color: var(--green); }
.banner strong { margin-right: 5px; }
.banner .btn { flex: 0 0 auto; min-height: 31px; border-color: #e4d7b9; }
.banner.ok .btn { border-color: #ccd9ca; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 17px; overflow: hidden; }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 17px; }
.timeline-scroll { overflow: auto; max-height: 590px; border-top: 1px solid var(--line); }
.timeline { width: max-content; min-width: 100%; --label: 258px; --step: 27px; }
.timeline-line { display: grid; grid-template-columns: var(--label) minmax(var(--span), 1fr); min-height: 36px; border-bottom: 1px solid #edf0ea; }
.timeline-line:last-child { border-bottom: 0; }
.timeline-head { position: sticky; top: 0; z-index: 4; background: #f9fbf7; }
.timeline-label {
  position: sticky; left: 0; z-index: 2; background: #fff; display: flex; align-items: center; gap: 8px;
  border-right: 1px solid var(--line); padding: 7px 12px; font-size: 12px; min-width: 0; text-align: left;
}
button.timeline-label { border: 0; border-right: 1px solid var(--line); width: 100%; }
button.timeline-label:hover { background: #f4f8f2; }
.timeline-head .timeline-label, .timeline-section .timeline-label { background: #f9fbf7; }
.timeline-section { min-height: 28px; background: #f9fbf7; }
.timeline-section .timeline-label { font-size: 11px; color: var(--muted); font-weight: 700; }
.row-label { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track { position: relative; background: repeating-linear-gradient(to right, transparent 0, transparent calc(var(--step) - 1px), #edf0ea calc(var(--step) - 1px), #edf0ea var(--step)); min-width: 0; }
.weekend { position: absolute; top: 0; bottom: 0; background: #f0f3ee7a; width: var(--step); pointer-events: none; }
.today-line { position: absolute; top: 0; bottom: 0; border-left: 1px solid #6e957d; pointer-events: none; z-index: 1; }
.tick { position: absolute; bottom: 0; height: 100%; display: grid; place-items: center; font-size: 10px; color: var(--muted); white-space: nowrap; }
.tick.week { font-size: 11px; font-weight: 650; justify-content: start; padding-left: 5px; }
.tick.current { background: #dcebdd; color: var(--green); font-weight: 750; }
.timeline-head .track { height: 43px; }
.tick-month { position: absolute; top: 3px; font-size: 10px; color: var(--muted); font-weight: 700; padding-left: 4px; white-space: nowrap; }
.timeline-head .tick { height: 24px; }
.bar {
  position: absolute; top: 6px; height: 23px; z-index: 2; border: 0; border-radius: 5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 3px 7px;
  font-size: 11px; text-align: left; font-weight: 650; line-height: 16px; min-width: 5px; touch-action: none;
}
.bar.sofya, .badge.sofya { color: var(--green); background: #dcefe1; }
.bar.sasha, .badge.sasha { color: #50417a; background: var(--purple-soft); }
.bar.both, .badge.both { color: #58614d; background: #e8eee1; }
.bar.sales { color: var(--amber); background: #f6e8c9; }
.bar.study { color: var(--green); background: #deebe0; }
.bar.support { color: var(--purple); background: #eceafa; }
.bar.done { box-shadow: inset 0 0 0 1px #7f9f8b; }
.bar.planned { background: transparent; border: 1px dashed #7fa38c; pointer-events: none; }
.bar.drag { cursor: grab; padding-right: 11px; }
.bar.drag:active { cursor: grabbing; }
.bar .resize { position: absolute; width: 8px; right: 0; top: 0; bottom: 0; border-left: 1px solid #1d272233; cursor: ew-resize; }
.bar.readonly { cursor: default; }
.track-empty { position: absolute; top: 10px; left: 9px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; padding: 9px 16px; font-size: 11px; color: var(--muted); }
.legend span { display: inline-flex; gap: 5px; align-items: center; }
.dot { height: 7px; width: 7px; border-radius: 50%; flex: 0 0 auto; background-color: #a4ad9e; }
.dot.sofya { background: #599077; }
.dot.sasha { background: #9482c6; }
.dot.both { background: #9baa8f; }
.dot.sales { background: #c59c5b; }
.dot.study { background: #709e80; }
.dot.support { background: #a190c5; }
.list { display: grid; padding: 0 17px 9px; }
.list-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 42px; border-top: 1px solid var(--line); padding: 6px 0; }
.list-row span { min-width: 0; overflow-wrap: anywhere; }
.list-row button { text-align: left; font-size: 13px; }
.list-row small { max-width: 50%; text-align: right; }
.pagination { display: flex; justify-content: space-between; align-items: center; padding: 3px 17px 12px; font-size: 13px; gap: 8px; }
.badge { display: inline-block; font-size: 11px; border-radius: 6px; padding: 4px 6px; background: #eef0ea; color: var(--muted); white-space: nowrap; }
.module-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(70px, 150px) auto; gap: 14px; align-items: center; }
.module-head .badge { margin-bottom: 5px; }
.progress { height: 6px; border-radius: 99px; overflow: hidden; background: #edf1eb; margin-top: 6px; }
.progress > div { height: 100%; background: #54856c; }
.lessons { padding: 0 17px 8px; }
.lesson { border-top: 1px solid var(--line); }
.lesson summary { display: flex; align-items: center; gap: 8px; padding: 11px 0; cursor: pointer; list-style: none; font-size: 13px; }
.lesson summary::-webkit-details-marker { display: none; }
.lesson summary::before { content: '›'; color: var(--muted); flex: 0 0 9px; font-size: 18px; line-height: 15px; transition: transform .15s; }
.lesson[open] summary::before { transform: rotate(90deg); }
.lesson-title { flex: 1; }
.lesson-code { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 25px; }
.lesson-body { padding: 0 0 13px 17px; }
.lesson-body > p { line-height: 1.5; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; margin: 3px 0 9px; }
.checks { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; margin: 0 0 9px; }
.check { display: flex; gap: 7px; align-items: center; padding: 7px; background: #f7f9f5; border-radius: 7px; font-size: 12px; }
input[type=checkbox] { accent-color: var(--green); flex: 0 0 auto; width: 16px; height: 16px; }
.check span { display: grid; gap: 2px; min-width: 0; }
.check small { font-size: 10px; }
.lesson-links { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 9px; font-size: 12px; }
.task-group h2 { margin-bottom: 1px; }
.empty { padding: 16px; color: var(--muted); font-size: 13px; }
.stack { display: grid; gap: 13px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.form-grid.tight { gap: 7px; }
.full { grid-column: 1/-1; }
.field { display: grid; align-content: start; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 650; min-width: 0; }
.field input, .field select, .field textarea {
  color: var(--ink); width: 100%; min-width: 0; font-size: 13px; font-weight: 500;
  background: #fff; border: 1px solid #dce4da; border-radius: 7px; padding: 7px 8px; min-height: 35px;
}
.field select[multiple] { min-height: 105px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid #8da99c; outline-offset: 1px; }
.field textarea { resize: vertical; min-height: 70px; }
.fieldset { padding: 11px; border: 1px solid var(--line); border-radius: 9px; margin: 0; min-width: 0; }
.fieldset legend { font-size: 13px; font-weight: 700; padding: 0 4px; }
.fieldset summary { cursor: pointer; font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.capacity-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 5px; }
.capacity-grid input { padding-inline: 3px; }
.booking { display: grid; grid-template-columns: minmax(100px,2fr) minmax(85px,1fr) minmax(108px,1fr) minmax(108px,1fr) minmax(45px,.65fr) auto; gap: 5px; padding: 6px 0; align-items: end; }
.booking .btn { min-height: 35px; }
dialog { width: min(715px, calc(100vw - 24px)); max-height: min(820px, calc(100dvh - 28px)); border: 0; padding: 0; border-radius: 16px; color: var(--ink); box-shadow: 0 25px 100px #12281b36; }
dialog::backdrop { background: #172b2066; }
.dialog-head { padding: 13px 18px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 3; background: #fff; }
.dialog-main { padding: 15px 18px; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 8px; background: #fff; position: sticky; bottom: 0; z-index: 3; border-top: 1px solid var(--line); padding: 11px 18px; }
.dialog-foot .danger { margin-right: auto; }
.error { color: var(--red); line-height: 1.4; font-size: 13px; }
#notice { position: fixed; z-index: 10; bottom: 16px; right: 16px; max-width: min(380px,calc(100vw - 32px)); background: #233e31; color: #fff; border-radius: 9px; font-size: 13px; padding: 10px 13px; box-shadow: 0 4px 24px #172b2033; }
#notice:empty { display: none; }
.signin { min-height: 100dvh; display: grid; place-items: center; padding: 18px; }
.signin .panel { width: min(100%,390px); padding: 24px; }
.signin .brand { padding: 0 0 7px; }
.signin h1 { font-size: 30px; }
.line-item { padding: 8px 0; font-size: 13px; border-bottom: 1px solid var(--line); line-height: 1.5; }
@media (max-width: 1070px) {
  :root { --sidebar: 185px; }
  .content { padding-inline: 20px; }
  .timeline { --label: 214px; }
  .metric { padding-inline: 12px; }
  .metric-date { font-size: 22px; }
}
@media (max-width: 760px) {
  .shell { display: block; }
  .side { position: relative; height: auto; padding: 12px; border-right: 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 8px; }
  .side .brand { padding: 0; }
  .side-footer { grid-column: 2; grid-row: 1; border: 0; padding: 0; }
  .course-name { display: none; }
  .side nav { grid-row: 2; grid-column: 1/-1; display: flex; flex-wrap: wrap; }
  .nav-button { width: auto; padding: 7px 9px; }
  .content { padding: 22px 12px 40px; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
  .metric { min-height: 91px; }
  .banner { align-items: flex-start; flex-wrap: wrap; }
  .timeline { --label: 154px; }
  .module-head { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .module-head > div:nth-child(2) { grid-row: 2; grid-column: 1/-1; }
  .checks { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .booking { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .booking .btn { justify-self: end; }
}
@media (max-width: 400px) {
  .lesson summary .badge:last-child { display: none; }
  .capacity-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
