/*
 * INTECHI Design System ("SD INTECHI"): the one look of the whole application. Flat and calm: a pale ground, a white menu with a thin line,
 * cards with a line and a 16 px corner, buttons with an 8 px corner, small capitals in the heads of tables, round badges. The colour of the
 * company stays as the main colour (--accent, set per company). Everything is under `html.sd`; the sign-in page does not have the class and
 * keeps its own look (glass.css). Values come from the package "INTECHI Design System 1.0" (tokens: canvas #f6f8fc, text #1e293b, muted #475569,
 * line #e2e8f0, card 16 px, control 8 px).
 */

/* ---- tokens ---- */
html.sd {
  --bg: #f6f8fc;
  --card: #fff;
  --ink: #1e293b;
  --muted: #475569;
  --line: #e2e8f0;
  --soft: #f8fafc;
  --soft2: #f1f5f9;
  --grid: #e2e8f0;
  --menu: #fff;
  --focus: var(--accent);
  --warn: #b91c1c;
  --shadow: none;
  --shadow-hover: 0 4px 16px rgba(15, 23, 42, 0.08);
  --sd-line-strong: #cbd5e1;
  --sd-field-line: #94a3b8;
  --sd-hover: #f1f5f9;
  --sd-on: color-mix(in srgb, var(--accent) 9%, #fff);
  --sd-card-r: 16px;
  --sd-ctl-r: 6px;
  --sd-ctl-h: 36px;
  /* one height of a button of each size (the owner, 3. 12. 2026: buttons in one row are equally high; the same as INTECHI CRM): a text
     button and an icon-only button of the same size share it; the desktop and the finger (public/css/buttons.css) set their own values */
  --sd-btn-h: var(--sd-ctl-h);
  --sd-btn-sm-h: 32px;
  --sd-action-size: var(--sd-btn-sm-h);
  --sd-menu: #fff;
}
html.sd[data-theme='dark'] {
  --bg: #0b1220;
  --card: #111a2b;
  --ink: #e2e8f0;
  --muted: #94a3b8;
  --line: #243247;
  --soft: #0f172a;
  --soft2: #17233a;
  --grid: #243247;
  --menu: #0f172a;
  --warn: #fca5a5;
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.45);
  --sd-line-strong: #334155;
  --sd-field-line: #475569;
  --sd-hover: #17233a;
  --sd-on: color-mix(in srgb, var(--accent) 24%, #0f172a);
  --sd-menu: #0f172a;
}
html.sd body {
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}
html.sd h1:not(.inv-sheet *),
html.sd h2:not(.inv-sheet *),
html.sd h3:not(.inv-sheet *) {
  letter-spacing: -0.2px;
}

/* ---- the menu: white, a thin line on the right, the lit item is a pale tint of the colour of the company ---- */
html.sd .side {
  /* the colour of the company tints the shell (--menu is set on it), the menu of INTECHI Design System is white (dark: deep blue) */
  background: var(--sd-menu);
  border-right: 1px solid var(--line);
  padding: 24px 14px;
}
html.sd .nav a {
  color: var(--muted);
  border-radius: var(--sd-ctl-r);
  font-weight: 600;
}
/* only the words (and the icon) change colour, never the whole cell */
html.sd .nav a:hover {
  background: transparent;
  color: var(--accent);
}
html.sd[data-theme='dark'] .nav a:hover {
  color: var(--link, var(--accent));
}
html.sd .nav a.on {
  background: transparent;
  box-shadow: none;
  color: var(--accent);
  font-weight: 700;
}
html.sd[data-theme='dark'] .nav a.on {
  color: var(--link, var(--accent));
}
html.sd .nav a.on::before {
  display: none;
}
html.sd .nav-sep {
  border: 0;
  border-top: 1px solid var(--line);
}
html.sd .userbox {
  color: var(--muted);
}
html.sd .brand-name {
  letter-spacing: 1px;
}

/* ---- cards and tiles: flat, with a line and a 16 px corner ---- */
html.sd .card,
html.sd .tile,
html.sd .adm-row,
html.sd .kpi-tile,
html.sd .notice {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--sd-card-r);
  box-shadow: none;
}
html.sd .tile:hover {
  box-shadow: var(--shadow-hover);
  transform: none;
}
html.sd .card .card,
html.sd .card .tile {
  background: var(--soft);
  border-radius: 12px;
}
html.sd .notice {
  border-radius: var(--sd-ctl-r);
  padding: 14px 18px;
}
html.sd .notice.good {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}
html.sd .notice.bad {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}
html.sd[data-theme='dark'] .notice.good {
  background: #10281b;
  border-color: #1f5a37;
  color: #86efac;
}
/* the message that something went well is clearly green, the same as a notice in the page */
html.sd .toast > .ok {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}
html.sd[data-theme='dark'] .toast > .ok {
  background: #10281b;
  border-color: #1f5a37;
  color: #86efac;
}
html.sd[data-theme='dark'] .notice.bad {
  background: #2d1316;
  border-color: #6b2227;
  color: #fca5a5;
}

/* ---- buttons: the main one in the colour of the company, the others white with a line ---- */
html.sd .btn {
  min-height: var(--sd-btn-h);
  border-radius: var(--sd-ctl-r);
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  box-shadow: none;
}
html.sd .btn:hover {
  filter: brightness(1.08);
}
html.sd .btn.secondary {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--sd-line-strong);
}
html.sd .btn.secondary:hover {
  background: var(--sd-hover);
  filter: none;
}
html.sd .btn.danger {
  background: #b91c1c;
  color: #fff;
}
html.sd .btn:disabled,
html.sd .btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---- chips (the tabs and the filters): the same corner as the buttons ---- */
html.sd .chip {
  border-radius: var(--sd-ctl-r);
  background: var(--card);
  border: 1px solid var(--sd-line-strong);
  color: var(--ink);
  box-shadow: none;
}
html.sd .chip:hover {
  background: var(--card);
  color: var(--accent);
}
html.sd .chip.on {
  background: var(--card);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
}
html.sd[data-theme='dark'] .chip.on {
  color: var(--link, var(--accent));
}

/* ---- badges: round, with a line, the colours keep their meaning (green done, yellow waiting, red problem, blue information) ---- */
html.sd .badge {
  border: 1px solid var(--line);
  background: var(--soft2);
  color: var(--muted);
}
html.sd .badge.good,
html.sd .badge.res.ok {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}
html.sd .badge.warn,
html.sd .badge.res.warn {
  background: #fef9c3;
  border-color: #fde047;
  color: #854d0e;
}
html.sd .badge.bad,
html.sd .badge.res.err {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
}
/* sent back to complete (Fred › Žádosti, the owner, 27. 11. 2026): orange, between the yellow waiting and the red refused */
html.sd .badge.orange {
  background: var(--sd-action-orange-bg);
  border-color: var(--sd-action-orange-line);
  color: var(--sd-action-orange-ink);
}
/* a value that is written in (a filed month): purple, so it is not read as a good or a bad state */
html.sd .badge.plum {
  background: var(--sd-color-purple-50, #faf5ff);
  border-color: var(--sd-color-purple-200, #e9d4ff);
  color: var(--sd-color-purple-600, #9810fa);
}
html.sd[data-theme='dark'] .badge.plum {
  background: #2a1f33;
  border-color: #4a3560;
  color: #d6b4ff;
}
html.sd[data-theme='dark'] .badge.good,
html.sd[data-theme='dark'] .badge.res.ok {
  background: #10281b;
  border-color: #1f5a37;
  color: #86efac;
}
html.sd[data-theme='dark'] .badge.warn,
html.sd[data-theme='dark'] .badge.res.warn {
  background: #2b2410;
  border-color: #6b5a14;
  color: #fde047;
}
html.sd[data-theme='dark'] .badge.bad,
html.sd[data-theme='dark'] .badge.res.err {
  background: #2d1316;
  border-color: #6b2227;
  color: #fca5a5;
}

/* „Poslední výsledek“ (src/views/resultBadge.ts, the owner 26. 11. 2026): ONE badge with the icon of the state and the date and time inside,
   green ok, red err, grey wait / none (the plain badge); never a state and a date one under another. The same in INTECHI CRM. */
html.sd .badge.res {
  gap: 6px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}
html.sd .badge.res .fa-solid {
  font-size: 12px;
  margin: 0;
}

/* ---- fields ---- */
html.sd input:not(.inv-sheet *),
html.sd select:not(.inv-sheet *),
html.sd textarea:not(.inv-sheet *) {
  border: 1px solid var(--sd-field-line);
  border-radius: var(--sd-ctl-r);
  /* the colour only: a select has its arrow as a background picture */
  background-color: var(--card);
  box-shadow: none;
}
html.sd input:not(.inv-sheet *)::placeholder,
html.sd textarea:not(.inv-sheet *)::placeholder {
  color: #64748b;
}
html.sd input:not(.inv-sheet *):focus-visible,
html.sd select:not(.inv-sheet *):focus-visible,
html.sd textarea:not(.inv-sheet *):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
html.sd .filter-input {
  border-radius: var(--sd-ctl-r);
  border: 1px solid var(--sd-field-line);
  background: var(--card);
  box-shadow: none;
}
html.sd .filter-input input {
  border: 0;
  background: transparent;
}

/* ---- tables: small grey capitals in the head, quiet lines, a pale row under the pointer ---- */
html.sd th:not(.inv-sheet *) {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  background: var(--soft);
  font-weight: 700;
}
html.sd th:not(.inv-sheet *),
html.sd td:not(.inv-sheet *) {
  border-bottom: 1px solid var(--line);
}
html.sd tbody tr:not(.inv-sheet *):hover {
  background: transparent;
}

/* ---- the little things in the top bar and what floats over the page ---- */
html.sd .dd ul,
html.sd .zdd ul,
html.sd dialog {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
}
html.sd .hand-btn,
html.sd .hist-nav {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: none;
}
/* the hand when on: the colour of the chosen company, as in CRM (the owner, 24. 11. 2026); public/js/pan.js puts the button into .shell, which
   carries --accent of the company */
html.sd .hand-btn.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
html.sd .theme-toggle,
html.sd .zbtn {
  color: var(--ink);
}
html.sd a:not(.inv-sheet *) {
  color: var(--link, var(--accent));
}
html.sd a.btn,
html.sd .nav a,
html.sd a.chip {
  color: inherit;
}
html.sd a.btn:not(.secondary) {
  color: #fff;
}
html.sd .nav a.on {
  color: var(--accent);
}
html.sd .nav a:hover .nav-ico,
html.sd .nav a:hover:not(.on) .nav-ico {
  color: var(--accent);
}
html.sd[data-theme='dark'] .nav a:hover .nav-ico,
html.sd[data-theme='dark'] .nav a:hover:not(.on) .nav-ico {
  color: var(--link, var(--accent));
}

/* ---- the menu of the user at the bottom: a button with the initials and the name, it opens upwards (as in the Service Desk) ---- */
html.sd .usermenu {
  position: relative;
  display: block;
  margin-top: auto;
  padding-top: 36px;
  border-top: 0;
}
html.sd .usermenu::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 10px;
  right: 10px;
  border-top: 1px solid var(--line);
}
html.sd .user-btn {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border: 0;
  border-radius: var(--sd-ctl-r);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
html.sd .user-btn:hover,
html.sd .usermenu.open .user-btn {
  color: var(--accent);
}
html.sd[data-theme='dark'] .user-btn:hover,
html.sd[data-theme='dark'] .usermenu.open .user-btn {
  color: var(--link, var(--accent));
}
html.sd .user-btn .avatar {
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}
html.sd .user-btn .who-name {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
html.sd .user-btn .chev {
  flex: none;
  transition: transform 0.15s;
}
html.sd .usermenu.open .user-btn .chev {
  transform: rotate(180deg);
}
html.sd .user-pop {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% - 30px);
  z-index: 30;
  padding: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
}
html.sd .user-pop[hidden] {
  display: none;
}
html.sd .pop-item {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--sd-ctl-r);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
html.sd .pop-item:hover,
html.sd .pop-item:focus-visible {
  color: var(--accent);
  background: transparent;
}
html.sd[data-theme='dark'] .pop-item:hover,
html.sd[data-theme='dark'] .pop-item:focus-visible {
  color: var(--link, var(--accent));
}
html.sd .pop-item .pop-ico {
  flex: none;
  color: var(--muted);
}
html.sd .pop-item:hover .pop-ico {
  color: inherit;
}
html.sd .pop-item small {
  margin-left: auto;
  color: var(--muted);
  font-weight: 600;
}
html.sd .pop-sep {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 6px 4px;
}
html.sd .user-pop form {
  margin: 0;
}
/* the switch of the notifications */
html.sd .pop-switch {
  width: 100%;
  height: auto;
  border-radius: var(--sd-ctl-r);
  box-shadow: none;
  border: 0;
  position: relative;
}
html.sd .pop-switch::after {
  display: none;
}
html.sd .pop-switch .sw {
  flex: none;
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: #cbd5e1;
  transition: background 0.15s;
}
html.sd .pop-switch .sw::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.3);
  transition: transform 0.15s;
}
html.sd .pop-switch.on .sw,
html.sd .pop-switch[aria-pressed='true'] .sw {
  background: var(--accent);
}
html.sd .pop-switch.on .sw::after,
html.sd .pop-switch[aria-pressed='true'] .sw::after {
  transform: translateX(18px);
}
html.sd .pop-switch.off {
  opacity: 0.55;
}
/* the menu hidden to the narrow strip: only the initials, the menu opens beside the strip */
html.sd.side-off .user-btn .who-name,
html.sd.side-off .user-btn .chev {
  display: none;
}
html.sd.side-off .user-btn {
  justify-content: center;
  padding: 6px 0;
}
html.sd.side-off .user-pop {
  position: fixed;
  left: 84px;
  right: auto;
  bottom: 16px;
  width: 260px;
}

/* ---- only the words (and the icon) are coloured, never the whole cell: no tinted ground under a chosen tab, a button of a kind or a phase ---- */
html.sd .top-left .admin-tabs .chip.on,
html.sd .chip[class*='status-'],
html.sd .chip[class*='status-'].on {
  background: var(--card);
}
html.sd .chip[class*='status-'] {
  color: color-mix(in srgb, var(--stage) 70%, #000);
  border-color: var(--sd-line-strong);
}
html.sd[data-theme='dark'] .chip[class*='status-'] {
  color: color-mix(in srgb, var(--stage) 55%, #fff);
}
html.sd .chip[class*='status-'].on {
  border-color: var(--stage);
  font-weight: 700;
}
html.sd .funnel-bar,
html.sd .deal-col {
  background: var(--card);
}
html.sd .funnel-row:hover .funnel-bar {
  background: var(--card);
  transform: none;
}
html.sd .pop-item {
  gap: 10px;
}
html.sd .pop-item > span {
  min-width: 0;
}
html.sd .pop-item small {
  white-space: nowrap;
}
html.sd .user-pop {
  padding: 6px;
}
html.sd .pop-switch {
  justify-content: flex-start;
}

/* ---- the trail above the page: the size and the spacing of the Service Desk and Smart (14 px, line 20 px, 8 px between the parts); the earlier parts pale, the page itself bolder and darker ---- */
html.sd .crumbs {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 20px;
  color: var(--sd-color-slate-500);
}
html.sd .crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
html.sd .crumbs li {
  color: inherit;
}
html.sd .crumbs li + li::before {
  content: '/';
  margin-right: 8px;
  font-weight: 400;
  opacity: 0.5;
}
html.sd .crumbs a {
  color: var(--sd-color-slate-700);
  font-weight: 600;
  text-decoration: none;
}
html.sd .crumbs a:hover {
  color: var(--accent);
}
html.sd .crumbs b {
  color: var(--sd-color-slate-700);
  font-weight: 600;
}
html.sd[data-theme='dark'] .crumbs {
  color: #8b9bb0;
}
html.sd[data-theme='dark'] .crumbs li:not(:first-child) a:not(:hover),
html.sd[data-theme='dark'] .crumbs b {
  color: #b6c3d4;
}

/* ---- what Finance has besides the common parts ---- */
/* the chosen year, the chosen part of a row of choices: the same as every chosen chip (a white ground, the colour of the company on the line and the words) */
html.sd .chip.year.current,
html.sd[data-theme='dark'] .chip.year.current {
  background: var(--card);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
}
html.sd[data-theme='dark'] .chip.year.current {
  color: var(--link, var(--accent));
}
/* the things that were round pills keep the 8 px corner of the buttons */
html.sd .rem-more,
html.sd .fp-btn,
html.sd .hist-nav,
html.sd .chips.seg {
  border-radius: var(--sd-ctl-r);
  border-color: var(--sd-line-strong);
}
html.sd .chips.seg .chip:first-child {
  border-radius: var(--sd-ctl-r) 0 0 var(--sd-ctl-r);
}
html.sd .chips.seg .chip:last-child {
  border-radius: 0 var(--sd-ctl-r) var(--sd-ctl-r) 0;
}

/* the opened menu of the user on a phone: in the flow of the menu (it would cover the items above it when it opens upwards) */
@media (max-width: 860px) {
  html.sd .user-pop {
    position: static;
    margin: 0 0 8px;
    box-shadow: none;
  }
  html.sd .usermenu {
    padding-top: 28px;
  }
}

/* ---- the sheet of an invoice keeps its own look: the designs of the invoices (the modern one too) are the same as the PDF and as before, so the line of the page does not reach into it ---- */
html.sd .inv-sheet {
  line-height: normal;
  --line: #dde1da;
}

/* ---- the sizes of the controls, as measured in the Service Desk at 100 %: a text field, a select and a main button are 36 px high with a 6 px corner (a main button has 24 px at the sides), a small icon button 32 px with a 6 px corner, a row of the menu 44 px with an 8 px corner, a card a 16 px corner ---- */
html.sd .btn {
  padding: 0 24px;
  font-size: 14px;
}
html.sd .btn.sm {
  min-height: var(--sd-btn-sm-h);
  padding: 0 14px;
  font-size: 13px;
}
html.sd .chip,
html.sd .fp-btn,
html.sd .rem-more,
html.sd .hist-nav,
html.sd .hist-btn {
  min-height: var(--sd-ctl-h);
}
html.sd input[type='text']:not(.inv-sheet *),
html.sd input[type='email']:not(.inv-sheet *),
html.sd input[type='date']:not(.inv-sheet *),
html.sd input[type='number']:not(.inv-sheet *),
html.sd input[type='search']:not(.inv-sheet *),
html.sd input[type='password']:not(.inv-sheet *),
html.sd input[type='tel']:not(.inv-sheet *),
html.sd input[type='url']:not(.inv-sheet *) {
  min-height: var(--sd-ctl-h);
  padding: 0 8px;
  border-radius: var(--sd-ctl-r);
}
/* a select keeps the room on the right for its arrow */
html.sd select:not(.inv-sheet *) {
  min-height: var(--sd-ctl-h);
  padding-top: 0;
  padding-bottom: 0;
  padding-left: 8px;
  border-radius: var(--sd-ctl-r);
}
html.sd textarea:not(.inv-sheet *) {
  padding: 6px 8px;
  border-radius: var(--sd-ctl-r);
}
html.sd .filter-input {
  min-height: var(--sd-ctl-h);
  border-radius: var(--sd-ctl-r);
}
html.sd .period-bar select,
html.sd .period-bar .btn {
  height: var(--sd-ctl-h);
  min-height: var(--sd-ctl-h);
}
html.sd .inbox-grid input[type='text'],
html.sd .inbox-grid input[type='date'],
html.sd .inbox-grid input[type='number'],
html.sd .inbox-grid select {
  height: var(--sd-ctl-h);
  min-height: var(--sd-ctl-h);
}
html.sd .acct-btn {
  min-height: var(--sd-ctl-h);
}
html.sd .chips.seg {
  border-radius: var(--sd-ctl-r);
}
html.sd .nav a {
  border-radius: 8px;
}

/* ---- the menu has no bar of the scroll: it scrolls by the wheel or the finger, nothing is drawn beside it ---- */
html.sd .side {
  scrollbar-width: none;
}
html.sd .side::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}


/* ---- the bell of the reminders in the top bar (as in the Smart): the count is red when something was missed, else orange ---- */
html.sd .bell-dd {
  position: relative;
}
html.sd .bell-btn {
  position: relative;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--accent);
  padding: 0;
  cursor: pointer;
}
html.sd[data-theme='dark'] .bell-btn {
  color: var(--link, var(--accent));
}
html.sd .bell-badge {
  position: absolute;
  top: 0;
  right: -2px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 20px;
  color: #fff;
  text-align: center;
}
html.sd .bell-badge.red {
  background: #dc2626;
}
html.sd .bell-badge.orange {
  background: #ea7a0c;
}
html.sd .bell-badge[hidden] {
  display: none;
}
html.sd .bell-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(380px, calc(100vw - 32px));
  max-height: 70vh;
  overflow: auto;
  z-index: 60;
  padding: 6px 0;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
}
html.sd .bell-menu[hidden] {
  display: none;
}
html.sd .bell-head {
  padding: 8px 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
html.sd .bell-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
html.sd .bell-title > i {
  color: var(--sd-action-blue-ink, #1d4ed8);
}
/* a square of the size of every icon-only button (the owner, 29. 11. 2026: it was a rectangle on a phone) */
html.sd .bell-read {
  width: var(--sd-action-size);
  min-width: var(--sd-action-size);
  height: var(--sd-action-size);
  min-height: var(--sd-action-size);
  padding: 0;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* the colours of the current mode (the owner, 21. 11. 2026: no white square in the dark mode) */
  border: 1px solid var(--line, #e2e8f0);
  border-radius: var(--sd-action-radius);
  background: var(--card, #fff);
  color: var(--muted, #62748e);
  cursor: pointer;
}
html.sd .bell-read:hover {
  color: var(--ids-primary, #2f88ee);
  border-color: var(--ids-primary, #2f88ee);
}
html.sd .bell-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
html.sd .bell-menu li a {
  display: flex;
  gap: 10px;
  padding: 10px 16px;
  text-decoration: none;
  color: var(--ink);
}
html.sd .bell-menu li a:hover {
  color: var(--accent);
}
html.sd .bell-menu .dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 6px;
}
html.sd .bell-menu .dot.red {
  background: #dc2626;
}
html.sd .bell-menu .dot.orange {
  background: #ea7a0c;
}
html.sd .bell-menu span b {
  display: block;
  font-size: 14px;
}
html.sd .bell-menu span small {
  color: var(--muted);
  font-size: 12px;
}
html.sd .bell-none {
  padding: 8px 16px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
@media (max-width: 760px) {
  html.sd .bell-dd {
    position: static;
  }
  html.sd .bell-menu {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 72px;
    width: auto;
    max-height: calc((100vh / var(--page-zoom, 1)) - 100px);
  }
}

/* ============ the states that INTECHI Design System 1.1 (the CSS of the Service Desk) states, as in `docs/INTECHI-DESIGN-SYSTEM.md` ============
   Field: a 1 px line slate-200, corner md (6 px), white; in focus a 2 px line primary-700; disabled and read-only slate-100, cursor not-allowed.
   Submit: corner md (6 px), hover primary-700, disabled pink-300. Panel (.c-page-panel): corner lg (8 px), line slate-200, thin shadow.
   Dialog (.popup): a pale veil (#0000001a), the box corner lg (8 px), padding 16 px, a close button of 34 px.
   The size of the touch targets (44 px in CRM) and the colour of the company (--accent) are the deliberate variants, see the document. */
html.sd {
  --sd-card-r: var(--sd-radius-lg);
  --sd-field-r: var(--sd-radius-md);
  --sd-btn-r: var(--sd-radius-lg);
  --sd-field-line: var(--sd-color-slate-200);
}
html.sd[data-theme='dark'] {
  --sd-field-line: #334155;
}
html.sd .card,
html.sd .tile,
html.sd .adm-row,
html.sd .kpi-tile {
  border-radius: var(--sd-radius-lg);
  box-shadow: var(--sd-panel-shadow);
}
html.sd[data-theme='dark'] .card,
html.sd[data-theme='dark'] .tile,
html.sd[data-theme='dark'] .adm-row,
html.sd[data-theme='dark'] .kpi-tile {
  box-shadow: none;
}
html.sd .btn {
  border-radius: var(--sd-btn-r);
}
html.sd input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='file']):not(.inv-sheet *),
html.sd select:not(.inv-sheet *),
html.sd textarea:not(.inv-sheet *) {
  border: 1px solid var(--sd-field-line);
  border-radius: var(--sd-field-r);
}
html.sd input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='file']):not(.inv-sheet *):focus-visible,
html.sd select:not(.inv-sheet *):focus-visible,
html.sd textarea:not(.inv-sheet *):focus-visible {
  outline: 0;
  border-color: var(--sd-color-primary-700);
  box-shadow: inset 0 0 0 1px var(--sd-color-primary-700);
}
html.sd input:disabled:not(.inv-sheet *),
html.sd select:disabled:not(.inv-sheet *),
html.sd textarea:disabled:not(.inv-sheet *),
html.sd input[readonly]:not(.inv-sheet *),
html.sd textarea[readonly]:not(.inv-sheet *) {
  background-color: var(--sd-color-slate-100);
  color: var(--sd-color-slate-700);
}
html.sd input:disabled:not(.inv-sheet *),
html.sd select:disabled:not(.inv-sheet *),
html.sd textarea:disabled:not(.inv-sheet *),
html.sd .btn:disabled,
html.sd .btn[disabled] {
  cursor: not-allowed;
}
html.sd[data-theme='dark'] input:disabled:not(.inv-sheet *),
html.sd[data-theme='dark'] select:disabled:not(.inv-sheet *),
html.sd[data-theme='dark'] textarea:disabled:not(.inv-sheet *),
html.sd[data-theme='dark'] input[readonly]:not(.inv-sheet *),
html.sd[data-theme='dark'] textarea[readonly]:not(.inv-sheet *) {
  background-color: #17233a;
  color: #94a3b8;
}
html.sd input[aria-invalid='true']:not(.inv-sheet *),
html.sd select[aria-invalid='true']:not(.inv-sheet *),
html.sd textarea[aria-invalid='true']:not(.inv-sheet *) {
  border-color: var(--sd-color-red-500);
  background-color: var(--sd-color-red-50);
}
/* the submit button: hover primary-700, disabled pink-300 (the corner 6 px) */
html.sd button.btn:not(.secondary):not(.danger),
html.sd input[type='submit'].btn {
  border-radius: var(--sd-field-r);
}
html.sd button.btn:not(.secondary):not(.danger):disabled,
html.sd input[type='submit'].btn:disabled {
  background: var(--sd-color-pink-300);
  opacity: 1;
}
/* a notice of an error: the line red-500, the ground red-50 (the alert of the Service Desk) */
html.sd .notice.bad {
  border-color: var(--sd-color-red-500);
  background: var(--sd-color-red-50);
  color: var(--sd-color-red-700);
}
html.sd[data-theme='dark'] .notice.bad {
  border-color: #6b2227;
  background: #2d1316;
  color: #fca5a5;
}
/* the dialog (.popup): a pale veil, the box with the corner lg and 16 px of padding */
html.sd dialog {
  border-radius: var(--sd-radius-lg);
  padding: var(--sd-space-3);
}
html.sd dialog::backdrop {
  background: var(--sd-overlay);
}
/* the field inside a search pill has no line of its own (the pill has it) */
html.sd .filter-input input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='file']):not(.inv-sheet *),
html.sd .top-search input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='file']):not(.inv-sheet *) {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
html.sd .filter-input input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='file']):not(.inv-sheet *):focus-visible,
html.sd .top-search input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='file']):not(.inv-sheet *):focus-visible {
  box-shadow: none;
}
html.sd .filter-input:focus-within,
html.sd .top-search:focus-within {
  border-color: var(--sd-color-primary-700);
  box-shadow: inset 0 0 0 1px var(--sd-color-primary-700);
}

