:root {
  --navy: #0a1f44;
  --navy-soft: #122b56;
  --teal: #05929e;
  --teal-bright: #16b8c4;
  --teal-pale: #e3f6f7;
  --ink: #142033;
  --muted: #5c6b82;
  --line: #dde5ef;
  --bg: #f4f7fb;
  --card: #ffffff;
  --ok: #147d54;
  --ok-bg: #e4f5ec;
  --warn: #9a5b06;
  --warn-bg: #fdf1dd;
  --danger: #b42318;
  --danger-bg: #fde8e6;
  --info-bg: #e8f0fb;
  --radius: 16px;
  --shadow: 0 12px 30px rgba(10, 31, 68, 0.08);
  --mono: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body.platform-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, Rubik, "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 0.5rem; line-height: 1.2; color: var(--navy); }
h1 { font-size: clamp(1.55rem, 2.4vw, 2.1rem); }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 0.8rem; }
small, .small { font-size: 0.82rem; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.right { text-align: right; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; }
.gap { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.65rem clamp(1rem, 4vw, 2.5rem);
  background: linear-gradient(100deg, var(--navy), #0d2a5b 70%, #0b3a55);
  color: #eef4ff;
  box-shadow: 0 6px 18px rgba(10, 31, 68, 0.2);
}

.brand { display: flex; align-items: center; gap: 0.65rem; color: inherit; }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--teal-bright), var(--teal));
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 0.98rem; }
.brand-text small { color: #9fb7dc; font-size: 0.72rem; }

.main-nav { display: flex; gap: 0.25rem; flex-wrap: wrap; margin-left: 0.5rem; }
.main-nav a {
  color: #cddcf5;
  padding: 0.4rem 0.7rem;
  border-radius: 9px;
  font-size: 0.9rem;
  text-decoration: none;
}
.main-nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.main-nav a.is-active { background: rgba(22, 184, 196, 0.22); color: #fff; }

.userbox { margin-left: auto; display: flex; align-items: center; gap: 0.55rem; flex-wrap: wrap; }
.user-name { font-weight: 600; font-size: 0.9rem; }

.page {
  width: min(1240px, 100% - 2.5rem);
  margin: 0 auto;
  padding: 1.6rem 0 2.5rem;
  flex: 1;
}

.page-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem clamp(1rem, 4vw, 2.5rem);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  background: #fff;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.page-head:empty { display: none; }
.page-head h1 { margin: 0; font-size: 1.35rem; }
.page-actions { display: flex; gap: 0.55rem; flex-wrap: wrap; align-items: center; margin-left: auto; }
.page-head > div:first-child:not(.page-actions) { min-width: 0; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.hero .eyebrow { margin-bottom: 0.3rem; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--teal);
}
.hero-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.grid { display: grid; gap: 1rem; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--sidebar { grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr); }

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.panel--flat { box-shadow: none; }
.panel--center { max-width: 560px; margin: 3rem auto; text-align: center; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.9rem; flex-wrap: wrap; }
.panel-title h2, .panel-title h3 { margin: 0; }
.panel-note { color: var(--muted); font-size: 0.86rem; margin-bottom: 0.9rem; }

.stat-grid { display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 1.2rem; }
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
}
.stat-label { color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
.stat-value { font-size: 1.6rem; font-weight: 800; color: var(--navy); margin: 0.35rem 0 0.1rem; }
.stat-value--ok { color: var(--ok); }
.stat-value--danger { color: var(--danger); }
.stat-hint { color: var(--muted); font-size: 0.8rem; }

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.data th, table.data td { padding: 0.62rem 0.7rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data th { color: var(--muted); font-size: 0.73rem; text-transform: uppercase; letter-spacing: 0.05em; }
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: #f8fbfe; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  background: var(--info-bg);
  color: var(--navy);
  white-space: nowrap;
}
.badge--ok { background: var(--ok-bg); color: var(--ok); }
.badge--warn { background: var(--warn-bg); color: var(--warn); }
.badge--danger { background: var(--danger-bg); color: var(--danger); }
.badge--teal { background: var(--teal-pale); color: #04606a; }
.badge--role { background: rgba(255,255,255,0.14); color: #eaf3ff; }
.badge--muted { background: #edf1f7; color: var(--muted); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 0.95rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--teal);
  color: #fff;
  font: inherit;
  font-weight: 650;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: filter 0.15s ease, transform 0.05s ease;
}
.btn:hover { filter: brightness(0.94); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: transparent; border-color: rgba(255,255,255,0.35); color: #eef4ff; }
.btn--outline { background: #fff; border-color: var(--line); color: var(--navy); }
.btn--danger { background: var(--danger); }
.btn--small { padding: 0.3rem 0.6rem; font-size: 0.8rem; border-radius: 8px; }
.btn--block { width: 100%; }

.inline-form { display: inline; }
.form-grid { display: grid; gap: 0.9rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
label.field { display: flex; flex-direction: column; gap: 0.32rem; font-size: 0.84rem; font-weight: 650; color: var(--navy); }
input, select, textarea {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  font: inherit;
  font-size: 0.9rem;
  background: #fff;
  color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(5,146,158,0.35); border-color: var(--teal); }
textarea { min-height: 90px; resize: vertical; }
.hint { color: var(--muted); font-size: 0.78rem; font-weight: 400; }
.password-wrap { position: relative; display: block; }
.password-wrap input { padding-right: 2.5rem; }
.password-toggle {
  position: absolute;
  right: 0.3rem;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.password-toggle:hover { color: var(--teal); background: var(--teal-pale); }
.password-toggle .icon { width: 18px; height: 18px; }

.combo { position: relative; min-width: 220px; }
.combo input { width: 100%; }
.combo-list {
  position: absolute;
  z-index: 30;
  top: calc(100% + 0.25rem);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 0.25rem;
}
.combo-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.4rem 0.55rem;
  border: 0;
  border-radius: 7px;
  background: transparent;
  font: inherit;
  font-size: 0.88rem;
  color: var(--ink);
  cursor: pointer;
}
.combo-option:hover, .combo-option:focus { background: var(--teal-pale); color: #04606a; }
.combo-option--clear { color: var(--muted); font-weight: 600; }
.combo-option--clear::before { content: "×"; margin-right: 0.4rem; font-weight: 800; }

.toolbar { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.toolbar form { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.toolbar input[type="search"], .toolbar input[type="text"] { min-width: 210px; }

.flash-stack { display: grid; gap: 0.5rem; margin-bottom: 1rem; }
.flash { padding: 0.7rem 0.9rem; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 0.9rem; }
.flash--success { background: var(--ok-bg); border-color: #bfe6d3; color: var(--ok); }
.flash--error, .flash--danger { background: var(--danger-bg); border-color: #f4c3bf; color: var(--danger); }
.flash--warning { background: var(--warn-bg); border-color: #f0d6a8; color: var(--warn); }

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.list li { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: none; }

.timeline { list-style: none; margin: 0; padding: 0 0 0 1.1rem; border-left: 2px solid var(--line); display: grid; gap: 0.85rem; }
.timeline li { position: relative; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -1.42rem;
  top: 0.35rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-pale);
}

.progress { height: 9px; background: #e9eef5; border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--teal-bright)); border-radius: inherit; }

.tiles { display: grid; gap: 0.8rem; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.tile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  align-items: center;
  column-gap: 0.85rem;
  min-height: 84px;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.tile:hover { transform: translateY(-2px); border-color: var(--teal); text-decoration: none; }
.tile h3 { margin: 0; font-size: 1.08rem; grid-column: 2; align-self: end; }
.tile p { color: var(--muted); font-size: 0.88rem; margin: 0; grid-column: 2; align-self: start; }
.tile .tile-icon { grid-row: 1 / span 2; }
.tile-url { color: var(--teal); font-size: 0.78rem; font-family: var(--mono); word-break: break-all; grid-column: 2; }

.code-block {
  background: #0e1c33;
  color: #d7e6ff;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  font-family: var(--mono);
  font-size: 0.82rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 0.45rem 1rem; font-size: 0.9rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }

.chip-row { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.lesson-list { display: grid; gap: 0.65rem; }
.lesson {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.lesson--locked { background: #f6f8fb; color: var(--muted); }
.lesson--open { border-left: 4px solid var(--teal); }
.lesson-num { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--teal-pale); color: var(--teal); font-weight: 800; font-size: 0.82rem; flex: 0 0 auto; }
.lesson-body { flex: 1; min-width: 0; }
.lesson-body strong { display: block; }
.lesson-body small { color: var(--muted); }

.question-card { border: 1px solid var(--line); border-radius: 14px; padding: 1rem; background: #fff; }
.option {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-top: 0.5rem;
  cursor: pointer;
  background: #fff;
}
.option:hover { border-color: var(--teal); background: var(--teal-pale); }
.option input { width: auto; margin-top: 0.2rem; }

.game-code {
  font-family: var(--mono);
  font-size: clamp(2rem, 7vw, 3.6rem);
  letter-spacing: 0.22em;
  font-weight: 800;
  color: var(--navy);
  background: var(--teal-pale);
  padding: 0.4rem 1rem;
  border-radius: 14px;
  display: inline-block;
}

.chart { display: flex; align-items: flex-end; gap: 0.5rem; height: 150px; padding-top: 0.5rem; }
.chart .bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; gap: 0.25rem; }
.chart .bar span { background: linear-gradient(180deg, var(--teal-bright), var(--teal)); border-radius: 6px 6px 2px 2px; min-height: 4px; }
.chart .bar small { text-align: center; color: var(--muted); font-size: 0.7rem; }

.empty { text-align: center; padding: 2rem 1rem; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; }

@media (max-width: 980px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--sidebar { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; gap: 0.6rem; padding: 0.6rem 1rem; }
  .main-nav { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 0.15rem; }
  .main-nav a { white-space: nowrap; }
  .userbox { margin-left: auto; }
  .user-name { display: none; }
  .page { width: calc(100% - 1.5rem); padding-top: 1rem; }
  .grid--2, .grid--3, .grid--4, .form-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { align-items: flex-start; }
  table.data { font-size: 0.84rem; }
  .kv { grid-template-columns: 1fr; gap: 0.1rem 0; }
  .kv dd { margin-bottom: 0.5rem; }
}

@media (max-width: 460px) {
  .stat-grid { grid-template-columns: 1fr; }
  .brand-text small { display: none; }
  .panel { padding: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Утиліти */
.text-danger { color: var(--danger); font-weight: 650; }
.text-ok { color: var(--ok); font-weight: 650; }
.notice { padding: 0.75rem 0.9rem; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 0.88rem; }
.notice--warn { background: var(--warn-bg); border-color: #f0d6a8; color: var(--warn); }
.notice--ok { background: var(--ok-bg); border-color: #bfe6d3; color: var(--ok); }
.notice a { color: inherit; font-weight: 700; }
.code-inline { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: #f1f5fa; padding: 0.1rem 0.35rem; border-radius: 6px; font-size: 0.86em; }

/* Адмінка: плитки з фото, картки персоналу, профіль */
.tile-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--teal-pale);
  color: var(--teal);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
}
.tiles--photo { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0.8rem; }
.tile--photo { display: flex; flex-direction: column; grid-template-columns: none; grid-template-rows: none; align-items: stretch; min-height: 0; padding: 0; overflow: hidden; }
.tile--photo:hover { text-decoration: none; }
.tile-media {
  aspect-ratio: 1 / 1;
  width: 100%;
  background: linear-gradient(135deg, var(--teal-pale), #dbe7f4);
  display: grid;
  place-items: center;
  color: var(--teal);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  overflow: hidden;
}
.tile-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-body { padding: 0.65rem 0.8rem 0.75rem; display: grid; gap: 0.15rem; min-width: 0; }
.tile-body h3 { margin: 0; font-size: 0.98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-body p { margin: 0; font-size: 0.82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-body .hint { font-weight: 400; }

.avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  display: grid;
  place-items: center;
  background: var(--teal-pale);
  color: var(--teal);
  font-weight: 800;
  flex: 0 0 auto;
}
.avatar--lg { width: 96px; height: 96px; font-size: 1.5rem; }
.profile-head { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.profile-head .profile-main { min-width: 0; }
.profile-head h1 { margin-bottom: 0.15rem; }
.staff-tile { flex-direction: row; align-items: center; }
.staff-tile .staff-text { min-width: 0; display: grid; gap: 0.1rem; }
.staff-tile .staff-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile--muted { background: #f7f9fc; box-shadow: none; }
.tile--muted .avatar { filter: grayscale(1); opacity: 0.75; }

.month-form { display: flex; gap: 0.5rem; align-items: flex-end; flex-wrap: wrap; margin-bottom: 1rem; }
.month-form label.field { width: auto; min-width: 170px; }

.photo-preview {
  width: 100%;
  max-width: 260px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  object-fit: cover;
  aspect-ratio: 4 / 3;
}
.photo-preview--avatar { width: 96px; height: 96px; border-radius: 50%; aspect-ratio: 1; object-fit: cover; }

.copy-line { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.copy-line code { word-break: break-all; }

.history-month { display: grid; gap: 0.6rem; }
.history-month + .history-month { margin-top: 1.4rem; }
.history-month > h3 { margin: 0; padding-bottom: 0.4rem; border-bottom: 1px solid var(--line); }
.history-item { display: flex; gap: 0.7rem; align-items: baseline; flex-wrap: wrap; }
.history-item .when { color: var(--muted); font-size: 0.8rem; min-width: 128px; }
.history-item .who { font-weight: 650; }
.history-item .what { color: var(--ink); }
.history-item .target { color: var(--muted); font-size: 0.84rem; }


/* Іконки та компактні елементи */
.icon { width: 22px; height: 22px; flex: 0 0 auto; }
.icon--sm { width: 16px; height: 16px; }
.tile-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--teal-bright), #057e8a);
  color: #fff;
  margin-bottom: 0;
  box-shadow: 0 6px 14px rgba(5, 146, 158, 0.28);
}
.tile-icon .icon { width: 28px; height: 28px; }
.tile-icon--wallet { background: linear-gradient(135deg, #3b82e0, #1f4f96); box-shadow: 0 6px 14px rgba(31, 79, 150, 0.28); }
.tile-icon--briefcase { background: linear-gradient(135deg, #e3a12b, #a86400); box-shadow: 0 6px 14px rgba(168, 100, 0, 0.28); }
.tile-icon--book { background: linear-gradient(135deg, #22b573, #0f7048); box-shadow: 0 6px 14px rgba(15, 112, 72, 0.26); }
.tile-icon--shield { background: linear-gradient(135deg, #d94a3d, #8f1d15); box-shadow: 0 6px 14px rgba(143, 29, 21, 0.26); }
.tile-icon--clock { background: linear-gradient(135deg, #6b82a6, #394a66); box-shadow: 0 6px 14px rgba(57, 74, 102, 0.26); }
.tile-media .tile-icon { width: 64px; height: 64px; margin: 0; background: transparent; color: var(--teal); box-shadow: none; }
.tile-media .tile-icon .icon { width: 40px; height: 40px; }
.req { color: var(--danger); font-weight: 700; }
.inline-form-row { display: flex; gap: 0.6rem; align-items: flex-end; flex-wrap: wrap; }
.inline-form-row .field { width: auto; min-width: 150px; }
.tabs { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tab {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.88rem;
}
.tab:hover { border-color: var(--teal); text-decoration: none; }
.tab.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.filter-row { display: flex; gap: 0.6rem; align-items: flex-end; flex-wrap: wrap; margin-bottom: 1rem; }
.filter-row .field { width: auto; min-width: 150px; }
.grid--tight { gap: 0.6rem; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap; }
.panel-head h2, .panel-head h3 { margin: 0; }
.muted-row { opacity: 0.7; }
.badge--online { background: #e8f0fb; color: #1f5aa6; }
.badge--offline { background: var(--teal-pale); color: #04606a; }

/* Календар менеджера: дні зліва, шкала часу прокручується */
.tcalendar { display: grid; grid-template-columns: 76px minmax(0, 1fr); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--card); }
.tcalendar-labels { border-right: 1px solid var(--line); background: #f8fafd; }
.tcalendar-label-head { height: 28px; border-bottom: 1px solid var(--line); }
.tcalendar-rowlabel { display: flex; align-items: center; gap: 0.4rem; padding: 0 0.55rem; border-bottom: 1px solid #eef2f8; font-size: 0.8rem; color: var(--muted); }
.tcalendar-rowlabel strong { color: var(--navy); font-size: 0.82rem; }
.tcalendar-rowlabel.is-today { background: var(--teal-pale); }
.tcalendar-rowlabel.is-today strong { color: #04606a; }
.tcalendar-scroll { overflow-x: auto; }
.tcalendar-axis { position: relative; height: 28px; border-bottom: 1px solid var(--line); background: #f8fafd; }
.tcalendar-axis span { position: absolute; top: 6px; transform: translateX(-50%); font-size: 0.68rem; color: var(--muted); white-space: nowrap; }
.tcalendar-axis span:first-child { transform: none; }
.tcalendar-row { position: relative; border-bottom: 1px solid #eef2f8; }
.tcalendar-row.is-today { background: rgba(224, 247, 250, 0.35); }
.tcalendar-tick { position: absolute; top: 0; bottom: 0; width: 1px; background: #eef2f8; }
.tcalendar-event {
  position: absolute;
  height: 22px;
  border-radius: 6px;
  padding: 0 0.4rem;
  font-size: 0.7rem;
  line-height: 22px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.25);
}
.tcalendar-event-time { font-weight: 700; }
.calendar-event--group { background: #2563a8; }
.calendar-event--individual { background: #12805a; }
.calendar-event--moved { background: #1a2233; }
.calendar-event--open { background: #b42318; }
.calendar-event--offline { background: #0e7490; }
.calendar-event--online { box-shadow: inset 0 0 0 2px #7dd3fc; }
.calendar-legend { display: flex; gap: 0.75rem; flex-wrap: wrap; font-size: 0.8rem; color: var(--muted); margin-top: 0.6rem; }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 0.3rem; vertical-align: middle; }
.day-schedule { display: grid; gap: 0.4rem; }
.lesson-card { display: flex; gap: 0.7rem; align-items: center; padding: 0.55rem 0.7rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.lesson-card .time { font-weight: 700; color: var(--navy); min-width: 90px; font-variant-numeric: tabular-nums; }
.lesson-card .who { flex: 1; min-width: 0; }
.lesson-card .who strong { display: block; }
.lesson-card--open { border-color: #f3b5ae; background: var(--danger-bg); }
.lesson-card--done { border-color: #bfe6d3; }

/* Друк доступів */
@media print {
  .topbar, .page-footer, .hero-actions, .tabs, .no-print { display: none !important; }
  body.platform-body { background: #fff; }
  .page { max-width: none; padding: 0; }
  .panel { box-shadow: none; border-color: #ccc; }
}

/* Компактний профіль */
.profile-list { display: grid; grid-template-columns: 120px 1fr; gap: 0.35rem 0.8rem; margin: 0; font-size: 0.92rem; }
.profile-list dt { color: var(--muted); }
.profile-list dd { margin: 0; font-weight: 600; }
.group-members { display: grid; gap: 0.4rem; }
.credential-table td code { font-size: 0.85rem; }
.reminder-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; }
