/* VatroTEL web UI.
   Layout: logged in, a sidebar with the menu on the left and the page on
   the right; under 900 px the sidebar becomes a bar on top (logo, the red
   button, "Izbornik"). Not logged in: one centred column under the logo.
   Colours: the periwinkle page and the grey and orange of the logo; red is
   kept for raising an alarm. */

@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(../fonts/source-sans-3-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(../fonts/source-sans-3-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --page: #e7ebfa; --surface: #fff; --surface-2: #f3f5fc; --line: #cdd3ea; --line-2: #e3e7f4;
  --ink: #515152; --ink-strong: #2d2d2e; --ink-2: #686971; --brand: #ff6600;
  --alarm: #cc0000; --alarm-line: #a30000;
  --ok: #1f6d27; --ok-bg: #d3ecd4; --no: #a31212; --no-bg: #f7d9d6; --wait: #7a5200; --wait-bg: #fdecc0; --off-bg: #e6e8f0;
  --btn-line: #c3c9e2; --main-bg: #515152; --in-line: #b9c0db; --focus: #4c63c8;
  --radius: 8px; --radius-s: 5px; --ctl-h: 34px; --box: 16px; --pad: 18px; --gap: 16px; --gut: 28px; --side: 236px;
  --font: "Source Sans 3", "Segoe UI", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--page); color: var(--ink); font: 15px/1.45 var(--font); }
a { color: inherit; font-weight: 700; text-decoration: none; }
a:hover { color: var(--ink-strong); }
img { border: 0; max-width: 100%; }
table { border-collapse: collapse; border-spacing: 0; }
textarea { resize: vertical; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }

.ic { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.22em; }
.ic-fill { fill: currentColor; stroke: none; }
.muted { color: var(--ink-2); font-weight: 400; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.cl { clear: left; } .cr { clear: right; } .cb { clear: both; }
.fl { float: left; } .fr { float: right; }
.tl { text-align: left; } .tc { text-align: center; } .tr { text-align: right; }
#preload-img { display: none; }

/* ---- the shell, logged in ---- */
.app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.hd { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; background: var(--surface); border-right: 1px solid var(--line); padding: 18px 14px; }
.brand { align-self: flex-start; }
.brand img { display: block; height: 56px; width: auto; }
.menu { display: contents; }
.menu-btn, .hd-alarm { display: none; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius-s); white-space: nowrap; }
.nav a .ic { color: var(--ink-2); }
.nav a:hover, .nav a.is-on { background: var(--page); color: var(--ink-strong); }
.nav a.is-on .ic { color: var(--brand); }
.nav a.nav-2 { font-weight: 400; }
.nav a.nav-alarm, .hd-alarm { background: var(--alarm); color: #fff; justify-content: center; }
.nav a.nav-alarm { margin-bottom: 12px; padding-block: 11px; }
.nav a.nav-alarm .ic { color: #fff; }
.nav a.nav-alarm:hover, .hd-alarm:hover { background: #b80000; color: #fff; }
.nav a.nav-alarm.is-on, .hd-alarm.is-on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--alarm); }
.who { margin-top: auto; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 12px 0; border-top: 1px solid var(--line-2); font-weight: 700; }
.who-out { font-weight: 400; text-decoration: underline; }
.page { display: flex; flex-direction: column; min-width: 0; }
.main { flex: 1; padding: 26px var(--gut); max-width: calc(1040px + 2 * var(--gut)); width: 100%; min-width: 0; }
.ft { padding: 10px var(--gut) 22px; font-size: 12px; color: var(--ink-2); max-width: calc(1040px + 2 * var(--gut)); }
.ft p { border-top: 1px solid var(--line); padding-top: 8px; margin: 0; }
.ft a { font-weight: 400; text-decoration: underline; }

/* ---- the shell, not logged in ---- */
#wrapper { max-width: 1020px; margin: 0 auto; padding: 18px 20px 0; }
#top { text-align: center; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
#top img { height: 84px; width: auto; }
#wrapper .main { padding: 0; max-width: none; }
#wrapper .ft, #footer { padding: 10px 0 22px; margin-top: 26px; font-size: 12px; color: var(--ink-2); text-align: center; max-width: none; }
#footer { border-top: 1px solid var(--line); }
#footer a { font-weight: 400; text-decoration: underline; }

/* ---- headings and text ---- */
h1 { font-size: 24px; line-height: 1.2; font-weight: 700; margin: 0 0 14px; text-wrap: balance; }
h2 { font-size: 17px; line-height: 1.25; font-weight: 700; margin: 0; }
h3 { font-size: 1em; font-weight: 700; margin: 0 0 4px; }
p { margin: 12px 0; }
.pg-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 14px; }
.pg-h h1 { margin: 0; }
.pg-a { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---- panels ---- */
.panel, #opts, .live-l, .live-r, #prijava-form, #login, #box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--pad); min-width: 0; }
.panel-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; margin-bottom: 10px; }
.panel-h.sub { margin-top: 18px; }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); align-items: start; }