/* ============ the density of a desktop: the sizes the Service Desk shows ============
   The Service Desk scales its desktop page by 0.8 (AUDIT.md), so its raw sizes look 0.8 times as big (a button of 46 px is 37 px on the screen, the field
   of 36 px is 29 px, the text of 16 px is 12.8 px). The apps do not scale the page; the shared components get the sizes it SHOWS, with a mouse and a wide
   window only. On a phone and a tablet (a finger) the sizes stay as they are: 44 px targets. See docs/INTECHI-DESIGN-SYSTEM.md. */
@media (min-width: 992px) and (pointer: fine) {
  html.sd body {
    font-size: 13px;
  }
  html.sd .nav a {
    min-height: 36px;
    font-size: 13px;
  }
  html.sd {
    --sd-btn-h: 34px;
    --sd-btn-sm-h: 30px;
  }
  html.sd .btn {
    padding-inline: 12px;
    font-size: 13px;
  }
  html.sd .chip {
    min-height: 34px;
    font-size: 13px;
  }
  html.sd input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='file']):not(.inv-sheet *),
  html.sd select:not(.inv-sheet *),
  html.sd textarea:not(.inv-sheet *) {
    min-height: 30px;
    padding-block: 4px;
    font-size: 13px;
  }
  html.sd .top-search,
  html.sd .filter-input {
    min-height: 34px;
  }
  html.sd th,
  html.sd td {
    font-size: 13px;
  }
  html.sd td,
  html.sd th {
    padding-block: 6px;
  }
  html.sd label.f > span:first-child {
    font-size: 11.5px;
  }
}

/* E-maily › Upomínky: the text of the reminder edited before sending (Upravit text) opens under the row of the controls, as wide as the cell */
html.sd details.rem-edit {
  flex-basis: 100%;
}
html.sd details.rem-edit > summary {
  list-style: none;
  width: max-content;
}
html.sd details.rem-edit > summary::-webkit-details-marker {
  display: none;
}
html.sd .rem-edit-body {
  gap: 8px;
  margin-top: 8px;
  min-width: min(100%, 28rem);
}
html.sd .rem-edit-body textarea {
  width: 100%;
  min-height: 12rem;
}
html.sd label.rem-field {
  gap: 4px;
}

/* the document window of FINANCE (dialog.viewer) is the dialog of the Service Desk: the box max. 820 px, the corner lg, a pale veil; the bar has its own padding */
html.sd dialog.viewer {
  padding: 0;
  width: min(820px, 96vw);
  border-radius: var(--sd-radius-lg);
}
html.sd dialog.viewer::backdrop {
  background: var(--sd-overlay);
}
html.sd .viewer-bar {
  padding: var(--sd-space-2) var(--sd-space-3);
}
@media (min-width: 992px) and (pointer: fine) {
  /* a drop-down, a field of a form and the file field: one height of 30 px (the field of the Service Desk, 36 px x 0.8) */
  html.sd select:not([multiple]):not(.inv-sheet *),
  html.sd .f select:not([multiple]),
  html.sd .f input:not([type='checkbox']):not([type='radio']):not([type='file']):not([type='range']):not(.inv-sheet *) {
    height: 30px;
    min-height: 30px;
  }
  html.sd .fp,
  html.sd input[type='file'] {
    height: 34px;
  }
}

/* ================= Vzhled jako ve Smartu (INTECHI Design System 1.1 SD) =================
   Menu na šedém pozadí bez rámečku, obsah v bílém panelu, ikony Font Awesome Free, ikonová tlačítka 40 px, uživatel dole v rámečku.
   Hodnoty: výška položky menu 44 px, ikonové tlačítko 40 px, zaoblení 8 px (naměřeno v SD, viz docs/INTECHI-DESIGN-SYSTEM.md). */
html.sd {
  --menu: var(--sd-color-slate-50);
  --bg: var(--sd-color-slate-50);
}
html.sd[data-theme='dark'] {
  --menu: #0f1720;
  --bg: #0f1720;
}
html.sd .side {
  border-right: 0;
  background: var(--sd-color-slate-50);
}
html.sd[data-theme='dark'] .side {
  background: #0f1720;
}
html.sd .nav a {
  min-height: 44px;
  padding: 8px;
}
html.sd .nav-ico {
  width: 24px;
  height: auto;
  font-size: 16px;
  line-height: 1;
  text-align: center;
}
html.sd .shell {
  background: var(--bg);
  padding: 8px 8px 8px 0;
  gap: 0;
  box-sizing: border-box;
}
html.sd .main {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 2px 0 #0000000d;
  min-height: calc((100vh / var(--page-zoom, 1)) - 16px);
}
@media (max-width: 860px) {
  html.sd .shell {
    padding: 0;
  }
  html.sd .main {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
}
/* tlačítka vpravo nahoře: 40 px, zaoblení 8 px, tenký rámeček; zvonek tónovaný */
html.sd .bell-btn,
html.sd .theme-toggle,
html.sd .top-tools .dd > button {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  padding: 0;
  box-shadow: 0 1px 2px 0 #0000000d;
}
html.sd .bell-btn {
  background: var(--sd-color-purple-50, #faf5ff);
  border-color: var(--sd-color-purple-200, #e9d4ff);
  color: var(--sd-color-purple-600, #9810fa);
}
html.sd[data-theme='dark'] .bell-btn {
  background: #2a1f33;
  border-color: #4a3560;
  color: #d6b4ff;
}
html.sd .bell-btn i {
  font-size: 20px;
  line-height: 1;
}
html.sd .theme-toggle:hover,
html.sd .top-tools .dd > button:hover {
  color: var(--accent);
  border-color: var(--accent);
}
/* uživatel dole v menu: rámeček s tónem firmy */
html.sd .user-btn {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--accent) 10%, var(--card));
  border-radius: 12px;
  min-height: 56px;
  padding: 8px 10px;
}
html.sd .user-btn .avatar {
  border-radius: 10px;
}

/* the tools at the top right are boxes of 40 px: the old moon had a negative margin to stand close to the globe, now the boxes would touch */
html.sd .top-tools {
  gap: 12px;
}
html.sd .top-tools .theme-toggle {
  margin-right: 0;
}

/* ======================================================================================================================================
 * The icon actions of rows, lists and cards (INTECHI component, the same contract in CRM and FINANCE).
 * Tokens: --sd-action-* in sd-tokens.css. Which action is which icon and tone: ACTIONS in src/views/buttonTone.ts (drawn on the page by tintButtons).
 * Markup: <button class="btn ia ia-<tone> icon-only" data-act="view" data-hint="Zobrazit fakturu" aria-label="Zobrazit fakturu"><i class="fa-solid fa-eye" aria-hidden="true"></i></button>
 * A link (a.btn) is for going to a page, a button for an action. States: default, hover, active, focus-visible, disabled (disabled or aria-disabled),
 * loading (.is-loading or aria-busy). The meaning is never only the colour: every icon has its name (aria-label) and the explanation over it (data-hint).
 * ====================================================================================================================================== */
html.sd .ia-blue {
  --ia-bg: var(--sd-action-blue-bg);
  --ia-line: var(--sd-action-blue-line);
  --ia-ink: var(--sd-action-blue-ink);
  --ia-hover: var(--sd-action-blue-hover);
  --ia-active: var(--sd-action-blue-active);
}
html.sd .ia-green {
  --ia-bg: var(--sd-action-green-bg);
  --ia-line: var(--sd-action-green-line);
  --ia-ink: var(--sd-action-green-ink);
  --ia-hover: var(--sd-action-green-hover);
  --ia-active: var(--sd-action-green-active);
}
html.sd .ia-orange {
  --ia-bg: var(--sd-action-orange-bg);
  --ia-line: var(--sd-action-orange-line);
  --ia-ink: var(--sd-action-orange-ink);
  --ia-hover: var(--sd-action-orange-hover);
  --ia-active: var(--sd-action-orange-active);
}
html.sd .ia-red {
  --ia-bg: var(--sd-action-red-bg);
  --ia-line: var(--sd-action-red-line);
  --ia-ink: var(--sd-action-red-ink);
  --ia-hover: var(--sd-action-red-hover);
  --ia-active: var(--sd-action-red-active);
}
html.sd .ia-purple {
  --ia-bg: var(--sd-action-purple-bg);
  --ia-line: var(--sd-action-purple-line);
  --ia-ink: var(--sd-action-purple-ink);
  --ia-hover: var(--sd-action-purple-hover);
  --ia-active: var(--sd-action-purple-active);
}
html.sd .ia-neutral {
  --ia-bg: var(--sd-action-neutral-bg);
  --ia-line: var(--sd-action-neutral-line);
  --ia-ink: var(--sd-action-neutral-ink);
  --ia-hover: var(--sd-action-neutral-hover);
  --ia-active: var(--sd-action-neutral-active);
}
html.sd .ia-grey {
  --ia-bg: var(--sd-action-grey-bg);
  --ia-line: var(--sd-action-grey-line);
  --ia-ink: var(--sd-action-grey-ink);
  --ia-hover: var(--sd-action-grey-hover);
  --ia-active: var(--sd-action-grey-active);
}
html.sd .btn.ia.ia {
  background: var(--ia-bg);
  border: 1px solid var(--ia-line);
  color: var(--ia-ink);
  box-shadow: var(--sd-action-shadow);
  transition:
    background-color 0.15s ease-in-out,
    border-color 0.15s ease-in-out,
    color 0.15s ease-in-out,
    box-shadow 0.15s ease-in-out;
}
html.sd .btn.ia.ia:hover {
  background: var(--ia-hover);
  filter: none;
}
html.sd .btn.ia.ia:active {
  background: var(--ia-active);
  box-shadow: none;
}
html.sd .btn.ia:focus-visible {
  outline: 2px solid var(--sd-action-focus);
  outline-offset: 2px;
}
html.sd .btn.ia:disabled,
html.sd .btn.ia[aria-disabled='true'] {
  --ia-bg: var(--sd-action-neutral-bg);
  --ia-hover: var(--sd-action-neutral-bg);
  --ia-active: var(--sd-action-neutral-bg);
  border-color: var(--sd-action-neutral-line);
  color: var(--sd-color-slate-400);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.7;
}
html.sd .btn.ia.is-loading,
html.sd .btn.ia[aria-busy='true'] {
  pointer-events: none;
  cursor: progress;
}
html.sd .btn.ia.is-loading::before,
html.sd .btn.ia[aria-busy='true']::before {
  content: '';
  box-sizing: border-box;
  width: 1em;
  height: 1em;
  margin-right: 0.4em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: ia-spin 0.8s linear infinite;
}
html.sd .btn.ia.icon-only.is-loading::before,
html.sd .btn.ia.icon-only[aria-busy='true']::before {
  position: absolute;
  inset: 0;
  margin: auto;
}
html.sd .btn.ia.icon-only.is-loading > i,
html.sd .btn.ia.icon-only[aria-busy='true'] > i {
  visibility: hidden;
}
@keyframes ia-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  html.sd .btn.ia.is-loading::before,
  html.sd .btn.ia[aria-busy='true']::before {
    animation-duration: 2.4s;
  }
}
/* the size: a square as high as a text button of its size (the owner, 3. 12. 2026: one height in a row; the same as INTECHI CRM): a small
   one (the actions of a row, 38 px of the Service Desk seen at its scale 0.8 = 30 px on a desktop) as .btn.sm, a big one as .btn; 44 px for
   a finger (public/css/buttons.css) */
html.sd .btn.icon-only {
  position: relative;
  display: inline-grid;
  place-items: center;
  /* always an exact square (the owner, 23. 11. 2026: the bin beside „Zakázat“ was narrower than high): the width follows the height, also
     when a row makes the buttons higher (min-height 44 px for a finger beside a text button) */
  width: auto;
  aspect-ratio: 1 / 1;
  min-width: var(--sd-btn-h);
  height: var(--sd-btn-h);
  min-height: var(--sd-btn-h);
  padding: 0;
  gap: 0;
  border-radius: var(--sd-action-radius);
  font-size: var(--sd-action-glyph);
  line-height: 1;
}
html.sd .btn.sm.icon-only {
  min-width: var(--sd-btn-sm-h);
  height: var(--sd-btn-sm-h);
  min-height: var(--sd-btn-sm-h);
}
/* a small button beside a big one in one row takes the big height (the owner, 3. 12. 2026: „tlačítka v jedné řadě stejně vysoká“: „Další
   akce“ beside „Hromadná změna“, a bin beside „Uložit“); a button alone in its form counts as standing in the row of the form. :where keeps
   it weak, so a place with its own height of the row (public/css/buttons.css) wins */
html.sd :where(:has(> .btn:not(.sm))) > .btn.sm,
html.sd :where(:has(> .btn:not(.sm))) > form > .btn.sm,
html.sd :where(:has(> .btn:not(.sm))) > details > summary.btn.sm,
html.sd :where(:has(> .btn:not(.sm))) > .mail-lang,
html.sd :where(:has(> form > .btn:not(.sm))) > .btn.sm,
html.sd :where(:has(> form > .btn:not(.sm))) > form > .btn.sm,
html.sd :where(:has(> form > .btn:not(.sm))) > details > summary.btn.sm,
html.sd :where(:has(> form > .btn:not(.sm))) > .mail-lang,
html.sd :where(:has(> details > summary.btn:not(.sm))) > .btn.sm,
html.sd :where(:has(> details > summary.btn:not(.sm))) > form > .btn.sm,
html.sd :where(:has(> details > summary.btn:not(.sm))) > details > summary.btn.sm,
html.sd :where(:has(> details > summary.btn:not(.sm))) > .mail-lang {
  --sd-btn-sm-h: var(--sd-btn-h);
}
html.sd .btn.icon-only > i {
  font-size: var(--sd-action-glyph);
  line-height: 1;
}
/* the gap to a text (the pages of Fred give it to every icon in a button) must not push a lone icon off the centre */
html.sd .btn.icon-only > i.fa-solid.fa-solid {
  margin: 0;
}
html.sd summary.btn.icon-only {
  list-style: none;
}
html.sd summary.btn.icon-only::-webkit-details-marker {
  display: none;
}
html.sd label.btn.icon-only {
  margin: 0;
  cursor: pointer;
}
/* the round toggles of the lists (in or out of the profit, in a plan...) have the size and the corner of the actions */
html.sd .icon-btn {
  width: var(--sd-action-size);
  min-width: var(--sd-action-size);
  height: var(--sd-action-size);
  min-height: var(--sd-action-size);
  border-radius: var(--sd-action-radius);
}

/* Náklady, the column Zahrnuto: only an icon, a plus in a circle (included in the costs, green) or a minus (outside the costs, grey) */
html.sd td.doc-incl {
  text-align: center;
  vertical-align: middle;
}
html.sd .incl-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}
html.sd .incl-mark svg {
  width: 20px;
  height: 20px;
}
html.sd .incl-mark.in {
  color: var(--sd-action-green-ink);
}
html.sd .incl-mark.out {
  color: var(--sd-action-neutral-ink);
}

/* the menu "Další akce" of a row: the main action (the pen) stays in sight, the others are one menu of icons with their words, the delete last */
html.sd .acts-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sd-action-gap);
}
html.sd td.acts-cell .acts-body {
  margin: 0;
  padding: 6px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 2px;
  min-width: 230px;
  max-width: min(320px, calc(100vw - 16px));
  max-height: calc(100vh - 16px);
  overflow-y: auto;
  z-index: 60;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--sd-radius-lg);
  box-shadow: 0 12px 32px rgb(15 23 42 / 14%);
  text-align: left;
}
html.sd td.acts-cell .acts-body[hidden] {
  display: none;
}
html.sd .acts-body form,
html.sd .acts-body .doc-actions,
html.sd .acts-body .doc-icons {
  display: contents;
  margin: 0;
  max-width: none;
}
html.sd .acts-body .btn.ia.ia.icon-only,
html.sd .acts-body .icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  min-width: 0;
  height: auto;
  min-height: 36px;
  /* a row of the menu, never the square of an icon button (its width made it 300 px high: Do odpisů, Smazat in Náklady) */
  aspect-ratio: auto;
  padding: 4px 10px;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  border-radius: var(--sd-radius-md);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  white-space: normal;
}
html.sd .acts-body .icon-btn {
  color: var(--ink);
  border: 1px solid transparent;
  background: transparent;
}
html.sd .acts-body .icon-btn {
  overflow: visible;
  align-items: center;
  height: auto;
  text-align: left;
}
html.sd .acts-body .icon-btn svg {
  flex: none;
  width: 18px;
  height: 18px;
}
html.sd .acts-body .btn.ia.ia.icon-only:hover,
html.sd .acts-body .icon-btn:hover {
  background: var(--ia-hover, var(--sd-hover));
}
html.sd .acts-body .btn.ia.icon-only > i {
  flex: none;
  width: 18px;
  text-align: center;
}
/* the words of the item are its name (it has no tooltip here: the words are the explanation); acts.js writes them as real text, a CSS
   ::after with the name is switched off on every page by the bubbles of hint.js (html.hint-float) */
/* a button that is not in the menu (the pen beside it) never shows them */
html.sd .acts-label {
  display: none;
}
html.sd .acts-body .acts-label {
  display: inline;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  white-space: normal;
  text-align: left;
}
html.sd .acts-body .btn.ia.icon-only::after,
html.sd .acts-body .icon-btn::after {
  content: none;
}
html.sd .acts-body .icon-btn .sr-only {
  display: none;
}
@media (max-width: 860px) {
  /* on a phone the menu floats under its button over the row too (acts.js, position fixed): with the words of the items a menu in the
     cell would widen it and squeeze the name of the file into one letter per line */
  html.sd td.acts-cell .acts-body {
    width: min(300px, calc(100vw - 32px));
    min-width: 0;
    max-width: none;
  }
}

html.sd .int-head {
  display: flex;
  align-items: center;
  gap: 14px;
}
/* the card Most mezi boty (src/views/integrations.ts bridgeCard), the same as INTECHI CRM: the icon before every text, each other
   application on its own line (name, state, last success), the three switches one under another, Uložit and Vyzkoušet spojení */
html.sd .int-bridge h3 .fa-solid,
html.sd .int-bridge > p .fa-solid,
html.sd .int-bridge .int-check .fa-solid,
html.sd .int-bridge .bridge-apps .fa-solid {
  margin-right: 4px;
}
html.sd .int-bridge .int-badge-wrap {
  white-space: normal;
}
/* a row of an application = the icon, the name and ONE badge with the time on ONE axis (the owner, 26. 11. 2026), on a phone too: the row never
   wraps, a long badge breaks its words inside itself */
html.sd .int-bridge .bridge-apps li {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
}
html.sd .int-bridge .bridge-apps li > .fa-solid,
html.sd .int-bridge .bridge-apps li > b {
  flex: none;
  white-space: nowrap;
}
html.sd .int-bridge .bridge-apps li > .badge.res {
  min-width: 0;
  white-space: normal;
  height: auto;
}
html.sd .int-bridge .int-check {
  align-items: center;
  min-height: 44px;
  padding: 0;
}
html.sd .int-bridge .int-check input {
  margin-top: 0;
}
/* the four tiles over the list (each a quick filter), the coloured glass of the tiles of INTECHI CRM (kpitiles.css there): a tint of
   its colour from the corner, a dot, the number big in the colour, the name with its picture; only here, the other tiles of Finance stay */
html.sd .int-kpis {
  margin: 0;
}
@media (min-width: 900px) {
  html.sd .int-kpis.kpi-row.n4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
html.sd .int-centre h3 > .fa-solid:first-child {
  margin-right: 6px;
}
html.sd .int-kpis .kt-blue {
  --stage: #1f7fc4;
  --stage-ink: #17639a;
}
html.sd .int-kpis .kt-violet {
  --stage: #6a4cc7;
  --stage-ink: #5a3db3;
}
html.sd .int-kpis .kt-amber {
  --stage: #e08a00;
  --stage-ink: #8a5a00;
}
html.sd .int-kpis .kt-slate {
  --stage: #64748b;
  --stage-ink: #475569;
}
html.sd .int-kpis .kpi-tile {
  --st: var(--stage, var(--accent));
  position: relative;
  min-height: 112px;
  padding: 16px 44px 16px 18px;
  gap: 6px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--st) 26%, var(--line));
  background: linear-gradient(145deg, color-mix(in srgb, var(--st) 13%, var(--card)) 0%, var(--card) 66%);
  color: var(--ink);
  text-decoration: none;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 10px 24px -14px rgba(15, 23, 42, 0.28);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}
html.sd[data-theme='dark'] .int-kpis .kpi-tile {
  border-color: color-mix(in srgb, var(--st) 34%, var(--line));
  background: linear-gradient(145deg, color-mix(in srgb, var(--st) 22%, var(--card)) 0%, var(--card) 72%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 14px 30px -16px rgba(0, 0, 0, 0.7);
}
html.sd .int-kpis .kpi-tile::after {
  content: '';
  position: absolute;
  top: 18px;
  right: 18px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--st);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--st) 20%, transparent);
}
html.sd .int-kpis .kpi-tile > small {
  display: flex;
  align-items: baseline;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}
html.sd .int-kpis .kpi-tile .tile-icon {
  min-width: 1.35em;
  margin-right: 6px;
  text-align: center;
  color: var(--stage-ink, var(--st));
}
html.sd[data-theme='dark'] .int-kpis .kpi-tile .tile-icon {
  color: color-mix(in srgb, var(--st) 70%, #fff);
}
html.sd .int-kpis .kpi-tile b.mono {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.5px;
  color: var(--stage-ink, var(--st));
}
html.sd[data-theme='dark'] .int-kpis .kpi-tile b.mono {
  color: color-mix(in srgb, var(--st) 60%, #fff);
}
html.sd .int-kpis a.kpi-tile:hover,
html.sd .int-kpis a.kpi-tile:focus-visible,
html.sd .int-kpis a.kpi-tile.on {
  border-color: var(--st);
}
html.sd .int-kpis a.kpi-tile.on {
  box-shadow:
    0 0 0 1px var(--st),
    0 10px 24px -14px rgba(15, 23, 42, 0.28);
}
html.sd:not([data-fx='off']) .int-kpis a.kpi-tile:hover,
html.sd:not([data-fx='off']) .int-kpis a.kpi-tile:focus-visible {
  transform: translateY(-4px);
}
/* on a phone the tiles stay two by two and the search keeps the button Filtry beside it, as INTECHI CRM */
@container (max-width: 419px) {
  html.sd .int-kpis.kpi-row.n4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  html.sd .int-kpis.kpi-row.n4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  /* the search and Filtry on one line, the main actions (Ověřit vše, Nové propojení) on the next one */
  html.sd .int-centre .list-bar .filter-box {
    flex-wrap: wrap;
  }
  html.sd .int-centre .list-bar .filter-box .filter-input {
    flex-basis: calc(100% - 120px);
  }
  html.sd .int-centre .list-bar .filter-box .filter-input {
    flex: 1 1 auto;
    min-width: 0;
  }
  html.sd .int-centre .list-bar .filter-box .filter-toggle {
    flex: none;
  }
  html.sd .int-kpis .kpi-tile {
    min-height: 96px;
    padding: 14px 36px 14px 14px;
    border-radius: 16px;
  }
  html.sd .int-kpis .kpi-tile::after {
    top: 15px;
    right: 14px;
    width: 10px;
    height: 10px;
  }
  html.sd .int-kpis .kpi-tile b.mono {
    font-size: 24px;
  }
}
/* the names of the connections and the callers are left-aligned, as in INTECHI CRM */
html.sd .int-table th.l,
html.sd .int-table td.l {
  text-align: left;
}
html.sd .int-centre .list-bar {
  margin: 0;
}
html.sd .int-centre .fp-chip a {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: inherit;
}
html.sd .int-centre .int-pager:empty {
  display: none;
}
/* the actions of a connection (on the left of its row): the shared icon buttons side by side, each action always in the same place
   (an empty slot where a connection has no such action), never wrapped under each other */
html.sd .int-acts {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  vertical-align: middle;
}
html.sd .int-acts .int-form {
  display: contents;
}
html.sd .int-slot {
  display: inline-block;
  width: var(--sd-action-size, 30px);
  height: var(--sd-action-size, 30px);
  flex: none;
}
html.sd .int-acts [aria-disabled='true'] {
  opacity: 0.45;
  cursor: not-allowed;
}
/* the explanation of a button in the first column opens to the right (to the left it would be cut by the edge of the table) */
html.sd .int-acts [data-hint]:hover::after,
html.sd .int-acts [data-hint]:focus-visible::after {
  left: 0;
  right: auto;
}
/* the way back from the page of one connection to the centre */
html.sd .int-crumb {
  margin: 0;
}
html.sd .int-crumb a {
  font-weight: 600;
}
html.sd .int-table .badge {
  white-space: nowrap;
}
html.sd .int-table td {
  vertical-align: middle;
}
/* a word is never split in the middle ("neověřeno", "implementováno"); only a long address may break, where a path allows it */
html.sd .int-table th,
html.sd .int-table td,
html.sd .int-table td .note {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}
html.sd .fn-table .fn-call {
  font-size: 12px;
  overflow-wrap: anywhere;
}
@media (min-width: 641px) {
  html.sd .fn-table td:nth-child(5) {
    min-width: 170px;
  }
}
/* the columns of the list: the actions as wide as their buttons (the shared rule of td.act below), the rest by their content; NO fixed
   layout (the owner, 26. 11. 2026: with fixed widths the fourth button lay over the name „Merlin“ and Propojení ran over Směr) */
html.sd .int-list-table td:nth-child(7) {
  overflow-wrap: anywhere;
}
/* a phone: the cards of the shared stacked table; a long text under its label takes the whole line */
@media (max-width: 640px) {
  html.sd .int-table td[data-label] {
    overflow-wrap: anywhere;
  }
  html.sd .int-acts {
    margin-left: auto;
  }
}
html.sd .int-table .note {
  margin: 2px 0 0;
}
html.sd .int-list,
html.sd .int-states {
  list-style: none;
  padding: 0;
  margin: 0;
}
html.sd .int-list li,
html.sd .int-states li {
  margin: 6px 0;
}
html.sd .int-key {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
html.sd .int-key.int-off {
  opacity: 0.7;
}
html.sd .int-key-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
html.sd .int-dl {
  display: grid;
  grid-template-columns: minmax(120px, max-content) 1fr;
  gap: 4px 16px;
  margin: 0;
  font-size: 14px;
}
html.sd .int-dl dt {
  color: var(--muted);
}
html.sd .int-dl dd {
  margin: 0;
}
html.sd .int-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 14px;
}
html.sd .int-meta label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  flex: 1 1 160px;
  min-width: 0;
}
html.sd .int-meta .btn {
  flex: none;
}
@media (max-width: 640px) {
  html.sd .int-dl {
    grid-template-columns: 1fr;
  }
  html.sd .int-dl dt {
    margin-top: 6px;
  }
}
html.sd .int-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 0;
}
html.sd .int-check input {
  margin-top: 3px;
  flex: none;
}
html.sd .int-check > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
html.sd .int-check .note {
  margin: 0;
}
html.sd .int-fs {
  border: 0;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
html.sd .int-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 13px;
}
/* the stepper of a guide (src/views/connections.ts steps): a round dot with the icon of the step, the steps done green with a tick, the current
   one in the colour of the accent and bold, the next ones muted; on a phone the steps wrap */
