@font-face { font-family: Gilroy; src: url("fonts/GILROY-REGULAR.TTF"); font-weight: 400; font-display: swap; }
@font-face { font-family: Gilroy; src: url("fonts/GILROY-MEDIUM.TTF"); font-weight: 500; font-display: swap; }
@font-face { font-family: Gilroy; src: url("fonts/GILROY-SEMIBOLD.TTF"); font-weight: 600; font-display: swap; }
@font-face { font-family: Gilroy; src: url("fonts/GILROY-BOLD.TTF"); font-weight: 700; font-display: swap; }

:root {
  --purple: #6A4AE2;
  --pink: #C04DFF;
  --lime: #C0FF4D;
  --ink: #333333;
  --muted: #7a7690;
  --line: #e6e3f0;
  --bg: #f5f4fa;
  --card: #ffffff;
  --red: #e5484d;
  --red-soft: #fdecec;
  --yellow: #ffd23f;
  --yellow-soft: #fff6d6;
  --green: #3dbb7a;
  --green-soft: #e3f7ec;
  --blue-soft: #e8e4ff;
  --grey-soft: #eceaf2;
  --radius: 12px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font: 500 15px/1.45 Gilroy, "Segoe UI", Arial, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--purple); }
h1, h2, h3, h4 { font-weight: 700; margin: 0 0 12px; }
h1 { font-size: 26px; }
input, select, textarea, button { font: inherit; color: inherit; }
input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff; max-width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--purple) 40%, transparent); border-color: var(--purple); }
textarea { width: 100%; resize: vertical; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--purple); width: 16px; height: 16px; vertical-align: -3px; }