/* ---- buttons; the old markup has them as inputs, links and buttons ---- */
.btn, a.button, a.buttongr, a.intdetail, a.btn-reg, a.btn-reg1, button, input[type=submit], input[type=button], input[type=reset] {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--ctl-h); padding: 0 12px; margin: 0;
  border: 1px solid var(--btn-line); border-radius: var(--radius-s); background: var(--surface); color: var(--ink-strong);
  font: 700 1em/1.2 var(--font); cursor: pointer; white-space: nowrap; text-decoration: none; position: static; width: auto; height: auto; vertical-align: middle; }
.btn:hover, a.button:hover, a.buttongr:hover, a.intdetail:hover, a.btn-reg:hover, button:hover, input[type=button]:hover { background: var(--surface-2); color: var(--ink-strong); }
.btn-main, input[type=submit], button[type=submit], a.btn-reg1 { background: var(--main-bg); color: #fff; border-color: var(--main-bg); }
.btn-main:hover, input[type=submit]:hover, button[type=submit]:hover, a.btn-reg1:hover { background: #3d3d3e; color: #fff; }
.btn-s, a.buttongr, a.intdetail, table.grupe a.button { min-height: 26px; padding: 0 8px; font-size: .88em; }
.btn-alarm, input[type=submit].btn-alarm { background: var(--alarm); color: #fff; border-color: var(--alarm-line); min-height: 44px; padding: 0 30px; font-size: 1.1em; }
.btn-alarm:hover, input[type=submit].btn-alarm:hover { background: #b80000; color: #fff; }
.btn:disabled, button:disabled, input[type=submit]:disabled { background: var(--off-bg); color: var(--ink-2); border-color: var(--line); cursor: default; }
.btn-link { background: none; border: 0; padding: 0; min-height: 0; font-weight: 400; text-decoration: underline; color: var(--ink-2); }
.btn-link:hover { background: none; }

/* ---- forms ---- */
input[type=text], input[type=password], input[type=email], input[type=number], input[type=date], select, textarea { min-height: var(--ctl-h); border: 1px solid var(--in-line); border-radius: var(--radius-s); background: #fff; padding: 4px 8px; max-width: 100%; }
input[type=checkbox], input[type=radio] { width: var(--box); height: var(--box); accent-color: var(--ink); vertical-align: -0.15em; }
.field { display: grid; gap: 3px; width: 100%; }
.field input[type=text], .field input[type=password] { width: 100%; }
.field-row { display: flex; gap: 6px; }
.field-row input { flex: 1; min-width: 0; }
.opt { display: flex; align-items: flex-start; gap: 8px; padding: 6px 8px; margin-inline: -8px; border: 1px solid transparent; border-radius: var(--radius-s); cursor: pointer; }
.opt input { margin-top: .2em; flex: none; }
.opt:has(input:checked) { background: #f1f4fd; border-color: var(--line); }
.note { color: var(--ink-2); }
/* a field that is missing or not valid, and only that one, is red */
input.is-invalid, select.is-invalid, textarea.is-invalid { border-color: var(--no); box-shadow: 0 0 0 1px var(--no); }
input[type=radio].is-invalid, input[type=checkbox].is-invalid { box-shadow: none; outline: 2px solid var(--no); outline-offset: 1px; }
.field-msg { color: var(--no); font-size: .92em; margin-top: 3px; }
#inputrow label.choice { font-weight: 400; margin-left: 8px; }
.pick { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; min-height: 26px; }
#inputrow { margin: 0 0 12px; max-width: 420px; }
#inputrow label { font-weight: 700; }
#inputrow input[type=text] { width: 100%; }
#inputrow input[type=text].telefon { width: 60%; }
#inputrow input[type=submit] + input[type=submit] { background: var(--surface); color: var(--no); border-color: var(--btn-line); }

/* ---- messages ---- */
#msg, .flash { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 9px 12px; background: var(--ok-bg); color: var(--ok); border: 1px solid var(--ok); border-radius: var(--radius-s); font-weight: 700; }
#msg[style*="f8d7da"], .flash-no { background: var(--no-bg) !important; color: var(--no); border-color: var(--no); }
#sliding_message_box { background: #339933; color: #fff; font-weight: 700; }

/* ---- marks ---- */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 1px 9px; border-radius: 999px; font-size: .9em; font-weight: 700; white-space: nowrap; background: var(--off-bg); color: var(--ink); vertical-align: middle; }
.chip .ic { width: 1em; height: 1em; stroke-width: 3; }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.no { background: var(--no-bg); color: var(--no); }
.chip.wait { background: var(--wait-bg); color: var(--wait); }
.chip.call { background: transparent; border: 1px solid var(--line); font-weight: 400; color: var(--ink-2); margin-left: 4px; }
a.chip:hover { filter: brightness(.95); }
.st-ok { color: var(--ok); } .st-no { color: var(--no); } .st-wait { color: var(--wait); }

/* ---- lists of label and value ---- */
.kv > div { display: grid; grid-template-columns: minmax(0, 12.5em) minmax(0, 1fr); gap: 2px 14px; align-items: baseline; padding: 6px 2px; border-bottom: 1px solid var(--line-2); }
.kv > div:last-child { border-bottom: 0; }
.kv dt { color: var(--ink-2); }
.kv dd { font-weight: 700; }
.kv dd small { font-weight: 400; font-size: .8em; color: var(--ink-2); white-space: nowrap; }
.kv-big > div:not(.kv-plain) dd { font-size: 1.55em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kv .money { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* ---- tables ---- */
.tbl-wrap { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow-x: auto; }
.tbl, table.ffs, table.grupe { width: 100%; text-align: left; }
.tbl th, table.ffs th, table.grupe th { text-align: left; font-weight: 700; background: #eef1fb; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td, table.ffs td, table.grupe td { padding: 8px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .t-end { text-align: right; }
.tbl tr.g-used td { background: #f2f9f2; }
.tbl-mini td { padding-inline: 4px; }
.tbl-mini td:first-child { width: 2.4em; font-weight: 700; white-space: nowrap; }
/* the tables of the pages that still have the old markup */
table.ffs, table.grupe { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); border-collapse: separate; }
table.ffs tr, table.grupe tr { background: transparent !important; }
table.ffs tr:last-child td, table.grupe tr:last-child td { border-bottom: 0; }
table.ffs th:first-child { border-top-left-radius: var(--radius); }
table.ffs th:last-child { border-top-right-radius: var(--radius); }
.ff-list-stat { text-align: center; }
.pagination { margin: 12px 0; }
.pagination a { padding: 2px 6px; }
.selected { font-size: 1.2em; margin: 0 5px; font-weight: 700; }

/* ---- home ---- */
.tally { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.stat { list-style: none; }
.stat li { display: grid; grid-template-columns: 1.6em minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 8px 2px; border-bottom: 1px solid var(--line-2); }
.stat li:last-child { border-bottom: 0; }
.stat .ic { width: 1.3em; height: 1.3em; stroke-width: 2.6; }
.stat-n { font-weight: 700; }
.stat-t { font-weight: 700; text-align: right; }
.live-dot { display: inline-flex; align-items: center; gap: 6px; font-size: .88em; color: var(--ink-2); }
.live-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--alarm); animation: vt-pulse 1.6s ease-in-out infinite; }
@keyframes vt-pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .live-dot::before { animation: none; } }

/* ---- a new alarm ---- */
.alarm-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-areas: "who msg" "who go"; gap: var(--gap); align-items: start; }
.step-who { grid-area: who; } .step-msg { grid-area: msg; } .step-go { grid-area: go; }
#alarm-groups .alarm-all { padding: 4px 0 8px; }
#alarm-groups .alarm-group { border-top: 1px solid var(--line-2); }
#alarm-groups .alarm-group-head { display: flex; align-items: center; gap: 8px; padding: 5px 0; }
#alarm-groups label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 400; }
#alarm-groups .alarm-toggle { width: var(--ctl-h); min-height: var(--ctl-h); padding: 0; flex: none; }
#alarm-groups .alarm-toggle .ic { transition: transform .15s; }
#alarm-groups .alarm-toggle[aria-expanded="true"] .ic { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) { #alarm-groups .alarm-toggle .ic { transition: none; } }
#alarm-groups .alarm-group-count { margin-left: auto; color: var(--ink-2); font-variant-numeric: tabular-nums; }
#alarm-groups table.alarm-members { width: calc(100% - var(--ctl-h) - 8px); margin: 0 0 8px calc(var(--ctl-h) + 8px); border-color: var(--line-2); border-radius: var(--radius-s); }
#alarm-groups table.alarm-members td { padding: 5px 10px; }
#alarm-groups table.alarm-members td + td + td { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.msg { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px; padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.msg label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; min-width: 0; }
.msg label input, #alarm-groups label input { flex: none; }
audio.player { height: 34px; width: 260px; max-width: 100%; }
.msg { flex-wrap: nowrap; }
.play { min-height: 30px; padding: 0 12px 0 8px; border-radius: 999px; font-weight: 400; flex: none; }
#audiorec { margin: 8px 0 4px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: var(--radius-s); background: var(--surface-2); }
#control_panel { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.rec-dot { color: var(--alarm); }
.go-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }

/* ---- settings ---- */
.opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
.opts-col { display: grid; gap: var(--gap); min-width: 0; }
.opts .panel-h { margin-bottom: 12px; }
.opts .sec { display: grid; gap: 10px; justify-items: start; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line-2); }
.opts .sec:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.opts .sec p { margin: 0; }
.opts form.sec, .opts .sec form { display: grid; gap: 10px; justify-items: start; width: 100%; }
.rec-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
#passwordStrength { min-height: 0; }

/* ---- pages with the old markup: room between their parts ---- */
.main > p { margin: 12px 0; }
.main > table.ffs + p, .main > form + .panel, .main > table + .panel, .main > .panel + .panel, .main > table.ffs + form { margin-top: 16px; }
.form-narrow { max-width: 440px; display: grid; gap: 10px; justify-items: start; }
#firefighter-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--pad); max-width: 480px; }
table.formtable select { max-width: 100%; }

/* ---- one group ---- */
table.grupa { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); border-collapse: separate; }
table.grupa td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); text-align: left; font-weight: 700; }
table.grupa td.ugrupi { vertical-align: top; line-height: 2.3; font-weight: 400; border-bottom: 0; }
table.grupa td.ugrupi + td.ugrupi { border-left: 1px solid var(--line-2); }
table.grupa img { width: 14px; height: 14px; vertical-align: middle; }
input[type=submit].buttgr { float: right; }