html.sd .int-steps.stepper {
  list-style: none;
  padding: 0;
  gap: 8px 18px;
  font-size: 14px;
}
html.sd .stepper li {
  display: flex;
  align-items: center;
  gap: 8px;
}
html.sd .stepper .step-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--soft2);
  font-size: 12px;
  flex: none;
}
html.sd .stepper .step-done {
  color: var(--sd-action-green-ink);
}
html.sd .stepper .step-done .step-dot {
  background: var(--sd-action-green-bg);
  border-color: var(--sd-action-green-line);
}
html.sd .stepper .step-now {
  color: var(--accent);
  font-weight: 700;
}
html.sd .stepper .step-now .step-dot {
  border-color: var(--accent);
  background: var(--card);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
/* the icon before the words of a choice of the guide (a chip of the application, an area, a switch, a note) */
html.sd .int-centre .chip > .fa-solid,
html.sd .int-centre .int-check b > .fa-solid,
html.sd .int-centre .note > .fa-solid:first-child,
html.sd .int-centre legend > .fa-solid:first-child {
  margin-right: 6px;
}
/* „Zpět na …“ is a button with the arrow back (the owner, 26. 11. 2026), the same on every page */
html.sd .back-btn {
  display: inline-flex;
  align-items: center;
}
html.sd .int-preview {
  border-color: var(--sd-action-blue-line);
}
html.sd .btn.int-danger {
  color: var(--sd-action-red-ink);
  border-color: var(--sd-action-red-line);
}

/* ---- the administration of a bot (Fred here, Johny in the CRM; the principle of Jarvis in Smart, src/views/fredAdmin.ts): the head, the tabs,
   four softly tinted counts, bars by area, compact cards of the skills; the tints are the tokens of the actions, the state is always written ---- */
html.sd .bot-head {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
html.sd .bot-head h2 {
  margin: 0;
}
html.sd .bot-head-text {
  flex: 1 1 280px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
html.sd .bot-head-text .note,
html.sd .bot-head-meta {
  margin: 0;
}
html.sd .bot-head-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
}
html.sd .bot-head-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
html.sd .bot-inline {
  display: inline;
  margin: 0;
}
html.sd .bot-head .btn .fa-solid,
html.sd .bot-card-acts .btn .fa-solid,
html.sd .bot-todo .btn .fa-solid {
  margin-right: 8px;
}
html.sd .badge.info {
  background: var(--sd-action-blue-bg);
  border-color: var(--sd-action-blue-line);
  color: var(--sd-action-blue-ink);
}
html.sd .bot-mode-autonomy {
  background: var(--sd-action-purple-bg);
  border-color: var(--sd-action-purple-line);
  color: var(--sd-action-purple-ink);
}
html.sd .bot-mode-prepare {
  background: var(--sd-action-blue-bg);
  border-color: var(--sd-action-blue-line);
  color: var(--sd-action-blue-ink);
}
html.sd .bot-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
html.sd .bot-kpi {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  border-radius: var(--sd-radius-xl);
  border: 1px solid;
  text-decoration: none;
  min-width: 0;
}
html.sd .bot-kpi:focus-visible {
  outline: 2px solid var(--sd-action-focus, currentColor);
  outline-offset: 2px;
}
html.sd .bot-kpi-label {
  font-size: 13px;
  font-weight: 600;
}
html.sd .bot-kpi-label .fa-solid {
  margin-right: 6px;
}
html.sd .bot-kpi-value {
  font-size: 28px;
  line-height: 1.1;
}
html.sd .bot-kpi-note {
  font-size: 12px;
  opacity: 0.85;
}
/* the tint of a count (two classes: a count is a link, and the colour of the links must not cover it) */
html.sd .bot-kpi.bot-kpi-blue {
  background: var(--sd-action-blue-bg);
  border-color: var(--sd-action-blue-line);
  color: var(--sd-action-blue-ink);
}
html.sd .bot-kpi.bot-kpi-green {
  background: var(--sd-action-green-bg);
  border-color: var(--sd-action-green-line);
  color: var(--sd-action-green-ink);
}
html.sd .bot-kpi.bot-kpi-purple {
  background: var(--sd-action-purple-bg);
  border-color: var(--sd-action-purple-line);
  color: var(--sd-action-purple-ink);
}
html.sd .bot-kpi.bot-kpi-amber {
  background: var(--sd-action-orange-bg);
  border-color: var(--sd-action-orange-line);
  color: var(--sd-action-orange-ink);
}
html.sd .bot-kpis-note {
  margin: 0;
}
html.sd .bot-grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}
html.sd .bot-block h3,
html.sd .bot-block h4 {
  margin: 0;
}
html.sd .bot-block .note {
  margin: 0;
}
html.sd .bot-block-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
html.sd .bot-bars,
html.sd .bot-todo,
html.sd .bot-recent,
html.sd .bot-seen,
html.sd .bot-deps,
html.sd .bot-checks,
html.sd .bot-rights {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* the name and the count on one line, the bar under them across the block (readable in half of the page and on a phone) */
html.sd .bot-bars li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 12px;
}
html.sd .bot-bars .bot-bar {
  grid-column: 1 / -1;
  grid-row: 2;
}
html.sd .bot-bar-name .fa-solid {
  margin-right: 6px;
}
html.sd .bot-bar {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: var(--sd-action-neutral-bg);
  border: 1px solid var(--sd-action-neutral-line);
  overflow: hidden;
}
html.sd .bot-bar span {
  display: block;
  height: 100%;
  background: var(--sd-action-green-ink);
}
html.sd .bot-bar-val {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
html.sd .bot-res {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 14px;
}
html.sd .bot-res b {
  font-size: 18px;
}
html.sd .bot-res-rate {
  color: var(--muted);
}
html.sd .bot-todo li,
html.sd .bot-recent li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
}
html.sd .bot-recent li {
  justify-content: flex-start;
}
html.sd .bot-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 12px;
}
html.sd .bot-filters label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  flex: 1 1 150px;
  min-width: 0;
}
html.sd .bot-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  align-items: start;
}
html.sd .bot-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--sd-radius-xl);
  background: var(--card);
}
html.sd .bot-card-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
html.sd .bot-card-head h3,
html.sd .bot-card-head h4,
html.sd .bot-card-head .note {
  margin: 0;
}
html.sd .bot-card-ico {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: var(--sd-action-radius, 8px);
  background: var(--sd-action-blue-bg);
  border: 1px solid var(--sd-action-blue-line);
  color: var(--sd-action-blue-ink);
}
html.sd .bot-badges,
html.sd .bot-card-acts,
html.sd .bot-modes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}
html.sd .bot-card-res {
  margin: 0;
}
html.sd .bot-ops th,
html.sd .bot-ops td,
html.sd .bot-kinds th,
html.sd .bot-kinds td {
  text-align: left;
  vertical-align: middle;
}
html.sd .bot-dl {
  display: grid;
  grid-template-columns: minmax(140px, max-content) 1fr;
  gap: 4px 16px;
  margin: 0;
}
html.sd .bot-dl dt {
  color: var(--muted);
}
html.sd .bot-dl dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
html.sd .bot-sub {
  margin: 8px 0 0;
}
html.sd .bot-empty {
  padding: 16px 0;
}
@media (max-width: 900px) {
  html.sd .bot-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  html.sd .bot-grid2 {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  html.sd .bot-dl {
    grid-template-columns: 1fr;
  }
  html.sd .bot-dl dt {
    margin-top: 6px;
  }
  html.sd .bot-head-acts .btn,
  html.sd .bot-head-acts form {
    width: 100%;
  }
  html.sd .bot-head-acts form .btn {
    width: 100%;
  }
}
/* a long state (a block with the missing connection) wraps instead of running out of a card on a phone */
html.sd .bot-page .badge {
  white-space: normal;
  max-width: 100%;
  overflow-wrap: anywhere;
}

/* ---- the requests of Fred (src/views/fredRequest.ts): the scopes and the states are chips, the decision is a row of buttons, an edit or a
   reason opens under its button; one gap between an icon and its text everywhere on the page ---- */
html.sd .bot-page .btn .fa-solid,
html.sd .bot-page .bot-warn .fa-solid {
  margin-right: 8px;
}
html.sd .bot-scopes,
html.sd .bot-states {
  margin-bottom: 4px;
}
html.sd .bot-requests td,
html.sd .bot-requests th {
  vertical-align: middle;
  text-align: left;
}
html.sd .bot-rq-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
html.sd .bot-eff-note {
  margin: 0;
}
html.sd .bot-pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
html.sd .bot-beforeafter h4 {
  margin: 0 0 4px;
}
html.sd .bot-beforeafter p {
  margin: 0;
}
html.sd .bot-warn {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--sd-action-amber-ink, inherit);
}
html.sd .bot-banner {
  margin: 0;
}
html.sd .bot-more {
  display: inline-block;
}
html.sd .bot-more[open] {
  display: block;
  flex-basis: 100%;
}
html.sd .bot-more > summary {
  list-style: none;
  cursor: pointer;
}
html.sd .bot-more > summary::-webkit-details-marker {
  display: none;
}
html.sd .bot-more > form {
  margin-top: 8px;
  max-width: 520px;
}
html.sd .bot-more textarea,
html.sd .bot-more select,
html.sd .bot-more input:not([type='checkbox']):not([type='radio']):not([type='hidden']) {
  width: 100%;
}
html.sd .bot-dev {
  margin-top: 8px;
}
html.sd .bot-dev > summary {
  cursor: pointer;
  color: var(--muted);
}
html.sd .bot-page .stack > .bot-card-acts {
  align-items: flex-start;
}
html.sd .bot-page .bot-requests td .badge {
  white-space: nowrap;
}
html.sd .bot-page .bot-requests td:last-child {
  white-space: nowrap;
}
/* on a phone a request is a small card (the columns would run out of the window) */
@media (max-width: 640px) {
  html.sd .bot-requests,
  html.sd .bot-requests tbody {
    display: block;
  }
  html.sd .bot-requests thead {
    display: none;
  }
  html.sd .bot-requests tr {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line, rgba(128, 128, 128, 0.25));
  }
  html.sd .bot-requests td {
    display: block;
    padding: 0;
    border: 0;
  }
  /* the decision about a request (src/views/fredRequest.ts): every button and every opener of a form is at least 44 px high for a finger */
  html.sd #rq-decision .btn {
    min-height: 44px;
  }
}

/* ---- the operations of the register (tab Schopnosti › Operace, src/views/fredOps.ts): the switch of the view, the counts by the mode set
   apart from the states, a dense table grouped by area (a card per operation on a phone); names, purposes and reasons always wrap, they
   are never cut short ---- */
html.sd .bot-view {
  margin-bottom: 4px;
}
html.sd .badge.bot-om-observe {
  background: var(--sd-action-blue-bg);
  border-color: var(--sd-action-blue-line);
  color: var(--sd-action-blue-ink);
}
html.sd .badge.bot-om-prepare {
  background: var(--sd-action-orange-bg);
  border-color: var(--sd-action-orange-line);
  color: var(--sd-action-orange-ink);
}
html.sd .badge.bot-om-auto {
  background: var(--sd-action-purple-bg);
  border-color: var(--sd-action-purple-line);
  color: var(--sd-action-purple-ink);
}
html.sd .badge.bot-om-off {
  border-style: solid;
}
html.sd .bot-kpi.bot-kpi-neutral {
  background: var(--sd-action-neutral-bg);
  border-color: var(--sd-action-neutral-line);
  color: var(--sd-action-neutral-ink);
}
html.sd .bot-kpi.bot-kpi-red {
  background: var(--sd-action-red-bg);
  border-color: var(--sd-action-red-line);
  color: var(--sd-action-red-ink);
}
html.sd .bot-kpi.bot-kpi-grey {
  background: var(--sd-action-grey-bg);
  border-color: var(--sd-action-grey-line);
  color: var(--sd-action-grey-ink);
}
html.sd .bot-opsum {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
html.sd .bot-opsum-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
html.sd .bot-opsum-title {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
html.sd .bot-kpis.bot-kpis-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
html.sd .bot-ops-explain {
  margin: 0;
}
html.sd .bot-ops-filters .bot-ops-check,
html.sd .bot-ops-check {
  flex-direction: row;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  display: inline-flex;
  font-size: 14px;
}
html.sd .bot-ops-reset {
  align-self: center;
}
html.sd .bot-ops-bulk {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 12px;
}
html.sd .bot-ops-bulk label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}
html.sd .bot-ops-bulk .bot-ops-selall {
  align-self: center;
}
html.sd .bot-ops-bulk .note {
  flex-basis: 100%;
}
html.sd .bot-oplist td,
html.sd .bot-oplist th {
  vertical-align: middle;
}
html.sd .bot-oplist .bot-ops-area th {
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
}
html.sd .bot-ops-name {
  font-weight: 600;
  overflow-wrap: anywhere;
}
html.sd .bot-ops-purpose {
  display: block;
  margin: 2px 0 0;
  white-space: normal;
  overflow-wrap: anywhere;
  min-width: 180px;
}
html.sd .bot-ops-why {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
html.sd .bot-oplist td .note {
  display: block;
  margin: 2px 0 0;
}
/* a badge of the table keeps its words whole (a mode, an effect); the reasons and the purpose have room and wrap at the spaces */
html.sd .bot-page .bot-oplist .badge {
  white-space: nowrap;
  overflow-wrap: normal;
}
html.sd .bot-oplist td.bot-ops-eff {
  min-width: 180px;
}
html.sd .bot-oplist td.bot-ops-when {
  min-width: 120px;
}
html.sd .bot-oplist td.bot-ops-when > span {
  display: block;
}
html.sd .bot-ops-filters > label:not(.bot-ops-check) {
  max-width: 280px;
}
html.sd .bot-oplist .bot-ops-pick,
html.sd .bot-oplist .bot-ops-act {
  width: 1%;
  white-space: nowrap;
}
html.sd .bot-ops-edit {
  max-width: 760px;
}
html.sd .bot-ops-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  min-width: 0;
}
html.sd .bot-ops-edit > .bot-ops-field {
  max-width: 320px;
}
html.sd .bot-ops-set {
  border: 1px solid var(--line);
  border-radius: var(--sd-radius-lg);
  padding: 12px 16px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
html.sd .bot-ops-set legend {
  padding: 0 4px;
  font-weight: 600;
}
html.sd .bot-ops-set .note {
  margin: 0;
}
html.sd .bot-ops-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 12px;
}
html.sd .bot-ops-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}
@media (max-width: 900px) {
  html.sd .bot-opsum {
    grid-template-columns: 1fr;
  }
  html.sd .bot-ops-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* on a phone an operation is a small card: every value under its own label, the name and its purpose in full */
@media (max-width: 640px) {
  html.sd .bot-oplist,
  html.sd .bot-oplist tbody {
    display: block;
  }
  html.sd .bot-oplist thead {
    display: none;
  }
  html.sd .bot-oplist tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }
  html.sd .bot-oplist tr.bot-ops-area {
    display: block;
    padding: 8px 0 0;
  }
  html.sd .bot-oplist td:first-child,
  html.sd .bot-oplist td.bot-ops-wide,
  html.sd .bot-oplist td.bot-ops-eff {
    grid-column: 1 / -1;
  }
  html.sd .bot-oplist td.bot-ops-act {
    align-self: end;
    justify-self: end;
    width: auto;
  }
  html.sd .bot-oplist td.bot-ops-pick {
    width: auto;
  }
  html.sd .bot-oplist td,
  html.sd .bot-oplist th {
    display: block;
    padding: 0;
    border: 0;
    width: auto;
    white-space: normal;
  }
  html.sd .bot-oplist td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
  }
  html.sd .bot-oplist td.bot-ops-pick {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  html.sd .bot-oplist td.bot-ops-pick::before {
    display: inline;
  }
  html.sd .bot-ops-purpose,
  html.sd .bot-oplist td.bot-ops-eff,
  html.sd .bot-oplist td.bot-ops-when {
    min-width: 0;
  }
  html.sd .bot-ops-filters > label:not(.bot-ops-check) {
    max-width: none;
  }
  html.sd .bot-ops-grid {
    grid-template-columns: 1fr;
  }
  html.sd .bot-ops-field input[type='time'] {
    min-height: 44px;
  }
  html.sd .bot-kpis.bot-kpis-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---- About the app (src/views/about.ts): the same concept and order as About the app in Smart and CRM. A card with a heading per part,
   rows label-value with muted labels, plain tables with a head row; no framed box of chips, no coloured bars. On a phone a table is a list
   of label-value rows and the value of a cell is one block that wraps as a whole (a text with the badge "Not documented" never overflows). ---- */
html.sd .ab-page {
  display: flex;
  flex-direction: column;
  gap: var(--sd-space-3);
  min-width: 0;
}
/* the search hides a row, a group and a card even where a rule of the phone sets its own display */
html.sd .ab-page [hidden] {
  display: none !important;
}
html.sd .ab-caption {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
}
html.sd .ab-head h2 {
  margin: 2px 0 0;
  font-size: 26px;
  line-height: 1.25;
}
html.sd .ab-head p {
  margin: 4px 0 0;
}
html.sd .ab-muted {
  color: var(--muted);
}
html.sd .ab-search {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px 16px;
}
html.sd .ab-search input {
  flex: 1 1 280px;
  min-width: 0;
  max-width: 560px;
  padding-inline: 12px;
  font: inherit;
}
html.sd .ab-body,
html.sd .ab-card {
  display: flex;
  flex-direction: column;
  gap: var(--sd-space-3);
  min-width: 0;
}
html.sd .ab-card > h3 {
  margin: 0;
  font-size: 18px;
}
/* a group inside a card: the heading and its content closer to each other than the groups among themselves */
html.sd .ab-group {
  display: grid;
  gap: 8px;
  min-width: 0;
}
html.sd .ab-group > * {
  margin: 0;
  min-width: 0;
}
html.sd .ab-group > h4 {
  font-size: 15px;
}
html.sd .ab-card p {
  margin: 0;
}
html.sd .ab-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 2px;
}
html.sd .ab-dl {
  display: grid;
  grid-template-columns: minmax(160px, max-content) 1fr;
  gap: 4px 24px;
  margin: 0;
}
/* a pair is wrapped for the search; the grid of the list stays */
html.sd .ab-dl > div {
  display: contents;
}
html.sd .ab-dl dt {
  color: var(--muted);
}
html.sd .ab-dl dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
html.sd .ab-card code {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
}
html.sd .ab-tablewrap {
  min-width: 0;
}
html.sd .ab-table {
  width: 100%;
  border-collapse: collapse;
}
html.sd .ab-table th,
html.sd .ab-table td {
  text-align: left;
  vertical-align: middle;
}
/* on a wide screen a long word breaks only when it must (an address keeps its column); on a phone anywhere (see below) */
html.sd .ab-table .ab-v {
  display: block;
  min-width: 0;
  overflow-wrap: break-word;
}
html.sd .ab-table .ab-v .badge {
  white-space: normal;
  max-width: 100%;
  min-height: 22px;
}
@media (max-width: 900px) {
  html.sd .ab-table,
  html.sd .ab-table tbody {
    display: block;
  }
  html.sd .ab-table thead {
    display: none;
  }
  html.sd .ab-table tr {
    display: block;
  }
  html.sd .ab-table tr + tr {
    margin-top: 12px;
    border-top: 1px solid var(--line);
  }
  html.sd .ab-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
  }
  html.sd .ab-table td::before {
    content: attr(data-label);
    flex: none;
    max-width: 42%;
    color: var(--muted);
  }
  html.sd .ab-table td > .ab-v {
    flex: 1 1 auto;
    text-align: right;
    overflow-wrap: anywhere;
  }
}
@media (max-width: 640px) {
  html.sd .ab-dl {
    grid-template-columns: 1fr;
    gap: 0;
  }
  html.sd .ab-dl dt {
    margin-top: 8px;
  }
  html.sd .ab-dl > div:first-child dt {
    margin-top: 0;
  }
  html.sd .ab-search input {
    flex-basis: 100%;
    max-width: none;
  }
}
/* links on the page as in Smart: in the colour of the link, underlined under the pointer only */
html.sd .ab-page a:not(.btn):not(.kpi-tile) {
  text-decoration: none;
}
html.sd .ab-page a:not(.btn):not(.kpi-tile):not(.tile):not(.chip):not(.badge):not(.pay-chip):hover,
html.sd .ab-page a:not(.btn):not(.kpi-tile):not(.tile):not(.chip):not(.badge):not(.pay-chip):focus-visible {
  text-decoration: underline;
}

/* ---- the icons of the menu come alive when the mouse is over the item (computer only, not on a phone, and not for people who ask for less motion):
   every icon has its own small move (a house hops, a scale rocks, a pie turns, an envelope turns over...); the move runs on the icon only.
   Only with the animation effects on (html[data-fx="on"], the owner, 24. 11. 2026), never by prefers-reduced-motion (theme-init.js asks the device
   when the person chose nothing) ---- */
@media (hover: hover) and (pointer: fine) {
  html.sd[data-fx='on'] .nav a .nav-ico {
    display: inline-block;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform;
  }
  html.sd[data-fx='on'] .nav a:hover .fa-house {
    transform: translateY(-3px);
  }
  html.sd[data-fx='on'] .nav a:hover .fa-fred {
    transform: rotate(-12deg) scale(1.12);
  }
  html.sd[data-fx='on'] .nav a:hover .fa-chart-column,
  html.sd[data-fx='on'] .nav a:hover .fa-chart-simple {
    transform: scaleY(1.25);
    transform-origin: 50% 100%;
  }
  html.sd[data-fx='on'] .nav a:hover .fa-chart-line {
    transform: translate(2px, -2px) scale(1.1);
  }
  html.sd[data-fx='on'] .nav a:hover .fa-file-lines {
    transform: translateY(-2px) rotate(-6deg);
  }
  html.sd[data-fx='on'] .nav a:hover .fa-clipboard-check {
    transform: translateY(-2px) scale(1.12);
  }
  html.sd[data-fx='on'] .nav a:hover .fa-address-book {
    transform: perspective(60px) rotateY(180deg);
  }
  html.sd[data-fx='on'] .nav a:hover .fa-arrow-trend-down {
    transform: translate(2px, 2px);
  }
  html.sd[data-fx='on'] .nav a:hover .fa-user-tie {
    transform: rotate(10deg) translateY(1px);
  }
  html.sd[data-fx='on'] .nav a:hover .fa-percent {
    transform: rotate(180deg);
  }
  html.sd[data-fx='on'] .nav a:hover .fa-receipt {
    transform: translateY(3px);
  }
  html.sd[data-fx='on'] .nav a:hover .fa-landmark {
    transform: scale(1.18);
  }
  html.sd[data-fx='on'] .nav a:hover .fa-boxes-stacked {
    transform: translateY(-3px) scale(1.08);
  }
  html.sd[data-fx='on'] .nav a:hover .fa-hand-holding-dollar {
    transform: translateY(-3px);
  }
  html.sd[data-fx='on'] .nav a:hover .fa-right-left {
    transform: scaleX(-1);
  }
  html.sd[data-fx='on'] .nav a:hover .fa-chart-pie {
    transform: rotate(90deg);
  }
  html.sd[data-fx='on'] .nav a:hover .fa-scale-balanced {
    transform: rotate(-14deg);
    transform-origin: 50% 20%;
  }
  html.sd[data-fx='on'] .nav a:hover .fa-envelope {
    transform: perspective(60px) rotateX(360deg);
    transition-duration: 0.6s;
  }
  html.sd[data-fx='on'] .nav a:hover .fa-calendar-days {
    transform: perspective(60px) rotateX(-180deg);
  }
  html.sd[data-fx='on'] .nav a:hover .fa-bars-staggered {
    transform: scaleX(1.25);
    transform-origin: 0 50%;
  }
  html.sd[data-fx='on'] .nav a:hover .fa-circle-info,
  html.sd[data-fx='on'] .nav a:hover .fa-circle-question {
    transform: scale(1.22);
  }
  html.sd[data-fx='on'] .nav a:hover .fa-play {
    transform: translateX(3px);
  }
  html.sd[data-fx='on'] .nav a:hover .fa-sliders {
    transform: rotate(90deg);
  }
  html.sd[data-fx='on'] .nav a:hover .fa-credit-card {
    transform: rotate(-10deg) translateY(-1px);
  }
}

/* the picture of the menu item at the heading of a page, and in the trail when the heading has none */
html.sd .title-icon { display:inline-flex; margin-right:10px; color:var(--accent); vertical-align:baseline; }
html.sd .title-icon .nav-ico { width:auto; font-size:0.95em; }
html.sd .crumbs .title-icon { margin-right:6px; }

/* the picture in front of the words of a button */
html.sd .btn-lead { margin-right:8px; font-size:0.95em; }

/* nothing on a page is underlined: a link is told by its colour */
html.sd a, html.sd a:hover, html.sd a:focus-visible { text-decoration:none; }
html.sd main a:not(.btn):not(.chip):hover { filter:brightness(0.85); }

/* a column stands on one axis: its heading in the middle over its values in the middle; a row label (th of the body) and a line over the
   whole table (a month) stay at the left. On a phone the tables are cards with their own order. */
@media (min-width:861px) {
  html.sd main table:not(.inv-sheet table) > thead > tr > th,
  html.sd main table:not(.inv-sheet table) > tbody > tr > td,
  html.sd main table:not(.inv-sheet table) > tfoot > tr > td,
  html.sd main table.stm:not(.inv-sheet table) > thead > tr > th.num,
  html.sd main table.stm:not(.inv-sheet table) > tbody > tr > td.num,
  html.sd main table.stm:not(.inv-sheet table) > tfoot > tr > td.num {
    text-align:center;
  }
  html.sd main table:not(.inv-sheet table) > tbody > tr > td[colspan] { text-align:left; }
  html.sd main table:not(.inv-sheet table) > tbody > tr > td > .row { justify-content:center; }
}

/* the name of a company is written as it is ("s.r.o." in small letters), not in the capitals of a row label */
html.sd table.contacts tbody th { text-transform:none; letter-spacing:0; font-size:13px; }

/* the picture of a folded card */
html.sd details.card.fold > summary > .fold-icon { flex:none; width:1.25em; text-align:center; margin-right:10px; color:var(--accent); font-size:0.9em; }

