/* Учителски планер — един файл, без външни зависимости.
   Темата, акцентът и плътността идват от data-атрибути на <html>,
   поставени от избора на учителя. */

/* ------------------------------------------------- акцент по избор */
:root,
[data-accent="violet"]    { --a-light: #7A3BD4; --a-dark: #BB92F5; --a-soft-l: #F1EAFC; --a-soft-d: #2E2140; --a-ink-l: #6B31BC; --a-ink-d: #C9A6F7; --a-deep: #5C2AA6; }
[data-accent="blue"]      { --a-light: #2B62E8; --a-dark: #7BA0FF; --a-soft-l: #E9EFFD; --a-soft-d: #1C2A46; --a-ink-l: #2454CE; --a-ink-d: #9DB9FF; --a-deep: #1E47B0; }
[data-accent="teal"]      { --a-light: #0F8A80; --a-dark: #4BC8BC; --a-soft-l: #E3F4F2; --a-soft-d: #123430; --a-ink-l: #0C6F67; --a-ink-d: #77DACF; --a-deep: #0A5F58; }
[data-accent="amber"]     { --a-light: #C77406; --a-dark: #F0B44C; --a-soft-l: #FCF1DE; --a-soft-d: #3A2C10; --a-ink-l: #9A5B05; --a-ink-d: #F5C572; --a-deep: #8A5104; }
[data-accent="raspberry"] { --a-light: #C93571; --a-dark: #F385AE; --a-soft-l: #FCE8F0; --a-soft-d: #3A1727; --a-ink-l: #B32C63; --a-ink-d: #F7A6C6; --a-deep: #A32659; }
[data-accent="green"]     { --a-light: #0B7A4B; --a-dark: #55C98D; --a-soft-l: #E8F4EE; --a-soft-d: #17361F; --a-ink-l: #0A6A41; --a-ink-d: #7FDCAA; --a-deep: #08603A; }

/* ------------------------------------------------------ светла основа */
:root {
  --bg: #FAF6F0;
  --card: #FFFFFF;
  --sunk: #F6F1E9;
  --ink: #191410;
  --ink-2: #3E3831;
  --muted: #6E635B;
  --faint: #A3968A;
  --line: #E6DED3;
  --line-soft: #F0E9DE;

  --accent: var(--a-light);
  --accent-soft: var(--a-soft-l);
  --accent-ink: var(--a-ink-l);
  --on-accent: #FFFFFF;

  --ok: #0A6A41;      --ok-soft: #E8F4EE;
  --warn: #9A5B05;    --warn-soft: #FCF1DE;
  --danger: #B02525;  --danger-soft: #FBE7E7;
  --info: #2454CE;    --info-soft: #E9EFFD;
  --violet: #6B31BC;  --violet-soft: #F1EAFC;

  --g2: #B02525; --g3: #9A5B05; --g4: #2454CE; --g5: #6B31BC; --g6: #0A6A41;
  --g2-bg: #FBE7E7; --g3-bg: #FCF1DE; --g4-bg: #E9EFFD; --g5-bg: #F1EAFC; --g6-bg: #E8F4EE;

  --subject-l: 97%;   /* светлота на фона на предмета */
  --subject-s: 72%;
  --subject-bar-l: 42%;
  --subject-ink-l: 32%;

  --c-home: #2B62E8; --c-year: #2B62E8; --c-students: #0F8A80;
  --c-teaching: #7A3BD4; --c-grades: #C77406; --c-comm: #C93571;
  --c-docs: #0B7A4B; --c-system: #6E635B; --c-admin: #B02525;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(25,20,16,.05), 0 8px 22px rgba(25,20,16,.05);
  --shadow-lg: 0 2px 8px rgba(25,20,16,.08), 0 18px 44px rgba(25,20,16,.12);
  --focus: 0 0 0 3px color-mix(in srgb, var(--accent) 34%, transparent);

  --row-y: 9px;  --row-x: 11px;  --cell-h: 96px;  --text: 15px;

  /* Лентата горе: в светла и тъмна тема е като картите, в цветната —
     в тона на акцента, затова я описваме отделно. */
  --bar: var(--card);
  --on-bar: var(--ink);
  --on-bar-2: var(--muted);
  --bar-2: var(--card);
  --bar-line: var(--line);
  --bar-sunk: var(--bg);
  --bar-pill: var(--accent);
  --bar-pill-ink: var(--on-accent);
}

/* -------------------------------------------------------- тъмна основа */
[data-theme="dark"] {
  --bg: #16120F;
  --card: #211B17;
  --sunk: #1B1613;
  --ink: #F5EFE7;
  --ink-2: #CFC3B6;
  --muted: #A3968A;
  --faint: #8A7D71;
  --line: #352C25;
  --line-soft: #2A231E;

  --accent: var(--a-dark);
  --accent-soft: var(--a-soft-d);
  --accent-ink: var(--a-ink-d);
  --on-accent: #16120F;

  --ok: #55C98D;      --ok-soft: #17361F;
  --warn: #F0B44C;    --warn-soft: #3A2C10;
  --danger: #FF8A80;  --danger-soft: #3A1A18;
  --info: #7BA0FF;    --info-soft: #1C2A46;
  --violet: #BB92F5;  --violet-soft: #2E2140;

  --g2: #FF8A80; --g3: #F0B44C; --g4: #7BA0FF; --g5: #BB92F5; --g6: #55C98D;
  --g2-bg: #3A1A18; --g3-bg: #3A2C10; --g4-bg: #1C2A46; --g5-bg: #2E2140; --g6-bg: #17361F;

  --subject-l: 16%;
  --subject-s: 40%;
  --subject-bar-l: 60%;
  --subject-ink-l: 76%;

  --c-home: #7BA0FF; --c-year: #7BA0FF; --c-students: #4BC8BC;
  --c-teaching: #BB92F5; --c-grades: #F0B44C; --c-comm: #F385AE;
  --c-docs: #55C98D; --c-system: #A3968A; --c-admin: #FF8A80;

  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 22px rgba(0,0,0,.3);
  --shadow-lg: 0 2px 8px rgba(0,0,0,.5), 0 18px 44px rgba(0,0,0,.45);

  --bar: var(--card); --on-bar: var(--ink); --on-bar-2: var(--muted);
  --bar-2: var(--card);
  --bar-line: var(--line); --bar-sunk: var(--bg);
  --bar-pill: var(--accent); --bar-pill-ink: var(--on-accent);
}

/* ------------------------------------------------------- цветна основа */
/* Всяка страница носи свой тон (--page-hue, изчислен в navigation.py).
   Светлотите са подбрани така, че белият текст върху лентата и бутоните и
   цветният текст върху фона да минават 4.5:1 при всеки тон от колелото —
   най-тесен е жълтият край, около 60 градуса. */
[data-theme="colour"] {
  --hue: var(--page-hue, 267);

  --bg: hsl(var(--hue) 62% 96%);
  --card: #FFFFFF;
  --sunk: hsl(var(--hue) 60% 97%);
  --ink: #17121B;
  --ink-2: #3B3340;
  --muted: #544C59;
  --faint: #857C8B;
  --line: hsl(var(--hue) 38% 86%);
  --line-soft: hsl(var(--hue) 38% 92%);

  --accent: hsl(var(--hue) 58% 29%);
  --accent-soft: hsl(var(--hue) 62% 93%);
  --accent-ink: hsl(var(--hue) 60% 27%);
  --on-accent: #FFFFFF;

  --bar: hsl(var(--hue) 55% 26%);
  --on-bar: #FFFFFF;
  --on-bar-2: #FFFFFF;
  --bar-2: hsl(var(--hue) 62% 93%);
  --bar-line: color-mix(in srgb, #FFFFFF 30%, transparent);
  --bar-sunk: color-mix(in srgb, #FFFFFF 16%, transparent);
  --bar-pill: #FFFFFF;
  --bar-pill-ink: hsl(var(--hue) 60% 27%);

  --section: hsl(var(--hue) 58% 40%);

  --subject-s: 80%;
  --subject-l: 94%;
  --subject-bar-l: 46%;
  --subject-ink-l: 30%;

  --shadow: 0 1px 2px hsl(var(--hue) 40% 30% / .10),
            0 8px 22px hsl(var(--hue) 40% 30% / .10);
  --shadow-lg: 0 2px 8px hsl(var(--hue) 40% 30% / .16),
               0 18px 44px hsl(var(--hue) 40% 30% / .18);
}

@media (prefers-color-scheme: dark) {
  [data-theme="auto"] {
    --bg: #16120F; --card: #211B17; --sunk: #1B1613;
    --ink: #F5EFE7; --ink-2: #CFC3B6; --muted: #A3968A; --faint: #8A7D71;
    --line: #352C25; --line-soft: #2A231E;
    --accent: var(--a-dark); --accent-soft: var(--a-soft-d);
    --accent-ink: var(--a-ink-d); --on-accent: #16120F;
    --ok: #55C98D; --ok-soft: #17361F;
    --warn: #F0B44C; --warn-soft: #3A2C10;
    --danger: #FF8A80; --danger-soft: #3A1A18;
    --info: #7BA0FF; --info-soft: #1C2A46;
    --violet: #BB92F5; --violet-soft: #2E2140;
    --g2: #FF8A80; --g3: #F0B44C; --g4: #7BA0FF; --g5: #BB92F5; --g6: #55C98D;
    --g2-bg: #3A1A18; --g3-bg: #3A2C10; --g4-bg: #1C2A46; --g5-bg: #2E2140; --g6-bg: #17361F;
    --subject-l: 16%; --subject-s: 40%; --subject-bar-l: 60%; --subject-ink-l: 76%;
    --c-home: #7BA0FF; --c-year: #7BA0FF; --c-students: #4BC8BC;
    --c-teaching: #BB92F5; --c-grades: #F0B44C; --c-comm: #F385AE;
    --c-docs: #55C98D; --c-system: #A3968A; --c-admin: #FF8A80;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 22px rgba(0,0,0,.3);
    --shadow-lg: 0 2px 8px rgba(0,0,0,.5), 0 18px 44px rgba(0,0,0,.45);
  }
}

/* ------------------------------------------- плътност и по-висок контраст */
[data-density="airy"]  { --row-y: 13px; --row-x: 14px; --cell-h: 112px; --text: 15.5px; }
[data-density="tight"] { --row-y: 5px;  --row-x: 8px;  --cell-h: 78px;  --text: 14px; }

[data-contrast="high"] {
  --muted: #3E3831; --faint: #5A5049; --line: #B9AC9C; --line-soft: #D5C9B9;
}
[data-contrast="high"][data-theme="dark"] {
  --muted: #E0D6CA; --faint: #C3B6A8; --line: #6A5B4E; --line-soft: #4A3F36;
}

[data-motion="calm"] * {
  animation-duration: 0.001ms !important;
  transition-duration: 0.001ms !important;
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ============================================================ основа */
* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: var(--text)/1.55 'Golos Text', 'Segoe UI', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 0;
}

h1, h2, h3 { letter-spacing: -0.015em; }

a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ------------------------------------------------------- горна лента */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 22px;
  height: 66px; padding: 0 22px;
  background: var(--bar); color: var(--on-bar);
  border-bottom: 1px solid var(--bar-line);
}
.brand { display: flex; align-items: baseline; gap: 9px; color: var(--on-bar); flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand strong { font-family: 'Unbounded', sans-serif; font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.brand small { font-size: 12px; color: var(--on-bar-2); font-weight: 500; }

.primary { display: flex; align-items: center; gap: 3px; min-width: 0; }
.primary a {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 15px; border-radius: var(--radius-sm);
  color: var(--on-bar); font-size: 14px; font-weight: 500; white-space: nowrap;
}
.primary a:hover { background: var(--bar-sunk); text-decoration: none; }
.primary a.on {
  background: var(--bar-pill); color: var(--bar-pill-ink); opacity: 1; font-weight: 600;
}
.primary a.on:hover { background: var(--bar-pill); }

.topbar-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.omni {
  display: flex; align-items: center; gap: 9px;
  height: 38px; padding: 0 12px 0 13px;
  border: 1px solid var(--bar-line); border-radius: 19px;
  background: var(--bar-sunk); color: var(--on-bar-2);
  font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.omni:hover { color: var(--on-bar); }
.omni kbd {
  font: inherit; font-size: 11px; font-weight: 600; color: inherit;
  background: var(--bar-sunk); border: 1px solid var(--bar-line);
  border-radius: 5px; padding: 2px 6px;
}

.topbar .icon-btn, .topbar .user-menu > summary { color: var(--on-bar); }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; flex-shrink: 0;
  border: 1px solid var(--bar-line); border-radius: 19px;
  background: transparent; color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { background: var(--bar-sunk); text-decoration: none; }
.topbar .icon-btn.on {
  color: var(--bar-pill-ink); border-color: var(--bar-pill); background: var(--bar-pill);
}
.pin { display: inline-flex; }

/* ------------------------------------------ лента със закачени страници */
/* --------------------------- страниците на раздела, в който сте */
.sectionbar {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  padding: 8px 22px; background: var(--card);
  border-bottom: 1px solid var(--line);
  box-shadow: inset 0 3px 0 -1px var(--sec, var(--accent));
}
.sectionbar-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--sec, var(--muted)); margin-right: 7px;
}
.sectionbar a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 9px; white-space: nowrap;
  color: var(--ink-2); font-size: 13px;
}
.sectionbar a:hover { background: var(--sunk); color: var(--ink); text-decoration: none; }
.sectionbar a.on {
  background: var(--accent-soft); color: var(--accent-ink); font-weight: 700;
}
.sectionbar a svg { color: var(--sec, var(--muted)); }
.sectionbar a.on svg { color: var(--accent-ink); }

.quickbar {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  padding: 9px 22px; background: var(--card); border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.quickbar-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--faint);
}
.quickbar .chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px 5px 10px; border-radius: 16px;
  border: 1px solid var(--line); background: var(--card);
  color: var(--muted); font-size: 12.5px; white-space: nowrap;
}
.quickbar .chip:hover { border-color: var(--accent); color: var(--accent-ink); text-decoration: none; }
.quickbar .chip.pinned {
  background: var(--accent-soft); border-color: transparent;
  color: var(--accent-ink); font-weight: 600;
}
.quickbar .chip.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.quickbar-split { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }

/* ------------------------------------------------------------- страница */
.page { max-width: 1680px; margin: 0 auto; }
.pagehead {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; padding: 22px 26px 0; flex-wrap: wrap;
}
.pagehead-text { min-width: 0; }
.pagehead-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.primary { flex-shrink: 0; }
.pagehead h1 {
  margin: 0; font-family: 'Unbounded', sans-serif;
  font-size: 25px; font-weight: 600; letter-spacing: -0.02em;
}
.pagehead h1::before {
  content: ""; display: inline-block; vertical-align: 0.06em;
  width: 5px; height: 0.82em; margin-right: 11px; border-radius: 3px;
  background: var(--section, var(--accent));
}
.pagehead .sub { margin: 6px 0 0 16px; color: var(--muted); font-size: 13.5px; }
.content { padding: 18px 26px 70px; }

.flashes { padding: 14px 26px 0; }
.flash {
  padding: 11px 15px; border-radius: var(--radius-sm); margin-bottom: 8px;
  font-size: 14px; border-left: 4px solid currentColor; background: var(--card);
}
.flash.success { color: var(--ok); background: var(--ok-soft); }
.flash.warn { color: var(--warn); background: var(--warn-soft); }
.flash.error { color: var(--danger); background: var(--danger-soft); }

/* --------------------------------------------- долна лента на телефон */
.tabbar { display: none; }

@media (max-width: 900px) {
  .topbar { gap: 8px; padding: 0 12px; height: 60px; }
  .primary, .omni span, .who-name, .year-switch { display: none; }
  .brand small { display: none; }
  .omni { width: 38px; justify-content: center; padding: 0; flex-shrink: 0; }
  .omni kbd { display: none; }
  /* Печатът е за настолен екран; на телефон отстъпва място. */
  .topbar-right > button[onclick] { display: none; }
  .user-menu > summary { padding: 4px; border-radius: 19px; }
  .quickbar, .sectionbar { padding: 8px 14px; flex-wrap: nowrap; overflow-x: auto; }
  .pagehead { padding: 16px 14px 0; align-items: flex-start; }
  .pagehead h1 { font-size: 21px; }
  .content { padding: 14px 14px 96px; }
  .flashes { padding: 12px 14px 0; }

  /* Пет дни не се събират на телефон: мрежата се плъзга настрани,
     вместо да смачка всяка клетка до една дума на ред. */
  .week-grid { min-width: 720px; }
  .gradebook { min-width: 640px; }

  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    grid-auto-flow: column;
    padding: 7px 5px calc(12px + env(safe-area-inset-bottom, 0px));
    background: var(--card); border-top: 1px solid var(--line);
  }
  .tabbar a {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; min-height: 46px; border-radius: 12px;
    color: var(--muted); font-size: 10.5px; text-align: center;
  }
  .tabbar a.on { color: var(--accent-ink); font-weight: 700; }
  .tabbar a:hover { text-decoration: none; }
}

/* ============================================================= карти */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 17px 19px; margin-bottom: 16px;
}
.card > h2, .card > h3 {
  margin-top: 0; font-size: 15.5px; font-weight: 700;
  display: flex; align-items: center; gap: 9px;
}
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: 2fr 1fr; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.auto { grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); }
@media (max-width: 1100px) { .grid.two, .grid.three, .grid.four { grid-template-columns: 1fr; } }

.stat { text-align: center; position: relative; overflow: hidden; padding-top: 19px; }
.stat::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: var(--section, var(--accent));
}
.stat .n {
  font-family: 'Unbounded', sans-serif; font-size: 29px; font-weight: 700;
  letter-spacing: -0.02em; color: var(--accent-ink); line-height: 1.15;
}
.stat .l { font-size: 12.5px; color: var(--muted); }
.grid.four > .stat:nth-child(1) { --section: var(--c-year); }
.grid.four > .stat:nth-child(1) .n { color: var(--info); }
.grid.four > .stat:nth-child(2) { --section: var(--c-students); }
.grid.four > .stat:nth-child(2) .n { color: var(--c-students); }
.grid.four > .stat:nth-child(3) { --section: var(--c-grades); }
.grid.four > .stat:nth-child(3) .n { color: var(--warn); }
.grid.four > .stat:nth-child(4) { --section: var(--c-comm); }
.grid.four > .stat:nth-child(4) .n { color: var(--c-comm); }

/* В цветната тема плочките се наливат и се въртят около тона на страницата,
   за да се различават една от друга, без да спорят с нея. */
[data-theme="colour"] .grid.four > .stat { --tile: var(--hue); }
[data-theme="colour"] .grid.four > .stat:nth-child(2) { --tile: calc(var(--hue) + 40); }
[data-theme="colour"] .grid.four > .stat:nth-child(3) { --tile: calc(var(--hue) + 80); }
[data-theme="colour"] .grid.four > .stat:nth-child(4) { --tile: calc(var(--hue) + 120); }
[data-theme="colour"] .stat {
  --tile: var(--hue);
  background: hsl(var(--tile) 62% 95%);
  border-color: hsl(var(--tile) 42% 84%);
}
[data-theme="colour"] .stat::before { height: 5px; background: hsl(var(--tile) 55% 38%); }
[data-theme="colour"] .grid.four > .stat .n { color: hsl(var(--tile) 60% 27%); }
[data-theme="colour"] .card > h2::before,
[data-theme="colour"] .card > h3::before {
  content: ""; width: 4px; height: 1em; border-radius: 3px;
  background: var(--accent); flex-shrink: 0;
}
[data-theme="colour"] th {
  background: hsl(var(--hue) 62% 94%);
  color: var(--accent-ink);
}
/* Цветът на раздела се подава вграден в заглавието; в цветната тема
   страницата вече носи свой тон, затова тя има думата. */
[data-theme="colour"] .pagehead h1::before { background: hsl(var(--hue) 58% 40%); }
[data-theme="colour"] .tabbar { background: var(--bar); }
[data-theme="colour"] .tabbar a { color: #FFFFFF; }
[data-theme="colour"] .tabbar a.on { color: #FFFFFF; opacity: 1; }

/* ============================================================ таблици */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td {
  padding: var(--row-y) var(--row-x); border-bottom: 1px solid var(--line-soft);
  text-align: left; vertical-align: middle;
}
th {
  background: var(--sunk); font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
table:not(.week-grid):not(.cal) tbody tr:hover > td { background: var(--accent-soft); }
td.num, th.num { text-align: center; }
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); }

/* ============================================================ бутони */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid transparent; background: var(--accent); color: var(--on-accent);
  padding: 9px 16px; border-radius: var(--radius-sm); font: inherit; font-size: 13.5px;
  font-weight: 600; cursor: pointer; min-height: 40px;
  transition: filter .12s, background .12s;
}
.btn:hover { filter: brightness(1.07); text-decoration: none; }
.btn:focus-visible { box-shadow: var(--focus); outline: none; }
.btn.ghost { background: var(--card); color: var(--ink); border-color: var(--line); font-weight: 500; }
.btn.ghost:hover { background: var(--sunk); filter: none; }
.btn.subtle { background: var(--accent-soft); color: var(--accent-ink); }
.btn.subtle:hover { filter: brightness(0.97); }
.btn.danger { background: var(--danger-soft); color: var(--danger); }
.btn.sm { padding: 4px 11px; font-size: 12.5px; min-height: 32px; border-radius: 8px; }

input[type=text], input[type=date], input[type=time], input[type=number],
input[type=search], input[type=email], input[type=password], input[type=file],
select, textarea {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 9px 11px; font: inherit; font-size: 14px;
  background: var(--card); color: var(--ink); max-width: 100%; min-height: 40px;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent); box-shadow: var(--focus); outline: none;
}
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 17px; height: 17px; }
textarea { width: 100%; resize: vertical; }
label { font-size: 13px; color: var(--muted); display: block; margin-bottom: 4px; }
.field { margin-bottom: 13px; }
.form-row { display: flex; gap: 11px; flex-wrap: wrap; align-items: flex-end; }
.form-row .field { margin-bottom: 0; }