/* ---- the report of an alarm ---- */
table.report { width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); border-collapse: separate; }
table.report > tbody > tr > td { padding: var(--pad); }
table.report .title { font-weight: 700; }
table.report textarea.high { width: 100%; height: 110px; }
table.report textarea.low { width: 100%; height: 64px; }
td .rep-l { float: left; width: 48%; }
td .rep-r { float: right; width: 48%; position: relative; }
td .rep-r a.pdf { position: absolute; right: 0; top: 0; }
.big { font-size: 1.07em; }

/* ---- the pages before the login ---- */
#login-l { float: left; width: 320px; }
#login-r { float: right; width: calc(100% - 350px); }
#login { margin: 0 0 16px; }
#wrapper > #login { max-width: 380px; margin-inline: auto; }
#login h1 { font-size: 20px; }
#login h1 img, #form { display: none; }
#login input[type=text], #login input[type=password] { width: 100%; margin: 2px 0 10px; }
#login input[type=submit] { margin: 4px 0 8px; }
#newu { text-align: right; }
#box { margin: 16px 0 0; }
#box.tips { font-style: italic; line-height: 1.4; }
#login-links { margin-top: 14px; }
#login-links a { font-size: 13px; }
#login-links p { margin: 20px 5px; }
ul.features { margin: 0 0 0 20px; line-height: 1.5; }
.popis { line-height: 60px; vertical-align: middle; font-size: 16px; }
.popis .num { display: inline; font-size: 18px; font-weight: 700; }
.popis img { vertical-align: middle; margin-right: 10px; }
#prijava-form { margin-top: 20px; text-align: center; }
#prijava-form p { text-align: center; font-size: 18px; margin: 20px 0; }
#prijava-form .npr { font-size: 12px; color: var(--ink-2); }
table.formtable { width: 400px; max-width: 100%; text-align: left; margin: auto; }
table.formtable input[type=text] { width: 100%; }
.status_message { margin: 8px 0; }