.btn {
  display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 10px; padding: 9px 16px;
  background: linear-gradient(90deg, var(--purple), var(--pink)); color: #fff; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { filter: brightness(1.07); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.ghost { background: #fff; color: var(--purple); border: 1px solid var(--line); }
.btn.btn-lime { background: var(--lime); color: var(--ink); }
.btn.danger { background: #fff; color: var(--red); border: 1px solid #f3c4c6; }
.link, .linklike { background: none; border: 0; padding: 0; color: var(--purple); cursor: pointer; text-decoration: none; }
.link:hover, .linklike:hover { text-decoration: underline; }
.hint { color: var(--muted); font-size: 13px; }
.field-label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 6px; }
.count { display: inline-block; min-width: 22px; padding: 0 6px; border-radius: 20px; background: rgba(0,0,0,.08); font-size: 12px; text-align: center; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 20px; background: var(--grey-soft); font-size: 12px; font-weight: 600; }
.tag-red { background: var(--red-soft); color: var(--red); }
.tag-yellow { background: var(--yellow-soft); color: #8a6d00; }
.pill { display: inline-block; padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 13px; }
.pill-red { border-color: #f3c4c6; color: var(--red); }
.x { border: 0; background: none; font-size: 20px; line-height: 1; color: var(--muted); cursor: pointer; padding: 2px 6px; }
.form-error, .errorlist { color: var(--red); font-size: 13px; }
.errorlist { list-style: none; margin: 4px 0; padding: 0; }
.grow { flex: 1; }

/* шапка */
.topbar {
  display: flex; align-items: center; gap: 24px; padding: 0 20px; height: 56px;
  background: linear-gradient(90deg, var(--purple), var(--pink)); color: #fff;
}
.brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 700; font-size: 18px; }
.brand img { width: 34px; height: 34px; }
.nav { display: flex; gap: 4px; }
.nav a { color: #fff; text-decoration: none; padding: 6px 12px; border-radius: 8px; opacity: .85; }
.nav a.on, .nav a:hover { background: rgba(255,255,255,.18); opacity: 1; }
.me { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.me a, .me .linklike { color: #fff; opacity: .9; }
.me-name small { opacity: .75; margin-left: 4px; }
.me form { margin: 0; }

.messages { position: fixed; top: 64px; right: 16px; z-index: 50; display: grid; gap: 8px; max-width: 420px; }
.msg { padding: 10px 14px; border-radius: 10px; background: #fff; box-shadow: 0 6px 24px rgba(40,20,90,.15); border-left: 4px solid var(--purple); animation: fade 6s forwards; }
.msg-success { border-color: var(--green); }
.msg-warning { border-color: var(--yellow); }
.msg-error { border-color: var(--red); }
@keyframes fade { 0%, 85% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.toast { background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; white-space: nowrap; }

.page { max-width: 980px; margin: 24px auto; padding: 0 16px; }
.page-wide { padding: 12px; }
.sheet { background: var(--card); border-radius: var(--radius); padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.narrow { max-width: 460px; }
.stack { display: grid; gap: 10px; }
.stack.small { gap: 6px; margin-top: 8px; }
.stack > div label, .stack > div > label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.stack .helptext { display: block; color: var(--muted); font-size: 12px; }
.stack input:not([type="checkbox"]):not([type="radio"]), .stack select { width: 100%; }

/* вход */
.login-body { background: linear-gradient(135deg, var(--purple), var(--pink)); min-height: 100vh; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: 100%; max-width: 360px; background: #fff; border-radius: 18px; padding: 28px; display: grid; gap: 12px; box-shadow: 0 20px 60px rgba(30,10,80,.3); }
.login-card h1 { font-size: 22px; }
.login-card label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.login-card input { width: 100%; }
.login-logo { width: 56px; height: 56px; background: linear-gradient(135deg, var(--purple), var(--pink)); border-radius: 14px; padding: 8px; }
.login-hint { margin: 0; color: var(--muted); font-size: 13px; text-align: center; }

/* календарь */
.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 12px; height: calc(100vh - 80px); }
.cal-card { background: var(--card); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; min-height: 0; }
.cal-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.who select { min-width: 240px; font-weight: 600; }
.who-static { font-weight: 700; padding: 8px 4px; }
.cal-hint { margin-left: auto; }
#calendar { flex: 1; min-height: 480px; }
.fc {
  --fc-border-color: var(--line); --fc-today-bg-color: #faf8ff; --fc-now-indicator-color: var(--red); font-size: 13px;
  /* выделение слота мышкой и «призрак» новой задачи — фирменный фиолетовый вместо голубого */
  --fc-highlight-color: rgba(106, 74, 226, .22); --fc-event-bg-color: var(--purple); --fc-event-border-color: var(--purple);
}
.fc-event.fc-event-mirror .fc-event-main { color: #fff; }
.fc-event.overdue { border-color: var(--red) !important; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch-pick { cursor: pointer; }
.swatch-pick input { position: absolute; opacity: 0; pointer-events: none; }
.swatch-pick span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; border: 1px solid; border-left-width: 4px; font-size: 11px; font-weight: 700; color: var(--muted); }
.swatch-pick input:checked + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.swatch-pick input:focus-visible + span { outline: 2px solid var(--purple); outline-offset: 2px; }
.fc .fc-toolbar-title { font-size: 18px; font-weight: 700; }
.fc .fc-button-primary { background: #fff; color: var(--ink); border-color: var(--line); text-transform: lowercase; }
.fc .fc-button-primary:not(:disabled).fc-button-active, .fc .fc-button-primary:not(:disabled):active { background: var(--purple); border-color: var(--purple); color: #fff; }
.fc .fc-button-primary:hover { background: var(--blue-soft); color: var(--ink); border-color: var(--line); }
.fc .fc-col-header-cell-cushion { color: var(--ink); text-decoration: none; font-weight: 600; }
.fc-timegrid-slot { height: 22px !important; }
.fc-event { border-radius: 6px; border-width: 0 0 0 3px; padding: 1px 3px; cursor: pointer; }
.fc-event .fc-event-main { color: var(--ink); font-weight: 600; }
.fc-event.st-new { background: var(--blue-soft); border-color: var(--purple); }
.fc-event.st-in_progress { background: #d9ccff; border-color: var(--purple); }
.fc-event.st-review { background: var(--yellow-soft); border-color: var(--yellow); }
.fc-event.st-done { background: var(--green-soft); border-color: var(--green); }
.fc-event.st-done .fc-event-main { color: #5b7a68; text-decoration: line-through; }
.fc-event.st-postponed { background: var(--grey-soft); border-color: #b9b5c8; }
.fc-event.overdue { background: var(--red-soft); border-color: var(--red); }
.fc-event.overdue .fc-event-main { color: var(--red); }

/* колонки справа */
.panel { overflow-y: auto; display: grid; gap: 10px; align-content: start; }
.col { border-radius: var(--radius); padding: 10px; }
.col h4 { font-size: 13px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.col-queue { background: var(--blue-soft); }
.col-overdue { background: var(--red-soft); }
.col-review { background: var(--yellow); }
.col-nodates { background: var(--grey-soft); }
.col-done { background: #bfeccf; }
.empty { margin: 0; font-size: 13px; color: rgba(0,0,0,.45); }
.card { position: relative; background: #fff; border-radius: 10px; margin-bottom: 6px; border-left: 3px solid transparent; cursor: grab; }
.card:hover { box-shadow: 0 3px 12px rgba(40,20,90,.12); }
.card.dragging { opacity: .45; }
.card-link { display: grid; gap: 4px; padding: 9px 40px 9px 10px; color: var(--ink); text-decoration: none; }
.card-done {
  position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid #cfc9e3; background: #fff; color: #b9b5c8; font-size: 13px; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0;
}
.card-done:hover { border-color: var(--green); background: var(--green-soft); color: var(--green); }
.col.drop-over { outline: 2px dashed var(--purple); outline-offset: -2px; }
.panel-hint { margin: 0 4px; }
.card b { font-weight: 700; font-size: 14px; }
.card .when { font-size: 12px; color: var(--muted); }
.card .meta { font-size: 11px; color: var(--muted); }
.card.overdue { border-left-color: var(--red); }
.card.overdue .when { color: var(--red); }

/* всплывашки */
.pop { position: fixed; z-index: 60; width: 320px; background: #fff; border-radius: 14px; box-shadow: 0 16px 48px rgba(30,10,80,.25); padding: 14px; }
.pop form { display: grid; gap: 8px; }
.pop input[name="title"] { font-size: 16px; font-weight: 600; }
.pop-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pop-head h3 { margin: 0; font-size: 17px; }
.pop-actions, .modal-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.modal-actions { justify-content: flex-end; }
.checks { display: grid; gap: 4px; max-height: 160px; overflow-y: auto; }
.checks label, .checks div label { font-size: 14px; color: var(--ink); }
.toggle { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.modal { position: fixed; inset: 0; z-index: 70; background: rgba(30,20,60,.35); display: grid; place-items: center; padding: 16px; }
.modal-card { width: 100%; max-width: 480px; background: #fff; border-radius: 16px; padding: 20px; display: grid; gap: 6px; max-height: calc(100vh - 32px); overflow-y: auto; }
.seg { display: inline-flex; gap: 4px; background: var(--grey-soft); padding: 4px; border-radius: 10px; width: max-content; }
.seg label { padding: 5px 12px; border-radius: 8px; cursor: pointer; }
.seg label:has(input:checked) { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.seg input { display: none; }
.days, .days > div { display: flex; flex-wrap: wrap; gap: 6px; }
.days label { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--ink); margin: 0; }
.days label:has(input:checked) { border-color: var(--purple); background: var(--blue-soft); }
.days label.own { border-style: dashed; }
.inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.inline input[type="number"] { width: 70px; }

/* карточка задачи */
.task-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.task-top form { margin: 0; }
.status-select { font-weight: 600; }
.status-select.st-review { background: var(--yellow-soft); }
.status-select.st-done { background: var(--green-soft); }
.status-select.st-in_progress { background: var(--blue-soft); }
.review-box { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px; border-radius: 12px; background: var(--yellow-soft); margin-bottom: 16px; }
.review-box input { flex: 1; min-width: 200px; }
.task-form { display: grid; gap: 14px; margin-top: 12px; }
.title-input { width: 100%; font-size: 22px; font-weight: 700; border-color: transparent !important; padding-left: 0 !important; }
.title-input:focus { border-color: var(--line) !important; padding-left: 10px !important; }
.task-title { margin-top: 8px; }
.rows { display: grid; gap: 10px; }
.row { display: grid; grid-template-columns: 180px minmax(0, 1fr); align-items: start; gap: 12px; }
.row > span:first-child { color: var(--muted); font-size: 14px; padding-top: 8px; }
.row input:not([type="checkbox"]), .row select { width: 100%; }
.row.row-toggle { align-items: center; }
.row.row-toggle > span:first-child { padding-top: 0; }
.dates { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 10px; margin: 0; }
.dates legend { padding: 0 6px; font-weight: 700; }
.toggles { display: flex; flex-wrap: wrap; gap: 18px; }
.date-grid { display: flex; flex-wrap: wrap; gap: 16px; }
.date-grid > div { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.date-grid span { color: var(--muted); font-size: 13px; min-width: 56px; }
.repeat-box { display: grid; gap: 8px; padding: 10px; border-radius: 10px; background: var(--bg); }
.presets { display: flex; gap: 6px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 20px; padding: 4px 12px; cursor: pointer; font-size: 13px; }
.chip:hover { border-color: var(--purple); }
.scope ul, .scope > div { display: flex; flex-wrap: wrap; gap: 14px; list-style: none; padding: 0; margin: 0; }
.block { display: block; }
.description { background: var(--bg); border-radius: 10px; padding: 4px 14px; }
.actions { display: flex; gap: 10px; }
.block-sec { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 18px; }
.block-sec h3 { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.check-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 4px; }
.check-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; border-radius: 8px; }
.check-item:hover { background: var(--bg); }
.check-item label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.check-item form { margin: 0; }
.check-item.done span { text-decoration: line-through; color: var(--muted); }
.inline-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.inline-add input[name="text"] { flex: 1; min-width: 200px; }
.inline-add textarea { flex: 1; min-width: 220px; }
.extra-dates { display: flex; flex-wrap: wrap; gap: 6px; }
.comments { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 10px; }
.comments li { background: var(--bg); border-radius: 10px; padding: 8px 12px; }
.comments li.sys { background: none; padding: 0 12px; font-size: 13px; color: var(--muted); }
.comments li.sys b { font-weight: 600; }
.danger-zone { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; border-top: 1px solid var(--line); margin-top: 22px; padding-top: 18px; }

/* категории */
.cat-list { display: grid; gap: 8px; margin: 16px 0; }
.cat-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cat-row input[name="name"] { flex: 1; min-width: 180px; }
.swatch { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line); }
.icon-btn { border: 1px solid var(--line); background: #fff; border-radius: 8px; width: 34px; height: 34px; cursor: pointer; }
.icon-btn:disabled { opacity: .35; cursor: default; }

/* сотрудники */
.table-scroll { overflow-x: auto; }
.team { width: 100%; border-collapse: collapse; }
.team th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px; border-bottom: 1px solid var(--line); }
.team td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.team tr.off td { opacity: .5; }
.team form { margin: 0; }
.team summary { cursor: pointer; color: var(--purple); }

/* одно окно: панель «Ответы» */
.answers-btn { border: 0; background: var(--lime); color: var(--ink); font-weight: 700; border-radius: 10px; padding: 7px 14px; cursor: pointer; white-space: nowrap; }
.drawer { position: fixed; top: 56px; right: 0; bottom: 0; width: min(460px, 100vw); z-index: 65; background: #fff; box-shadow: -12px 0 40px rgba(30,10,80,.18); display: flex; flex-direction: column; }
.drawer-head { display: flex; gap: 8px; padding: 12px; border-bottom: 1px solid var(--line); }
.drawer-head input { flex: 1; font-size: 15px; }
.drawer-body { overflow-y: auto; padding: 4px 14px 24px; }
.drawer .sp-title { font-size: 16px; margin-top: 16px; }
.drawer .link-grid, .link-grid.one { grid-template-columns: 1fr; }
.drawer .fact { grid-template-columns: 1fr; gap: 2px; }

/* справочник */
.sheet-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.sheet-head h1 { margin: 0; }
.row-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.btn.small { padding: 6px 12px; font-size: 13px; }
.sp-search { width: 100%; font-size: 16px; padding: 11px 14px !important; }
.sp-title { font-size: 20px; margin: 24px 0 8px; }
.sp-group { margin-bottom: 14px; }
.sp-group h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 12px 0 6px; }
.tpl { background: #f7f4ff; border-left: 3px solid var(--purple); border-radius: 0 10px 10px 0; padding: 10px 12px; margin-bottom: 8px; }
.tpl p { margin: 0; }
.tpl-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--purple); font-weight: 700; margin-bottom: 6px; }
.tpl-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; display: grid; gap: 8px; }
.tpl-label { font-weight: 700; }
.minicopy { border: 0; background: #eae3fe; color: var(--purple); font-size: 12px; font-weight: 700; border-radius: 20px; padding: 4px 10px; cursor: pointer; white-space: nowrap; }
.minicopy:hover { background: #dcd1fd; }
.copied { background: var(--lime) !important; color: var(--ink) !important; }
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.link-card { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: #fff; }
.link-card > a { flex: 1; display: flex; gap: 10px; align-items: center; color: var(--ink); text-decoration: none; min-width: 0; }
.link-card small { display: block; color: var(--muted); font-size: 12px; }
.link-card .ico { font-size: 20px; }
.edit-mini { color: var(--muted); text-decoration: none; padding: 0 4px; }
.facts { margin: 0; display: grid; }
.fact { display: grid; grid-template-columns: minmax(140px, 240px) 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.fact dt { color: var(--muted); font-size: 13px; }
.fact dd { margin: 0; }

/* HTML из генераторов: заметки к ответам и уроки */
.doc { font-size: 15px; }
.doc h4 { margin: 14px 0 6px; font-size: 15px; }
.doc p { margin: 0 0 8px; }
.doc ul, .doc ol { margin: 0 0 10px; padding-left: 20px; }
.doc li { margin-bottom: 4px; }
.doc code { background: #f0ecfe; border-radius: 6px; padding: 1px 6px; font-size: 13.5px; }
.warn, .note { background: var(--yellow-soft); border-radius: 10px; padding: 9px 12px; font-size: 14px; margin: 8px 0; }
.shot { margin: 14px 0; }
.shot img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 12px; }
.shot.narrow img { max-width: 40%; margin: 0 auto; }
.shot figcaption { margin-top: 6px; font-size: 12.5px; color: var(--muted); text-align: center; }
.shot-miss { background: var(--yellow-soft); border-radius: 12px; padding: 14px; text-align: center; }
.anno { position: relative; display: block; }
.pin { position: absolute; transform: translate(-50%, -50%); width: 26px; height: 26px; border-radius: 50%; background: var(--purple); color: #fff; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 3px #fff; }
ol.pins { list-style: none; padding-left: 0; counter-reset: pin; }
ol.pins li { counter-increment: pin; position: relative; padding-left: 36px; margin-bottom: 8px; }
ol.pins li::before { content: counter(pin); position: absolute; left: 0; top: 1px; width: 24px; height: 24px; border-radius: 50%; background: var(--purple); color: #fff; font-weight: 700; font-size: 13px; display: grid; place-items: center; }
.creds { background: #f7f4ff; border: 1px solid #dcd1fd; border-radius: 12px; padding: 14px 16px; margin: 0 0 16px; max-width: 520px; }
.creds-t { font-weight: 700; }
.creds-p { margin: 0 0 10px; font-size: 13.5px; color: var(--muted); }
.cred { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid #e7dffb; }
.cred-k { flex: 0 0 60px; font-size: 11px; color: var(--muted); text-transform: uppercase; font-weight: 700; }
.cred-v { flex: 1; font-weight: 700; word-break: break-all; }
.cred-or { text-align: center; font-size: 11px; color: var(--muted); padding: 8px 0 2px; text-transform: uppercase; }

/* обучение */
.progress-line { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 10px; }
.progress-line .bar { flex: 1; min-width: 120px; }
.bar { height: 8px; background: var(--line); border-radius: 8px; overflow: hidden; margin: 8px 0 16px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--purple), var(--pink)); border-radius: 8px; }
.rule { background: var(--bg); border-left: 4px solid var(--lime); border-radius: 10px; padding: 10px 14px; font-size: 14px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 4px; }
.tab { border: 1px solid var(--line); border-radius: 24px; padding: 7px 14px; color: var(--muted); text-decoration: none; font-weight: 600; display: inline-flex; gap: 8px; align-items: center; }
.tab.on { background: var(--purple); border-color: var(--purple); color: #fff; }
.tab-n { font-size: 11px; background: #f0ecfe; color: var(--purple); border-radius: 12px; padding: 1px 7px; }
.tab.on .tab-n { background: rgba(255,255,255,.22); color: #fff; }
.lead { color: var(--muted); max-width: 680px; }
.mod-t { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 0 8px; }
.lesson-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ls-link { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; color: var(--ink); text-decoration: none; background: #fff; }
a.ls-link:hover { border-color: #b9a6f5; }
.ls-state { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: 11px; }
.ls.done .ls-state { background: var(--green); border-color: var(--green); color: #fff; }
.ls.done .ls-state::before { content: "✓"; }
.ls.current .ls-link { border-color: #b9a6f5; box-shadow: 0 6px 20px rgba(106,74,226,.14); }
.ls.current .ls-state { border-color: var(--purple); color: var(--purple); }
.ls.current .ls-state::before { content: "▶"; font-size: 9px; }
.ls.locked { opacity: .55; }
.ls.locked .ls-link { cursor: not-allowed; }
.ls.locked .ls-state::before { content: "🔒"; font-size: 10px; }
.ls-num { color: var(--purple); font-weight: 700; min-width: 30px; }
.ls-txt { flex: 1; }
.ls-tag { font-size: 11px; text-transform: uppercase; color: var(--muted); background: var(--bg); border-radius: 10px; padding: 2px 8px; }
.fin { background: linear-gradient(90deg, var(--purple), var(--pink)); color: #fff; border-radius: 12px; padding: 14px 18px; margin-top: 12px; font-weight: 700; }
.lesson h1 { margin-top: 4px; }
.lesson .btn { white-space: normal; max-width: 100%; }
.player { position: relative; padding-top: 56.25%; background: #ede9f9; border-radius: 12px; overflow: hidden; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.frame { height: 70vh; min-height: 420px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; position: relative; margin: 10px 0; }
.frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.frame.scaled iframe { position: absolute; top: 0; left: 0; transform-origin: 0 0; }
.lesson-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); margin-top: 22px; padding-top: 16px; }
.lesson-foot form { margin: 0; }
.nda-card { max-width: 620px; margin: 0 auto; }
.nda-emo { font-size: 40px; }
.nda-docs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.nda-docs a { flex: 1 1 220px; background: #f0ecfe; border-radius: 12px; padding: 11px 14px; text-decoration: none; font-weight: 600; }
.nda-check { display: flex; gap: 10px; align-items: flex-start; background: var(--bg); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; cursor: pointer; }
.tag-green { background: var(--green-soft); color: #23764a; }

/* сегодня */
.today { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; max-width: 1240px; margin: 12px auto; }
.today-side { display: grid; gap: 16px; align-content: start; }
.today h3 { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.red-title { color: var(--red); }
.task-rows { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.task-row { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-left: 3px solid var(--purple); border-radius: 10px; padding: 8px 10px; background: #fff; }
.task-row a { flex: 1; display: grid; gap: 2px; color: var(--ink); text-decoration: none; min-width: 0; }
.task-row form { margin: 0; }
.task-row.st-done { border-left-color: var(--green); }
.task-row.st-done b { text-decoration: line-through; color: var(--muted); }
.task-row.st-review { border-left-color: var(--yellow); }
.task-row.overdue { border-left-color: var(--red); }
.card-done.static { position: static; flex: 0 0 auto; }
.row-state { width: 26px; text-align: center; color: var(--muted); flex: 0 0 auto; }

/* доски */
.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin: 12px 0; }
.board-tile { display: grid; gap: 6px; border: 1px solid var(--line); border-radius: 12px; padding: 14px; color: var(--ink); text-decoration: none; background: #fff; }
.board-tile:hover { border-color: #b9a6f5; box-shadow: 0 6px 20px rgba(106,74,226,.12); }
.narrow-form { max-width: 560px; }
.stack > label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.board-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 4px 6px 8px; }
.board-head h1 { margin: 0; }
.board-desc { margin: 0 6px 10px; }
.board { display: flex; gap: 12px; overflow-x: auto; padding: 4px 4px 16px; align-items: flex-start; }
.bcol { flex: 0 0 290px; background: #ece9f6; border-radius: 14px; padding: 10px; display: grid; gap: 8px; }
.bcol-done { background: #d9f1e3; }
.bcol h3 { display: flex; justify-content: space-between; align-items: center; font-size: 14px; margin: 0; }
.bcards { display: grid; gap: 8px; min-height: 48px; border-radius: 10px; }
.bcards.drop-over { outline: 2px dashed var(--purple); outline-offset: 2px; }
.bcard { display: grid; gap: 4px; background: #fff; border-radius: 10px; padding: 9px 10px; color: var(--ink); text-decoration: none; border-left: 3px solid var(--purple); cursor: grab; }
.bcard:hover { box-shadow: 0 3px 12px rgba(40,20,90,.12); }
.bcard.dragging { opacity: .45; }
.bcard.st-done b { text-decoration: line-through; color: var(--muted); }
.bcard.st-review { border-left-color: var(--yellow); }
.bcard.overdue .bmeta { color: var(--red); }
.blabel { justify-self: start; font-size: 11px; font-weight: 700; border-radius: 6px; padding: 1px 7px; }
.bmeta { font-size: 12px; color: var(--muted); }
.badd { display: grid; gap: 6px; }
.board-move { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: var(--bg); border-radius: 10px; padding: 8px 12px; margin-bottom: 12px; }

@media (max-width: 900px) {
  .today { grid-template-columns: 1fr; }
  .nav { overflow-x: auto; flex: 1; scrollbar-width: none; }
  .nav a { white-space: nowrap; }
  .brand span, .me-pass { display: none; }
  .fact { grid-template-columns: 1fr; gap: 2px; }
  .bcol { flex-basis: 82vw; }
  .cal-layout { grid-template-columns: 1fr; height: auto; }
  .cal-card { height: auto; }
  #calendar { min-height: 0; }
  .cal-hint { display: none; }
  .panel { overflow: visible; }
  .topbar { gap: 12px; padding: 0 12px; }
  .me-name { display: none; }
  .row { grid-template-columns: 1fr; gap: 4px; }
  .row > span:first-child { padding-top: 0; }
  .sheet { padding: 16px; }
  .pop { left: 8px !important; right: 8px; top: 72px !important; width: auto; }
  .who select { min-width: 0; width: 100%; }
  .who { flex: 1 1 100%; }
  .fc .fc-toolbar { flex-wrap: wrap; gap: 6px; }
  .fc .fc-toolbar-title { font-size: 15px; }
}
