:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #17212b;
  --muted: #667587;
  --border: #dce3eb;
  --primary: #173f69;
  --primary-2: #245a8d;
  --primary-soft: #eaf2f9;
  --success: #167547;
  --success-soft: #eaf7ef;
  --danger: #b42318;
  --danger-soft: #fff0ee;
  --warning: #8b5e00;
  --warning-soft: #fff7df;
  --sidebar: 222px;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(20,45,74,.05);
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-width: 320px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(36,90,141,.2); outline-offset: 1px; }

.app-shell { min-height: 100vh; display: flex; }
.workspace { min-width: 0; flex: 1; }
.main-content { min-width: 0; }

/* Staff desktop shell */
.staff-sidebar {
  width: var(--sidebar);
  flex: 0 0 var(--sidebar);
  min-height: 100vh;
  position: sticky;
  top: 0;
  align-self: flex-start;
  background: #fff;
  border-right: 1px solid var(--border);
  padding: 14px 12px;
  display: none;
  z-index: 20;
}
body.role-staff .staff-sidebar { display: block; }
.sidebar-brand { display: flex; gap: 10px; align-items: center; padding: 4px 6px 14px; border-bottom: 1px solid var(--border); margin-bottom: 10px; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 800; letter-spacing: -.03em; }
.brand-name { font-weight: 780; line-height: 1.1; }
.brand-caption { font-size: 11px; color: var(--muted); margin-top: 2px; }
.sidebar-role { padding: 6px 8px 10px; color: var(--muted); font-size: 12px; }
.sidebar-nav { display: grid; gap: 3px; }
.side-nav-btn {
  border: 0;
  background: transparent;
  border-radius: 8px;
  text-align: left;
  padding: 9px 10px;
  min-height: 40px;
  font-weight: 650;
  color: #344456;
}
.side-nav-btn:hover { background: var(--surface-soft); }
.side-nav-btn.active { background: var(--primary-soft); color: var(--primary); }
.sidebar-footer { position: absolute; bottom: 14px; left: 12px; right: 12px; border-top: 1px solid var(--border); padding: 10px 8px 0; font-size: 12px; color: var(--muted); }

.staff-header {
  height: 54px;
  padding: 0 20px;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--border);
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 15;
  backdrop-filter: blur(8px);
}
body.role-staff .staff-header { display: flex; }
.staff-header-title { font-size: 17px; font-weight: 760; }
.staff-user { color: var(--muted); font-size: 13px; white-space: nowrap; }
body.role-staff .main-content { padding: 16px 20px 30px; max-width: 1600px; margin: 0 auto; }

/* Generic compact UI */
.page-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 12px; }
.page-row h1 { margin: 0; font-size: 22px; line-height: 1.15; }
.page-help { color: var(--muted); font-size: 13px; margin-top: 3px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }

.btn { min-height: 40px; border: 1px solid transparent; border-radius: 8px; padding: 8px 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-2); }
.btn-secondary { background: var(--primary-soft); color: var(--primary); border-color: #cadbea; }
.btn-ghost { background: #fff; border-color: var(--border); }
.btn-small { min-height: 34px; padding: 6px 9px; font-size: 12px; }

input, select { min-height: 38px; border: 1px solid var(--border); border-radius: 8px; background: #fff; padding: 7px 9px; outline: none; }
input:focus, select:focus { border-color: #719bc3; }
.control { display: grid; gap: 4px; min-width: 130px; }
.control.grow { flex: 1 1 190px; }
.control label, .control-label { font-size: 11px; font-weight: 700; color: #536376; }

.inline-alert { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 7px 10px; border-radius: 8px; font-size: 12px; margin-bottom: 10px; border: 1px solid var(--border); background: #fff; }
.inline-alert.warning { background: var(--warning-soft); border-color: #ead79b; color: #765000; }
.inline-alert.success { background: var(--success-soft); border-color: #c2e5d0; color: var(--success); }
.alert-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }

.table-wrap { width: 100%; overflow: auto; border: 1px solid var(--border); border-radius: 9px; background: #fff; }
table { border-collapse: collapse; width: 100%; min-width: 720px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #e7ebf0; vertical-align: middle; font-size: 13px; }
th { position: sticky; top: 0; z-index: 1; background: #f6f8fb; color: #506174; font-size: 11px; letter-spacing: .01em; }
tbody tr:hover { background: #fafcfe; }
tbody tr:last-child td { border-bottom: 0; }
.status-chip { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 7px; border-radius: 999px; font-size: 11px; font-weight: 750; white-space: nowrap; }
.status-present { background: var(--success-soft); color: var(--success); }
.status-sick { background: var(--danger-soft); color: var(--danger); }
.status-excused { background: var(--warning-soft); color: #765000; }
.status-other { background: var(--primary-soft); color: var(--primary); }
.status-unmarked { background: #eef1f4; color: #566474; }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); background: #fff; border: 1px solid var(--border); border-radius: 9px; }
.muted { color: var(--muted); }
.text-danger { color: var(--danger); }

/* Teacher: mobile-first and intentionally separate */
body.role-teacher { background: #fff; }
body.role-teacher .app-shell { display: block; }
body.role-teacher .workspace { width: 100%; }
body.role-teacher .main-content { max-width: 720px; margin: 0 auto; padding: 0 12px calc(82px + env(safe-area-inset-bottom)); }
.teacher-mobile-head {
  position: sticky;
  top: 0;
  z-index: 12;
  margin: 0 -12px;
  padding: 9px 12px;
  min-height: 50px;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.teacher-group-name { font-size: 15px; font-weight: 790; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.teacher-day-state { flex: none; font-size: 11px; font-weight: 750; padding: 4px 7px; border-radius: 999px; background: var(--warning-soft); color: #765000; }
.teacher-day-state.saved { background: var(--success-soft); color: var(--success); }
.teacher-summary { min-width: 0; flex: 1; text-align: right; font-size: 12px; color: var(--muted); }
.teacher-summary strong { color: var(--text); }
.attendance-list { display: grid; gap: 4px; }
.child-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 4px 5px 4px 8px;
}
.child-row[data-status="sick"] { border-color: #efc5c1; background: #fffafa; }
.child-row[data-status="excused"] { border-color: #ead79b; background: #fffdf7; }
.child-row[data-status="other"] { border-color: #c9dbea; background: #fbfdff; }
.child-row-top { min-width: 0; flex: 1 1 auto; }
.child-name { font-size: 13px; font-weight: 730; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-options {
  display: grid;
  grid-template-columns: repeat(4,34px);
  gap: 3px;
  justify-content: end;
  flex: 0 0 auto;
}
.status-btn {
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-weight: 800;
  padding: 0;
}
.status-btn.active[data-status="present"] { background: var(--success-soft); border-color: #acd8bd; color: var(--success); }
.status-btn.active[data-status="sick"] { background: var(--danger-soft); border-color: #efc1bc; color: var(--danger); }
.status-btn.active[data-status="excused"] { background: var(--warning-soft); border-color: #e9d491; color: #765000; }
.status-btn.active[data-status="other"] { background: var(--primary-soft); border-color: #c5d9ea; color: var(--primary); }
.teacher-savebar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(720px,100%);
  z-index: 18;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.97);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(9px);
}
.teacher-saveinfo { flex: 1; min-width: 0; font-size: 12px; color: var(--muted); }
.teacher-saveinfo strong { color: var(--text); }
.teacher-savebar .btn { min-width: 128px; }

/* Admin */
.admin-toolbar { display: flex; align-items: end; gap: 8px; flex-wrap: wrap; padding: 10px; margin-bottom: 10px; }
.admin-toolbar .control { flex: 1 1 180px; }
.admin-count { font-size: 12px; color: var(--muted); }

/* Demo controls: intentionally outside product UI */
.demo-dock { position: fixed; right: 10px; bottom: 10px; z-index: 60; display: flex; align-items: end; gap: 6px; }
.demo-toggle { min-height: 30px; border: 1px solid #cdd7e1; border-radius: 999px; background: rgba(255,255,255,.92); padding: 4px 9px; font-size: 11px; color: #566474; }
.demo-controls { background: #fff; border: 1px solid var(--border); border-radius: 9px; box-shadow: 0 10px 30px rgba(20,45,74,.15); padding: 8px; display: flex; align-items: end; gap: 6px; }
.demo-controls[hidden] { display: none; }
.demo-controls label { display: grid; gap: 2px; font-size: 10px; color: var(--muted); }
.demo-controls select { min-height: 32px; font-size: 12px; padding: 4px 7px; }

.toast { position: fixed; left: 50%; bottom: 76px; transform: translate(-50%,8px); max-width: min(420px,calc(100% - 24px)); padding: 9px 12px; border-radius: 8px; background: #23364a; color: #fff; font-size: 12px; opacity: 0; pointer-events: none; transition: .18s ease; z-index: 80; }
.toast.show { opacity: 1; transform: translate(-50%,0); }

@media (min-width: 620px) {
  body.role-teacher .main-content { padding-left: 16px; padding-right: 16px; }
  .teacher-mobile-head { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
}

@media (max-width: 900px) {
  body.role-staff .staff-sidebar { width: 188px; flex-basis: 188px; }
  body.role-staff .main-content { padding: 12px; }
}

@media (max-width: 680px) {
  /* Staff pages still work on narrow screens, but are desktop-oriented. */
  body.role-staff .staff-sidebar { display: none; }
  body.role-staff .staff-header { display: flex; height: 48px; padding: 0 12px; }
  body.role-staff .main-content { padding: 10px; }
  .page-row { align-items: flex-start; }
}

@media (max-width: 420px) {
  body.role-teacher .main-content { padding-left: 8px; padding-right: 8px; }
  .teacher-mobile-head { margin-left: -8px; margin-right: -8px; padding-left: 10px; padding-right: 10px; }
  .teacher-summary { font-size: 11px; }
  .child-row { gap: 5px; min-height: 42px; padding: 3px 4px 3px 7px; }
  .child-name { font-size: 12.5px; }
  .status-options { grid-template-columns: repeat(4,32px); gap: 3px; }
  .status-btn { width: 32px; min-width: 32px; min-height: 34px; }
  .teacher-savebar { padding-left: 8px; padding-right: 8px; }
  .teacher-savebar .btn { min-width: 118px; }
}
.staff-mobile-route { display: none; min-height: 34px; max-width: 180px; }
body.role-teacher .demo-dock { bottom: 82px; }
@media (max-width: 680px) {
  .staff-mobile-route { display: block; }
  .staff-header-title { display: none; }
  .staff-user { font-size: 11px; }
}

/* === UI v4: clarity and density overrides === */
:root { --sidebar: 206px; }
body.role-staff .staff-header { display: none; }
body.role-staff .main-content { padding: 12px 16px 28px; max-width: 1600px; }
.staff-sidebar { padding: 10px 9px; }
.sidebar-brand { padding: 3px 5px 10px; margin-bottom: 7px; }
.sidebar-role { padding: 5px 7px 7px; }
.side-nav-btn { min-height: 37px; padding: 8px 9px; font-size: 13px; }
.sidebar-footer { bottom: 10px; left: 9px; right: 9px; }
.page-row-tight { margin-bottom: 9px; }
.page-row h1 { font-size: 20px; }
.page-help { font-size: 12px; margin-top: 2px; }

/* Teacher: two compact rows before the list */
body.role-teacher .main-content { max-width: 720px; padding: 0 8px calc(68px + env(safe-area-inset-bottom)); }
.teacher-mobile-head.compact-head {
  position: sticky; top: 0; z-index: 12;
  margin: 0 -8px;
  padding: 6px 8px 5px;
  min-height: 0;
  display: block;
  background: rgba(255,255,255,.98);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.teacher-mobile-head.single-line { min-height: 38px; padding: 7px 8px; }
.teacher-head-main { display: flex; align-items: center; gap: 7px; min-width: 0; height: 26px; }
.teacher-group-name { flex: 1; min-width: 0; font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.teacher-day-state { font-size: 11px; padding: 3px 8px; }
.teacher-head-meta { height: 36px; display: flex; align-items: center; gap: 6px; }
.teacher-head-meta input[type="date"] { width: 140px; min-height: 34px; height: 34px; border-radius: 7px; padding: 3px 6px; font-size: 13px; }
.teacher-head-meta select { min-height: 34px; height: 34px; min-width: 0; flex: 1; padding: 3px 6px; font-size: 12px; }
.teacher-summary { margin-left: auto; min-width: 0; text-align: right; font-size: 12px; color: var(--muted); white-space: nowrap; }
.teacher-summary strong { color: var(--text); }
/* Висота шапки: padding 6 + head-main 26 + head-meta 36 + padding 5 + border 1 = 74px.
   Заголовок колонок липне рівно під нею. */
.attendance-column-head {
  display: grid;
  grid-template-columns: minmax(0,1fr) repeat(4,40px);
  gap: 4px;
  align-items: end;
  min-height: 26px;
  padding: 5px 5px 4px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  border-bottom: 1px solid var(--border);
  background: #fff;
  position: sticky;
  top: 74px;
  z-index: 10;
}
.attendance-column-head span:not(:first-child) { text-align: center; color: #4c5e72; }
.attendance-list { gap: 4px; padding-top: 4px; }
.child-row {
  min-height: 48px;
  border-radius: 8px;
  padding: 4px 5px 4px 9px;
  gap: 6px;
}
.child-name { font-size: 13px; font-weight: 720; }
.status-options { grid-template-columns: repeat(4,40px); gap: 4px; }
.status-btn { width: 40px; min-width: 40px; min-height: 40px; height: 40px; border-radius: 8px; font-size: 14px; }
.teacher-savebar { padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); }
.teacher-savebar .btn { min-width: 118px; min-height: 44px; }
.teacher-saveinfo { font-size: 12px; }
.teacher-empty { margin-top: 8px; }

/* Staff analytics: plain, explicit and dense */
.overview-group-control { min-width: 230px; }
.plain-summary {
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 7px;
  margin-bottom: 8px;
}
.plain-summary > div { padding: 7px 10px; border-right: 1px solid var(--border); min-width: 0; }
.plain-summary > div:last-child { border-right: 0; }
.plain-summary span { display: block; font-size: 10.5px; color: var(--muted); margin-bottom: 1px; }
.plain-summary strong { font-size: 18px; }
.action-alert {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  min-height: 34px; padding: 6px 9px; margin-bottom: 8px;
  border: 1px solid var(--border); border-radius: 7px; background: #fff; font-size: 12px;
}
.action-alert.warning { border-color: #e4c96f; background: #fffaf0; color: #6d4b00; }
.action-alert.success { border-color: #b9ddc8; background: #f4fbf7; color: #12633d; }
.action-alert span { color: inherit; }
.data-section { min-width: 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 6px; }
.section-head h2 { margin: 0; font-size: 15px; }
.section-head span { display: block; margin-top: 1px; color: var(--muted); font-size: 11px; }

.filter-panel { border: 1px solid var(--border); border-radius: 7px; background: #fff; padding: 8px 9px 9px; margin-bottom: 7px; }
.filter-panel-title { font-size: 12px; font-weight: 800; margin-bottom: 6px; }
.simple-filters { display: flex; align-items: end; gap: 7px; flex-wrap: wrap; }
.simple-filters .control { min-width: 128px; gap: 2px; }
.simple-filters .control label { font-size: 10.5px; }
.simple-filters input, .simple-filters select { min-height: 34px; height: 34px; border-radius: 6px; padding: 4px 7px; font-size: 12px; }
.period-control { flex: 0 0 170px; }
.group-control { flex: 1 1 185px; }
.child-control { flex: 1 1 185px; }
.status-control { flex: 0 1 160px; }
.custom-dates { display: flex; gap: 7px; align-items: end; }
.custom-dates.is-hidden { display: none; }
.custom-dates .date-control { width: 140px; }
.filter-buttons { display: flex; gap: 5px; margin-left: auto; }
.filter-buttons .btn { min-height: 34px; }
.result-line {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 31px; margin-bottom: 6px; padding: 4px 2px; font-size: 11px; color: var(--muted);
}
.result-line strong { color: var(--text); font-size: 12px; }
.inline-alert { min-height: 31px; padding: 5px 8px; margin-bottom: 6px; border-radius: 6px; font-size: 11px; }
.table-wrap { border-radius: 6px; }
table { min-width: 680px; }
th, td { padding: 7px 8px; font-size: 12px; }
th { font-size: 10.5px; }
.table-compact table { min-width: 560px; }
.compact-empty { padding: 18px 12px; }
.status-chip { min-height: 21px; padding: 2px 6px; font-size: 10.5px; }

@media (max-width: 900px) {
  .plain-summary { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .plain-summary > div:nth-child(3) { border-right: 0; }
  .plain-summary > div:nth-child(n+4) { border-top: 1px solid var(--border); }
}

@media (max-width: 680px) {
  body.role-staff .staff-header { display: flex; height: 44px; padding: 0 10px; }
  body.role-staff .main-content { padding: 9px; }
  .plain-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .plain-summary > div { border-right: 0; border-bottom: 1px solid var(--border); }
  .plain-summary > div:nth-child(odd) { border-right: 1px solid var(--border); }
  .plain-summary > div:last-child { border-bottom: 0; }
  .simple-filters .control, .period-control, .group-control, .child-control, .status-control { flex: 1 1 calc(50% - 7px); min-width: 130px; }
  .custom-dates { width: 100%; }
  .custom-dates .date-control { flex: 1; width: auto; }
  .filter-buttons { width: 100%; margin-left: 0; }
  .filter-buttons .btn { flex: 1; }
  .result-line { align-items: flex-start; flex-direction: column; gap: 1px; }
}

@media (max-width: 420px) {
  body.role-teacher .main-content { padding-left: 5px; padding-right: 5px; }
  .teacher-mobile-head.compact-head { margin-left: -5px; margin-right: -5px; padding-left: 6px; padding-right: 6px; }
  .teacher-group-name { font-size: 13.5px; }
  .teacher-head-meta input[type="date"] { width: 136px; }
  .attendance-column-head { grid-template-columns: minmax(0,1fr) repeat(4,38px); gap: 3px; padding-left: 7px; top: 74px; }
  .child-row { min-height: 46px; padding-left: 7px; gap: 5px; }
  .child-name { font-size: 12.5px; }
  .status-options { grid-template-columns: repeat(4,38px); gap: 3px; }
  .status-btn { width: 38px; min-width: 38px; min-height: 38px; height: 38px; }
  .teacher-savebar { padding-left: 6px; padding-right: 6px; }
  .teacher-savebar .btn { min-width: 108px; }
}

/* Тонка смужка завантаження вгорі: показується лише при повільних відповідях репозиторію. */
.loading-bar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 100; pointer-events: none; opacity: 0; transition: opacity .15s ease; }
.loading-bar.active { opacity: 1; }
.loading-bar.active::before {
  content: ""; display: block; height: 100%; width: 40%;
  background: var(--primary-2);
  animation: loading-slide 1s ease-in-out infinite;
}
@keyframes loading-slide {
  0% { margin-left: -40%; }
  100% { margin-left: 100%; }
}

/* Закритий період (табель здано): режим лише для перегляду у вихователя. */
.teacher-day-state.locked { background: var(--danger-soft); color: var(--danger); }
.teacher-locked-note {
  margin: 8px 0 6px;
  padding: 8px 10px;
  border: 1px solid #e4c96f;
  border-radius: 8px;
  background: #fffaf0;
  color: #6d4b00;
  font-size: 12px;
  line-height: 1.35;
}
.status-btn:disabled { opacity: .55; cursor: default; }
.status-btn:disabled.active { opacity: .8; }

/* === Гейт входу === */
/* Робочий стіл прихований, доки немає сесії — жодного «мигання» контенту до входу. */
body:not(.authed) #appShell { display: none !important; }

.login-screen {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; background: var(--bg);
}
/* Атрибут hidden має перемагати display:flex вище. */
.login-screen[hidden] { display: none; }
.login-card {
  width: 100%; max-width: 360px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: 0 12px 40px rgba(20,45,74,.12);
  padding: 22px 20px; display: grid; gap: 12px;
}
.login-brand { display: flex; align-items: center; gap: 10px; }
.login-title { font-size: 18px; font-weight: 800; }
.login-sub { color: var(--muted); font-size: 13px; margin-top: -6px; }
.login-field { display: grid; gap: 5px; }
.login-field span { font-size: 12px; font-weight: 700; color: #536376; }
.login-field input { min-height: 42px; }
.login-error {
  min-height: 20px; padding: 8px 10px; border-radius: 8px;
  background: var(--danger-soft); color: var(--danger);
  border: 1px solid #efc5c1; font-size: 12.5px;
}
.login-submit { width: 100%; min-height: 44px; margin-top: 2px; }
.login-demo { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 2px; }
.login-demo-title { font-size: 11.5px; color: var(--muted); margin-bottom: 7px; }
.login-demo-title code { background: var(--surface-soft); padding: 1px 5px; border-radius: 5px; color: var(--text); }
.login-demo-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.login-demo-chip {
  border: 1px solid var(--border); background: #fff; border-radius: 999px;
  padding: 5px 10px; font-size: 11.5px; font-weight: 650; color: #344456;
}
.login-demo-chip:hover { background: var(--surface-soft); }

/* Кнопки виходу */
.sidebar-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sidebar-user { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#logoutBtnMobile { display: none; }
.teacher-logout {
  flex: none; border: 1px solid var(--border); background: #fff;
  border-radius: 7px; padding: 4px 9px; font-size: 11px; font-weight: 700; color: #536376;
}
@media (max-width: 680px) {
  #logoutBtnMobile { display: inline-flex; }
}