/* ============================================================= етикети */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px; white-space: nowrap;
  font-size: 12px; font-weight: 600; background: var(--accent-soft); color: var(--accent-ink);
}
.badge.ok, .badge.positive, .badge.completed { background: var(--ok-soft); color: var(--ok); }
.badge.warn, .badge.review, .badge.proposed { background: var(--warn-soft); color: var(--warn); }
.badge.danger, .badge.unexcused { background: var(--danger-soft); color: var(--danger); }
.badge.muted { background: var(--sunk); color: var(--muted); }
.badge.exam { background: var(--violet-soft); color: var(--violet); }
.badge.official { background: var(--warn-soft); color: var(--warn); }
.badge.covered { background: var(--info-soft); color: var(--info); }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.right { text-align: right; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.stack { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.scroll-box {
  max-height: 260px; overflow-y: auto; border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 9px 11px; background: var(--sunk);
}

/* ============================================================ календар */
.month {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 13px; box-shadow: var(--shadow);
}
.month h3 { margin: 0 0 9px; font-size: 14px; text-transform: capitalize; color: var(--accent-ink); }
.month .cal { font-size: 12px; }
.month th, .month td { padding: 3px; text-align: center; border: none; background: none; }
.month td.d { border-radius: 7px; }
.d-school { background: var(--card); }
.d-weekend { background: var(--sunk); color: var(--faint); }
.d-holiday { background: var(--warn-soft); color: var(--warn); font-weight: 700; }
.d-outside { color: var(--faint); opacity: .55; }
.d-today { outline: 2px solid var(--accent); font-weight: 800; color: var(--accent-ink); }
.month td.d a { color: inherit; display: block; border-radius: 7px; }
.month td.d a:hover { background: var(--accent); color: var(--on-accent); text-decoration: none; }

.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend i {
  display: inline-block; width: 13px; height: 13px; border-radius: 4px;
  margin-right: 5px; vertical-align: -2px; border: 1px solid var(--line);
}
.progress { height: 9px; background: var(--sunk); border-radius: 6px; overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 6px; background: var(--accent); }

/* ====================================================== седмична мрежа */
.week-grid { width: 100%; border-collapse: separate; border-spacing: 4px; table-layout: fixed; }
.week-grid th { width: 19%; background: none; }
.week-grid th.per { width: 6%; }
.week-grid td {
  border: 1px solid var(--line); border-radius: 11px; vertical-align: top;
  padding: 0; height: var(--cell-h); background: var(--card);
}
.week-grid td.num { background: none; border: none; }
.cell {
  display: block; height: 100%; padding: 8px 10px; font-size: 12.5px;
  color: var(--ink); border-radius: 10px; border-left: 3px solid transparent;
}
.cell:hover { text-decoration: none; }
.cell .cs { font-weight: 700; display: block; }
.cell .tp { display: block; margin-top: 3px; color: var(--ink-2); }
.cell .hw { display: block; margin-top: 3px; color: var(--muted); font-size: 11.5px; }

.cell.subj {
  background: hsl(var(--hue) var(--subject-s) var(--subject-l));
  border-left-color: hsl(var(--hue) 55% var(--subject-bar-l));
}
.cell.subj .cs { color: hsl(var(--hue) 55% var(--subject-ink-l)); }
.cell.done .cs::after { content: " ✓"; color: var(--ok); }
.cell.empty {
  color: var(--faint);
  background: repeating-linear-gradient(135deg,
    var(--card), var(--card) 7px, var(--sunk) 7px, var(--sunk) 14px);
}
.cell.empty:hover { background: var(--accent-soft); color: var(--accent-ink); }
.week-grid td.off {
  background: repeating-linear-gradient(135deg,
    var(--sunk), var(--sunk) 9px, var(--line-soft) 9px, var(--line-soft) 18px);
}
.week-grid td.off .cell {
  color: var(--violet); font-size: 11.5px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; text-align: center;
}
.day-head { font-size: 13px; padding-bottom: 6px; }
.day-head small { display: block; color: var(--muted); font-weight: 400; }
.day-head.today {
  color: var(--accent-ink); background: var(--accent-soft);
  border-radius: 9px; box-shadow: inset 0 -2px 0 var(--accent);
}
a.cell[draggable=true] { cursor: grab; }
a.cell.dragging { opacity: .4; }
td.drop-target { outline: 2px dashed var(--accent); outline-offset: -3px; background: var(--accent-soft); }
.subj-dot {
  display: inline-block; width: 9px; height: 9px; border-radius: 3px;
  background: hsl(var(--hue) 55% var(--subject-bar-l)); margin-right: 7px;
}

/* ============================================================= дневник */
.gradebook th.col { text-align: center; font-size: 11px; white-space: nowrap; }
.gradebook td.cell-g { padding: 2px; text-align: center; }
.gradebook input.g {
  width: 44px; text-align: center; border: 1px solid transparent; border-radius: 8px;
  padding: 5px 2px; font-size: 15px; font-weight: 700; background: transparent;
  min-height: 34px;
}
.gradebook input.g:focus { border-color: var(--accent); background: var(--card); }
.g-2 { color: var(--g2); background: var(--g2-bg); border-radius: 8px; }
.g-3 { color: var(--g3); background: var(--g3-bg); border-radius: 8px; }
.g-4 { color: var(--g4); background: var(--g4-bg); border-radius: 8px; }
.g-5 { color: var(--g5); background: var(--g5-bg); border-radius: 8px; }
.g-6 { color: var(--g6); background: var(--g6-bg); border-radius: 8px; }
strong.g-2, strong.g-3, strong.g-4, strong.g-5, strong.g-6 { padding: 2px 9px; }
input.g-2 { color: var(--g2); background: transparent; }
input.g-3 { color: var(--g3); background: transparent; }
input.g-4 { color: var(--g4); background: transparent; }
input.g-5 { color: var(--g5); background: transparent; }
input.g-6 { color: var(--g6); background: transparent; }
.progress > i[class*="g-"] { border-radius: 6px; }
.avg { font-weight: 800; }
.saved { animation: flash-ok .9s ease; }
@keyframes flash-ok { from { background: var(--ok-soft); } to { background: transparent; } }

/* ========================================================== отсъствия */
.att-radio { display: flex; }
.att-radio input { position: absolute; opacity: 0; }
.att-radio label {
  margin: 0; padding: 6px 11px; border: 1px solid var(--line); cursor: pointer;
  font-size: 12px; color: var(--muted); background: var(--card); font-weight: 600;
  min-height: 34px; display: flex; align-items: center;
}
.att-radio label:first-of-type { border-radius: 8px 0 0 8px; }
.att-radio label:last-of-type { border-radius: 0 8px 8px 0; }
.att-radio input:checked + label { background: var(--ok); color: var(--card); border-color: var(--ok); }
.att-radio input[value=excused]:checked + label { background: var(--warn); border-color: var(--warn); color: var(--card); }
.att-radio input[value=unexcused]:checked + label { background: var(--danger); border-color: var(--danger); color: var(--card); }
.att-radio input[value=late]:checked + label { background: var(--violet); border-color: var(--violet); color: var(--card); }
.att-radio input:focus-visible + label { box-shadow: var(--focus); }

/* ==================================================== извънредни часове */
.week-grid td.has-extra, .week-grid td.has-extra .cell { height: auto; }
.extra {
  display: block; margin: 0 6px 6px; padding: 5px 9px; border-radius: 9px;
  border-left: 3px solid var(--c-comm); background: var(--accent-soft);
  font-size: 11.5px; color: var(--ink);
}
.extra { background: color-mix(in srgb, var(--c-comm) 13%, var(--card)); }
.extra:hover { text-decoration: none; filter: brightness(.97); }
.extra .k { display: block; font-weight: 700; color: var(--c-comm); }
.extra .w { display: block; color: var(--muted); }
.extra.done { opacity: .6; }
.add-extra {
  display: block; padding: 2px 9px 5px; font-size: 11px; color: var(--faint);
  opacity: 0; transition: opacity .12s;
}
.add-extra:hover { color: var(--accent-ink); text-decoration: none; }
td:hover > .add-extra, .add-extra:focus { opacity: 1; }
.week-grid tfoot td { height: auto; border: 1px dashed var(--line); background: none; }
.week-grid tfoot a { display: block; padding: 6px 9px; font-size: 11.5px; color: var(--muted); }
.week-grid tfoot a:hover { color: var(--accent-ink); text-decoration: none; }
@media (hover: none) { .add-extra { opacity: 1; } }
tr.extra-row > td { background: color-mix(in srgb, var(--c-comm) 9%, var(--card)); }

/* ======================================================== разсадка и др. */
.board {
  background: var(--ink); color: var(--bg); text-align: center; padding: 10px;
  border-radius: 9px; font-size: 13px; letter-spacing: .06em; margin-bottom: 16px; font-weight: 600;
}
.seating { display: grid; gap: 12px; }
.desk { border: 1px solid var(--line); border-radius: 11px; padding: 9px; background: var(--sunk); position: relative; }
.desk-no { position: absolute; top: 4px; right: 7px; font-size: 10px; color: var(--faint); }
select.seat { width: 100%; font-size: 12px; padding: 5px; margin-top: 3px; border: 1px dashed var(--line); min-height: 32px; }
select.seat.filled { border-style: solid; border-color: var(--accent); }

.timeline { border-left: 2px solid var(--line); padding-left: 17px; margin-left: 4px; }
.timeline .entry { position: relative; padding: 8px 0; }
.timeline .entry::before {
  content: ""; position: absolute; left: -23px; top: 15px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { padding: 4px 0; font-size: 13px; }
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a {
  padding: 9px 15px; font-size: 13px; border-bottom: 3px solid transparent; color: var(--muted);
  white-space: nowrap; margin-bottom: -2px; font-weight: 500; border-radius: 9px 9px 0 0;
}
.tabs a.on { border-bottom-color: var(--accent); color: var(--accent-ink); font-weight: 700; background: var(--accent-soft); }
.tabs a:hover { text-decoration: none; color: var(--accent-ink); background: var(--accent-soft); }
.doc-body {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 30px; font-size: 14px; line-height: 1.75; white-space: pre-wrap;
}
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 5px 16px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.certificate .doc-body {
  border: 3px double var(--accent); padding: 40px 30px; min-height: 260px;
  display: flex; flex-direction: column; justify-content: center;
}
.print-section { margin-bottom: 26px; }
.print-section > h2 { font-size: 15px; margin: 0 0 10px; }

/* ============================================================= профил */
.user-menu { position: relative; }
.user-menu > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px;
  padding: 4px 12px 4px 4px; border-radius: 22px; background: var(--bar-sunk);
  color: var(--on-bar); font-size: 13px; font-weight: 600; min-height: 38px;
}
.user-menu > summary::-webkit-details-marker { display: none; }
.avatar {
  width: 30px; height: 30px; border-radius: 15px; background: var(--bar-pill);
  color: var(--bar-pill-ink); display: inline-flex; align-items: center;
  justify-content: center; font-size: 11px; font-weight: 700;
}
.user-menu[open] > summary { background: var(--bar-pill); color: var(--bar-pill-ink); }
.user-menu[open] > summary .avatar { background: var(--bar-pill-ink); color: var(--bar-pill); }
.user-menu .menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 230px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 8px;
}
.user-menu .menu a, .user-menu .menu button {
  display: block; width: 100%; text-align: left; padding: 9px 11px; border-radius: 8px;
  font: inherit; font-size: 13px; border: none; background: none; color: var(--ink); cursor: pointer;
}
.user-menu .menu a:hover, .user-menu .menu button:hover { background: var(--accent-soft); text-decoration: none; }
.user-menu .menu .who { padding: 6px 11px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.user-menu .menu .who strong { display: block; font-size: 13px; }
.user-menu .menu .who span { color: var(--muted); font-size: 12px; }
.year-switch select {
  font-size: 13px; padding: 6px 12px; border-radius: 22px;
  background: var(--bar-sunk); color: var(--on-bar); border-color: var(--bar-line);
}

/* ================================================== вход и регистрация */
body.centred {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 24px;
}
.gate { width: 100%; max-width: 410px; }
.gate-brand {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  margin-bottom: 18px; font-family: 'Unbounded', sans-serif; font-size: 19px;
  font-weight: 600; color: var(--ink);
}
.gate .card { padding: 26px; box-shadow: var(--shadow-lg); }
.gate h2 { margin-top: 0; font-size: 17px; }
.gate .btn { width: 100%; justify-content: center; }

/* ============================================ палитрата за търсене (⌘K) */
.omni-sheet {
  position: fixed; inset: 0; z-index: 100;
  background: color-mix(in srgb, var(--ink) 42%, transparent);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 12vh 20px 20px;
}
.omni-sheet[hidden] { display: none; }
.omni-box {
  width: 100%; max-width: 620px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.omni-field {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--muted);
}
.omni-field input {
  flex-grow: 1; border: 0; background: transparent; font: inherit; font-size: 16px;
  color: var(--ink); min-height: 32px; padding: 0;
}
.omni-field input:focus { box-shadow: none; outline: none; }
.omni-field .icon-btn { width: 32px; height: 32px; border: 0; }
.omni-list { list-style: none; margin: 0; padding: 7px; max-height: 46vh; overflow-y: auto; }
.omni-list a {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px;
  border-radius: 9px; color: var(--ink); font-size: 14px;
}
.omni-list a:hover, .omni-list li.on a { background: var(--accent-soft); text-decoration: none; }
.omni-list .g { margin-left: auto; font-size: 11.5px; color: var(--muted); }
.omni-list .none { padding: 18px 14px; color: var(--muted); font-size: 13.5px; }
.omni-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 15px; border-top: 1px solid var(--line);
  background: var(--sunk); font-size: 12px; color: var(--muted);
}

/* ================================================ всички страници (Още) */
.pagegrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 1100px) { .pagegrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .pagegrid { grid-template-columns: 1fr; } }
.pagegrid section { break-inside: avoid; }
.pagegrid h2 {
  display: flex; align-items: center; gap: 9px; margin: 0 0 9px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--sec);
}
.pagegrid h2::before {
  content: ""; width: 9px; height: 9px; border-radius: 3px; background: var(--sec);
}
.pagegrid a {
  display: flex; align-items: center; gap: 9px; padding: 7px 10px;
  border-radius: 9px; color: var(--ink); font-size: 14px; min-height: 38px;
}
.pagegrid a:hover { background: var(--accent-soft); color: var(--accent-ink); text-decoration: none; }
.pagegrid a.on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.pagegrid a svg { color: var(--sec); flex-shrink: 0; }