/* the pictures of the headings and of the names of fields (src/views/buttonTone.ts) */
html.sd .head-icon { margin-right:10px; color:var(--accent); font-size:0.85em; }
html.sd .field-icon { margin-right:6px; color:var(--accent); font-size:0.9em; }
html.sd .fp-btn::before { content:"\f07c"; font-family:"Font Awesome 6 Free"; font-weight:900; margin-right:8px; }
html.sd .person-list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:6px; }
html.sd .person-list .fa-solid { margin-right:6px; color:var(--accent); }
html.sd .person-list a { margin-left:14px; display:inline-flex; align-items:center; }
@media (pointer:coarse) { html.sd .person-list a { min-height:44px; margin-left:0; } }
html.sd .loan-bank { display:inline-flex; vertical-align:middle; margin-right:8px; }
/* the accounts of Cash flow: the account lies on the left and takes the room, the numbers and the months share the rest */
html.sd table.cf-accounts { width:100%; table-layout:fixed; }
html.sd table.cf-accounts th:first-child, html.sd table.cf-accounts td:first-child { text-align:left !important; width:50%; }
@media (max-width:640px) { html.sd table.cf-accounts { table-layout:auto; } html.sd table.cf-accounts th:first-child, html.sd table.cf-accounts td:first-child { width:auto; } }
/* the matrix of the permissions: the name of the part of the menu (with its picture) is a row label and stays at the left,
   the ticks stay in the middle of their column (the rule above centres every cell of a table on a computer) */
html.sd table.matrix th:first-child, html.sd table.matrix td:first-child { text-align:left !important; }
html.sd .rem-more::before { content:"\f078"; font-family:"Font Awesome 6 Free"; font-weight:900; margin-right:8px; font-size:0.85em; }
@media (max-width:640px) {
  html.sd table.cf-accounts td:first-child .note { display:block; white-space:nowrap; font-size:12px; }
  html.sd table.cf-accounts td, html.sd table.cf-accounts th { padding-left:4px; padding-right:4px; }
  html.sd table.cf-accounts td.num { font-size:13px; white-space:nowrap; }
}

