/*
 * HRM as an app of the desk (js/shell/hrm.js): its mark, the dialog of the token, the window with the briefing.
 */

/* the mark carries its own red tile: the places that show it only give it the size */
.hrm-tile { width: 38px; height: 38px; flex: none; display: grid; }
.hrm-tile--big { width: 56px; height: 56px; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.35)); }
svg.hrm-mark { display: block; width: 100% !important; height: 100% !important; }
.desk-app--hrm .desk-app__icon { background: none; border: 0; padding: 0; overflow: visible; }

/* connecting an account inside the window of its app (connectPane in js/shell/ui.js) */
.connect-lead { margin: 0; color: var(--text); font-size: 14px; line-height: 20px; }
.connect-pane { min-height: 0; overflow: auto; display: grid; place-items: center; padding: 32px 16px; }
.connect-card { width: min(420px, 100%); gap: var(--space-4); padding: var(--space-8); border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.connect-card .field-error[hidden] { display: none; }
.connect-card__btns { display: grid; margin-top: 4px; }
.connect-card__btns .btn { justify-content: center; }
.is-connecting .hrm-searchform, .is-connecting .chrome .tools > .jv-round { visibility: hidden; }
.hrm-connect .input { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.02em; }
.hrm-connect .field-error[hidden] { display: none; }

/* the window */
.hrm-win { grid-template-rows: auto minmax(0, 1fr); }
.hrm-win .chrome .brand { width: auto; min-width: 180px; }
.hrm-win .chrome .tools { gap: 8px; }
.shell-body .hrm-page.content { overflow-y: auto; min-height: 0; padding: 24px 36px 40px; width: 100%; max-width: 1240px; margin-inline: auto; }
.hrm-page .kpi--bad .kpi-v { color: var(--bad); }
.hrm-list { display: grid; }
.hrm-row { display: grid; grid-template-columns: auto minmax(0, 1fr) 72px auto; align-items: center; gap: 12px; padding: 11px 6px; border-top: 1px solid var(--line); border-radius: 8px; color: inherit; text-decoration: none; }
.hrm-list > .hrm-row:first-child { border-top: 0; }
a.hrm-row:hover, a.hrm-row:focus-visible { background: color-mix(in srgb, var(--text-strong) 6%, transparent); outline: none; }
.hrm-row--event { grid-template-columns: 92px minmax(0, 1fr); }
.hrm-row__main { display: grid; gap: 2px; min-width: 0; }
.hrm-row__main b { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hrm-row__main small, .hrm-date small { font-size: 12px; line-height: 16px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hrm-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); }
.hrm-dot--high, .hrm-dot--urgent { background: var(--warn); }
.hrm-dot--late { background: var(--bad); }
.hrm-progress { height: 5px; border-radius: 99px; background: color-mix(in srgb, var(--text-strong) 12%, transparent); overflow: hidden; }
.hrm-progress span { display: block; height: 100%; border-radius: 99px; background: var(--text-strong); }
.hrm-due { font-size: 12px; color: var(--text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.hrm-due--late { color: var(--bad); font-weight: 600; }
.hrm-date { display: grid; gap: 2px; }
.hrm-date b { font-size: 13px; line-height: 20px; color: var(--text-strong); font-variant-numeric: tabular-nums; }
@media (max-width: 820px) {
  .shell-body .hrm-page.content { padding: 16px 12px 28px; }
  .hrm-win .chrome-bar { flex-wrap: wrap; gap: 8px; padding: 8px 12px; height: auto; }
  .hrm-row { grid-template-columns: auto minmax(0, 1fr) auto; min-height: 44px; }
  .hrm-progress { display: none; }
  .hrm-row__main b { white-space: normal; }
}

/* ---------- the window with tabs, a search, details and the light writing ---------- */
.hrm-win { grid-template-rows: auto auto minmax(0, 1fr); }
.hrm-tabs { margin: 0; padding: 14px 36px 0; width: 100%; max-width: 1240px; margin-inline: auto; box-sizing: border-box; }
.hrm-searchform { flex: 1 1 auto; min-width: 0; display: flex; }
.hrm-search { all: unset; box-sizing: border-box; width: 100%; height: 38px; padding: 0 16px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-strong); font: 400 14px/20px var(--font-sans, system-ui, sans-serif); }
.hrm-search::placeholder { color: var(--placeholder, var(--text-muted)); }
.hrm-search:focus { border-color: var(--line-strong, var(--line)); }
button.hrm-row { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: auto minmax(0, 1fr) 72px auto; align-items: center; gap: 12px; padding: 11px 6px; border-top: 1px solid var(--line); border-radius: 8px; width: 100%; }
button.hrm-row.hrm-row--event { grid-template-columns: 92px minmax(0, 1fr); }
.hrm-row--plain, button.hrm-row.hrm-row--plain { grid-template-columns: minmax(0, 1fr); }
.hrm-list > button.hrm-row:first-child { border-top: 0; }
button.hrm-row:hover, button.hrm-row:focus-visible { background: color-mix(in srgb, var(--text-strong) 6%, transparent); }
.hrm-dot--done { background: var(--ok); }
.hrm-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.hrm-head h2 { margin: 0; font-size: 22px; line-height: 28px; letter-spacing: -0.02em; }
.hrm-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 20px; margin: 16px 0 0; }
.hrm-facts dt { font: var(--label-caps, 600 11px/16px system-ui); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
.hrm-facts dd { margin: 2px 0 0; font-size: 14px; line-height: 20px; color: var(--text-strong); }
.hrm-text { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 22px; color: var(--text); }
.hrm-checks { display: grid; gap: 2px; }
.hrm-check { display: flex; align-items: flex-start; gap: 10px; padding: 8px 6px; border-radius: 8px; font-size: 14px; line-height: 20px; color: var(--text-strong); cursor: pointer; }
.hrm-check:hover { background: color-mix(in srgb, var(--text-strong) 6%, transparent); }
.hrm-check input { margin-top: 2px; flex: none; width: 16px; height: 16px; accent-color: var(--accent); }
.hrm-check.is-done span { color: var(--text-muted); text-decoration: line-through; }
.hrm-additem { display: flex; gap: 8px; margin-top: 12px; }
.hrm-additem .input { flex: 1 1 auto; min-width: 0; }
.hrm-thread { display: grid; gap: 10px; max-height: 520px; overflow-y: auto; padding-right: 4px; }
.hrm-msg { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.hrm-msg--system { background: none; border-style: dashed; }
.hrm-msg__head { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; line-height: 16px; color: var(--text-muted); }
.hrm-msg__head b { color: var(--text-strong); font-weight: 600; }
.hrm-msg p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 21px; color: var(--text); }
.hrm-msg--system p { font-size: 13px; color: var(--text-muted); }
.hrm-comment { display: grid; gap: 8px; margin-top: 14px; }
.hrm-comment .textarea { width: 100%; resize: vertical; }
.hrm-files { margin: 0; padding-left: 18px; font-size: 14px; line-height: 24px; }
@media (max-width: 820px) {
  .hrm-tabs { padding: 10px 12px 0; }
  .hrm-searchform { order: 3; flex: 1 1 100%; }
  .hrm-search { height: 44px; }
  button.hrm-row { grid-template-columns: auto minmax(0, 1fr) auto; min-height: 44px; }
  .hrm-check { min-height: 44px; align-items: center; }
  .hrm-head { flex-direction: column; }
}
/* the rows of the window in their order (the tabs of the shell carry an order of their own) */
.hrm-win > .chrome { grid-row: 1; }
.hrm-win > .hrm-tabs { grid-row: 2; order: 0; flex: none; }
.hrm-win > .hrm-page { grid-row: 3; }

/* ---------- the forms Nový úkol and Nová akce ---------- */
/* Nový úkol, Nová akce: a page of the window (15. 11. 2026), not a dialog over the desk */
.hrm-formpage { display: grid; gap: 14px; }
.hrm-form { display: grid; gap: 14px; }
.hrm-form__section { margin: 0; font: 600 11px/16px var(--font-sans, system-ui, sans-serif); letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.hrm-form__row.hrm-form__row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hrm-form .textarea, .mail-new .textarea { font: inherit; line-height: 1.45; }
/* the buttons stay in sight under a long form: the last row of the page sticks to its bottom edge */
/* (the page of the window has a bottom padding of 32 px, 28 px when narrow: the row reaches over it to the edge of the window) */
.hrm-formpage > .btn-row, .hrm-formpage > .hrm-formpage__ask { position: sticky; bottom: -32px; z-index: 1; margin: 0 -20px -18px; padding: 12px 20px;
  background: var(--surface-1); border-top: 1px solid var(--line); border-radius: 0 0 inherit inherit; }
.hrm-formpage > .hrm-formpage__ask { border: 0; border-top: 1px solid var(--line); }
.hrm-formpage { overflow: clip; }
.hrm-form .field-help { margin: 4px 0 0; min-height: 0; }
.hrm-form .field-help:empty { display: none; }
.hrm-form .field-help.is-warn { color: var(--warn, #d29922); }
.hrm-form .select:disabled { opacity: .5; }
/* people as chips with a select that adds one */
.hrm-chipbox { display: grid; gap: 8px; }
.hrm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hrm-chips[hidden] { display: none; }
.hrm-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 10px; border-radius: 999px; font-size: 13px; line-height: 20px; color: var(--text-strong);
  background: color-mix(in srgb, var(--text-strong) 9%, transparent); border: 1px solid var(--line); }
.hrm-chip button { all: unset; cursor: pointer; width: 20px; height: 20px; border-radius: 50%; text-align: center; line-height: 20px; color: var(--text-muted); }
.hrm-chip button:hover, .hrm-chip button:focus-visible { color: var(--text-strong); background: color-mix(in srgb, var(--text-strong) 12%, transparent); }
/* the term by one click */
.hrm-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.hrm-quick button { all: unset; cursor: pointer; padding: 2px 9px; border-radius: 999px; font-size: 12px; line-height: 18px; color: var(--text-muted); border: 1px solid var(--line); }
.hrm-quick button:hover, .hrm-quick button:focus-visible { color: var(--text-strong); border-color: color-mix(in srgb, var(--text-strong) 30%, transparent); }
.hrm-formpage .btn-row { justify-content: flex-end; }
.hrm-formpage__orbit { margin: 0; padding: 9px 12px; border-radius: var(--radius-m, 10px); font-size: 13px; line-height: 18px; color: var(--text-strong);
  background: color-mix(in srgb, var(--sys-blue, #0a84ff) 10%, transparent); border: 1px solid color-mix(in srgb, var(--sys-blue, #0a84ff) 30%, transparent); }
.hrm-formpage__orbit[hidden], .hrm-formpage__ask[hidden], .hrm-formpage .btn-row[hidden] { display: none; }
.hrm-formpage__ask { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-m, 10px); background: var(--surface-2); }
.hrm-formpage__ask p { margin: 0; font-size: 13px; line-height: 19px; color: var(--text-strong); }
.hrm-formpage .hrm-form[inert] { opacity: .6; }
@keyframes hrm-filled { from { box-shadow: 0 0 0 2px color-mix(in srgb, var(--sys-blue, #0a84ff) 55%, transparent); } to { box-shadow: 0 0 0 2px transparent; } }
.hrm-formpage.is-filled .input, .hrm-formpage.is-filled .select, .hrm-formpage.is-filled .textarea { animation: hrm-filled 1.4s ease-out 1; }
@media (prefers-reduced-motion: reduce) { .hrm-formpage.is-filled .input, .hrm-formpage.is-filled .select, .hrm-formpage.is-filled .textarea { animation: none; } }
.hrm-form .input, .hrm-form .select, .hrm-form .textarea { width: 100%; }
.hrm-form__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.hrm-picks { max-height: 168px; overflow-y: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; padding: 6px; border: 1px solid var(--line); border-radius: var(--radius-m, 10px); background: var(--surface-2); }
.hrm-pick { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 7px; font-size: 13px; line-height: 18px; color: var(--text-strong); cursor: pointer; min-width: 0; }
.hrm-pick:hover { background: color-mix(in srgb, var(--text-strong) 7%, transparent); }
.hrm-pick input { flex: none; width: 15px; height: 15px; accent-color: var(--accent); }
.hrm-pick span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hrm-pick small { color: var(--text-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hrm-pick--single { padding-left: 0; }
.hrm-form .field-error[hidden] { display: none; }
@media (max-width: 820px) {
  .hrm-form__row, .hrm-form__row.hrm-form__row--2 { grid-template-columns: minmax(0, 1fr); }
  .hrm-formpage > .btn-row, .hrm-formpage > .hrm-formpage__ask { bottom: -28px; }
  .hrm-picks { grid-template-columns: minmax(0, 1fr); }
  .hrm-pick { min-height: 44px; }
}

/* ---------- soft loading (the bones and the fade are shared with Pošta, css/mail.css) ---------- */
.hrm-view { display: grid; gap: 24px; }
.hrm-row--ghost { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 6px; border-top: 1px solid var(--line); }
.hrm-list > .hrm-row--ghost:first-child { border-top: 0; }
.card.mail-ghost { display: grid; gap: 14px; }
.kpi.mail-ghost { display: grid; gap: 12px; align-content: center; min-height: 86px; }
.hrm-ghost-lines { display: grid; gap: 12px; margin-top: 18px; }
.hrm-tabs { align-items: center; }
.hrm-busy { margin-left: auto; }
.hrm-busy[hidden] { display: none; }
/* =====================================================================================================================
   The look people know from HRM itself, inside a window of the OS (12. 11. 2026, Štěpán): the parts on the left, the
   table of tasks, the detail in two columns with the discussion, the calendar of the month. The window, the type,
   the corners and the surfaces are of the OS; the red of HRM marks what is HRM's own (the chosen filter, the bars of
   progress, the main button, what is after its term).
   ===================================================================================================================== */
.hrm-win { --hrm-accent: #f5233f; --hrm-accent-soft: color-mix(in srgb, #f5233f 16%, transparent); grid-template-rows: auto minmax(0, 1fr); }
:root[data-theme="light"] .hrm-win { --hrm-accent: #e50026; }
.hrm-body { grid-template-columns: 200px minmax(0, 1fr); }
.hrm-nav__label { padding: 2px 12px 8px; font: 600 10.5px/16px var(--font-sans, system-ui, sans-serif); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
/* the whole width of the window, as the page of Pošta (12. 11. 2026) */
.shell-body .hrm-page.content { max-width: none; margin-inline: 0; padding: 18px 28px 32px; }
.hrm-busy { margin: 0; }
.hrm-card { padding: 18px 20px; }

/* small parts: pills, tags, counts, dots, bars, faces */
.hrm-pill { display: inline-flex; align-items: center; gap: 6px; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--line); font-size: 11.5px; line-height: 18px; color: var(--text-muted); white-space: nowrap; }
.hrm-pill--late, .hrm-pill--run { color: var(--hrm-accent); border-color: color-mix(in srgb, var(--hrm-accent) 40%, transparent); background: var(--hrm-accent-soft); }
.hrm-pill--done { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.hrm-tag { padding: 1px 8px; border-radius: 99px; font-size: 11.5px; line-height: 18px; font-weight: 600; white-space: nowrap;
  color: hsl(var(--hue) 80% 72%); background: hsl(var(--hue) 70% 50% / 0.16); }
:root[data-theme="light"] .hrm-tag { color: hsl(var(--hue) 70% 32%); }
.hrm-count { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; line-height: 18px; color: var(--text-muted); white-space: nowrap; }
.hrm-count svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.hrm-count--accent { color: var(--hrm-accent); font-weight: 600; }
.hrm-num { display: inline-grid; place-items: center; min-width: 20px; padding: 0 6px; border-radius: 99px; font-size: 11.5px; line-height: 18px; font-weight: 600; color: var(--text-muted); background: color-mix(in srgb, var(--text-strong) 9%, transparent); }
.hrm-num--accent { color: var(--hrm-accent); background: var(--hrm-accent-soft); }
.hrm-dot { flex: none; }
.hrm-dot--high { background: var(--hrm-accent); }
.hrm-dot--medium { background: #e0a83c; }
.hrm-dot--low { background: var(--ok); }
.hrm-progress { display: block; height: 4px; border-radius: 99px; background: color-mix(in srgb, var(--text-strong) 10%, transparent); overflow: hidden; }
.hrm-progress span { background: var(--hrm-accent); }
.hrm-face { flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 9.5px; font-weight: 700; letter-spacing: 0.02em; color: var(--text-strong); background: color-mix(in srgb, var(--text-strong) 13%, transparent); }
.hrm-cta, .btn.hrm-cta { background: var(--hrm-accent); border-color: transparent; color: #fff; font-weight: 600; text-transform: none; letter-spacing: 0; font-size: 14px; padding: 10px 18px; border-radius: 10px; }
.hrm-cta:hover, .btn.hrm-cta:hover { background: color-mix(in srgb, var(--hrm-accent) 88%, #fff); color: #fff; }
.btn.hrm-cta--small { padding: 7px 12px; font-size: 13px; }
.hrm-hint { margin: 0; font-size: 12px; line-height: 18px; color: var(--text-muted); }
.hrm-more { justify-self: start; }
.hrm-back { all: unset; cursor: pointer; font-size: 13px; line-height: 20px; color: var(--text-muted); }
.hrm-back:hover, .hrm-back:focus-visible { color: var(--text-strong); }

/* the dashboard */
.hrm-hello h1 { margin: 0; font-size: 20px; line-height: 28px; letter-spacing: -0.01em; color: var(--text-strong); }
.hrm-hello p { margin: 2px 0 0; font-size: 13px; color: var(--text-muted); }
.hrm-dash { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.hrm-dash > .stack { gap: 16px; }
.hrm-panel { display: grid; gap: 12px; }
.hrm-panel__head { display: flex; align-items: center; gap: 8px; }
.hrm-panel__head h2 { margin: 0; font-size: 15px; line-height: 22px; font-weight: 600; color: var(--text-strong); }
.hrm-panel__aside { display: inline-flex; align-items: center; gap: 8px; }
.hrm-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.hrm-stats small { display: block; font-size: 12px; color: var(--text-muted); }
.hrm-stats b { display: block; margin-top: 2px; font-size: 24px; line-height: 30px; font-weight: 700; color: var(--text-strong); }
.hrm-stats .is-late b { color: var(--hrm-accent); }
.hrm-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.hrm-week__day { display: grid; justify-items: center; gap: 0; padding: 6px 2px; border: 1px solid var(--line); border-radius: 8px; }
.hrm-week__day small { font-size: 11px; line-height: 16px; color: var(--text-muted); white-space: nowrap; }
.hrm-week__day b { font-size: 15px; line-height: 20px; font-weight: 600; color: var(--text-muted); }
.hrm-week__day.has b { color: var(--text-strong); }
.hrm-week__day.is-today { border-color: var(--hrm-accent); }
button.hrm-line { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; padding: 8px 6px; border-top: 1px solid var(--line); border-radius: 6px; font-size: 14px; line-height: 20px; }
.hrm-list > button.hrm-line:first-child { border-top: 0; }
button.hrm-line:hover, button.hrm-line:focus-visible { background: color-mix(in srgb, var(--text-strong) 6%, transparent); }
.hrm-line b { flex: 1 1 auto; min-width: 0; font-weight: 600; color: var(--text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hrm-line small { flex: none; max-width: 40%; font-size: 12.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hrm-line__due { flex: none; font-size: 13px; font-weight: 600; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.hrm-line__due.is-late { color: var(--hrm-accent); }
.hrm-line .hrm-progress { flex: none; width: 72px; }
.hrm-line__date { flex: none; width: 76px; font-size: 13px; color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* the board of Úkoly and of Akce: a head with the main button, the filters, the table */
.hrm-board { display: grid; gap: 16px; }
.hrm-board__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.hrm-board__head h2 { margin: 0; font-size: 16px; line-height: 24px; font-weight: 600; color: var(--text-strong); }
.hrm-board__head h2 small { margin-left: 6px; font-size: 13px; font-weight: 400; color: var(--text-muted); }
.hrm-board__head p { margin: 2px 0 0; font-size: 13px; color: var(--text-muted); }
.hrm-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hrm-find { width: 200px; }
.hrm-select { width: auto; }
.hrm-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.hrm-seg button { all: unset; box-sizing: border-box; cursor: pointer; padding: 6px 12px; font-size: 13px; line-height: 20px; color: var(--text); border-left: 1px solid var(--line); }
.hrm-seg button:first-child { border-left: 0; }
.hrm-seg button:hover, .hrm-seg button:focus-visible { background: color-mix(in srgb, var(--text-strong) 7%, transparent); }
.hrm-seg button[aria-pressed="true"] { background: var(--hrm-accent); color: #fff; font-weight: 600; }
.hrm-table { display: grid; }
.hrm-trow, button.hrm-trow { all: unset; box-sizing: border-box; display: grid; grid-template-columns: minmax(0, 1fr) 170px 84px 104px 132px; align-items: center; gap: 14px; width: 100%; padding: 10px 8px; border-top: 1px solid var(--line); font-size: 14px; line-height: 20px; }
button.hrm-trow { cursor: pointer; }
button.hrm-trow:hover, button.hrm-trow:focus-visible { background: color-mix(in srgb, var(--text-strong) 5%, transparent); }
.hrm-trow--head { border-top: 0; padding-block: 6px; font: 600 10.5px/16px var(--font-sans, system-ui, sans-serif); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.hrm-tcell { display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; overflow: hidden; }
.hrm-tcell--main { flex-wrap: wrap; row-gap: 4px; white-space: normal; }
.hrm-tcell--main b { font-weight: 600; color: var(--text-strong); overflow-wrap: anywhere; }
.hrm-tcell--owner { color: var(--text-strong); text-overflow: ellipsis; }
.hrm-tcell--prio { color: var(--text-muted); }
.hrm-tcell--due { font-weight: 600; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.hrm-tcell--due.is-late { color: var(--hrm-accent); }
.hrm-tcell--done .hrm-progress { flex: 1 1 auto; }
.hrm-tcell--done .num { flex: none; width: 38px; text-align: right; font-size: 12.5px; color: var(--text-muted); }
.hrm-trow--head .hrm-tcell { color: var(--text-muted); font-weight: 600; }

/* the detail: a head with pills, two columns (what the task is; the discussion) */
.hrm-detail { display: grid; gap: 12px; }
.hrm-detail__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hrm-detail__title { margin: 0; font-size: 18px; line-height: 26px; font-weight: 700; letter-spacing: -0.01em; color: var(--text-strong); overflow-wrap: anywhere; }
.hrm-detail__pills, .hrm-detail__people { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; }
.hrm-detail__people { font-size: 13.5px; color: var(--text-strong); padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.hrm-detail__people span { display: inline-flex; align-items: center; gap: 8px; }
.hrm-detail__cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 14px; align-items: start; padding-top: 4px; }
.hrm-detail__cols > .stack { gap: 12px; }
.hrm-box { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: color-mix(in srgb, var(--text-strong) 2.5%, transparent); min-width: 0; }
.hrm-box__label { display: flex; align-items: center; gap: 8px; font: 600 10.5px/16px var(--font-sans, system-ui, sans-serif); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.hrm-box .hrm-text { margin: 0; padding: 0; border: 0; }
.hrm-bigbar { display: flex; align-items: center; gap: 14px; }
.hrm-bigbar .hrm-progress { flex: 1 1 auto; }
.hrm-bigbar .num { font-size: 13px; color: var(--text-muted); }
.hrm-checks { gap: 6px; }
.hrm-check { padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: color-mix(in srgb, var(--text-strong) 3%, transparent); }
.hrm-check input { accent-color: var(--hrm-accent); }
.hrm-thread { gap: 12px; max-height: 640px; }
.hrm-msg { display: flex; align-items: flex-start; gap: 10px; padding: 0; border: 0; background: none; }
.hrm-msg__body { flex: 1 1 auto; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.hrm-msg__head { justify-content: flex-start; }
.hrm-note { margin: 0; padding-left: 32px; font-size: 12.5px; line-height: 18px; color: var(--text-muted); overflow-wrap: anywhere; }
.hrm-note b { color: var(--text); font-weight: 600; }
.hrm-note span { white-space: nowrap; opacity: 0.8; }
.hrm-people { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 13.5px; color: var(--text-strong); }
.hrm-people span { display: inline-flex; align-items: center; gap: 8px; }

/* the calendar of the month */
.hrm-month { display: inline-flex; align-items: center; gap: 8px; }
.hrm-month b { min-width: 130px; text-align: center; font-size: 15px; font-weight: 600; color: var(--text-strong); text-transform: capitalize; }
.hrm-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.hrm-cal__dow { padding: 4px 8px; font: 600 10.5px/16px var(--font-sans, system-ui, sans-serif); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.hrm-cal__day { display: grid; align-content: start; gap: 4px; min-height: 88px; padding: 6px; border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
.hrm-cal__day.is-out { border-style: dashed; opacity: 0.6; }
.hrm-cal__day.is-today { border-color: var(--hrm-accent); }
.hrm-cal__num { font-size: 12.5px; line-height: 18px; font-weight: 600; color: var(--text); padding-left: 2px; }
.hrm-cal__day.is-today .hrm-cal__num { color: var(--hrm-accent); }
button.hrm-cal__ev { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: baseline; gap: 6px; width: 100%; min-width: 0; padding: 3px 6px; border-left: 3px solid var(--hrm-accent); border-radius: 4px; font-size: 12px; line-height: 18px; color: var(--text-strong); background: color-mix(in srgb, var(--text-strong) 8%, transparent); }
button.hrm-cal__ev:hover, button.hrm-cal__ev:focus-visible { background: color-mix(in srgb, var(--text-strong) 14%, transparent); }
.hrm-cal__ev small { flex: none; font-size: 11px; color: var(--text-muted); }
.hrm-cal__ev span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hrm-cal__ev.is-past { border-left-color: var(--text-muted); color: var(--text-muted); }

/* a window up to 1100 px wide; the phone (no container there) gets the same */
@container win (max-width: 1100px) {
  .hrm-dash, .hrm-detail__cols { grid-template-columns: minmax(0, 1fr); }
  .hrm-trow, button.hrm-trow { grid-template-columns: minmax(0, 1fr) 104px 110px; }
  .hrm-tcell--owner, .hrm-tcell--prio { display: none; }
}
@media (max-width: 820px) {
  .hrm-dash, .hrm-detail__cols { grid-template-columns: minmax(0, 1fr); }
  .hrm-trow, button.hrm-trow { grid-template-columns: minmax(0, 1fr) 104px 110px; }
  .hrm-tcell--owner, .hrm-tcell--prio { display: none; }
}
@media (max-width: 820px) {
  .hrm-body { grid-template-columns: minmax(0, 1fr); }
  .hrm-nav__label { display: none; }
  .shell-body .hrm-page.content { padding: 14px 12px 28px; }
  .hrm-board__head { flex-direction: column; }
  .hrm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hrm-trow, button.hrm-trow { grid-template-columns: minmax(0, 1fr) auto; min-height: 44px; }
  .hrm-tcell--done { display: none; }
  .hrm-seg button, button.hrm-line, .hrm-back { min-height: 44px; }
  .hrm-seg button { display: inline-flex; align-items: center; }
  .hrm-find { width: 100%; }
  .hrm-cal__day { min-height: 64px; padding: 4px; }
  .hrm-cal__ev small { display: none; }
  .hrm-line small { display: none; }
}

/* the bar of the window as the bar of AI Bistro: the name takes the width of the side menu, the search fills the row
   from the edge of the page (where AI Bistro has the last event of the log), the person sits at the right end */
.hrm-win .chrome .brand { flex: none; width: 190px; min-width: 0; } /* 220 px of the side menu less the padding and the gap of the bar */
.hrm-win .hrm-searchform { flex: 1 1 auto; }
.hrm-win .chrome .tools { margin-left: auto; }
.hrm-user { display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px 5px 5px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface-1); font-size: 13px; line-height: 20px; white-space: nowrap; }
.hrm-user[hidden] { display: none; }
.hrm-user__face { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-size: 11px; font-weight: 700; color: #fff; background: var(--hrm-accent); }
.hrm-user b { font-weight: 600; color: var(--text-strong); }
.hrm-user small { font-size: 12px; color: var(--hrm-accent); }
@container win (max-width: 1100px) { .hrm-user b, .hrm-user small { display: none; } .hrm-user { padding: 5px; } }
@media (max-width: 820px) { .hrm-user b, .hrm-user small { display: none; } .hrm-user { padding: 5px; } }
@media (max-width: 820px) { .hrm-win .hrm-searchform { flex: 1 1 100%; } .hrm-win .chrome .brand { flex: 1 1 0; width: auto; } }

/* ---------- red in place of gold in HRM and Pošta (Štěpán 13. 11. 2026) ----------
   Gold belongs to Orbit and to the pages of AI Bistro. Inside the windows of HRM and Pošta (and the Chat, which
   shares the frame of Pošta) every accent the shared parts take from the theme (the active row of the list on the
   left, main buttons, tabs, check boxes, focus) is the red of HRM. Metricool keeps its own colours. */
.hrm-win, .mail-win:not(.mc-win) {
  --accent: #f5233f; --accent-deep: #c9102b; --accent-text: #ff5a70;
  --accent-soft: rgba(245, 35, 63, 0.12); --accent-line: rgba(245, 35, 63, 0.4);
  --gold: #f5233f; --gold-light: #f5233f; --gold-dim: rgba(245, 35, 63, 0.12);
  --gold-grad: linear-gradient(135deg, #ff5a70 0%, #f5233f 45%, #d0142e 100%);
  --gold-grad-hover: linear-gradient(135deg, #ff7083 0%, #f73c55 45%, #d92038 100%);
  --gold-shadow: 0 8px 22px rgba(245, 35, 63, 0.24);
  --nav-active-bg: linear-gradient(90deg, rgba(245, 35, 63, 0.18) 0%, rgba(245, 35, 63, 0.03) 100%);
}
:root[data-theme="light"] .hrm-win, :root[data-theme="light"] .mail-win:not(.mc-win) {
  --accent: #e50026; --accent-deep: #b8001f; --accent-text: #c2001f;
  --accent-soft: rgba(229, 0, 38, 0.1); --accent-line: rgba(229, 0, 38, 0.4);
  --gold: #e50026; --gold-light: #e50026; --gold-dim: rgba(229, 0, 38, 0.1);
  --gold-grad: linear-gradient(135deg, #f5233f 0%, #e50026 45%, #c2001f 100%);
  --gold-grad-hover: linear-gradient(135deg, #ff4059 0%, #ee1437 45%, #cc0a28 100%);
  --gold-shadow: 0 8px 22px rgba(229, 0, 38, 0.2);
}
.shell-body .hrm-win .btn--primary, .shell-body .mail-win:not(.mc-win) .btn--primary,
.shell-body .hrm-win .btn--primary:hover, .shell-body .mail-win:not(.mc-win) .btn--primary:hover { color: #fff; }
/* the hairline on top of a card (gold in the theme) is red here too */
.shell-body .hrm-win .card::before, .shell-body .mail-win:not(.mc-win) .card::before {
  background: linear-gradient(90deg, rgba(245, 35, 63, 0) 0%, rgba(245, 35, 63, 0.55) 50%, rgba(245, 35, 63, 0) 100%);
}