/* ============================================== тема и изглед (настройки) */
.choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.choice-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .choice-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .choice-grid, .choice-grid.four { grid-template-columns: 1fr; } }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice > span {
  display: block; border: 1px solid var(--line); background: var(--card);
  border-radius: var(--radius); padding: 15px 17px; cursor: pointer; min-height: 44px;
}
.choice input:checked + span { border: 2px solid var(--accent); background: var(--sunk); padding: 14px 16px; }
.choice input:focus-visible + span { box-shadow: var(--focus); }
.choice .mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--sunk); color: var(--muted); margin-bottom: 9px;
}
.choice input:checked + span .mark { background: var(--accent); color: var(--on-accent); }
.choice b { display: block; font-size: 14.5px; }
.choice small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { position: relative; }
.swatch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.swatch > span {
  display: flex; align-items: center; gap: 9px; min-height: 44px;
  border: 1px solid var(--line); background: var(--card); border-radius: 22px;
  padding: 8px 16px 8px 10px; cursor: pointer; font-size: 13px; font-weight: 600;
}
.swatch input:checked + span { border: 2px solid var(--accent); background: var(--sunk); padding: 7px 15px 7px 9px; }
.swatch input:focus-visible + span { box-shadow: var(--focus); }
.swatch i { width: 18px; height: 18px; border-radius: 9px; display: block; }