/* the button of the public register ARES: light blue, with the name of the register as its mark */
html.sd .btn.btn-ares { background:#e6f0fd; border:1px solid #bcd6f7; color:#0b4f9e; gap:8px; }
html.sd .btn.btn-ares:hover { background:#d6e6fb; }
html.sd .ares-mark { display:inline-block; margin-right:8px; padding:1px 5px; border-radius:4px; background:#0b4f9e; color:#fff; font-size:10px; font-weight:800; letter-spacing:.5px; line-height:14px; }
html.sd[data-theme='dark'] .btn.btn-ares { background:#1c3560; border-color:#2d4f85; color:#b7d0ff; }
html.sd[data-theme='dark'] .ares-mark { background:#b7d0ff; color:#0f1b2d; }
/* the logo of the company in the top line */
html.sd .crumb-logo { width:18px; height:18px; border-radius:50%; margin-right:6px; vertical-align:-4px; }
/* a step of the trail below the part of the menu: its own picture, the same size as the icon of the part */
html.sd .crumb-icon { margin-right:6px; opacity:0.85; }
/* the small box over a chart: quiet, in the colours of the page */
html.sd .tt { background:var(--card); color:var(--ink); border:1px solid var(--line); box-shadow:0 2px 8px rgba(16,24,40,.10); font-size:12px; padding:6px 9px; }
html.sd .tt-row b { color:var(--ink); }
html.sd .tt-title { font-weight:600; opacity:.7; margin-bottom:2px; }
/* the state of the backup in its tile of the administration: a small dot, breathing gently */
html.sd .backup-dot-sm { display:inline-block; width:9px; height:9px; border-radius:50%; margin-right:8px; vertical-align:1px; background:#2E9E6B; animation:backup-breath 3s ease-in-out infinite; }
html.sd .backup-dot-sm.soon { background:#E0A030; }
html.sd .backup-dot-sm.stale { background:#D9453D; }
@media (prefers-reduced-motion: reduce) { html.sd .backup-dot-sm { animation:none; } }
/* the zoom of the page: the menu keeps the whole height of the window, its profile stays at the bottom */
@media (min-width: 861px) {
  html.sd .side { height:calc(100vh / var(--page-zoom, 1)); }
  html.sd .shell { min-height:calc(100vh / var(--page-zoom, 1)); }
}
/* the roles: rounded clouds in their own colours, so that they are not taken for the firms, which keep their rectangles and logos */
html.sd .role-pill { display:inline-flex; align-items:center; gap:6px; min-height:28px; padding:2px 12px; border-radius:999px; font-weight:600; font-size:13px; background:var(--rp-bg); color:var(--rp-fg); }
html.sd .rc-amber { --rp-bg:#fdf0cf; --rp-fg:#855d00; }
html.sd .rc-rose { --rp-bg:#fde2e4; --rp-fg:#a3213a; }
html.sd .rc-sky { --rp-bg:#d9f1fb; --rp-fg:#0b6480; }
html.sd .rc-lime { --rp-bg:#ecf6c9; --rp-fg:#566b00; }
html.sd .rc-orange { --rp-bg:#ffe7d1; --rp-fg:#a34a00; }
html.sd .rc-pink { --rp-bg:#fbe0f2; --rp-fg:#9b1c75; }
html.sd .rc-slate { --rp-bg:#e6eaf0; --rp-fg:#3d4b5f; }
html.sd .rc-green { --rp-bg:#d7f3e1; --rp-fg:#14633b; }
/* the pencil of "Rozpracováno": mirrored, so its point is at the bottom left and its end at the top right */
/* the picture in a pill of a bar of tabs: a little in front of the words, never louder than them */
html.sd .chip-ico { margin-right:6px; opacity:0.85; }
/* The switch of the look says where it goes, by its colour: the moon (a click turns the dark mode on) is in the colour
   of the dark mode, the sun (a click turns the light one on) in the warm colour of the light one. Under the pointer and
   on the keyboard both take the colour of the firm, as every other tool of the top line. */
html.sd .theme-toggle .moon { color:#1E2A3A; }
html.sd .theme-toggle .sun { color:#E0A030; }
html.sd .theme-toggle:hover .moon, html.sd .theme-toggle:hover .sun,
html.sd .theme-toggle:focus-visible .moon, html.sd .theme-toggle:focus-visible .sun { color:var(--accent); }
/* the switch to the dark mode: a black button with a white moon (the owner, 8. 11. 2026; the same in the CRM) */
html.sd:not([data-theme="dark"]) .theme-toggle,
html.sd:not([data-theme="dark"]) .theme-toggle:hover,
html.sd:not([data-theme="dark"]) .theme-toggle:focus-visible { background:#111827; border-color:#111827; }
html.sd:not([data-theme="dark"]) .theme-toggle .moon,
html.sd:not([data-theme="dark"]) .theme-toggle:hover .moon,
html.sd:not([data-theme="dark"]) .theme-toggle:focus-visible .moon { color:#ffffff; }
html.sd:not([data-theme="dark"]) .theme-toggle:hover { box-shadow:0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent); }
html.sd .sign-flip { display:inline-block; transform:scaleX(-1); }
html.sd .rc-indigo { --rp-bg:#e0e3fb; --rp-fg:#333a9e; }
html.sd .rc-violet { --rp-bg:#eadffb; --rp-fg:#6327a6; }
html.sd .rc-plum { --rp-bg:#f0dceb; --rp-fg:#7a2a57; }
html.sd .rc-red { --rp-bg:#fbdbd8; --rp-fg:#a32a1e; }
html.sd .rc-teal { --rp-bg:#d2f1ec; --rp-fg:#0f6b5f; }
html.sd .rc-brown { --rp-bg:#eee0d2; --rp-fg:#7a4a1e; }
html.sd .rc-stone { --rp-bg:#eae6e0; --rp-fg:#554e46; }
html.sd .rc-mint { --rp-bg:#d8f6ea; --rp-fg:#0d6b52; }
html.sd .rc-blue { --rp-bg:#dbe7fd; --rp-fg:#1d4fb8; }
html.sd .rc-cyan { --rp-bg:#d3f3f8; --rp-fg:#0b6170; }
html.sd .rc-yellow { --rp-bg:#fbf3c2; --rp-fg:#6b5a00; }
html.sd .rc-purple { --rp-bg:#efe0fa; --rp-fg:#7a2bb0; }
html.sd .rc-grey { --rp-bg:#ececec; --rp-fg:#474747; }
html.sd .rc-olive { --rp-bg:#ecedd5; --rp-fg:#56561a; }
html.sd .rc-coral { --rp-bg:#ffe1d9; --rp-fg:#a8361c; }
html.sd .rc-navy { --rp-bg:#dde3ef; --rp-fg:#22355e; }
html.sd[data-theme='dark'] .role-pill { background:color-mix(in srgb, var(--rp-fg) 45%, #0f1b2d); color:#fff; }
html.sd .role-palette { display:flex; flex-wrap:wrap; gap:8px; }
html.sd .role-swatch { width:32px; height:32px; border-radius:50%; background:var(--rp-bg); border:2px solid var(--rp-fg); cursor:pointer; display:inline-grid; place-items:center; }
html.sd .role-swatch input { appearance:none; margin:0; padding:0; width:100%; height:100%; min-height:0; border:0; border-radius:50%; cursor:pointer; background:transparent; }
html.sd .role-swatch input:checked { background:radial-gradient(circle, var(--rp-fg) 0 35%, transparent 37%); }
html.sd .role-swatch input:focus-visible { outline:3px solid #F59331; outline-offset:2px; }
@media (pointer:coarse) { html.sd .role-swatch { width:44px; height:44px; } }
html.sd .firm-mini { width:22px; height:22px; border-radius:50%; margin-right:6px; background:#fff; flex:none; vertical-align:middle; }
html.sd .firm-chip { display:inline-flex; align-items:center; }
html.sd .tile-icon { margin-right:8px; color:var(--accent); }
/* the button that adds (Nová faktura, Přidat…, Nahrát…) stands on the LEFT of every overview, in all three applications (the owner,
   27. 11. 2026, the same as INTECHI CRM public/css/shared.css): the free place of a heading said by the top line takes no room */
html.sd .title-gone { display:none; }
html.sd .toolbar { justify-content:flex-start; }
/* a chart over the whole width keeps the size of its letters */
html.sd .chart .svg { max-height:340px; }
/* the reminders in one block: the day has its own column, the names begin one under the other */
/* the text of a reminder keeps at least 16rem when the actions grow (an opened field for the copy, 10. 11. 2026): the buttons wrap instead */
@media (min-width: 861px) { html.sd .reminder { grid-template-columns:190px minmax(16rem, 1fr) minmax(0, max-content); } }
/* one axis: the picture and the words of a heading, a field and a tile lie on one line; the pictures of tiles have one width */
html.sd h2:has(> .head-icon), html.sd h3:has(> .head-icon), html.sd h4:has(> .head-icon) { display:flex; align-items:center; }
html.sd .field-name { display:inline-flex; align-items:center; }
html.sd .tile b { display:flex; align-items:center; }
html.sd .tile b .head-icon, html.sd .tile b .tile-icon { flex:none; width:auto; min-width:1.35em; margin-right:10px; display:inline-flex; justify-content:center; align-items:center; }
html.sd .tile b .tile-icon .nav-ico { width:auto; margin:0; }
html.sd summary > .head-icon { vertical-align:0.05em; }
html.sd .crumbs a, html.sd .crumbs b { display:inline-flex; align-items:center; }
html.sd .crumbs .title-icon { align-items:center; }
/* the name of the company in the top line has the colour of its logo */
html.sd .crumbs li:first-child a { color:var(--accent); }
/* the name of the company in the top line in the dark look: the colour of the firm lightened to a contrast of at least 4.5:1 */
html.sd[data-theme='dark'] .crumbs li:first-child a {
  color: color-mix(in srgb, var(--accent) 62%, #fff);
}
/* the dot of the backup breathes visibly, gently */
html.sd .backup-dot-sm { animation:backup-breath 2.4s ease-in-out infinite; }
html.sd .backup-chip { display:inline-block; margin-top:6px; font-size:13px; padding:3px 10px; }
html.sd .crumbs li { display:inline-flex; align-items:center; }
html.sd .doc-note { white-space:normal; overflow:visible; max-width:280px; overflow-wrap:anywhere; }
/* The choice of a colour (src/views/colorPick.ts, the same as in the CRM; the owner, 9. 11. 2026): a button with the palette and a dot of the
   chosen colour, opening a grid of the 24 colours of the roles over the page (public/js/colorpick.js places it and closes it). */
html.sd details.cpick { position:relative; display:inline-block; }
html.sd details.cpick > summary { list-style:none; }
html.sd details.cpick > summary::-webkit-details-marker { display:none; }
html.sd .cpick-btn { display:inline-flex; align-items:center; gap:8px; min-height:44px; cursor:pointer; }
html.sd .cpick-btn .fa-palette { color:var(--accent); }
html.sd .cpick-dot { display:inline-block; width:18px; height:18px; border-radius:50%; background:var(--rp-bg); border:2px solid var(--rp-fg); }
html.sd details.cpick .cpick-pop { position:absolute; z-index:70; top:calc(100% + 6px); left:0; width:max-content; max-width:min(320px, calc(100vw - 32px)); display:grid; grid-template-columns:repeat(5, 32px); gap:8px; padding:12px; background:var(--card); border:1px solid var(--line); border-radius:12px; box-shadow:0 12px 32px rgb(15 23 42 / 18%); }
@media (pointer:coarse) { html.sd details.cpick .cpick-pop { grid-template-columns:repeat(5, 44px); } }

/* Správa › AI (stejně jako CRM, public/css/leads.css a shared.css): karta na funkci, útrata měsíce proti limitu, ikona AI */
html.sd .ai-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
html.sd .ai-head h3 {
  margin: 0 8px 0 0;
  /* a long name wraps beside its picture, never under it (the dots and the picture take about 64 px, with the gaps 80), as in CRM */
  min-width: 0;
  max-width: calc(100% - 80px);
}
/* the folding card of a function: the dots, the picture, the name and the badges on one line; the form inside below it */
html.sd details.ai-feature > summary.ai-head {
  list-style: none;
  cursor: pointer;
}
html.sd details.ai-feature > summary.ai-head::-webkit-details-marker {
  display: none;
}
html.sd details.ai-feature > summary.ai-head h3 {
  font-size: 1rem;
}
html.sd details.ai-feature + details.ai-feature {
  margin-top: 12px;
}
html.sd .ai-feature.ai-off .ai-head h3,
html.sd .ai-feature.ai-off > form > .note {
  opacity: 0.6;
}
html.sd label.ai-field {
  gap: 4px;
}
html.sd .ai-limit {
  max-width: 120px;
}
html.sd .ai-area {
  margin: 18px 0 0;
  font-size: 1.15rem;
}
/* Správa › AI: the spending of the month against the limit (the owner, 10. 11. 2026): green all right, orange near it, red at it */
html.sd .badge.ai-spend {
  font-family: var(--mono, ui-monospace, monospace);
  font-weight: 700;
}
html.sd .badge.ai-spend-ok {
  background: var(--sd-action-green-bg);
  color: var(--sd-action-green-ink);
  border-color: var(--sd-action-green-line);
}
html.sd .badge.ai-spend-near {
  background: #fef3c7;
  color: #92400e;
  border-color: #f59e0b;
}
html.sd .badge.ai-spend-over {
  background: #fee2e2;
  color: #991b1b;
  border-color: #ef4444;
}
html.sd[data-theme='dark'] .badge.ai-spend-near {
  background: #3a2c0c;
  color: #fcd34d;
}
html.sd[data-theme='dark'] .badge.ai-spend-over {
  background: #3b1414;
  color: #fca5a5;
}
html.sd .ai-spend-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
html.sd .ai-spend-legend .badge.ai-spend {
  font-family: inherit;
  font-weight: 600;
}
/* the own icon of the AI (a magnifying glass with sparkles; the owner, 11. 11. 2026, before a chip with "AI"): drawn here, used like a Font Awesome icon (fa-solid fa-ai-chip) in the
   colour of the text; Johny keeps his robot */
html.sd .fa-solid.fa-ai-chip::before {
  content: '';
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  vertical-align: -0.2em;
  background-color: currentColor;
  -webkit-mask: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M14.56%207.12A5.6%205.6%200%201%201%208.21%2014.70%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%222.4%22%20stroke-linecap%3D%22round%22%2F%3E%3Cpath%20d%3D%22M17.91%2017.11L21.3%2021.3%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%222.8%22%20stroke-linecap%3D%22round%22%2F%3E%3Cpath%20d%3D%22M8.10%206.40Q8.73%209.68%2011.60%2010.40Q8.73%2011.12%208.10%2014.40Q7.47%2011.12%204.60%2010.40Q7.47%209.68%208.10%206.40Z%22%2F%3E%3Cpath%20d%3D%22M3.70%204.00Q4.11%206.13%206.00%206.60Q4.11%207.07%203.70%209.20Q3.29%207.07%201.40%206.60Q3.29%206.13%203.70%204.00Z%22%2F%3E%3Cpath%20d%3D%22M9.90%203.15Q10.14%204.42%2011.25%204.70Q10.14%204.98%209.90%206.25Q9.66%204.98%208.55%204.70Q9.66%204.42%209.90%203.15Z%22%2F%3E%3C%2Fsvg%3E')
    center / contain no-repeat;
  mask: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M14.56%207.12A5.6%205.6%200%201%201%208.21%2014.70%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%222.4%22%20stroke-linecap%3D%22round%22%2F%3E%3Cpath%20d%3D%22M17.91%2017.11L21.3%2021.3%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%222.8%22%20stroke-linecap%3D%22round%22%2F%3E%3Cpath%20d%3D%22M8.10%206.40Q8.73%209.68%2011.60%2010.40Q8.73%2011.12%208.10%2014.40Q7.47%2011.12%204.60%2010.40Q7.47%209.68%208.10%206.40Z%22%2F%3E%3Cpath%20d%3D%22M3.70%204.00Q4.11%206.13%206.00%206.60Q4.11%207.07%203.70%209.20Q3.29%207.07%201.40%206.60Q3.29%206.13%203.70%204.00Z%22%2F%3E%3Cpath%20d%3D%22M9.90%203.15Q10.14%204.42%2011.25%204.70Q10.14%204.98%209.90%206.25Q9.66%204.98%208.55%204.70Q9.66%204.42%209.90%203.15Z%22%2F%3E%3C%2Fsvg%3E')
    center / contain no-repeat;
}

/* the mark under an answer of Fred, the same as Johny in INTECHI CRM (public/css/johny.css there): Pomohlo in green, Nesprávná odpověď in
   orange, Odeslat ke kontrole in purple (the tokens of the actions); the answer with the buttons may take the whole width of the panel */
html.sd .fred-fb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  /* in the middle of the bubble (the owner, 20. 11. 2026: „zarovnání hlášek na střed“) */
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
  width: max-content;
  max-width: 100%;
  white-space: normal;
}
html.sd .fred-msg.fred:has(> .fred-fb) {
  max-width: 100%;
}
html.sd .fred-fb .btn {
  white-space: nowrap;
  gap: 6px;
}
html.sd .fred-fb:has(.fred-fb-what) {
  width: auto;
}
html.sd .fred-fb .btn.fred-fb-up {
  background: var(--sd-action-green-bg);
  border-color: var(--sd-action-green-line);
  color: var(--sd-action-green-ink);
}
html.sd .fred-fb .btn.fred-fb-down {
  background: var(--sd-action-orange-bg);
  border-color: var(--sd-action-orange-line);
  color: var(--sd-action-orange-ink);
}
/* work the person asked for in the chat (src/fredChatDo.ts): green confirms, red rejects, as in INTECHI CRM (the owner, 11. 11. 2026) */
html.sd .fred-msg.fred-do {
  border-left: 5px solid var(--sd-action-green-line);
}
html.sd .fred-msg.fred-do.fred-do-del {
  border-left-color: var(--sd-action-red-line);
}
html.sd .fred-do-label {
  font-weight: 600;
}
html.sd .fred-do-danger {
  margin-top: 4px;
  color: var(--sd-action-red-ink);
  font-weight: 600;
}
html.sd .fred-do-details {
  margin: 6px 0 0;
  padding-left: 18px;
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}
/* Potvrdit and Zamítnout in the middle of the card (the owner, 20. 11. 2026) */
html.sd .fred-do-row {
  justify-content: center;
}
html.sd .fred-do-row .btn {
  min-height: 44px;
  padding: 0 14px;
  gap: 6px;
}
html.sd .fred-do-row .btn.fred-do-confirm {
  background: var(--sd-action-green-bg);
  border-color: var(--sd-action-green-line);
  color: var(--sd-action-green-ink);
}
html.sd .fred-do-row .btn.fred-do-reject {
  background: var(--sd-action-red-bg);
  border-color: var(--sd-action-red-line);
  color: var(--sd-action-red-ink);
}
/* a work already given (src/fredDuplicates.ts): the orange edge of a warning; Ukázat blue, Požádat purple (the action tones .ia-*) */
html.sd .fred-msg.fred-do.fred-dup {
  border-left-color: var(--sd-action-orange-line);
}
html.sd .fred-dup .fred-do-label .fa-copy {
  color: var(--sd-action-orange-ink);
}
html.sd .fred-dup .fred-do-row .btn {
  white-space: normal;
  text-align: center;
  text-decoration: none;
}
/* the results of another application of the group (Most mezi boty, public/js/fred-chat.js bridgeCard): the blue edge of a link, one block
   per item; Otevřít v … blue, Převzít sem / Přidat do K fakturaci green (the action tones .ia-*) */
html.sd .fred-msg.fred-do.fred-bridge {
  border-left-color: var(--sd-action-blue-line);
}
html.sd .fred-bridge-item + .fred-bridge-item {
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 8px;
}
html.sd .fred-bridge .fred-do-label .fa-solid {
  color: var(--sd-action-blue-ink);
}
html.sd .fred-bridge-kind {
  color: var(--muted);
  font-weight: 400;
}
html.sd .fred-bridge-sum {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.92em;
}
html.sd .fred-bridge .fred-do-row .btn {
  white-space: normal;
  text-align: center;
  text-decoration: none;
}
html.sd .fred-fb .btn.fred-fb-send {
  background: var(--sd-action-purple-bg);
  border-color: var(--sd-action-purple-line);
  color: var(--sd-action-purple-ink);
}
html.sd .fred-fb-what {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
}
html.sd .fred-fb-what textarea {
  width: 100%;
  font: inherit;
}
/* Fred did not understand the reproach of a wrong answer: his question „Co byste chtěl vidět?“ over the field (the owner, 24. 11. 2026) */
html.sd .fred-fb-ask {
  margin: 0;
  width: 100%;
  font-weight: 600;
  color: var(--ink);
}
html.sd .fred-fb-done,
html.sd .fred-fb-err {
  font-size: 12.5px;
  color: var(--muted);
}
html.sd .fred-fb-err {
  color: var(--warn);
}

/* Správa › AI: the feedback under the answers (the owner, 10. 11. 2026): the marks of the month as badges and the cases to check */
html.sd .badge.ai-fb-up {
  background: var(--sd-action-green-bg);
  color: var(--sd-action-green-ink);
  border-color: var(--sd-action-green-line);
}
html.sd .badge.ai-fb-down {
  background: var(--sd-action-orange-bg);
  color: var(--sd-action-orange-ink);
  border-color: var(--sd-action-orange-line);
}
html.sd .ai-cases {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
html.sd .ai-case {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
html.sd .ai-case-meta {
  margin: 0 0 6px;
}
html.sd .ai-case-texts {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 12px;
}
html.sd .ai-case-texts dt {
  font-weight: 600;
  color: var(--muted);
}
html.sd .ai-case-texts dd {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
html.sd .ai-case-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
html.sd .ai-case-save[open] {
  flex-basis: 100%;
}
html.sd .ai-case-save > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
html.sd .ai-case-save > summary::-webkit-details-marker {
  display: none;
}
html.sd .ai-case-save form {
  margin-top: 10px;
}
html.sd .ai-case-check {
  display: flex;
  align-items: center;
  gap: 8px;
}
html.sd .ai-case-check input {
  margin: 0;
  flex: none;
}
@media (max-width: 640px) {
  html.sd .ai-case-texts {
    grid-template-columns: 1fr;
  }
}

/* every notice says by its picture what happened, the same as INTECHI CRM (public/css/toasts.css there; the owner, 10. 11. 2026: „ve
   financích jsou v hláškách jako v CRM doplněné ikonky před“): a tick in a circle (done), a cross in a circle (not done), a triangle (a
   warning); floating at the top and in the page alike. A notice with a picture of its own keeps only that one. */
html.sd .toast > .ok,
html.sd .toast > .err,
html.sd .toast > .notice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 16px;
}
html.sd .toast > .err:not(:has(.fa-solid)) {
  padding-left: 16px;
}
html.sd .toast > .ok:not(:has(.fa-solid))::before,
html.sd .toast > .err:not(:has(.fa-solid))::before,
html.sd .toast > .notice:not(:has(.fa-solid))::before,
html.sd main p.ok[role]:not(:has(.fa-solid))::before,
html.sd main p.err[role]:not(:has(.fa-solid))::before {
  /* the older triangle drawn by a mask (app.css) gives way to the picture of the font */
  position: static;
  transform: none;
  width: auto;
  height: auto;
  background: none;
  -webkit-mask: none;
  mask: none;
  flex: none;
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 22px;
  line-height: 1;
}
html.sd .toast > .ok:not(:has(.fa-solid))::before,
html.sd .toast > .notice.good:not(:has(.fa-solid))::before,
html.sd main p.ok[role]:not(:has(.fa-solid))::before {
  content: '\f058';
  color: #16a34a;
}
html.sd .toast > .err:not(:has(.fa-solid))::before,
html.sd .toast > .notice.bad:not(:has(.fa-solid))::before,
html.sd main p.err[role]:not(:has(.fa-solid))::before {
  content: '\f057';
  color: #e5484d;
}
html.sd .toast > .notice:not(.good):not(.bad):not(:has(.fa-solid))::before {
  content: '\f071';
  color: #d97706;
}
html.sd main p.ok[role]:not(:has(.fa-solid)),
html.sd main p.err[role]:not(:has(.fa-solid)) {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* no three dots in front of a folding card, line or row (the owner, 26. 11. 2026: „tři tečky před nadpisem pryč“; the same in INTECHI CRM,
   public/css/shared.css there): a click on the row or its name opens it (aria-expanded stays); the three dots stay only as the button of a
   menu of actions (public/js/acts.js). The old signs are switched off here in one place, for every kind of a fold. */
html.sd details.fold > summary::before,
html.sd .user-card summary::before,
html.sd .fred-areas > summary::before,
html.sd .fred-chat-notes > summary::before,
html.sd .pay-sec .pay-detail > summary.pay-month::before,
html.sd details.file-more > summary::before,
html.sd details.help-topic > summary::before,
html.sd details.help-topic > summary::after,
html.sd .mail-log > summary::before,
html.sd main details > summary:not(.btn):not(.chip)::before {
  content: none;
}
html.sd main details > summary:not(.btn):not(.chip) {
  cursor: pointer;
}
/* the toggles of the months and rows wrote ▸ / ▾ as text (public/js/documents.js, invfold.js, paygroups.js): no sign at all, the name of
   the month or of the row is the button */
html.sd .month-toggle .chev,
html.sd .row-toggle .chev,
html.sd tr.pay-head .chev {
  font-size: 0;
  transform: none;
}
/* in its place the picture of what the row is (a month: the calendar), as every button has one */
html.sd .month-toggle .chev::before,
html.sd .row-toggle .chev::before,
html.sd tr.pay-head .chev::before {
  content: '\f073';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 13px;
  color: var(--accent);
}

/* the picture of Fred (the owner, 10. 11. 2026: the hooded figure with the chart badge, in a blue ring; the same idea as Johny in INTECHI
   CRM): used like a Font Awesome icon (fa-solid fa-fred) wherever Fred is meant, in the menu, the crumbs, the headings and the cards */
html.sd .fa-solid.fa-fred::before {
  content: '';
  display: inline-block;
  width: 1.3em;
  height: 1.3em;
  vertical-align: -0.28em;
  background: url('/icons/fred.png?v=3') center / contain no-repeat;
}

/* the number of the files on the button of the upload, in a little circle (public/js/documents.js) */
html.sd .btn .btn-count,
html.sd button .btn-count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgb(255 255 255 / 25%);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1;
}
html.sd .btn.secondary .btn-count {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}
html.sd .doc-up-acts .btn {
  gap: 8px;
}


/* the overview of the bot in two columns that fill each from the top (the owner, 10. 11. 2026: a short card left an empty place under it in
   the rows of a grid); on a phone one column in the former order */
html.sd .bot-cols > .bot-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
html.sd .bot-cols > .bot-col > div > * { margin: 0; }
@media (max-width: 860px) {
  html.sd .bot-cols { display: flex; flex-direction: column; }
  html.sd .bot-cols > .bot-col { display: contents; }
  html.sd .bot-o1 { order: 1; } html.sd .bot-o2 { order: 2; } html.sd .bot-o3 { order: 3; } html.sd .bot-o4 { order: 4; }
}


/* the AI buttons of the form fields, the same as in INTECHI CRM (public/css/aidraft.css there) */
html.sd .ai-draft {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: -4px;
}
html.sd .ai-draft-panel {
  width: 100%;
  border: 1px solid var(--sd-action-purple-line);
  background: color-mix(in srgb, var(--sd-action-purple-bg) 60%, var(--card));
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
html.sd .ai-draft-title {
  margin: 0;
  font-weight: 700;
  color: var(--sd-action-purple-ink);
}
html.sd .ai-draft-hint,
html.sd .ai-draft-acts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
html.sd .ai-draft-hint input {
  flex: 1 1 260px;
  min-width: 0;
}
html.sd .ai-draft-out {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}
html.sd .ai-draft-out.thinking {
  color: var(--muted);
  font-style: italic;
}
html.sd .ai-draft-out.err {
  color: var(--warn);
}
html.sd .ai-draft .btn {
  /* the same room between the picture and the words as every other button (the margin of .btn-lead), not twice as much */
  gap: 0;
}
/* in the row of the buttons of its form (public/js/aidraft.js) the box is only its button */
html.sd .ai-row > .ai-draft {
  margin-top: 0;
}
html.sd .ai-draft-acts .btn.ai-draft-use {
  background: var(--sd-action-green-bg);
  border-color: var(--sd-action-green-line);
  color: var(--sd-action-green-ink);
}
html.sd .ai-draft-stale,
html.sd .ai-draft-undo {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
html.sd .ai-draft-stale {
  color: var(--warn);
}
/* in a narrow card (To invoice) the button and the panel keep the width of the card: the words wrap, nothing runs out of it */
html.sd .ai-draft { min-width: 0; max-width: 100%; }
html.sd .ai-draft .ai-draft-btn { max-width: 100%; white-space: normal; text-align: left; height: auto; }
html.sd .ai-draft-panel { min-width: 0; max-width: 100%; box-sizing: border-box; }
html.sd .ai-draft-title { overflow-wrap: anywhere; }

/* Správa › AI: the icon before the field of the limit of the group keeps its gap */
html.sd .ai-feature label > span > i.fa-gauge { margin-right: 6px; }

/* Správa › AI, the monthly limits on a phone: every firm a card of its own with its name as the title and the lines "label : value", the same as
   the cards of INTECHI CRM (the owner, 10. 11. 2026: the same look in both) */
@media (max-width: 640px) {
  html.sd .ai-feature table.cards.stack-table tr {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 8px 12px;
    margin: 0 0 10px;
  }
  html.sd .ai-feature table.cards.stack-table td {
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
    align-items: center;
    min-height: 32px;
  }
  html.sd .ai-feature table.cards.stack-table tr > td:last-child {
    border-bottom: 0;
  }
  /* the line of the group in all (in tfoot, so the sorting of the firms never moves it) is a card of the full width too */
  html.sd .ai-feature table.cards.stack-table tfoot {
    display: block;
  }
  html.sd .ai-feature table.cards.stack-table tfoot td:empty {
    display: none;
  }
  html.sd .ai-feature table.cards.stack-table tfoot td:nth-last-child(2) {
    border-bottom: 0;
  }
  html.sd .ai-feature table.cards.stack-table tr > td:first-child {
    font-size: 15px;
  }
  html.sd .ai-feature table.cards.stack-table tr > td:first-child::before {
    content: none;
  }
  html.sd .ai-feature table.cards.stack-table td[data-label]::before {
    font-size: 14px;
    font-weight: 400;
    color: var(--muted);
  }
  html.sd .ai-feature table.cards.stack-table td > input.ai-limit {
    flex: 0 0 80px;
    width: 80px;
  }
}
/* the forms of Správa › AI, the same as in INTECHI CRM: the buttons in a row on one axis, the fields three in a row on a computer, the label over
   its field, a wide table scrolls inside its card */
html.sd .formbtns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
html.sd .tablewrap {
  overflow-x: auto;
}
/* a table that scrolls sideways never gets a scroll up and down of its own (the owner, 20. 11. 2026: the items of a handover from CRM showed
   in a short box with the head hidden): in a column of a card (flex) the box of a scrolled table would shrink below its table, so it keeps its
   whole height; only a really wide table scrolls, and only sideways */
html.sd .tablewrap,
html.sd .table-wrap,
html.sd div[style*='overflow-x:auto'] {
  flex-shrink: 0;
  overflow-y: hidden;
}
/* the round emblem of a firm before its name (src/views/companyEmblem.ts): the picture of the switch of the firms, 22 px, and a row of a check
   box, the emblem and the name on one axis */
html.sd .co-emblem {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex: none;
  object-fit: cover;
  vertical-align: middle;
}
html.sd .co-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  vertical-align: middle;
}
html.sd label.co-check {
  display: flex;
  align-items: center;
  gap: 8px;
}
html.sd label.co-check input {
  margin: 0;
  flex: none;
}

/* ---- tables never lie over each other (the owner, 26. 11. 2026, „je to všude v appkách“): the column of the actions (td.act) is as wide as
   its buttons in one row, no text column has a fixed width its text could run out of, a long word or code wraps inside its cell, and on a
   phone the table is the cards (class cards / stack-table with data-label). scripts/ui-check.sh reports VAROVANI-PREKRYV. ---- */
/* every row is as high as its highest cell and every cell has its content in the middle (the owner, 26. 11. 2026: a text on two lines ran
   under the line of the row while the buttons stayed up): no fixed height, no clipping, no absolute position in a cell */
html.sd table:not(.inv-sheet *) > * > tr > td,
html.sd table:not(.inv-sheet *) > * > tr > th {
  vertical-align: middle;
}
@media (min-width: 641px) {
  html.sd table td.act {
    width: 1%;
    white-space: nowrap;
  }
}
html.sd table td.act > .int-acts,
html.sd table td.act > .row {
  flex-wrap: nowrap;
}
html.sd table td code,
html.sd table td .mono {
  overflow-wrap: anywhere;
}
/* a phone: a badge in a card of a table never runs out of its cell (Opravný doklad beside the number, the pill of an account): its words may
   go on the next line inside the badge, a long account number breaks */
@media (max-width: 640px) {
  html.sd table th .badge,
  html.sd table td .badge {
    max-width: 100%;
    white-space: normal;
    height: auto;
  }
  html.sd table td .badge .mono {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}
/* Safari rounds a table of a width with a fraction of a pixel one pixel up and shows a scroll bar for that one pixel: a table in such a box is
   one pixel narrower (not seen); a table really wider than its card still scrolls sideways */
html.sd .tablewrap > table,
html.sd .table-wrap > table,
html.sd div[style*='overflow-x:auto'] > table {
  width: calc(100% - 1px);
}
html.sd .ai-feature .grid2 {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: 12px;
  align-items: end;
}
/* a green badge (all right: on, sent, paid) has the tick in a circle before its words and a red one (off, refused) the cross, the same as in
   INTECHI CRM (the owner, 8. and 9. 11. 2026); a badge with an icon of its own or a tick in its words (.no-ico) keeps only that one */
html.sd .badge.good:not(:has(.fa-solid)):not(:has(.fa-regular)):not(:has(img)):not(.no-ico)::before {
  content: '\f058';
  margin-right: 6px;
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
}
html.sd .badge.bad:not(:has(.fa-solid)):not(:has(.fa-regular)):not(:has(img)):not(.no-ico)::before {
  content: '\f057';
  margin-right: 6px;
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
}
/* on a phone the number of a document and its badge (Opravný doklad, Záloha) wrap in the head of the card instead of running over the box beside */
@media (max-width: 640px) {
  html.sd table.stack-table tr > th:first-child {
    flex-wrap: wrap;
    row-gap: 4px;
    min-width: 0;
  }
  html.sd table.inv-table tr:not(.letter-row) > th {
    white-space: normal;
    min-width: 0;
  }
}
/* after the mark the thumb keeps its colour: green Pomohlo, orange Nesprávná odpověď (the owner, 10. 11. 2026), the same as in CRM */
html.sd .fred-fb-done .fa-thumbs-up {
  color: var(--sd-action-green-ink);
}
html.sd .fred-fb-done .fa-thumbs-down {
  color: var(--sd-action-orange-ink);
}
html.sd .fred-do-done {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
html.sd .fred-do-done .fa-check {
  color: var(--sd-action-green-ink);
}
html.sd .fred-do-done .fa-xmark {
  color: var(--sd-action-red-ink);
}
/* a part of the application named in an answer (**Faktury**): a blue link with the icon of the menu, with a space around it
   (public/js/chatrich.js; the same as in CRM) */
html.sd .chat-page-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0 2px;
  font-weight: 600;
  color: var(--link, var(--sd-action-blue-ink));
  text-decoration: none;
  white-space: nowrap;
}
html.sd .chat-page-link:hover {
  text-decoration: underline;
}
html.sd .chat-page-link > i {
  font-size: 0.95em;
}
/* a word the assistant stressed (**…** in its answer): blue and bold, never the stars (the owner, 10. 11. 2026; public/js/chatrich.js) */
html.sd strong.chat-em {
  font-weight: 700;
  color: var(--link, var(--sd-action-blue-ink));
}
/* the end of the menu on a computer the same as in INTECHI CRM (the owner, 10. 11. 2026: „O aplikaci pod má větší mezeru“, again
   1. 12. 2026 with the measure): the line above the user is exactly as far under O aplikaci as every hr.nav-sep under its item (8 px) and the
   user as far under the line as an item under its line; the user follows the menu, it is not pushed to the bottom of a tall window */
@media (min-width: 861px) {
  html.sd .side .nav + .userbox {
    position: relative;
    border-top: 0;
    margin-top: 0;
    padding-top: 11px;
  }
  html.sd .side .nav + .userbox::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10px;
    right: 10px;
    border-top: 1px solid var(--line);
  }
}
/* the chip of the heading of a section (Rozhodnutí in orange, the others in their colour): in the light mode the words in a darker shade of the
   colour of the section, so that they read at 4.5:1 on its pale ground (the orange had 2.9:1) */
html.sd:not([data-theme='dark']) .co-sec .co-h span:not(.firm-chip) {
  color: color-mix(in srgb, var(--sec) 62%, #000);
}

/* the amounts and the rate of a cost document that do not fit (src/views/costInbox.ts vatOffNote; the owner, 11. 11. 2026): across the whole
   row of the form, in the orange of a warning, with the buttons and the confirmation under the text */
html.sd .vat-off:not([hidden]) {
  grid-column: 1 / -1;
  flex-basis: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--sd-action-orange-line);
  border-left-width: 4px;
  border-radius: 10px;
  background: var(--sd-action-orange-bg);
  color: var(--sd-action-orange-ink);
}
html.sd .vat-off .vat-off-text {
  margin: 0;
  font-weight: 600;
}
html.sd .vat-off .vat-off-text::before {
  content: '\f071';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  margin-right: 8px;
}
html.sd .vat-off .formbtns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}
html.sd .vat-off > label.check {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  text-align: left;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin: 0;
  color: var(--ink);
  font-weight: 500;
}
html.sd .vat-off > label.check input {
  width: 20px;
  height: 20px;
  flex: none;
  margin: 0;
}

/* a required field (src/views/costInbox.ts: the amount to pay, the variable symbol and the due date of a document to pay): the star after
   the name, on the same line (the name gets its icon in buttonTone.ts, so the star is drawn here) */
html.sd label[data-req] > .field-name::after {
  content: '*';
  color: var(--warn);
  font-weight: 700;
  margin-left: 3px;
}
html.sd .req {
  color: var(--warn);
  font-weight: 700;
  margin-left: 3px;
}
html.sd .req-note {
  margin: 6px 0 0;
}

/* the standing orders of Fred (the page of Fred › Pověření), as in INTECHI CRM */
html.sd .deleg {
  border: 1px solid var(--sd-action-neutral-line);
  border-radius: 10px;
  padding: 12px 14px;
  display: grid;
  gap: 6px;
}
html.sd .deleg.deleg-off {
  opacity: 0.75;
}
html.sd .deleg-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
html.sd .deleg p {
  margin: 0;
  overflow-wrap: anywhere;
}
html.sd .deleg-state {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1px solid var(--sd-action-neutral-line);
  background: var(--sd-action-neutral-bg);
  color: var(--sd-action-neutral-ink);
}
html.sd .deleg-state.on {
  border-color: var(--sd-action-green-line);
  background: var(--sd-action-green-bg);
  color: var(--sd-action-green-ink);
}
html.sd .deleg-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
html.sd .deleg-acts .btn {
  min-height: 44px;
}
html.sd .deleg-report {
  border-top: 1px solid var(--sd-action-neutral-line);
  padding-top: 6px;
  margin-top: 6px;
}
html.sd .deleg-text {
  white-space: pre-wrap;
}
/* the standing orders that run on their own (src/fredAutonomy.ts): the mode, the condition, the exceptions, the allowances */
html.sd .deleg-mode {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: var(--sd-action-neutral-ink);
}
html.sd .deleg-cond > b > i,
html.sd .deleg-cond > p > i,
html.sd .deleg-ex > li > i {
  margin-right: 6px;
}
html.sd .deleg-mode.is-auto {
  color: var(--sd-action-green-ink);
  font-weight: 600;
}
html.sd .deleg-cond ul,
html.sd .deleg-ex {
  margin: 4px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 4px;
}
html.sd .deleg-ex form,
html.sd .chat-task-details li .btn {
  display: inline-block;
  margin-left: 6px;
  vertical-align: middle;
}
html.sd .deleg-grant-form {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  align-items: end;
}
html.sd .deleg-grant-form label {
  display: grid;
  gap: 4px;
}
html.sd .deleg-grant-form input {
  min-height: 44px;
}
/* the red dot at the button of Fred: what waits for the decision of an administrator; a quiet pulse only with the effects on */
html.sd .fred-btn {
  overflow: visible;
}
html.sd .fred-btn img {
  border-radius: 50%;
}
html.sd .bot-dot {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--card, #fff);
  pointer-events: none;
}
html.sd .bot-dot[hidden] {
  display: none;
}
html.sd[data-fx='on'] .bot-dot {
  animation: bot-dot-pulse 2.4s ease-in-out infinite;
}
/* the green count beside it: the notes of the board Fred fulfilled, not read yet (bottom right, the red one stays top right; INTECHI CRM) */
html.sd .bot-dot.bot-dot-done {
  top: auto;
  bottom: -6px;
  background: var(--sd-color-green-700, #15803d);
}
html.sd[data-fx='on'] .bot-dot.bot-dot-done {
  animation: none;
}

/* the news from Fred when the chat opens, the requests and the batch in the panel of the chat */
html.sd .chat-notices {
  margin: 8px 12px 0;
  padding: 8px 10px;
  border: 1px solid var(--sd-action-green-line);
  background: var(--sd-action-green-bg);
  color: var(--sd-action-green-ink);
  border-radius: 10px;
  display: grid;
  gap: 4px;
}
html.sd .chat-notices[hidden] {
  display: none;
}
html.sd .chat-notices-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
html.sd .chat-notice {
  margin: 0;
  overflow-wrap: anywhere;
}
html.sd .chat-request-limits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
html.sd .chat-request-limits label,
html.sd .chat-batch-q {
  display: grid;
  gap: 4px;
  font-size: 0.875rem;
}
html.sd .chat-request-limits input,
html.sd .chat-batch-q input,
html.sd .chat-batch-q select {
  min-height: 44px;
  width: 100%;
}
html.sd .chat-batch-item {
  overflow-wrap: anywhere;
}
html.sd .chat-batch-item.is-done > i {
  color: var(--sd-action-green-ink);
}
html.sd .chat-batch-item.is-ask > i {
  color: var(--sd-action-orange-ink, var(--sd-action-neutral-ink));
}
html.sd .chat-order-mode {
  margin: 0;
  display: flex;
  gap: 6px;
  align-items: baseline;
}
html.sd .chat-order-mode.is-auto {
  color: var(--sd-action-green-ink);
  font-weight: 600;
}
html.sd .fred-do-hold {
  margin: 4px 0 0;
  font-size: 0.8125rem;
  color: var(--sd-action-neutral-ink);
}

/* ---- the head of the chat of Fred and the panel Úkoly: as in INTECHI CRM (public/css/johny.css there) and Nibbit in RARELO.
   The head of the chat (the owner, 12. 11. 2026: „ikonky v chatu do koleček jako má Nibbit“): Návrhy a pověření, bigger, close, each in a
   round button; the pressed one (the panel is open) is filled with the colour of the application ---- */
html.sd .fred-chat-head .chat-hbtn,
html.sd .fred-chat-head .chat-grow,
html.sd .fred-chat-head .fred-chat-x {
  flex: none;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  color: inherit;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--sd-action-shadow, none);
}
html.sd .fred-chat-head .chat-hbtn:hover {
  color: var(--accent);
  border-color: var(--accent);
}
html.sd .fred-chat-head .chat-hbtn:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
html.sd .fred-chat-head .chat-hbtn[aria-pressed='true'] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
/* the name and the emblem on the left, the round buttons on the right */
html.sd .fred-chat-head > strong {
  flex: 0 1 auto;
  margin-right: 0;
}
html.sd .fred-chat-head .chat-tasks-btn {
  margin-left: auto;
}
@media (max-width: 860px) {
  html.sd .fred-chat-head .chat-hbtn,
  html.sd .fred-chat-head .fred-chat-x {
    width: 44px;
    height: 44px;
  }
  /* the size of the window is only for a computer (chatsize.js) */
  html.sd .fred-chat-head .chat-grow {
    display: none;
  }
}

/* the panel Úkoly in place of the conversation: what waits for the person and the standing orders */
html.sd .fred-chat.tasks-open .fred-chat-log,
html.sd .fred-chat.tasks-open .fred-chat-notes {
  display: none;
}
html.sd .chat-tasks {
  flex: 1 1 0;
  min-height: 72px;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
html.sd .chat-tasks[hidden] {
  display: none;
}
html.sd .chat-tasks h4 {
  margin: 4px 0 0;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
html.sd .chat-tasks h4 i {
  color: var(--accent);
  width: 1.1em;
  text-align: center;
  margin: 0;
}
html.sd .chat-task {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  overflow-wrap: anywhere;
}
html.sd .chat-proposal {
  border-left: 5px solid var(--sd-action-green-line, #1f8a4c);
}
html.sd .chat-proposal.is-danger {
  border-left-color: var(--sd-action-red-line, #b42318);
}
html.sd .chat-task-label {
  font-weight: 600;
}
html.sd .chat-task-danger {
  margin-top: 4px;
  color: var(--sd-action-red-ink);
  font-weight: 600;
}
html.sd .chat-task-details {
  margin: 6px 0 0;
  padding-left: 18px;
  font-size: 0.875rem;
}
html.sd .chat-task-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  justify-content: center;
}
html.sd .chat-order.is-off {
  opacity: 0.8;
}
html.sd .chat-order-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
html.sd .chat-task-meta,
html.sd .chat-task-empty {
  display: block;
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}
html.sd .chat-order-text,
html.sd .chat-order-run {
  margin: 6px 0 0;
  font-size: 0.875rem;
  white-space: pre-wrap;
}
html.sd .chat-order-run {
  color: var(--muted);
}
html.sd .chat-task-note {
  margin: 8px 0 0;
  font-size: 0.875rem;
}
html.sd .chat-task-note.good {
  color: var(--sd-action-green-ink);
}
html.sd .chat-task-note.bad {
  color: var(--sd-action-red-ink);
}
/* the button that reads the list again: in the middle of the panel, with its icon (the owner, 20. 11. 2026) */
html.sd .chat-task-reload {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin-top: 6px;
}
html.sd .chat-tasks .chat-task-row .btn.ia {
  min-height: 44px;
  width: auto;
  padding: 0 14px;
  gap: 6px;
}
/* the emblem of the company of the conversation beside the name of Fred */
html.sd .fred-chat-head .fred-chat-emblem {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
}

/* the part Platba of a document to sort follows the choice „Co s tím?“ (public/js/paypart.js): hidden really hides it */
html.sd [data-pay-part][hidden],
html.sd [data-pay-part] .inbox-grid > [hidden] {
  display: none !important;
}

/* the explanation of a field: an „i“ beside its name with a bubble (public/js/fhelp.js; the same in INTECHI CRM and FINANCE) */
html.sd .fhelp {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 5px;
  width: 18px;
  height: 18px;
  /* dark green in both apps (the owner, 12. 11. 2026), so it is never taken for the blue picture of a name */
  color: var(--sd-action-green-ink, #15803d);
  cursor: help;
  vertical-align: middle;
  font-weight: 400;
  border-radius: 50%;
}
html.sd .fhelp:focus-visible {
  outline: 2px solid var(--focus, var(--accent));
  outline-offset: 2px;
}
html.sd .fhelp::after {
  content: attr(data-fhelp);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(calc(-50% + var(--fh-shift, 0px)));
  z-index: 50;
  width: max-content;
  max-width: min(320px, 80vw);
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--ink, #1e293b);
  color: var(--card, #fff);
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.4;
  white-space: normal;
  text-align: left;
  box-shadow: 0 4px 14px #00000026;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease-in-out;
}
html.sd .fhelp:hover::after,
html.sd .fhelp:focus-visible::after,
html.sd .fhelp.open::after {
  opacity: 1;
  visibility: visible;
}
/* a closed bubble takes no place: hidden only by its look it still made the page wider than a phone (the edit of an event in the calendar, 3 px) */
html.sd .fhelp:not(:hover):not(:focus-visible):not(.open)::after {
  display: none;
}
/* a required field with an „i“: the star stands right after the name, before the „i“ (all on the line of the name): „Měsíc dokladu * (i)“.
   The „i“ is inside .fhelp-tail with the last word (buttonTone.ts fhelpTail), so it is looked for anywhere in the name, not only as its
   child (the owner, 23. 11. 2026: the star stood after the „i“) */
html.sd label[data-req] > .field-name:has(.fhelp)::after {
  content: none;
}
html.sd label[data-req] > .field-name .fhelp::before {
  content: '*';
  position: absolute;
  right: calc(100% + 1px);
  color: var(--warn);
  font-weight: 700;
}
html.sd label[data-req] > .field-name .fhelp {
  margin-left: 12px;
}

/* the level of learning by operation of Fred (the same as Johny in INTECHI CRM, public/css/johny.css there) */
html.sd .learn-level {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1px solid var(--sd-action-neutral-line);
  background: var(--sd-action-neutral-bg);
  color: var(--sd-action-neutral-ink);
}
/* still learning: orange; learned: green; failing: red (the owner, 24. 11. 2026, the same as Johny in INTECHI CRM) */
html.sd .learn-level.learn-learning {
  border-color: var(--sd-action-orange-line);
  background: var(--sd-action-orange-bg);
  color: var(--sd-action-orange-ink);
}
html.sd .learn-level.learn-ready {
  border-color: var(--sd-action-green-line);
  background: var(--sd-action-green-bg);
  color: var(--sd-action-green-ink);
}
html.sd .learn-level.learn-weak {
  border-color: var(--sd-action-red-line);
  background: var(--sd-action-red-bg);
  color: var(--sd-action-red-ink);
}
/* the bar of the progress with its % in the middle */
html.sd .learn-bar {
  position: relative;
  display: block;
  height: 18px;
  margin: 6px 0 2px;
  max-width: 180px;
  border-radius: 9px;
  border: 1px solid var(--sd-action-neutral-line);
  background: var(--sd-action-neutral-bg);
  overflow: hidden;
}
html.sd .learn-bar > span {
  display: block;
  height: 100%;
  background: var(--sd-action-orange-bg);
}
html.sd .learn-bar.learn-weak > span {
  background: var(--sd-action-red-bg);
}
html.sd .learn-bar > b {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--sd-action-orange-ink);
}
html.sd .learn-bar.learn-weak > b {
  color: var(--sd-action-red-ink);
}


/* the level of learning on a phone: every operation is a card with the names of its figures (as the other tables of Fred) */
@media (max-width: 760px) {
  html.sd table.chat-learn thead {
    display: none;
  }
  html.sd table.chat-learn,
  html.sd table.chat-learn tbody,
  html.sd table.chat-learn tr,
  html.sd table.chat-learn td {
    display: block;
    width: auto;
  }
  html.sd table.chat-learn tr {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 10px;
  }
  html.sd table.chat-learn td,
  html.sd table.chat-learn td.r,
  html.sd table.chat-learn td.c {
    padding: 4px 0;
    border: 0;
    text-align: left !important;
  }
  html.sd table.chat-learn td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
  }
}

/* the line about the required fields of a document to sort takes the whole width (no needless wrapping on a computer) */
html.sd .inbox-grid > .req-note {
  grid-column: 1 / -1;
}

/* an e-mail sent again: only the icon of the two arrows in violet (its words are the hint), the same as in CRM (the owner, 20. 11. 2026) */
html.sd .badge.mail-again {
  background: #ede9fe;
  color: #5b21b6;
  border-color: #c4b5fd;
}
html.sd[data-theme='dark'] .badge.mail-again {
  background: #2e1065;
  color: #ddd6fe;
  border-color: #6d28d9;
}

/* ---- the mark of Claude (src/views/aiPill.ts, public/js/fred-chat.js; the owner, 22. 11. 2026, by the administration of Rarelo): an
   amber pill with the mark and the name of the model, in Správa › AI at every function on Claude and in the chat of Fred. The colours are
   the orange of the former badge of the Claude API, as tokens for light and dark ---- */
html.sd {
  --sd-claude-bg: #fff4e6;
  --sd-claude-border: #f5a35c;
  --sd-claude-fg: #b4530a;
}
html.sd[data-theme='dark'] {
  --sd-claude-bg: rgba(234, 120, 30, 0.16);
  --sd-claude-border: #c96a1f;
  --sd-claude-fg: #ffb066;
}
html.sd .ai-pill-claude {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border: 1px solid var(--sd-claude-border);
  border-radius: 999px;
  background: var(--sd-claude-bg);
  color: var(--sd-claude-fg);
  font-size: 12px;
  font-weight: 600;
  font-style: normal;
  line-height: 1.4;
  white-space: nowrap;
  vertical-align: middle;
}
html.sd .ai-pill-claude svg {
  flex: none;
}

/* ---- the chat of Fred does not block (the owner, 22. 11. 2026): Fred thinking with his icon, the mark of Claude and „Přerušit“; a message
   sent meanwhile waits at the bottom as „Čeká“ with Upravit and Zrušit; the send button sends into the queue while the field has text ---- */
html.sd .fred-msg.fred.wait {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 8px;
  white-space: normal;
  text-align: center;
}
/* the bubble is as wide as its line: in a wide chat „Přerušit“ stands in the same line after the mark of Claude; in a narrow chat it
   wraps under the words and stands in the middle of the bubble, not at its right edge (the owner, 23. 11. 2026) */
html.sd .fred-wait-ico {
  flex: none;
  width: 22px;
  height: 22px;
  /* no space under it (the pictures of a message have 4 px), so it sits on the same axis as the words and the mark of Claude */
  margin: 0;
  border-radius: 50%;
}
html.sd .fred-msg.wait .fred-wait-stop {
  font-style: normal;
  margin: 0;
}
html.sd .fred-by {
  margin-top: 6px;
  white-space: normal;
}
html.sd .fred-msg.me.queued {
  background: color-mix(in srgb, var(--accent) 12%, var(--card));
  color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent);
}
/* the buttons of every bubble stand in its middle (.fred-msg-acts), also at a waiting message: „Čeká“ on its own line above them */
html.sd .fred-msg.me.queued .fred-msg-acts {
  justify-content: center;
}
html.sd .fred-queued {
  flex-basis: 100%;
  margin: 0;
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent);
}
html.sd .fred-chat.busy.queueing .fred-send-go {
  display: block;
}
html.sd .fred-chat.busy.queueing .fred-send-stop {
  display: none;
}
html.sd .fred-chat.busy.queueing .fred-send {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  background: color-mix(in srgb, var(--accent) 14%, var(--card));
}
@media (max-width: 860px) {
  html.sd .fred-msg.me.queued .btn,
  html.sd .fred-msg.wait .fred-wait-stop {
    min-height: 44px;
  }
}

/* ---- the „i“ of an explanation always right after the last word of its text, on the same line (the owner, 22. 11. 2026; the same in
   INTECHI CRM and Smart): src/views/buttonTone.ts fhelpTail ties the last word with the „i“ (.fhelp-tail cannot be broken) and keeps the
   whole text with the „i“ one piece (.fhelp-text), so a flex or grid box (a label in a column, the name of a field) cannot part them.
   The gap is the margin of the „i“ ---- */
html.sd .fhelp-tail {
  white-space: nowrap;
}
html.sd .fhelp-text {
  min-width: 0;
}
html.sd .fhelp-tail > .fhelp {
  white-space: normal;
}
/* the line under the brain while Fred thinks: his icon, the words and the mark of Claude on one line (wraps on a narrow phone) */
html.sd .ai-think-inline p.fred-think-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 8px;
}

/* ---- the trace „Zpracováno Fredem“ of a document saved from the chat (the owner, 22. 11. 2026), and the buttons Stáhnout of the files Fred
   made in the chat (an edit with tracked changes, a conversion; src/chatFileWork.ts) ---- */
html.sd .bot-trace {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}
html.sd .bot-trace a {
  color: inherit;
}
html.sd .fred-files-out {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  white-space: normal;
}
html.sd .fred-file-out {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}
html.sd .fred-file-out .btn {
  max-width: 100%;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}
html.sd .fred-file-out .note {
  margin: 0;
  font-size: 12px;
}
html.sd .fred-file-out.gone .btn {
  opacity: 0.55;
  pointer-events: none;
}
/* the changes made from a wish in free words, each with its reason (src/chatFileAi.ts) */
html.sd .fred-changes {
  list-style: none;
  margin: 0;
  padding: 6px 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}
html.sd .fred-changes li {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
html.sd .fred-change-text {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
html.sd .fred-changes li > .fa-solid {
  color: var(--accent);
  width: 14px;
  flex: none;
  text-align: center;
}
html.sd .fred-change-what {
  color: var(--ink);
}
html.sd .fred-change-why {
  color: var(--muted);
}
html.sd .fred-change-more {
  color: var(--muted);
}
@media (max-width: 860px) {
  html.sd .fred-file-out .btn {
    min-height: 44px;
  }
}
/* Faktury k úhradě: the account it is paid from as the flag of its currency and its number */
html.sd .cpay-from {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ---- the cross that closes a window (Upravit doklad, Poslat pásku, Zaplaceno, platba nákladu, the chat of Fred): one component for all.
   A square of 44 px (a finger), the cross drawn by two bars of 18 px from the very middle (no text "×", which a font puts off centre;
   the same way as .toast-close), so it is the same on both axes; the edges of the bars are whole pixels (margin, not translate -50 %).
   The owner, 23. 11. 2026: „miniaturní × v obdélníku“. The chat keeps its round buttons (html.sd .fred-chat-head .fred-chat-x). ---- */
html.sd .x-close {
  position: relative;
  flex: none;
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  margin: 0;
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: var(--sd-radius-md);
  background: var(--card);
  color: var(--ink);
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  box-shadow: var(--sd-action-shadow, none);
}
html.sd .x-close::before,
html.sd .x-close::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 2px;
  margin: -1px 0 0 -9px;
  border-radius: 1px;
  background: currentColor;
  transform: rotate(45deg);
}
html.sd .x-close::after {
  transform: rotate(-45deg);
}
html.sd .x-close:hover {
  background: var(--sd-hover, var(--card));
  border-color: var(--accent);
  color: var(--accent);
}
html.sd .x-close:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* the hand button and the arrow to the top move up together with the bot moved by hand (botmove.js sets --bot-shift; as in Smart and CRM) */
html.sd .hand-btn,
html.sd .to-top {
  translate: 0 calc(-1 * var(--bot-shift, 0px));
}

/* ---- the icons of success (a tick, a tick in a circle) are green everywhere, in the chat and in the whole application (the owner, 23. 11.
   2026: „Hotovo, aplikace to provedla“ had a black tick under the green „Potvrzeno“). Inside a button the icon keeps the colour of the
   button (a white tick on a filled button, the green of a green action button) ---- */
html.sd i.fa-check,
html.sd i.fa-circle-check {
  color: var(--sd-action-green-ink);
}
html.sd .btn i.fa-check,
html.sd .btn i.fa-circle-check,
html.sd button i.fa-check,
html.sd button i.fa-circle-check,
html.sd a.btn i.fa-check,
html.sd .chips i.fa-check,
html.sd .chips i.fa-circle-check {
  color: inherit;
}

/* ---- an icon button beside a text button in a row of buttons has the height of the text button and stays a square (the owner, 23. 11.
   2026: „ikonová tlačítka dáváme čtverce“): it stretches to the height of the row, the width follows by aspect-ratio (.btn.icon-only).
   In the rows of buttons of Fred (Pověření, the panel Úkoly); a button in its own form inside the row takes the form along ---- */
html.sd .deleg-acts > form,
html.sd .chat-task-row > form {
  display: flex;
}
html.sd .deleg-acts > .btn.icon-only,
html.sd .chat-task-row > .btn.icon-only,
html.sd .deleg-acts > form > .btn.icon-only,
html.sd .chat-task-row > form > .btn.icon-only {
  align-self: stretch;
  height: auto;
}
/* the same in every other row of buttons of the application (.row, the rows of a card or a form; the owner, 23. 11. 2026, left over from
   PR #642: the icon buttons were 30 px beside the text buttons of 34 px): where a row has a text button too, an icon button takes its height
   and stays a square; a row of icon buttons only (the actions of a table) keeps the size of the actions */
html.sd .row:has(> .btn:not(.icon-only)) > form:has(> .btn.icon-only),
html.sd .row:has(> form > .btn:not(.icon-only)) > form:has(> .btn.icon-only),
html.sd .row:has(> .btn:not(.icon-only)) > details:has(> summary.btn.icon-only),
html.sd .row:has(> form > .btn:not(.icon-only)) > details:has(> summary.btn.icon-only) {
  display: flex;
  align-self: stretch;
}
html.sd .row:has(> .btn:not(.icon-only)) > .btn.icon-only,
html.sd .row:has(> .btn:not(.icon-only)) > form > .btn.icon-only,
html.sd .row:has(> form > .btn:not(.icon-only)) > .btn.icon-only,
html.sd .row:has(> form > .btn:not(.icon-only)) > form > .btn.icon-only,
html.sd .row:has(> .btn:not(.icon-only)) > details > summary.btn.icon-only,
html.sd .row:has(> form > .btn:not(.icon-only)) > details > summary.btn.icon-only {
  align-self: stretch;
  height: auto;
}
/* a rolled menu „+“ (details > summary, e.g. + Kopie in the detail of an invoice) often wraps to another line of the row than the text
   button, so stretching does not reach it (it was 24 × 26 px beside 27 px; 24. 11. 2026): it gets the height of a text button itself and the
   same width, an exact square */
html.sd .row:has(> .btn:not(.icon-only)) > details > summary.btn.icon-only,
html.sd .row:has(> form > .btn:not(.icon-only)) > details > summary.btn.icon-only {
  align-self: center;
  width: var(--sd-btn-h);
  min-width: var(--sd-btn-h);
  height: var(--sd-btn-h);
  min-height: var(--sd-btn-h);
}

/* the face of Fred in its marks and headings, never a generic robot (the owner, 24. 11. 2026) */
html.sd img.bot-face {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  vertical-align: -3px;
  display: inline-block;
  flex: 0 0 auto;
}
html.sd img.bot-face.md {
  width: 20px;
  height: 20px;
}
html.sd img.bot-face.lg {
  width: 24px;
  height: 24px;
}

/* a quick look at a file (public/js/filepeek.js, the owner, 24. 11. 2026): the mouse resting on the name of a PDF or a picture shows its
   first page in a floating panel beside the name; a long press on a phone shows it over the screen. Shadow and corners of the bell menu */
html.sd .filepeek {
  position: fixed;
  z-index: 80;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  zoom: calc(1 / var(--page-zoom, 1));
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
}
html.sd .filepeek[hidden] {
  display: none;
}
@media (prefers-reduced-motion: no-preference) {
  html.sd .filepeek:not([hidden]) {
    animation: filepeek-in 0.14s ease-out;
  }
}
@keyframes filepeek-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}
/* the bar of the look in the colour of the company (the owner, 25. 11. 2026), white name and icon; the cross a small square (.x-close) */
html.sd .filepeek-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 14px;
  background: var(--accent);
  color: #fff;
}
html.sd .filepeek-head > i {
  color: #fff;
}
html.sd .filepeek-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
html.sd .filepeek-head .x-close {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
  box-shadow: none;
}
html.sd .filepeek-head .x-close::before,
html.sd .filepeek-head .x-close::after {
  width: 14px;
  margin-left: -7px;
}
html.sd .filepeek-head .x-close:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: #fff;
  color: #fff;
}
html.sd .filepeek-head .x-close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
html.sd .filepeek-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  background: var(--soft2);
}
/* the first page of a PDF drawn as a picture, or the picture itself: across the whole width of the look, the look as tall as it (at most
   the height the script gives, then it scrolls inside); no bars and no empty place of the PDF viewer of the browser (the owner, 30. 11. 2026) */
html.sd .filepeek-body .filepeek-page {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  background: #fff;
}
html.sd .filepeek-body .filepeek-page.filepeek-pic {
  width: auto;
  max-width: 100%;
  margin: 0 auto;
}
/* while the page is being drawn: a turning circle in the middle of a small place */
html.sd .filepeek-body[aria-busy='true'] {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
}
html.sd .filepeek-body[aria-busy='true']::before {
  content: '';
  width: 32px;
  height: 32px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
}
@media (prefers-reduced-motion: no-preference) {
  html.sd:not([data-fx='off']) .filepeek-body[aria-busy='true']::before {
    animation: viewer-spin 0.8s linear infinite;
  }
}
html.sd .filepeek-msg {
  margin: 0;
  padding: 16px;
  color: var(--muted);
}
/* on a phone: over the screen in the middle, as tall as the page (at most the screen), a dark veil around; the cross on the right */
html.sd .filepeek.is-sheet {
  inset: 0;
  margin: auto;
  width: min(640px, calc(100% - 24px));
  height: fit-content;
  max-height: calc(100% - 24px);
  box-shadow: 0 0 0 100vmax var(--sd-overlay, rgba(15, 23, 42, 0.45));
}
/* a finger: the square of 44 px */
html.sd .filepeek.is-sheet .filepeek-head .x-close {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
}
@media (hover: none) {
  html.sd a[data-peek] {
    -webkit-touch-callout: none;
  }
}

/* ==== round 2 of the tidy look (the owner, 26. 11. 2026; the same rules as INTECHI CRM, docs/INTECHI-DESIGN-SYSTEM.md) ==== */

/* the bar of the period: every name has its picture and a colon, the value shown stands in a cloud */
html.sd .period-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
html.sd .period-label > i {
  color: var(--accent);
}
html.sd .pick-label > i {
  margin-right: 6px;
  color: var(--accent);
}

/* a card or a section with nothing but its heading is not shown; it comes with its first record (the action to add one stays at the top of
   the page). The sections of To pay / To invoice with only their head and no cloud of a state too. */
html.sd main section.card:not(:has(> :not(h2):not(h3):not(h4))),
html.sd main div.card:not(:has(> :not(h2):not(h3):not(h4))),
html.sd main section:not(.pay-sec):not(:has(> :not(h2):not(h3):not(h4))),
html.sd main .pay-sec:not(:has(> :not(.pay-sec-head))):not(:has(.pay-chip)),
html.sd main .esb-area:not(:has(> :not(h4))) {
  display: none;
}

/* the one sentence after a search or a filter that found nothing */
html.sd .nomatch {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
html.sd .nomatch[hidden] {
  display: none;
}

/* the switch of a function and the try of the bridge: „Zapnout“ and „Vyzkoušet spojení“ full green, „Vypnout“ full dark red; the colours are
   the tokens of the palette (green 700, red 800), white words: contrast above 4.5 : 1 in both modes (the same in INTECHI CRM) */
html.sd.sd .btn.btn-go,
html.sd.sd button.btn.btn-go:not(.secondary):not(.danger) {
  background: var(--sd-color-green-700);
  border-color: var(--sd-color-green-700);
  color: #fff;
}
html.sd.sd .btn.btn-stop,
html.sd.sd button.btn.btn-stop:not(.secondary):not(.danger) {
  background: var(--sd-color-red-800);
  border-color: var(--sd-color-red-800);
  color: #fff;
}
html.sd.sd .btn.btn-go:hover,
html.sd.sd .btn.btn-stop:hover {
  filter: brightness(0.92);
}
html.sd.sd .btn.btn-go:disabled {
  opacity: 0.55;
}

/* the hand at the start of a row of the items of an invoice: hold it and move the row up or down (public/js/rowmove.js; the same as the
   editor of a quote in INTECHI CRM) */
html.sd .row-grip {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: grab;
  touch-action: none;
}
html.sd .row-grip:hover,
html.sd .row-grip:focus-visible {
  color: var(--accent);
  background: var(--soft);
}
html.sd tr.row-dragging {
  background: var(--soft);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.14);
  position: relative;
  z-index: 2;
}
html.sd tr.row-dragging .row-grip {
  cursor: grabbing;
  color: var(--accent);
}
html.sd th.row-grip-cell,
html.sd td.row-grip-cell {
  width: 40px;
  padding-left: 0;
  padding-right: 0;
  text-align: center;
}
/* the first shown row keeps no minus (an invoice has one item at least) */
html.sd tbody[data-rows] > tr[data-row]:first-child .row-del-cell > * {
  visibility: hidden;
}
@media (pointer: coarse) {
  html.sd .row-grip {
    width: 44px;
    height: 44px;
  }
}

/* the picture of a way of payment in the choice of the form */
html.sd .seg label > i {
  margin-right: 6px;
}

/* the small picture left of a file in every list of files: a thumbnail of a picture, the red mark of a PDF, the mark of the kind (the
   same in INTECHI CRM) */
html.sd .file-name {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  vertical-align: middle;
  text-align: left;
}
html.sd .file-name-text {
  min-width: 0;
  overflow-wrap: anywhere;
}
html.sd .file-thumb {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  object-fit: cover;
}
html.sd .file-thumb-ico > i {
  font-size: 20px;
  color: var(--muted);
}
html.sd .file-thumb-ico > i.fa-file-pdf {
  color: #d92d20;
}
html.sd .file-thumb-ico > i.fa-file-excel {
  color: #15803d;
}
html.sd .file-thumb-ico > i.fa-file-word {
  color: #1d4ed8;
}
html.sd .file-thumb-ico > i.fa-file-image {
  color: #7c3aed;
}
/* on a phone (a row is a card): the file, and under it on the left the account it was paid from; the size of the file is left out there
   (the owner, 26. 11. 2026). The cell is a column, so nothing in it jumps to the side and the row keeps one height with its tick box
   and its buttons. */
@media (max-width: 640px) {
  html.sd table.stack-table td:has(> a .file-name) {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: center;
    gap: 6px;
  }
  html.sd table.stack-table td:has(> a .file-name) > br,
  html.sd table.stack-table td:has(> a .file-name) > .doc-pay > br,
  html.sd table.stack-table td:has(> a .file-name) > .note {
    display: none;
  }
  html.sd table.stack-table td:has(> a .file-name) > a {
    padding: 0;
    max-width: 100%;
  }
  html.sd table.stack-table td:has(> a .file-name) > .doc-pay:empty {
    display: none;
  }
  /* the picture of a file is smaller in a card, so that the name beside it keeps its room and is not broken in the middle */
  html.sd table.stm .file-name {
    gap: 6px;
  }
  html.sd table.stm .file-thumb {
    width: 26px;
    height: 26px;
    border-radius: 6px;
  }
  html.sd table.stm .file-thumb-ico > i {
    font-size: 16px;
  }
  /* the list of revenue has a narrow column for the file: no picture there on a phone, the name keeps one line */
  html.sd table.rev-table .file-thumb {
    display: none;
  }
  /* a cell whose value is only a mark (Zahrnuto): the mark on the line of its name */
  html.sd table.stack-table td[data-label]:has(> .incl-mark:only-child) {
    align-items: center;
  }
}

/* the menu „…“ of a row: as wide as its longest item, every item of the same width, the picture in one column and the words beside it */
html.sd td.acts-cell .acts-body {
  width: max-content;
  min-width: 0;
  max-width: min(360px, calc(100vw - 16px));
}
/* (an item longer than the widest menu allowed wraps inside the menu, it is never cut) */
html.sd .acts-body .btn.ia.ia.icon-only,
html.sd .acts-body .icon-btn {
  box-sizing: border-box;
}
@media (max-width: 860px) {
  html.sd td.acts-cell .acts-body {
    width: max-content;
    max-width: calc(100vw - 32px);
  }
}

/* the window of a file: about 90 % of the height that is really seen (dvh leaves out the bars of the browser of a phone), the PDF fills
   100 % of its width and height (the frame lies over the whole body of the window) */
html.sd dialog.viewer {
  width: min(1100px, 96vw);
  height: 90vh;
  height: 90dvh;
  max-height: none;
}
html.sd dialog.viewer .viewer-body {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  align-self: stretch;
}
html.sd dialog.viewer .viewer-body iframe {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* a heading whose name is a coloured cloud: its picture stands inside the cloud */
html.sd h2 > .role-pill > i.fa-solid:first-child,
html.sd h3 > .role-pill > i.fa-solid:first-child,
html.sd h4 > .role-pill > i.fa-solid:first-child,
html.sd summary > .role-pill > i.fa-solid:first-child,
html.sd h2 > .pay-chip > i.fa-solid:first-child,
html.sd h3 > .pay-chip > i.fa-solid:first-child,
html.sd h4 > .pay-chip > i.fa-solid:first-child,
html.sd summary > .pay-chip > i.fa-solid:first-child {
  margin-right: 6px;
  color: inherit;
}

/* the name of a row of facts with its picture */
html.sd dt > .field-icon {
  margin-right: 6px;
  color: var(--accent);
}

/* a choice with a picture at every option (select[data-pick], public/js/accountpick.js): the picture before the words */
html.sd .acct-pick .pick-ico {
  flex: none;
  width: 18px;
  text-align: center;
  color: var(--accent);
}
html.sd .row > .acct-pick {
  width: auto;
  min-width: 180px;
}

/* every bar with a message has the picture of its kind (the owner, 26. 11. 2026; solved here in the root, for every page): done = a tick
   in a circle, an error = a cross in a circle, a warning = a triangle, anything else = the „i“. A bar that carries its own picture keeps it. */
html.sd main .notice:not(:has(.fa-solid))::before,
html.sd main .warn-box:not(:has(.fa-solid))::before,
html.sd main p.ok:not([role]):not(:has(.fa-solid))::before {
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  line-height: 1;
  margin-right: 10px;
  content: '\f05a';
  color: #2563eb;
  position: static;
  width: auto;
  height: auto;
  background: none;
  -webkit-mask: none;
  mask: none;
  transform: none;
}
html.sd main .notice.good:not(:has(.fa-solid))::before,
html.sd main p.ok:not([role]):not(:has(.fa-solid))::before {
  content: '\f058';
  color: #16a34a;
}
html.sd main .notice.bad:not(:has(.fa-solid))::before {
  content: '\f057';
  color: #e5484d;
}
html.sd main .warn-box:not(:has(.fa-solid))::before {
  content: '\f071';
  color: #d97706;
}
html.sd .co-sec .co-h span > i.fa-solid:first-child {
  margin-right: 6px;
  color: inherit;
}
/* a choice with pictures stands in line with the fields beside it */
@media (min-width: 992px) and (pointer: fine) {
  html.sd .acct-pick.pick .acct-btn {
    min-height: 30px;
    height: 30px;
  }
}
html.sd legend > .field-icon,
html.sd .pick-label > .field-icon {
  margin-right: 6px;
  color: var(--accent);
}
/* the picture of a tag (a badge with words) */
html.sd .badge > .badge-ico {
  margin-right: 5px;
  font-size: 0.9em;
}
/* in a cell of a table the name with its picture starts at the top of its line, so the content stays in the vertical middle of the row */
html.sd td .file-name {
  vertical-align: top;
}

/* ==== the sorting and the funnels in the head of every table: the file public/css/colfilter.css of INTECHI CRM copied 1:1 (the owner,
   27. 11. 2026: „převezmeme komplet koncept na Finance ze CRM“); keep it the same as there, a change goes into both applications ==== */
/* the sorting and the filters in the head of a table (src/views/colFilter.ts, public/js/colfilter.js; the owner, 20. 11. 2026) */
/* a long name of a column may go on two lines, but only when the table would not fit otherwise; the arrows and the funnel stay with it */
html.sd th.cf-th {
  white-space: normal;
  /* narrower sides: the arrows and the funnel take place of their own (a table of nine columns fits at 1280 px) */
  padding-left: 8px;
  padding-right: 8px;
}
html.sd .cf-head {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
html.sd .cf-sort > span {
  text-wrap: balance;
}
html.sd .cf-arrows,
html.sd .cf-funnel {
  flex: none;
}
html.sd .cf-sort {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: inherit;
  text-decoration: none;
  min-height: 32px;
}
html.sd .cf-sort:hover,
html.sd .cf-sort:focus-visible {
  color: var(--accent);
}
html.sd .cf-arrows {
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.55;
}
html.sd th.cf-sorted .cf-sort,
html.sd th.cf-sorted .cf-arrows {
  color: var(--accent);
  opacity: 1;
}
/* the funnel: quiet when off; when on the colour of the actions and a small dot (no heavy square) */
html.sd .cf-funnel {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--muted);
  opacity: 0.6;
  cursor: pointer;
  font-size: 13px;
}
html.sd .cf-funnel:hover,
html.sd .cf-funnel:focus-visible,
html.sd .cf-funnel[aria-expanded='true'] {
  opacity: 1;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
html.sd .cf-funnel.on {
  opacity: 1;
  color: var(--accent);
}
/* the mark of a filter that is on: a round badge with a white tick (the owner, 20. 11. 2026: „symetrická jako kolečko“) */
html.sd .cf-funnel.on::after {
  content: '\f00c';
  position: absolute;
  top: -1px;
  right: -4px;
  box-sizing: border-box;
  width: 14px;
  height: 14px;
  padding: 0;
  border-radius: 50%;
  display: block;
  text-align: center;
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 8px;
  line-height: 14px;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--card);
}
/* the window of a filter */
html.sd .cf-pop {
  z-index: 60;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
  padding: 14px;
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
  font-size: 14px;
  color: var(--text);
  white-space: normal;
}
html.sd .cf-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
html.sd .cf-title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
html.sd .cf-title i,
html.sd .cf-field > span i,
html.sd .cf-group legend i {
  color: var(--accent);
  width: 1.1em;
  text-align: center;
}
html.sd .cf-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
html.sd .cf-field > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}
html.sd .cf-field input,
html.sd .cf-field select {
  min-height: 44px;
  width: 100%;
}
html.sd .cf-range {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
html.sd .cf-set {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
html.sd .cf-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 8px;
  border-radius: 10px;
  cursor: pointer;
}
html.sd .cf-check:hover {
  background: var(--soft2);
}
html.sd .cf-check input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--accent);
  flex: none;
}
html.sd .cf-btns {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 4px;
}
/* nothing stands above the table on a computer (the owner, 26. 11. 2026); the box holds only the button of the phone */
html.sd .cf-bar {
  margin: 0;
}
/* a computer: the box is empty there, and an empty box in a stacked card doubled the gap between the heading and the table */
@media (min-width: 641px) {
  html.sd .cf-bar:not(:has(~ .tablewrap > .cards-mid)):not(:has(.cf-show)) {
    display: none;
  }
}
@media (min-width: 1280px) {
  html.sd .cf-bar:not(:has(.cf-show)) {
    display: none;
  }
}
/* a row the filter of a table made in the browser took away (public/js/coltable.js); the cards of a phone set their own display */
html.sd tr.cf-hide {
  display: none !important;
}
/* the one row of a list that found nothing: the head with the funnel stays above it */
html.sd tr.cf-none > td {
  text-align: center;
  padding: 18px 12px;
}
html.sd tr.cf-none > td::before {
  content: none !important;
}
html.sd tr.cf-none p.empty {
  margin: 0;
}
/* the phone: the table is cards without its head, one button holds the same choices */
html.sd .cf-phone {
  display: none;
  width: 100%;
}
html.sd .cf-phone > summary {
  list-style: none;
  cursor: pointer;
  width: max-content;
}
html.sd .cf-phone > summary::-webkit-details-marker {
  display: none;
}
html.sd .cf-phone-form {
  margin-top: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}
html.sd .cf-group {
  border: 0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
html.sd .cf-group legend {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  margin-bottom: 4px;
}
/* the button and a group of the phone panel with a filter that is on: the same round mark as a funnel */
html.sd .cf-phone > summary.cf-on {
  position: relative;
}
html.sd .cf-phone > summary.cf-on::after,
html.sd .cf-group.cf-on legend::after {
  content: '\f00c';
  box-sizing: border-box;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: block;
  text-align: center;
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 8px;
  line-height: 14px;
  color: #fff;
  background: var(--accent);
}
html.sd .cf-phone > summary.cf-on::after {
  position: absolute;
  top: -4px;
  right: -4px;
  box-shadow: 0 0 0 2px var(--card);
}
/* shown exactly where the head of the table is not: the cards of a phone, and the cards of a middle width (cards-mid) */
@media (max-width: 640px) {
  html.sd .cf-phone:not(.cf-phone-client) {
    display: block;
    margin: 0 0 10px;
  }
  /* one row on a phone (the owner, 27. 11. 2026): the button that adds (Nový…, Přidat…) on the LEFT as on every overview, „Filtrovat a řadit“
     beside it, never one under the other; the opened panel of the filters takes the whole width below the row */
  html.sd .toolbar:has(+ .cf-bar) {
    display: block;
    margin-bottom: 0;
  }
  html.sd .toolbar:has(+ .cf-bar) > * {
    margin-bottom: 10px;
  }
  html.sd .toolbar:has(+ .cf-bar) > :last-child:not(.chips) {
    float: left;
    max-width: 100%;
    margin-right: 8px;
    justify-content: flex-start;
  }
  html.sd .toolbar + .cf-bar::after {
    content: '';
    display: block;
    clear: both;
  }
  html.sd .toolbar + .cf-bar .cf-phone {
    width: auto;
    float: left;
  }
  html.sd .toolbar + .cf-bar .cf-phone-form {
    clear: both;
  }
}
@media (min-width: 641px) and (max-width: 1279px) {
  html.sd .cf-bar:has(~ .tablewrap > .cards-mid) .cf-phone {
    display: block;
    margin: 0 0 10px;
  }
}
/* a table made in the browser: its script shows the button whenever the head is not drawn */
html.sd .cf-phone-client.cf-show {
  display: block;
  margin: 0 0 10px;
}
/* a head without sorting (a log kept in the order of its server): the name beside the funnel; the name of a group of choices in a window */
html.sd .cf-name {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
}
html.sd .cf-sub {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}
html.sd .cf-sub i {
  color: var(--accent);
  width: 1.1em;
  text-align: center;
}
/* Finance only: the links of Finance have a stronger rule (html.sd a:not(.inv-sheet *)) than the CRM, so the name and the arrows of a head
   would be blue; they are grey as in the CRM, blue only when sorted or under the pointer */
html.sd th a.cf-sort:not(.inv-sheet *) {
  color: inherit;
}
/* Finance only: the colour of a firm of Finance is its own (purple TECHNOLOGY, teal SERVICE); the head, its funnel and the window of the
   filter are blue in every firm, as in INTECHI CRM (the owner, 27. 11. 2026: no green window) */
html.sd th.cf-th,
html.sd .cf-pop,
html.sd .cf-phone {
  --accent: #1c6bc7;
}
html.sd th a.cf-sort:not(.inv-sheet *):hover,
html.sd th a.cf-sort:not(.inv-sheet *):focus-visible,
html.sd th.cf-sorted a.cf-sort:not(.inv-sheet *) {
  color: var(--accent);
}

/* the head takes the side its cells are seen on (public/js/coltable.js, the owner, 27. 11. 2026: the head of a column stands on the same axis
   as its cells; the first column stays on the left); stronger than the rule of any single table. The same as INTECHI CRM (public/css/tables.css).
   scripts/ui-check.sh reports a head on another side than its cells (headalign=). */
html.sd th.th-l {
  text-align: left !important;
}
html.sd th.th-c {
  text-align: center !important;
}
html.sd th.th-r {
  text-align: right !important;
}

/* the payments of the bank (Faktury › Platby z banky): the account and the note of a payment are one block, the number never breaks letter
   by letter on a phone (the owner, 26. 11. 2026) */
html.sd .pay-from {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
html.sd .pay-from .pay-acct {
  overflow-wrap: anywhere;
}
@media (max-width: 640px) {
  html.sd table.stack-table td[data-label] > .pay-from {
    flex: 1 1 0;
    align-items: flex-end !important;
    text-align: right !important;
  }
  html.sd .pay-from > .pay-acct:empty {
    display: none;
  }
}

/* round 3, the cards of the documents on a phone (the owner, 26. 11. 2026: every kind of row the same, nothing runs aside) */
@media (max-width: 640px) {
  /* a record without a file: the same column as a row with a file (the name, under it „záznam bez souboru“, no empty line between them) */
  html.sd table.stack-table td:has(> .doc-pay):not(:has(> a .file-name)) {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
  }
  html.sd table.stack-table td:has(> .doc-pay):not(:has(> a .file-name)) > br,
  html.sd table.stack-table td:has(> .doc-pay) > .doc-pay:empty {
    display: none;
  }
  /* the account under the file: the bank and the number on one line inside the cell (the flag and the code of the currency are left out
     there: with them the number broke into three lines or ran out of the cell) */
  html.sd table.stack-table .doc-pay .acct-pill {
    max-width: 100%;
    flex-wrap: nowrap;
    gap: 4px;
    padding: 3px 7px 3px 4px;
  }
  html.sd table.stack-table .doc-pay .acct-pill .mono {
    white-space: nowrap;
    font-size: 11px;
    letter-spacing: -0.3px;
  }
  html.sd table.stack-table .doc-pay .acct-pill > b,
  html.sd table.stack-table .doc-pay .acct-pill .acct-flag {
    display: none;
  }
  /* the kind of a document with a note under it (the advance it belongs to): the name of the kind stays on the line of its label, the note
     under it on the left */
  html.sd table.stack-table td[data-label] > .kind-cell:has(> .doc-note) {
    max-width: 66%;
  }
}

/* the matrix of the rights (Správa › Uživatelé): the picture of a module stands in the middle of its line, so the name of the row is in the
   middle of its cell on a phone too (scripts/ui-check.sh, VAROVANI-STRED) */
html.sd .matrix td:first-child .mod-icon {
  vertical-align: middle;
  line-height: 1;
}

/* Fred › Žádosti (the owner, 27. 11. 2026): the lists and the states are tiles with their numbers in one row (as Úkoly of INTECHI CRM) */
html.sd .kpi-row.bot-rq-tiles {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-bottom: 16px;
}
@media (max-width: 640px) {
  html.sd .kpi-row.bot-rq-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ==== the tiles of the numbers: the file public/css/kpitiles.css of INTECHI CRM copied 1:1 (the owner, 27. 11. 2026: every tile of the numbers
   of Finance the same as the CRM: the coloured glass, the dot in the corner, the picture before the name, the number in the colour) ==== */
@keyframes pc-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--st) 20%, transparent);
  }
  14% {
    transform: scale(1);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--st) 20%, transparent);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--st) 20%, transparent);
  }
  6% {
    transform: scale(1.22);
    box-shadow: 0 0 0 9px color-mix(in srgb, var(--st) 28%, transparent);
  }
}
/*
 * THE ONE TILE of the numbers of the whole CRM (the owner, 22. 11. 2026: no flat tile anywhere): a coloured piece of glass as the cards of the
 * phases on the home page (pcards.css): a soft tint of its colour from the corner, a dot in the colour, the number big in the colour, the name with
 * the picture of its meaning (buttonTone.ts kpiLook gives the picture and the class kt-xxx). The depth, the lift and the tilt follow the switch
 * Animační efekty (html[data-fx]). A tile with a colour of its own (warn, bad, good, info, the colour of a phase) keeps it.
 * html.sd:root: sd.css comes after the parts and has html.sd .kpi-tile, so these rules have one class more.
 */
html.sd .kpi-tile.kt-blue,
html.sd .kpi-tile.info {
  --stage: #1f7fc4;
  --stage-ink: #17639a;
}
html.sd .kpi-tile.kt-sky {
  --stage: #38a3e8;
  --stage-ink: #0b6e99;
}
html.sd .kpi-tile.kt-violet {
  --stage: #6a4cc7;
  --stage-ink: #5a3db3;
}
html.sd .kpi-tile.kt-amber,
html.sd .kpi-tile.warn {
  --stage: #e08a00;
  --stage-ink: #8a5a00;
}
html.sd .kpi-tile.kt-green,
html.sd .kpi-tile.good {
  --stage: #1e8e3e;
  --stage-ink: #1a7434;
}
html.sd .kpi-tile.kt-red,
html.sd .kpi-tile.bad {
  --stage: #c62828;
  --stage-ink: #b02121;
}
html.sd .kpi-tile.kt-slate {
  --stage: #64748b;
  --stage-ink: #475569;
}
html.sd .kpi-tile.kt-teal {
  --stage: #0e8a7d;
  --stage-ink: #0b6b61;
}
html.sd .kpi-row {
  perspective: 900px;
}
html.sd:root .kpi-tile {
  --st: var(--stage, var(--accent));
  position: relative;
  min-height: 112px;
  padding: 16px 44px 16px 18px;
  gap: 6px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--st) 26%, var(--line));
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--st) 13%, var(--card)) 0%,
    var(--card) 66%
  );
  color: var(--ink);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 10px 24px -14px rgba(15, 23, 42, 0.28);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}
html.sd[data-theme='dark']:root .kpi-tile {
  border-color: color-mix(in srgb, var(--st) 34%, var(--line));
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--st) 22%, var(--card)) 0%,
    var(--card) 72%
  );
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 14px 30px -16px rgba(0, 0, 0, 0.7);
}
/* the dot in the colour of the tile, top right (as the cards of the phases) */
html.sd:root .kpi-tile::after {
  content: '';
  position: absolute;
  top: 18px;
  right: 18px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--st);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--st) 20%, transparent);
}
/* the name: the words of the text, the picture in the colour of the tile */
html.sd:root .kpi-tile > small:first-child {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}
html.sd:root .kpi-tile .tile-icon {
  color: var(--stage-ink, var(--st));
}
html.sd[data-theme='dark']:root .kpi-tile .tile-icon {
  color: color-mix(in srgb, var(--st) 70%, #fff);
}
/* the number big, in the colour of the tile (a profit or a loss keeps its own green or red) */
html.sd:root .kpi-tile b.mono:not(.profit):not(.neg):not(.pos),
html.sd:root .kpi-tile .kpi-line > b.mono {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.5px;
  color: var(--stage-ink, var(--st));
}
html.sd[data-theme='dark']:root .kpi-tile b.mono:not(.profit):not(.neg):not(.pos),
html.sd[data-theme='dark']:root .kpi-tile .kpi-line > b.mono {
  color: color-mix(in srgb, var(--st) 60%, #fff);
}
html.sd:root .kpi-tile b.mono.profit,
html.sd:root .kpi-tile b.mono.neg,
html.sd:root .kpi-tile b.mono.pos {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
}
/* a tile that opens its list: the frame in its colour under the pointer */
html.sd:root a.kpi-tile:hover,
html.sd:root a.kpi-tile:focus-visible,
html.sd:root a.kpi-tile.on {
  border-color: var(--st);
}
html.sd:root a.kpi-tile.on {
  box-shadow:
    0 0 0 1px var(--st),
    0 10px 24px -14px rgba(15, 23, 42, 0.28);
}
/* the depth: the tile rises and leans a little under the pointer, only while the effects are on */
html.sd:not([data-fx='off']):root .kpi-tile:hover,
html.sd:not([data-fx='off']):root a.kpi-tile:focus-visible {
  transform: translateY(-4px) rotateX(2deg);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 18px 34px -14px rgba(15, 23, 42, 0.34);
}
html.sd:not([data-fx='off'])[data-theme='dark']:root .kpi-tile:hover,
html.sd:not([data-fx='off'])[data-theme='dark']:root a.kpi-tile:focus-visible {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 20px 36px -16px rgba(0, 0, 0, 0.8);
}
html.sd[data-fx='off'] .kpi-tile {
  transition: none;
}
@media (max-width: 640px) {
  html.sd:root .kpi-tile {
    min-height: 96px;
    padding: 14px 36px 14px 14px;
    border-radius: 16px;
  }
  html.sd:root .kpi-tile::after {
    top: 15px;
    right: 14px;
    width: 10px;
    height: 10px;
  }
  html.sd:root .kpi-tile b.mono:not(.profit):not(.neg):not(.pos),
  html.sd:root .kpi-tile .kpi-line > b.mono,
  html.sd:root .kpi-tile b.mono.profit,
  html.sd:root .kpi-tile b.mono.neg,
  html.sd:root .kpi-tile b.mono.pos {
    font-size: 24px;
  }
}

/* the counts of Johny (Schopnosti, Operace: .bot-kpi in johny.css and botops.css) are the same coloured glass with the same depth */
html.sd:root .bot-kpi-blue {
  --stage: #1f7fc4;
  --stage-ink: #17639a;
}
html.sd:root .bot-kpi-green {
  --stage: #1e8e3e;
  --stage-ink: #1a7434;
}
html.sd:root .bot-kpi-purple {
  --stage: #6a4cc7;
  --stage-ink: #5a3db3;
}
html.sd:root .bot-kpi-amber {
  --stage: #e08a00;
  --stage-ink: #8a5a00;
}
html.sd:root .bot-kpi-red {
  --stage: #c62828;
  --stage-ink: #b02121;
}
html.sd:root .bot-kpi-neutral {
  --stage: #64748b;
  --stage-ink: #475569;
}
html.sd:root .bot-kpis {
  perspective: 900px;
}
html.sd:root .bot-kpi.bot-kpi {
  --st: var(--stage, var(--accent));
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--st) 26%, var(--line));
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--st) 13%, var(--card)) 0%,
    var(--card) 66%
  );
  color: var(--ink);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 10px 24px -14px rgba(15, 23, 42, 0.28);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}
html.sd[data-theme='dark']:root .bot-kpi.bot-kpi {
  border-color: color-mix(in srgb, var(--st) 34%, var(--line));
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--st) 22%, var(--card)) 0%,
    var(--card) 72%
  );
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 14px 30px -16px rgba(0, 0, 0, 0.7);
}
html.sd:root .bot-kpi .bot-kpi-label .fa-solid,
html.sd:root .bot-kpi .bot-kpi-value {
  color: var(--stage-ink, var(--st));
}
html.sd[data-theme='dark']:root .bot-kpi .bot-kpi-label .fa-solid,
html.sd[data-theme='dark']:root .bot-kpi .bot-kpi-value {
  color: color-mix(in srgb, var(--st) 65%, #fff);
}
html.sd:root .bot-kpi .bot-kpi-value {
  font-weight: 800;
}
html.sd:root .bot-kpi.bot-kpi:hover {
  border-color: var(--st);
}
html.sd:not([data-fx='off']):root .bot-kpi.bot-kpi:hover,
html.sd:not([data-fx='off']):root .bot-kpi.bot-kpi:focus-visible {
  transform: translateY(-4px) rotateX(2deg);
}
html.sd[data-fx='off'] .bot-kpi {
  transition: none;
}

/*
 * The dot top right pulses as the dots of the cards of the phases on the home page (pcards.css, pc-pulse; the owner, 23. 11. 2026: „na
 * Reportech tečka nepulzuje, na Přehledu ano“): one tile after another, again every 5 seconds. The same for every tile of the numbers (.kpi-tile
 * and the counts of Johny .bot-kpi, which get the same dot). Only while the switch Animační efekty is on (html[data-fx]: off when the person
 * switched it off, or did not choose and the device asks for less motion).
 */
html.sd:root .bot-kpi.bot-kpi {
  position: relative;
  padding-right: 40px;
}
html.sd:root .bot-kpi.bot-kpi::after {
  content: '';
  position: absolute;
  top: 16px;
  right: 16px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--st);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--st) 20%, transparent);
}
html.sd:not([data-fx='off']):root .kpi-tile::after,
html.sd:not([data-fx='off']):root .bot-kpi.bot-kpi::after {
  animation: pc-pulse 5s ease-in-out infinite;
}
html.sd:not([data-fx='off']):root .kpi-tile:nth-child(1)::after,
html.sd:not([data-fx='off']):root .bot-kpi:nth-child(1)::after {
  animation-delay: 0.5s;
}
html.sd:not([data-fx='off']):root .kpi-tile:nth-child(2)::after,
html.sd:not([data-fx='off']):root .bot-kpi:nth-child(2)::after {
  animation-delay: 1s;
}
html.sd:not([data-fx='off']):root .kpi-tile:nth-child(3)::after,
html.sd:not([data-fx='off']):root .bot-kpi:nth-child(3)::after {
  animation-delay: 1.5s;
}
html.sd:not([data-fx='off']):root .kpi-tile:nth-child(4)::after,
html.sd:not([data-fx='off']):root .bot-kpi:nth-child(4)::after {
  animation-delay: 2s;
}
html.sd:not([data-fx='off']):root .kpi-tile:nth-child(5)::after,
html.sd:not([data-fx='off']):root .bot-kpi:nth-child(5)::after {
  animation-delay: 2.5s;
}
html.sd:not([data-fx='off']):root .kpi-tile:nth-child(6)::after,
html.sd:not([data-fx='off']):root .bot-kpi:nth-child(6)::after {
  animation-delay: 3s;
}
html.sd[data-fx='off'] .kpi-tile::after,
html.sd[data-fx='off'] .bot-kpi::after {
  animation: none;
}

/* five tiles of counts (the lists of Úkoly): short numbers, so one row from the width of a computer (the owner, 27. 11. 2026) */
@media (min-width: 900px) {
  html.sd .kpi-row.n5.kpi-counts {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* Mzdy (the owner, 27. 11. 2026): no line „Z čeho se mzda skládá“ under every wage; the eye of the row opens the parts under it, a line
   with a problem of the payslip stays */
html.sd tr.pay-sub:not(.pay-sub-open):not(:has(.pay-problem)) {
  display: none;
}
html.sd tr.pay-sub:not(.pay-sub-open) .pay-detail {
  display: none;
}
html.sd tr.pay-sub .pay-detail > summary {
  display: none;
}
/* the groups of Mzdy by people: the picture of a person, not the calendar of a month */
html.sd #pay-list[data-view='people'] tr.pay-head .chev::before {
  content: '\f007';
}
/* Náklady › Nahrát doklady (the owner, 27. 11. 2026): the pictures of the kinds of files beside the heading, on its line */
html.sd .docs-drop-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
}
/* the button of a field for a file: the picture of a folder before its words, as every button */
html.sd .fp-btn::before {
  content: '\f07c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  margin-right: 8px;
  color: var(--accent);
}
html.sd .fp-name:empty {
  display: none;
}
/* Domů › Připomínky (the owner, 27. 11. 2026): the name of the invoice and the line „Upomínáno N× · naposledy …“ under its first letter,
   the picture of the PDF in the middle of both lines */
html.sd .reminder-main {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 8px;
  row-gap: 2px;
  align-items: center;
  min-width: 0;
}
html.sd .reminder-main > .reminder-thumb {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: center;
  text-decoration: none;
}
html.sd .reminder-main > .reminder-title,
html.sd .reminder-main > .reminder-sent {
  grid-column: 2;
  grid-row: auto;
  align-self: center;
}
html.sd .reminder-main > .reminder-title:only-child,
html.sd .reminder-main > .reminder-title:first-child {
  grid-column: 1 / -1;
}
html.sd .reminder-main > .reminder-title:first-child + .reminder-sent {
  grid-column: 1 / -1;
}
/* a reminder of one line beside the PDF (Faktura … má splatnost za 3 dny; the owner, 28. 11. 2026): the picture spans only that line, so the
   words stand in the middle of the picture as in a row of two lines, not higher */
html.sd .reminder-main:not(:has(> .reminder-sent)) > .reminder-thumb {
  grid-row: 1;
}
@media (max-width: 860px) {
  html.sd .reminder-main {
    grid-column: 1 / -1;
    grid-row: auto;
  }
}
/* date and time fields on an iPhone (Safari draws them as a centred pill with its own least width, lower than the other fields and wider
   than a narrow column): the same box as a text field, never wider than its column, the value on the left (the same as INTECHI CRM sd.css) */
html.sd input[type='date'],
html.sd input[type='time'],
html.sd input[type='datetime-local'],
html.sd input[type='month'] {
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  text-align: left;
}
html.sd input::-webkit-date-and-time-value {
  text-align: left;
  min-height: 1.4em;
}
/* the choices of a period of Fred (7 / 30 / 90 dní): the picture of a clock before the words, as every chip */
html.sd .bot-period .chip:not(:has(i))::before {
  content: '\f017';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  margin-right: 6px;
  opacity: 0.85;
}
/* a card that held only the heading said by the top line is empty: not shown */
html.sd .card:has(> .title-gone:only-child) {
  display: none;
}
/* a wide table made smaller to the width of its card (public/js/fitwide.js): the whole table is seen, so the sticky column of the actions
   on the right is not needed, and in a scaled table it would stay at the right edge of the unscaled box and cover the column before it */
html.sd table[data-fit][style*='scale'] th.col-act,
html.sd table[data-fit][style*='scale'] td.month-act,
html.sd table[data-fit][style*='scale'] td.doc-actions-cell,
html.sd table[data-fit][style*='scale'] td:has(> .doc-icons) {
  position: static !important;
  box-shadow: none !important;
}

/* ===== Kolo 5 z CRM 1.125 (vlastník 27. 11. 2026: „to stejně udělej i ve Financích“), pravidla 1:1 podle CRM public/css/shared.css,
   askbox.css, telpick.css, johny.css a kpitiles.css ===== */

/* the button that adds (Nový…, Přidat…, Vytvořit…) stands on the LEFT of every overview, in all three applications */
html.sd .toolbar {
  justify-content: flex-start;
}
html.sd .toolbar > .title-gone {
  display: none;
}
html.sd .toolbar > .adds {
  order: -1;
}

/* every button that uploads (Nahrát doklad, Nahrát výpis, Nahrát přílohu…) is purple, the colour of the action upload (the same in CRM and Smart) */
html.sd .btn:has(> i.fa-upload):not(.ia),
html.sd .btn:has(> i.fa-upload).ia {
  background: var(--sd-action-purple-bg);
  border-color: var(--sd-action-purple-line);
  color: var(--sd-action-purple-ink);
}
html.sd .btn:has(> i.fa-upload):hover {
  background: var(--sd-action-purple-hover);
  border-color: var(--sd-action-purple-line);
  color: var(--sd-action-purple-ink);
  filter: none;
}

/* a count is a circle in the colour of the firm, never „(1)“ (src/views/buttonTone.ts countDots; all three apps) */
html.sd .count-dot {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  box-sizing: border-box;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
  margin-left: 6px;
}
/* in a coloured button or label the circle is a soft tint of its letters, so it is seen on every tone */
html.sd .btn .count-dot,
html.sd .badge .count-dot,
html.sd .chip .count-dot,
html.sd .pay-chip .count-dot {
  min-width: 20px;
  height: 20px;
  font-size: 11.5px;
  background: color-mix(in srgb, currentColor 18%, transparent);
  color: inherit;
}

/* Zrušit is dark grey, Smazat is red, wherever they stand (the owner, 27. 11. 2026, all three apps) */
html.sd .btn:has(> i.fa-xmark):not(.ia),
html.sd .btn:has(> i.fa-xmark).ia {
  background: var(--sd-color-slate-700);
  border-color: var(--sd-color-slate-700);
  color: #fff;
}
html.sd .btn:has(> i.fa-xmark):hover,
html.sd .btn:has(> i.fa-xmark):focus-visible {
  background: var(--sd-color-slate-800);
  border-color: var(--sd-color-slate-800);
  color: #fff;
}
html.sd .btn:has(> i.fa-trash):not(.ia),
html.sd .btn:has(> i.fa-trash).ia {
  background: var(--sd-action-red-bg);
  border-color: var(--sd-action-red-line);
  color: var(--sd-action-red-ink);
}

/* the lists of a page as tiles (src/views/listTiles.ts): as many as there are, side by side as the width allows; on a phone two in a row
   and an odd last one over the whole width, as INTECHI CRM */
html.sd .kpi-row.kpi-lists {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
html.sd .kpi-row.kpi-lists > .kpi-tile:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}
@media (min-width: 900px) {
  html.sd .kpi-row.kpi-lists > .kpi-tile:last-child:nth-child(odd) {
    grid-column: auto;
  }
  html.sd .kpi-row.kpi-lists {
    grid-template-columns: repeat(var(--lists-cols, 5), minmax(0, 1fr));
  }
}

/* a section as a folded row (src/views/paySection.ts): the chip stands at the right end of the row */
html.sd details.pay-fold > summary {
  display: flex;
  align-items: center;
  gap: 10px;
}
html.sd details.pay-fold > summary > .pay-chip {
  margin-left: auto;
}
/* a single card of the overview of Fred goes across the page */
html.sd .bot-cols > .bot-col:only-child {
  grid-column: 1 / -1;
}
/* the head card with Fred: the picture and the heading on one axis (CRM johny.css .card.johny-head) */
html.sd .card.bot-head > div {
  margin: 0;
}
html.sd .bot-mode .fa-solid {
  margin-right: 6px;
}

/* The question before an action (public/js/askbox.js): a card of the application over a dimmed page, Ano red and Ne green in the middle */
html.sd .ask-box {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.45);
}
html.sd .ask-card {
  width: min(440px, 100%);
  padding: 24px 22px 20px;
  border-radius: var(--sd-radius-xl, 18px);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  background: var(--card);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
  text-align: center;
}
html.sd .ask-text {
  margin: 0 0 18px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}
html.sd .ask-btns {
  display: flex;
  justify-content: center;
  gap: 12px;
}
html.sd .ask-btns .btn {
  min-width: 110px;
  min-height: 44px;
  justify-content: center;
}
html.sd .ask-box .ask-btns .btn.ask-yes.ask-yes,
html.sd .ask-box .ask-btns .btn.ask-yes.ask-yes:hover {
  background: var(--sd-action-red-ink);
  border-color: var(--sd-action-red-ink);
  color: #fff;
}
html.sd .ask-box .ask-btns .btn.ask-no.ask-no,
html.sd .ask-box .ask-btns .btn.ask-no.ask-no:hover {
  background: var(--sd-action-green-ink);
  border-color: var(--sd-action-green-ink);
  color: #fff;
}

/* the field of a phone number (src/views/phoneInput.ts, public/js/telpick.js): the pick of the prefix joined to the number */
html.sd .tel-pick {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
  min-width: 0;
}
html.sd .tel-pick .tel-cc {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--line, #d0d5dd);
  border-right: 0;
  border-radius: 10px 0 0 10px;
  background: var(--card, #fff);
  color: inherit;
  font: inherit;
  cursor: pointer;
}
html.sd .tel-pick .tel-cc:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
html.sd .tel-pick input[type='tel'] {
  flex: 1;
  width: auto;
  min-width: 0;
  border-radius: 0 10px 10px 0;
}
/* on a computer with a mouse the phone field is as high as every other field (30 px, the same as INTECHI CRM; it stood 44 px high beside
   them on Můj profil, the owner, 1. 12. 2026); 44 px stays to touch */
@media (min-width: 992px) and (pointer: fine) {
  html.sd .tel-pick .tel-cc,
  html.sd .tel-pick input[type='tel'] {
    height: 30px;
    min-height: 30px;
  }
}
html.sd .tel-flag {
  flex: none;
  border-radius: 2px;
}
html.sd i.tel-flag {
  width: 22px;
  text-align: center;
  color: var(--accent);
}
html.sd .tel-cc-dial {
  font-variant-numeric: tabular-nums;
}
html.sd .tel-caret {
  font-size: 11px;
  color: var(--muted);
}
html.sd .tel-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 40;
  width: min(340px, calc(100vw - 32px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: 320px;
  border: 1px solid var(--line, #d0d5dd);
  border-radius: 12px;
  background: var(--card, #fff);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}
html.sd .tel-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line, #e4e7ec);
}
html.sd .tel-search > i {
  color: var(--muted);
}
html.sd .tel-search input {
  flex: 1;
  min-width: 0;
  min-height: 40px;
}
html.sd .tel-list {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  overflow-y: auto;
}
html.sd .tel-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  cursor: pointer;
}
html.sd .tel-opt.on,
html.sd .tel-opt:hover {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
html.sd .tel-opt[aria-selected='true'] .tel-name {
  font-weight: 700;
}
html.sd .tel-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html.sd .tel-dial {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
html.sd .tel-none {
  padding: 10px 12px;
  color: var(--muted);
}
html.sd .pay-chip > .fa-solid {
  margin-right: 6px;
}
/* the cell of the file of a document (Náklady, Výnosy, Doklady): the picture, the name and the cloud of the account under it start on ONE left
   axis in every row, whatever the length of the name (the owner, 27. 11. 2026: „ikona PDF uskakuje“); the heading of the column follows
   (public/js/align.js reads the side of the cells) */
html.sd td.doc-file-td {
  text-align: left !important;
}
html.sd td.doc-file-td > a.doc-link {
  display: inline-flex;
  max-width: 100%;
  vertical-align: top;  hyphens: manual;
}
/* a long name (Demo-vyplatni-paska-2026-12-0001.pdf) wraps at its dashes in a column wide enough to read, never syllable by syllable
   (the owner, 3. 12. 2026) */
@media (min-width: 641px) {
  html.sd td.doc-file-td {
    min-width: 12rem;
  }
}
/* the cloud of the account (Pokladna, the account) sits right under the name, glued to it (the owner, 3. 12. 2026: „těsně k názvu“) */
html.sd td.doc-file-td > .doc-pay > br {
  display: none;
}
html.sd td.doc-file-td > .doc-pay:not(:empty) {
  display: block;
  margin-top: 4px;
  line-height: 1;
}
/* under a FILE it starts where the name starts, not under the picture (the owner, 3. 12. 2026: „ujíždí“): the width of the picture and
   the gap of .file-name above; a card of a phone has the smaller picture (26 px, gap 6 px) */
html.sd td.doc-file-td > a.doc-link:has(.file-thumb) ~ .doc-pay:not(:empty) {
  padding-left: calc(36px + 10px);
}
@media (max-width: 640px) {
  html.sd table.stm td.doc-file-td > a.doc-link:has(.file-thumb) ~ .doc-pay:not(:empty) {
    padding-left: calc(26px + 6px);
  }
}
/* Mzdy, the column Osoba: the name and the clouds of the contracts on ONE left axis in every row, the clouds side by side (the owner,
   27. 11. 2026: „odjíždí“); a card of a phone keeps both at its right edge (app.css) */
@media (min-width: 641px) {
  html.sd td:has(> .pay-person) {
    text-align: left !important;
  }
  html.sd td > .pay-person {
    align-items: flex-start !important;
    justify-content: flex-start !important;
    text-align: left;
  }
  html.sd td > .pay-person > .pay-types {
    justify-content: flex-start;
  }
}
/* the signposts (Domů, Správa › Přehled) as the coloured tiles of CRM (public/css/admin.css .adm-overview there): the picture and the name in
   the colour of the tile, a grey line under it, the dot in the corner, the tiles of one row as high as each other */
html.sd .hub-tiles {
  align-items: stretch;
}
html.sd .hub-tiles .tile.kpi-tile {
  display: block;
  min-height: 88px;
  height: 100%;
  box-sizing: border-box;
  text-decoration: none;
}
html.sd .hub-tiles .tile.kpi-tile b {
  display: flex;
  align-items: center;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 4px;
  padding-right: 24px;
  color: var(--ink);
}
html.sd .hub-tiles .tile.kpi-tile b .head-icon,
html.sd .hub-tiles .tile.kpi-tile b .tile-icon,
html.sd .hub-tiles .tile.kpi-tile b .tile-icon .nav-ico,
html.sd .hub-tiles .tile.kpi-tile b .tile-icon i {
  color: var(--stage-ink, var(--st));
}
html.sd[data-theme='dark'] .hub-tiles .tile.kpi-tile b .head-icon,
html.sd[data-theme='dark'] .hub-tiles .tile.kpi-tile b .tile-icon,
html.sd[data-theme='dark'] .hub-tiles .tile.kpi-tile b .tile-icon i {
  color: color-mix(in srgb, var(--st) 70%, #fff);
}
html.sd .hub-tiles .tile.kpi-tile > span {
  color: var(--muted);
  font-size: 13px;
}
/* the clouds in the tiles of the overview: an icon and the words on one line (CRM public/css/admin.css; the owner, 27. 11. 2026) */
html.sd .hub-tiles .tile.kpi-tile > span > .pay-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 12px;
  padding: 3px 9px;
  margin-top: 4px;
  /* the ground of the cloud under all its words (it ended before „stažena“) */
  max-width: none;
}
/* a phone: the long „Záloha ještě nebyla stažena“ breaks inside its cloud instead of sticking out of the tile */
@media (max-width: 640px) {
  html.sd .hub-tiles .tile.kpi-tile > span > .pay-chip.backup-chip {
    max-width: 100%;
    white-space: normal;
  }
}
html.sd .count-dot[hidden] {
  display: none;
}
/* the head of Fred on a phone: the picture and the state on one axis, side by side (as the head with Johny in CRM, johny.css), the buttons
   under them over the whole width */
@media (max-width: 640px) {
  html.sd .card.bot-head > .bot-head-text {
    flex: 1 1 0;
  }
  html.sd .card.bot-head > .bot-head-acts {
    flex: 1 1 100%;
  }
}
/* the numbers of the tiles a little smaller (the owner, 27. 11. 2026, all apps; CRM 1.125.5 kpitiles.css): 30 → 24 px, a phone 24 → 20 px */
html.sd:root .kpi-tile b.mono:not(.profit):not(.neg):not(.pos),
html.sd:root .kpi-tile .kpi-line > b.mono,
html.sd:root .kpi-tile b.mono.profit,
html.sd:root .kpi-tile b.mono.neg,
html.sd:root .kpi-tile b.mono.pos {
  font-size: 24px;
}
@media (max-width: 640px) {
  html.sd:root .kpi-tile b.mono:not(.profit):not(.neg):not(.pos),
  html.sd:root .kpi-tile .kpi-line > b.mono,
  html.sd:root .kpi-tile b.mono.profit,
  html.sd:root .kpi-tile b.mono.neg,
  html.sd:root .kpi-tile b.mono.pos {
    font-size: 20px;
  }
}
/* Domů: the numbers of the head (Tržby, Měsíců s daty, Průměr) a little smaller too (the owner, 27. 11. 2026) */
html.sd .hero .kpi b {
  font-size: 18px;
}
@media (max-width: 640px) {
  html.sd .hero .kpi b {
    font-size: 16px;
  }
}
/* a tile, a chip, a button or a cloud that is a link is never underlined, not even under the pointer (the owner, 27. 11. 2026, all apps;
   the same block as INTECHI CRM shared.css) */
html.sd a.kpi-tile,
html.sd a.kpi-tile:hover,
html.sd a.kpi-tile:focus-visible,
html.sd a.kpi-tile *,
html.sd a.tile,
html.sd a.tile:hover,
html.sd a.tile *,
html.sd a.chip,
html.sd a.chip:hover,
html.sd a.btn,
html.sd a.btn:hover,
html.sd a.badge,
html.sd a.badge:hover,
html.sd a.pay-chip,
html.sd a.pay-chip:hover {
  text-decoration: none;
}
/* Výpisy: the row of a month as the rows of the months elsewhere (DPH, Náklady): the tick box, the calendar in the colour of the firm, the
   name with its capital letter in bold, never cut; the toggle and the ZIP of the month after it (the owner, 27. 11. 2026) */
html.sd tr.stm-row > th .stm-head {
  grid-template-columns: minmax(max-content, 1fr) auto auto;
}
html.sd tr.stm-row > th .stm-head > label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
}
html.sd tr.stm-row > th .stm-head .stm-month-ico {
  color: var(--accent);
}
html.sd tr.stm-row > th .stm-head .mh-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  text-transform: none;
  letter-spacing: 0;
}
/* a section where nothing waits is not shown at all (the owner, 27. 11. 2026): the pages mark it hidden, no card rule may show it */
html.sd section[hidden],
html.sd .pay-sec[hidden] {
  display: none !important;
}
/* every cell with a file (DPH, Výpisy, Mzdy and the other lists of files by months): the picture of the file and its name on ONE left axis
   in every row, whatever the length of the name (the owner, 27. 11. 2026: „ikona ujíždí“) */
@media (min-width: 641px) {
  html.sd td:has(> a > .file-name),
  html.sd td:has(> .file-name),
  html.sd td:has(> div > a > .file-name) {
    text-align: left !important;
  }
  html.sd td:has(> div > a > .file-name) > div {
    justify-content: flex-start !important;
    align-items: flex-start !important;
  }
}

/* Výpisy on a phone (the owner, 27. 11. 2026: „v telefonu úplně mimo“): the month is the title of its card, without the label „Měsíc“, the tick box,
   the calendar and the name at the left and the toggle and the ZIP beside them; the labels of the lines in the letters of the page, not of the numbers */
@media (max-width: 640px) {
  html.sd table.stm-cards.stack-table tr.stm-row > th::before {
    content: none;
  }
  html.sd table.stm-cards.stack-table tr.stm-row > th {
    display: block;
    padding-bottom: 8px;
  }
  html.sd tr.stm-row > th .stm-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px 10px;
  }
  html.sd tr.stm-row > th .stm-head > .stm-toggle {
    margin-right: auto;
  }
  /* folded as the months of Náklady (the owner, 27. 11. 2026: „nejde zabalit jako ostatní věci“): a folded month shows only its name and
     its state; a tap on the name opens the rest (public/js/fold.js) */
  html.sd table.stm-cards.stack-table tr.stm-row:not(.open) > td:not(:nth-child(2)) {
    display: none;
  }
  html.sd table.stack-table td[data-label]::before,
  html.sd table.stack-table th[data-label]::before {
    font-family: var(--sd-font-sans);
    font-weight: 600;
    letter-spacing: 0;
  }
}

/* Výpisy: the name of the month is the button that opens and folds it (as the months of Náklady), the box to tick before it */
html.sd tr.stm-row > th .stm-head {
  grid-template-columns: max-content max-content max-content;
}
html.sd tr.stm-row > th .stm-head > .stm-toggle .chev {
  transform: none;
}
html.sd tr.stm-row > th .stm-head > .stm-check {
  display: inline-flex;
  align-items: center;
  margin: 0;
}
html.sd tr.stm-row > th .stm-head > .stm-toggle {
  grid-column: 2;
  width: auto;
  height: auto;
  margin: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
}
html.sd tr.stm-row > th .stm-head > [data-bundle-row] {
  grid-column: 3;
}

/* ---- Kopie a skrytá kopie of an e-mail (src/views/ccField.ts, public/js/ccpick.js; the owner, 27. 11. 2026): the button „Přidat
   do kopie“ opens two fields under each other, each with the chosen people as chips; Uložit and Zrušit (dark grey, on the right) ---- */
html.sd details.cc-add[open] {
  display: block;
  flex-basis: 100%;
  width: 100%;
}
html.sd details.cc-add > summary.cc-sum {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
html.sd .cc-panel {
  display: grid;
  gap: 10px;
  max-width: 560px;
  padding: 12px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--sd-radius-lg);
  background: var(--card);
}
html.sd .cc-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
}
html.sd .cc-head {
  flex-basis: 100%;
  font-weight: 700;
  color: var(--ink);
}
html.sd .cc-head > i {
  color: var(--accent);
  width: 1.2em;
  text-align: center;
}
html.sd .cc-chips {
  display: contents;
}
html.sd .cc-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  min-height: 32px;
  padding: 2px 2px 2px 10px;
  border: 1px solid var(--sd-action-blue-line);
  border-radius: 999px;
  background: var(--sd-action-blue-bg);
  color: var(--sd-action-blue-ink);
  font-size: 13.5px;
  box-sizing: border-box;
}
html.sd .cc-box[data-cc-box='bcc'] .cc-chip {
  border-color: var(--sd-action-neutral-line);
  background: var(--sd-action-neutral-bg);
  color: var(--sd-action-neutral-ink);
}
html.sd .cc-chip > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html.sd .cc-x {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
html.sd .cc-x:hover,
html.sd .cc-x:focus-visible {
  background: color-mix(in srgb, currentColor 16%, transparent);
}
html.sd .cc-box input.cc-in {
  flex: 1 1 200px;
  min-width: 0;
  width: auto;
}
html.sd .cc-btns {
  gap: 8px;
  justify-content: flex-start;
}
@media (max-width: 640px) {
  html.sd .cc-panel {
    max-width: none;
  }
  html.sd .cc-x {
    width: 40px;
    height: 40px;
  }
  html.sd .cc-chip {
    min-height: 44px;
  }
  html.sd .cc-box input.cc-in {
    flex-basis: 100%;
    min-height: 44px;
  }
  html.sd .cc-btns > .btn {
    flex: 1 1 0;
    min-height: 44px;
  }
}

/* The invoice of the shared link (the e-mail „Zobrazit fakturu“) on a phone (the owner, 27. 11. 2026): Stáhnout PDF and Tisk smaller and
   beside each other, Tisk on the right; the QR code of the payment in the middle of the sheet */
html.sd .public-invoice .pub-inv-btns {
  flex-wrap: nowrap;
}
html.sd .public-invoice .pub-inv-btns > .btn {
  white-space: nowrap;
}
@media (max-width: 640px) {
  html.sd .public-invoice .pub-inv-btns {
    width: 100%;
  }
  html.sd .public-invoice .pub-inv-btns > .btn {
    flex: 1 1 0;
    min-width: 0;
    min-height: 44px;
    padding: 6px 10px;
    font-size: 13px;
    justify-content: center;
  }
  html.sd .inv-qr {
    margin-left: auto;
    margin-right: auto;
  }
}
/* the items of the invoice on a phone fit the sheet (the column Celkem was cut): less room around the cells, the amounts a little smaller */
@media (max-width: 640px) {
  html.sd .public-invoice table.inv-items {
    min-width: 0;
  }
  html.sd .public-invoice table.inv-items th,
  html.sd .public-invoice table.inv-items td {
    padding-left: 4px;
    padding-right: 4px;
    font-size: 14px;
  }
  html.sd .public-invoice table.inv-items td.r,
  html.sd .public-invoice table.inv-items th.r {
    font-size: 12.5px;
  }
}

/* The window of a file on a phone (public/js/viewer.js): the pages of a PDF as pictures one under another, as wide as the window; the
   fingers enlarge and make smaller (the owner, 28. 11. 2026) */
html.sd .viewer-body .viewer-pages {
  align-self: flex-start;
  width: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  box-sizing: border-box;
  touch-action: pan-x pan-y pinch-zoom;
}
html.sd .viewer-body .viewer-pages > img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  max-height: none;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}
html.sd .viewer-body .viewer-pages[aria-busy='true'] {
  align-items: center;
  justify-content: center;
}
html.sd .viewer-body .viewer-pages[aria-busy='true']::before {
  content: '';
  width: 32px;
  height: 32px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: viewer-spin 0.8s linear infinite;
}
@keyframes viewer-spin {
  to {
    transform: rotate(360deg);
  }
}
/* the pages of a PDF drawn as pictures, on a phone and on a computer (the owner, 30. 11. 2026): the window is as tall as the pages, at most
   90 % of the screen (then they scroll inside), so no empty place stays under the document */
html.sd dialog.viewer.fit {
  /* fit-content, not auto: a modal dialog stands between the top and the bottom of the screen and auto would stretch it */
  height: fit-content;
  max-height: 90vh;
  max-height: 90dvh;
}
html.sd dialog.viewer.fit .viewer-body .viewer-pages {
  min-height: 0;
}
html.sd dialog.viewer.fit .viewer-body .viewer-pages[aria-busy='true'] {
  min-height: 240px;
}
@media (prefers-reduced-motion: reduce) {
  html.sd .viewer-body .viewer-pages[aria-busy='true']::before {
    animation: none;
  }
}
/* the bar of the window of a file on a phone: only the pictures of Stáhnout, Tisknout and Zavřít on the right, side by side, so that the
   name of the document is readable (the owner, 28. 11. 2026); on a computer the words stay */
@media (max-width: 640px) {
  html.sd dialog.viewer .viewer-bar {
    gap: 6px;
    padding: 8px 10px;
  }
  html.sd dialog.viewer .viewer-bar .btn {
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    justify-content: center;
    flex: none;
  }
  html.sd dialog.viewer .viewer-bar .btn .vw-words {
    display: none;
  }
  html.sd dialog.viewer .viewer-bar .btn .btn-lead {
    margin: 0;
  }
}
/* a phone: „Zobrazené období:“ and its dates on one line, as on a computer (the owner, 28. 11. 2026); the label of the choice of the period
   above the boxes keeps its own line */
@media (max-width: 640px) {
  html.sd .period-result .period-label {
    width: auto;
  }
  /* Úvěry on a phone: the logo of the bank right before the name of the loan, not alone in the middle of the line */
  html.sd table.stack-table th .loan-bank {
    margin-left: auto;
  }
}

/* ---- Kolo 6 (the owner, 27. 11. 2026; the same as public/css/approvals.css of INTECHI CRM 1.126.0): the requests for an approval decided from
   the chat (src/fredChatApprovals.ts, public/js/fred-chat.js apprCard): the reminder of Fred with who, what, when, the app and the firm;
   Schválit green, Vrátit k doplnění orange, Zamítnout red with the cross; the reason under the card with Zrušit on the right. ---- */
html.sd .fred-msg.fred-do.fred-appr {
  border-left: 5px solid var(--sd-action-amber-line, #d97706);
}
html.sd .fred-appr-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
html.sd .fred-appr-head .badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
html.sd .fred-appr-facts {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 4px;
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}
/* every line in one axis: the icons in one column of the same width, the words after them */
html.sd .fred-appr-facts li {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: baseline;
  gap: 8px;
}
html.sd .fred-appr-facts li .fa-solid {
  justify-self: center;
  color: var(--muted);
}
html.sd .fred-appr-facts li:nth-child(2) {
  font-weight: 600;
}
html.sd .fred-appr-why {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}
html.sd .fred-appr-why label {
  display: grid;
  gap: 4px;
  font-weight: 600;
}
html.sd .fred-appr-why textarea {
  width: 100%;
  box-sizing: border-box;
}
html.sd .fred-appr-err {
  margin: 0;
  color: var(--sd-action-red-ink, #b42318);
}
html.sd .fred-appr-err[hidden] {
  display: none;
}
/* Zrušit is the last one, on the right */
html.sd .fred-appr-why .fred-do-row {
  justify-content: flex-end;
}
html.sd .fred-appr-done {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}
html.sd .fred-appr-done.is-green {
  color: var(--sd-action-green-ink);
}
html.sd .fred-appr-done.is-orange {
  color: var(--sd-action-orange-ink);
}
html.sd .fred-appr-done.is-red {
  color: var(--sd-action-red-ink);
}
html.sd .fred-appr-done.is-neutral {
  color: var(--muted);
}
/* the colours of the decisions (every button says its own tone, as Potvrdit / Zamítnout) */
html.sd .fred-do-row .btn.fred-appr-approve,
html.sd .fred-do-row .btn.fred-appr-return,
html.sd .fred-do-row .btn.fred-appr-reject,
html.sd .fred-do-row .btn.fred-appr-open {
  background: var(--ia-bg);
  border: 1px solid var(--ia-line);
  color: var(--ia-ink);
  text-decoration: none;
}
html.sd .fred-do-row .btn.fred-appr-approve:hover,
html.sd .fred-do-row .btn.fred-appr-return:hover,
html.sd .fred-do-row .btn.fred-appr-reject:hover,
html.sd .fred-do-row .btn.fred-appr-open:hover {
  background: var(--ia-hover);
}
html.sd .fred-do-row .btn.fred-appr-cancel {
  background: var(--sd-color-slate-700);
  border-color: var(--sd-color-slate-700);
  color: #fff;
}
/* on a phone the decisions stand side by side, two in a row (the owner: the actions of a phone next to one another) */
@media (max-width: 640px) {
  html.sd .fred-appr-row .btn {
    flex: 1 1 calc(50% - 8px);
    padding: 0 8px;
    justify-content: center;
  }
}

/* ---- the detail of a request (src/views/fredRequest.ts): Vrátit k doplnění and Zamítnout open their form under the buttons; the buttons are as
   wide as their words, never the whole row; Zrušit closes the form again and stands on the right ---- */
html.sd .bot-more > summary {
  width: fit-content;
}
html.sd .bot-more .bot-card-acts .btn {
  width: auto;
}
html.sd .bot-more .bot-cancel {
  margin-left: auto;
}
@media (max-width: 640px) {
  html.sd .bot-card-acts .btn,
  html.sd .bot-more > summary {
    min-height: 44px;
  }
}
/* the buttons of the decision keep the colour of their action also as the button that sends a form (a form paints it blue otherwise) */
html.sd .bot-block .bot-card-acts .btn.ia.ia,
html.sd .bot-block .bot-more > summary.btn.ia.ia {
  background: var(--ia-bg);
  border: 1px solid var(--ia-line);
  color: var(--ia-ink);
}
html.sd .bot-block .bot-card-acts .btn.ia.ia:hover,
html.sd .bot-block .bot-more > summary.btn.ia.ia:hover {
  background: var(--ia-hover);
}
/* Zamítnout is red with the cross (the action reject), not the dark grey of Zrušit that shares the cross */
html.sd .btn.ia.ia-red:has(> i.fa-xmark),
html.sd .bot-more > summary.btn.ia.ia-red:has(> i.fa-xmark) {
  background: var(--sd-action-red-bg);
  border-color: var(--sd-action-red-line);
  color: var(--sd-action-red-ink);
}
html.sd .btn.ia.ia-red:has(> i.fa-xmark):hover,
html.sd .btn.ia.ia-red:has(> i.fa-xmark):focus-visible {
  background: var(--sd-action-red-hover);
  border-color: var(--sd-action-red-line);
  color: var(--sd-action-red-ink);
}

/* ---- a small menu behind one button (public/js/popmenu.js; the owner, 28. 11. 2026): the less used actions of a table are behind the three
   dots. The language of an e-mail is ONE small button with only the flag of the chosen language; a click switches CZ <-> EN, no menu. The menu floats over the page under its button, so the row of the actions never grows. ---- */
html.sd .mail-lang,
html.sd .tool-more {
  position: relative;
  display: inline-flex;
  flex: none;
  vertical-align: middle;
}
html.sd .mail-lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  /* a square as high as a small button (--sd-btn-sm-h: 30 px on a computer, 44 px for a finger; beside a big button the big height, the row
     rule of .btn.sm), so the flag stands in the row of the buttons that send at one height (the owner, 3. 12. 2026) */
  height: var(--sd-btn-sm-h);
  min-width: var(--sd-btn-sm-h);
  padding: 0 7px;
  border: 1px solid var(--sd-line-strong);
  border-radius: var(--sd-ctl-r);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
}
html.sd .mail-lang-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}
html.sd .mail-lang-btn:focus-visible {
  outline: 3px solid #f59331;
  outline-offset: 2px;
}
html.sd .mail-lang-flag {
  display: block;
  width: 20px;
  height: 14px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px var(--line);
}
html.sd .pop-menu {
  position: fixed;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 140px;
  padding: 6px;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
}
html.sd .pop-menu[hidden] {
  display: none;
}
html.sd .pop-menu .pop-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 6px 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
html.sd .pop-menu .pop-item:hover,
html.sd .pop-menu .pop-item:focus-within,
html.sd .pop-menu .pop-item:focus-visible {
  background: color-mix(in srgb, var(--accent) 10%, var(--card));
  color: var(--accent);
}
html.sd .pop-menu .pop-item > i {
  width: 18px;
  text-align: center;
  color: var(--accent);
}
html.sd .pop-menu .pop-item input[type='radio'] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
html.sd .pop-menu .pop-item:has(input:checked) {
  background: color-mix(in srgb, var(--accent) 14%, var(--card));
  color: var(--accent);
}
html.sd .pop-menu .pop-item img {
  display: block;
  border-radius: 2px;
}
html.sd .tool-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
@media (max-width: 640px) {
  html.sd .pop-menu .pop-item {
    min-height: 44px;
  }
}

/* the own icon of Mzdy (the owner, 28. 11. 2026): two curved arrows in a circle (the upper one to the right and down, the lower one to the
   left and up) and the dollar sign in the middle, a full drawing in the colour of the text; Font Awesome Free and Pro have no such icon.
   Used like a Font Awesome icon (fa-solid fa-payroll-cycle) in the menu, the tiles and the headings */
html.sd .fa-solid.fa-payroll-cycle::before {
  content: '';
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  vertical-align: -0.2em;
  background-color: currentColor;
  -webkit-mask: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M3.07%208.75A9.5%209.5%200%200%201%2021.36%2010.4M20.93%2015.25A9.5%209.5%200%200%201%202.64%2013.6%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%222.4%22%2F%3E%3Cpath%20d%3D%22M18.6%2010.3H24L21.3%2014ZM0%2013.7H5.4L2.7%2010Z%22%2F%3E%3Cpath%20d%3D%22M14.7%209.3C14.2%208.4%2013.2%207.9%2012%207.9C10.5%207.9%209.4%208.7%209.4%209.9C9.4%2012.6%2014.7%2011.4%2014.7%2014.1C14.7%2015.3%2013.5%2016.1%2012%2016.1C10.7%2016.1%209.6%2015.5%209.2%2014.6M12%206.3V17.7%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%2F%3E%3C%2Fsvg%3E') center / contain no-repeat;
  mask: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M3.07%208.75A9.5%209.5%200%200%201%2021.36%2010.4M20.93%2015.25A9.5%209.5%200%200%201%202.64%2013.6%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%222.4%22%2F%3E%3Cpath%20d%3D%22M18.6%2010.3H24L21.3%2014ZM0%2013.7H5.4L2.7%2010Z%22%2F%3E%3Cpath%20d%3D%22M14.7%209.3C14.2%208.4%2013.2%207.9%2012%207.9C10.5%207.9%209.4%208.7%209.4%209.9C9.4%2012.6%2014.7%2011.4%2014.7%2014.1C14.7%2015.3%2013.5%2016.1%2012%2016.1C10.7%2016.1%209.6%2015.5%209.2%2014.6M12%206.3V17.7%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%2F%3E%3C%2Fsvg%3E') center / contain no-repeat;
}