/* css for timepicker */
.ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }
.ui-timepicker-div dl { text-align: left; }
.ui-timepicker-div dl dt { height: 25px; }
.ui-timepicker-div dl dd { margin: -25px 0 10px 65px; }
.ui-timepicker-div td { font-size: 90%; }

/* ---- narrow: a tablet on end, a phone ---- */
@media (max-width: 1100px) {
  .opts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  :root { --gut: 16px; }
  .app { display: block; }
  /* a bar with the logo, the red button and "Izbornik"; the menu of the
     sidebar drops down from it */
  .hd { position: sticky; top: 0; z-index: 20; height: auto; overflow: visible; flex-direction: row; align-items: center; gap: 8px; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px var(--gut); }
  .brand { align-self: center; margin-right: auto; }
  .brand img { height: 38px; }
  .hd-alarm { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 14px; border-radius: var(--radius-s); white-space: nowrap; }
  .menu-btn { display: inline-flex; flex-direction: column; gap: 0; width: 58px; min-height: 46px; padding: 0; font-size: 11px; line-height: 1.2; }
  .menu-btn .ic { width: 22px; height: 22px; }
  .menu-btn[aria-expanded="true"] { background: var(--page); border-color: var(--ink-2); }
  .menu { display: none; position: absolute; z-index: 5; top: 100%; left: 0; right: 0; max-height: calc(100vh - 64px); overflow-y: auto; background: var(--surface); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line); box-shadow: 0 16px 26px rgba(40, 50, 100, .22); padding: 6px var(--gut) 14px; }
  .hd.is-menu .menu { display: block; }
  .nav { gap: 0; }
  .nav a { min-height: 50px; font-size: 1.07em; border-radius: 0; border-bottom: 1px solid var(--line-2); padding-inline: 8px; gap: 14px; }
  .nav a.is-on { border-radius: var(--radius-s); border-bottom-color: transparent; }
  .nav .ic { width: 22px; height: 22px; }
  .nav a.nav-alarm { display: none; }
  .who { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 0 8px; border-top: 0; }
  .who-out { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--btn-line); border-radius: var(--radius-s); font-weight: 700; text-decoration: none; }
  .main { padding-block: 18px; }
  .alarm-grid { grid-template-columns: 1fr; grid-template-areas: "who" "msg" "go"; }
  #login-l, #login-r { float: none; width: auto; }
  td .rep-l, td .rep-r { float: none; width: auto; }
}
@media (max-width: 640px) {
  .cols-2, .opts { grid-template-columns: 1fr; }
  .kv > div { grid-template-columns: 1fr; }
  .c-mail, .c-oz, .c-nr { display: none; }
  h1 { font-size: 21px; }
  #top img { height: 60px; }
  /* the tables of the old markup scroll sideways inside themselves */
  table.ffs:not(.alarm-members), table.grupe { display: block; overflow-x: auto; }
  #alarm-groups table.alarm-members { width: 100%; margin-left: 0; }
  #alarm-groups table.alarm-members td + td + td + td { display: none; }
  .go-row .btn-alarm { flex: 1 1 100%; }
  table.grupa td.ugrupi { display: block; width: 100%; }
  table.grupa td.ugrupi + td.ugrupi { border-left: 0; border-top: 1px solid var(--line-2); }
}
@media (max-width: 385px) {
  .hd-alarm .ic { display: none; }
  .hd-alarm { padding: 0 11px; }
  .brand img { height: 34px; }
}

/* admin UI (www/admin/): the same shell, a label in the place of the alarm button */
/* the tables of the administrator use the whole width of the window */
.app.admin .main, .app.admin .ft { max-width: none; }
.hd-alarm.is-admin { background: var(--ink); cursor: default; }
.hd-alarm.is-admin:hover { background: var(--ink); }
.pg-h .search { display: flex; gap: 6px; }
.pg-h .search input[type="search"] { width: 18em; max-width: 60vw; }
#login.admin-login { max-width: 22em; margin: 0 auto; }
#login.admin-login input[type="text"], #login.admin-login input[type="password"] { width: 100%; margin-bottom: 10px; }
.flash.kao { margin-bottom: 14px; }
.flash a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.progress { height: 10px; border-radius: 999px; background: var(--line-2); overflow: hidden; margin: 10px 0; }
.progress-bar { height: 100%; width: 0; background: var(--brand); transition: width .3s; }
.brevo-log { max-height: 16em; overflow: auto; font-size: 12px; white-space: pre-wrap; margin: 8px 0 0; }
.brevo-log:empty { display: none; }
#brevo-attributes tr.differs td { background: var(--wait-bg); }