.pill-row { display: flex; gap: 10px; flex-wrap: wrap; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pill > span {
  display: flex; align-items: center; min-height: 44px; padding: 0 20px;
  border: 1px solid var(--line); background: var(--card); border-radius: 11px;
  cursor: pointer; font-size: 13.5px; font-weight: 600;
}
.pill input:checked + span { border: 2px solid var(--accent); background: var(--sunk); }
.pill input:focus-visible + span { box-shadow: var(--focus); }

.switch-row { display: flex; gap: 28px; flex-wrap: wrap; }
.switch-row label { display: flex; align-items: center; gap: 11px; font-size: 14px; color: var(--ink); cursor: pointer; margin: 0; }

/* ================================================================ печат */
.print-only { display: none; }
@media print {
  @page { size: A4 landscape; margin: 10mm; }

  /* Хартията е бяла независимо коя тема е избрал учителят. */
  :root, [data-theme="dark"], [data-theme="auto"], [data-theme="colour"] {
    --bg: #FFFFFF; --card: #FFFFFF; --sunk: #F2F2F2;
    --ink: #000000; --ink-2: #222222; --muted: #555555; --faint: #777777;
    --line: #BBBBBB; --line-soft: #DDDDDD;
    --accent: #000000; --accent-soft: #EEEEEE; --accent-ink: #000000; --on-accent: #FFFFFF;
    --ok: #0A5A33; --ok-soft: #EFF6F2;
    --warn: #7A4A00; --warn-soft: #F8F2E6;
    --danger: #A11111; --danger-soft: #F9EDED;
    --info: #14408A; --info-soft: #EDF1F8;
    --violet: #4A1E8A; --violet-soft: #F1EDF8;
    --g2: #A11111; --g3: #7A4A00; --g4: #14408A; --g5: #4A1E8A; --g6: #0A5A33;
    --g2-bg: #FFFFFF; --g3-bg: #FFFFFF; --g4-bg: #FFFFFF;
    --g5-bg: #FFFFFF; --g6-bg: #FFFFFF;
    --subject-l: 94%; --subject-s: 50%; --subject-bar-l: 42%; --subject-ink-l: 28%;
    --shadow: none; --shadow-lg: none;
    --row-y: 5px; --row-x: 7px; --cell-h: auto;
    --bar: #FFFFFF; --on-bar: #000000; --on-bar-2: #555555; --bar-line: #BBBBBB;
    --bar-pill: #EEEEEE; --bar-pill-ink: #000000; --bar-sunk: #F2F2F2;
  }
  [data-theme="colour"] .stat { background: #fff; border-color: #bbb; }
  [data-theme="colour"] th { background: #eee !important; color: #000; }

  body { background: #fff; color: #000; font-size: 11px; }
  .topbar, .quickbar, .tabbar, .omni-sheet, .pagehead, .no-print { display: none !important; }
  .page { max-width: none; }
  .content { padding: 0; }
  .card { box-shadow: none; border: 1px solid #bbb; break-inside: avoid; background: #fff; }
  .print-only { display: block; }
  .print-footer { margin-top: 8mm; font-size: 10px; color: #555; text-align: center; }
  a { color: #000; }
  th { background: #eee !important; color: #000; }
  table:not(.week-grid):not(.cal) tbody tr:hover > td { background: #fff; }
  .week-grid { border-spacing: 0; border-collapse: collapse; }
  .week-grid td { height: auto; border-radius: 0; }
  .cell.empty { background: #fff; }
  .stat .n { color: #000; }
  select.seat { border: none; appearance: none; -webkit-appearance: none; font-size: 11px; }
  .desk { background: #fff; }
  .certificate { break-after: page; border: none; padding: 0; }
  .certificate:last-of-type { break-after: auto; }
  .print-section { break-after: page; }
  .print-section:last-of-type { break-after: auto; }
}

/* --------------------------------------------- проценти на пробните НВО */
.pct { font-weight: 700; padding: 2px 8px; border-radius: 7px; }
.pct.low { color: var(--danger); background: var(--danger-soft); }
.pct.mid { color: var(--warn); background: var(--warn-soft); }
.pct.high { color: var(--ok); background: var(--ok-soft); }
.trend { font-weight: 700; }
.trend.up { color: var(--ok); }
.trend.down { color: var(--danger); }

/* Дневникът: следата от грешка е няколко реда и трябва да се пренася,
   иначе разпъва таблицата надясно, вместо да се чете. */
.logline {
  margin: 0;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  background: none;
  padding: 0;
}

/* Стъпалата на скалата: две тесни колони, без рамки около полетата, за да
   се чете като таблица, а не като формуляр. */
.stapala { max-width: 320px; }
.stapala th { font-weight: 600; font-size: 12.5px; color: var(--muted); }
.stapala td { padding: 3px 6px; }
.stapala input { width: 100%; text-align: center; }
