/* Sales CRM module. Same Flowis tokens as application.css; layouts scale from tablet to 2560 px. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.grow {
  flex: 1 1 auto;
}

.strong {
  font-weight: 600;
  color: var(--fl-dark);
}

.overdue,
.overdue .ic {
  color: var(--fl-danger);
}

.ic.big {
  width: 30px;
  height: 30px;
  display: block;
  margin: 0 auto 8px;
  color: #c4ccd6;
}

.empty.small {
  padding: 14px;
  font-size: 12px;
}

.card-body.tight {
  padding: 8px 14px 12px;
}

.link-btn {
  background: none;
  border: 0;
  color: var(--fl-link);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  padding: 0 4px;
}

.link-btn.address-link {
  font-size: inherit;
  padding: 0;
  text-align: start;
  overflow-wrap: anywhere;
}

.link-btn.address-link:hover {
  text-decoration: underline;
}

.block {
  display: block;
}

.row.end {
  justify-content: flex-end;
  align-items: center;
}

.row.end > * {
  flex: 0 0 auto;
}

.row .grow2 {
  flex: 2 1 260px;
}

.form.wide {
  max-width: none;
}

.form.compact {
  gap: 8px;
  max-width: none;
}

.form.compact .row > * {
  flex: 1 1 110px;
}

kbd {
  font: 11px var(--mono);
  background: #fff;
  border: 1px solid #d5dbe4;
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 0 5px;
  color: var(--fl-dark);
}

/* nav badge */
.nav a {
  position: relative;
}

.nav-badge {
  margin-left: auto;
  background: var(--fl-danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 10px;
  padding: 0 6px;
  line-height: 17px;
}

/* quick search in the header */
.qsearch {
  position: relative;
  flex: 0 1 380px;
  margin-left: 18px;
}

/* Beside the page title the box gives way first, down to a usable width: a long lead name squeezed it to 70 px, and
   a short one was cut to "Alfa Logistika s.…" at 1440 px while the box kept 360 px. A narrower band has no room for
   both (a tablet's lead head names the lead itself). */
@media (min-width: 1200px) {
  .header .qsearch {
    flex-shrink: 4;
    min-width: 180px;
  }
}

.qsearch-form {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid transparent;
  border-radius: var(--fl-pill);
  padding: 0 10px;
  height: 34px;
  color: #fff;
}

.qsearch-form:focus-within {
  background: #fff;
  color: var(--fl-dark);
  border-color: var(--fl-secondary);
}

.qsearch-form input[type="search"] {
  background: transparent;
  border: 0;
  color: inherit;
  min-height: 30px;
  padding: 0;
  outline: none;
}

.qsearch-form input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.qsearch-form:focus-within input::placeholder {
  color: #a9b1bb;
}

.qsearch-form kbd {
  background: transparent;
  color: inherit;
  opacity: 0.7;
}

/* On the search page and Prehľad of the Sales app, which has no header. */
.qsearch.on-page {
  position: relative;
  margin: 0 0 12px;
}

.qsearch.on-page .qsearch-form {
  background: #fff;
  color: var(--fl-dark);
  border-color: var(--fl-light);
  height: 44px;
}

.qsearch.on-page .qsearch-form input::placeholder {
  color: #a9b1bb;
}

.qsearch.on-page kbd {
  display: none;
}

/* On a phone the header's box hands its results to the header; a box on the page keeps them under itself. */
.qsearch.on-page .qsearch-results {
  top: 50px;
  left: 0;
  right: 0;
}

.qsearch-results {
  position: absolute;
  top: 40px;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: var(--fl-radius);
  box-shadow: 0 12px 30px rgba(7, 10, 46, 0.25);
  z-index: 30;
  max-height: 70vh;
  overflow: auto;
}

.qresults {
  list-style: none;
  margin: 0;
  padding: 4px;
}

.qresult {
  display: block;
  padding: 7px 10px;
  border-radius: 6px;
  color: var(--fl-dark);
}

.qresult span {
  display: block;
}

.qresult:hover,
.qresult:focus {
  background: var(--fl-gray);
  text-decoration: none;
  outline: none;
}

.qresult.more {
  color: var(--fl-link);
}

.qresult.empty {
  color: var(--fl-text);
  padding: 12px;
}

/* avatars, chips, segmented, tabs */
.avatar {
  --av: var(--fl-primary);
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--av);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  flex: none;
  vertical-align: middle;
}

.avatar.xs {
  width: 20px;
  height: 20px;
  font-size: 9px;
}

.avatar.sm {
  width: 32px;
  height: 32px;
}

.avatar.empty {
  background: #e1e7f0;
  color: var(--fl-text);
}

.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 3px 11px;
  border-radius: var(--fl-pill);
  border: 1px solid var(--fl-light);
  color: var(--fl-dark);
  font-size: 11.5px;
  background: #fff;
}

.chip:hover {
  text-decoration: none;
  border-color: var(--fl-secondary);
}

.chip.active {
  background: var(--fl-primary);
  color: #fff;
  border-color: var(--fl-primary);
}

.chip.static {
  background: var(--fl-zebra);
}

.seg {
  display: inline-flex;
  background: #fff;
  border-radius: var(--fl-pill);
  padding: 2px;
  box-shadow: var(--fl-shadow-sm);
}

.seg a {
  padding: 5px 14px;
  border-radius: var(--fl-pill);
  color: var(--fl-primary);
  font-size: 12px;
}

.seg a:hover {
  text-decoration: none;
  background: var(--fl-gray);
}

.seg a.on {
  background: var(--fl-primary);
  color: #fff;
}

.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--fl-row-border);
  padding: 0 12px;
  overflow-x: auto;
}

.tab {
  background: none;
  border: 0;
  padding: 11px 12px 9px;
  font: inherit;
  font-weight: 600;
  color: var(--fl-text);
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  border-bottom: 3px solid transparent;
}

.tab:hover {
  color: var(--fl-primary);
  text-decoration: none;
}

.tab[aria-selected="true"],
.tab.on {
  color: var(--fl-primary);
  border-bottom-color: var(--fl-primary);
}

/* dropdown menus built on <details> */
.menu {
  position: relative;
  display: inline-block;
}

.menu > summary {
  list-style: none;
}

.menu > summary::-webkit-details-marker {
  display: none;
}

.menu-body {
  position: absolute;
  z-index: 25;
  top: calc(100% + 4px);
  left: 0;
  min-width: 220px;
  background: #fff;
  border-radius: var(--fl-radius);
  box-shadow: 0 12px 30px rgba(7, 10, 46, 0.18);
  padding: 8px;
  display: grid;
  gap: 4px;
}

.menu-body.wide {
  min-width: 300px;
}

/* One form per menu with a button per choice: a row of the team Inbox would otherwise carry a form per colleague. */
.menu-items {
  display: grid;
  gap: 4px;
}

.right-menu .menu-body {
  left: auto;
  right: 0;
}

/* menu_fit_controller.js: a menu in a box that clips (the kanban) opens upwards or scrolls inside itself. */
.menu-body.up {
  top: auto;
  bottom: calc(100% + 4px);
}

.menu-body.fitted {
  overflow-y: auto;
  overscroll-behavior: contain;
}

.menu-item {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 6px 8px;
  border-radius: 6px;
  font: inherit;
  color: var(--fl-dark);
  cursor: pointer;
}

.menu-item:hover {
  background: var(--fl-gray);
  text-decoration: none;
}

.menu-title {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #a9b1bb;
  padding: 2px 8px;
}

/* dialogs */
.dialog {
  border: 0;
  border-radius: 10px;
  padding: 22px;
  width: min(460px, calc(100vw - 32px));
  box-shadow: 0 30px 60px rgba(7, 10, 46, 0.35);
  color: var(--fl-text);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.dialog::backdrop {
  background: rgba(7, 10, 46, 0.45);
}

html:has(dialog[open]) {
  overflow: hidden;
}

/* Phones: an open dropdown becomes a bottom sheet that scrolls on its own while the page behind stays put. Its backdrop
   must cover the dark band too (a tap there closes it in iOS Safari): the page stops being a stacking box of its own,
   which had put everything scrolled under the band above it. A box around the open menu that is one (a sticky bar
   such as the inbox's bulk actions) is lifted above its neighbours, so the backdrop also covers the sticky bands. */
@media (max-width: 640px) {
  .content:has(.menu[open]) {
    z-index: auto;
  }

  .content :has(.menu[open]) {
    z-index: 61;
  }

  .menu[open]::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 59;
    background: rgba(7, 10, 46, 0.35);
    cursor: pointer;
  }

  .menu[open] > .menu-body {
    position: fixed;
    z-index: 60;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    min-width: 0;
    max-height: 80dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: 14px 14px 0 0;
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
    box-shadow: 0 -12px 30px rgba(7, 10, 46, 0.25);
  }

  html:has(.menu[open]) {
    overflow: hidden;
  }
}

.dialog h2 {
  display: flex;
  gap: 8px;
  align-items: center;
}

.table.shortcuts td:first-child {
  white-space: nowrap;
  width: 110px;
}

/* filters & bulk */
.filters .field.grow {
  flex: 1 1 220px;
}

.filters .checks {
  align-self: center;
}

.inline-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.page-actions {
  align-items: center;
}

.bulk-bar {
  position: sticky;
  top: var(--app-header-height);
  z-index: 5;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  background: var(--fl-primary);
  color: #fff;
  border-radius: var(--fl-radius);
  padding: 8px 12px;
  margin-bottom: 8px;
}

.bulk-bar select,
.bulk-bar input {
  min-height: 30px;
  padding: 4px 8px;
  width: auto;
}

.bulk-bar[hidden] {
  display: none;
}

.bulk-bar .sep {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.3);
}

.bulk-bar .btn.primary {
  background: #fff;
  color: var(--fl-primary);
}

.bulk-bar .btn.outline {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}

.table .check {
  width: 28px;
}

.leads-table td {
  vertical-align: middle;
}

.leads-table .opened {
  color: var(--ok-fg);
  font-weight: 600;
}

/* Compact rows (the default) keep each lead on one line, as in a spreadsheet: long text ends in "…" and shows whole in
   the tooltip; "Pohodlné riadky" (.comfortable) brings back the second line of each cell (.cell-sub). */
@media (min-width: 641px) {
  .leads-table:not(.comfortable) td {
    white-space: nowrap;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .leads-table:not(.comfortable) .cell-sub {
    display: none;
  }

  .leads-table:not(.comfortable) .cell-line {
    max-width: 320px;
  }
}

.leads-table .cell-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.leads-table .cell-line > .clip {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leads-table .cell-line > .ic,
.leads-table .cell-line > .nowrap {
  flex: none;
}

.leads-table:not(.comfortable) td {
  padding-block: 7px;
}

.leads-table .btn.row-call {
  flex: none;
  margin-left: auto;
  width: 24px;
  height: 24px;
  min-height: 0;
  padding: 4px;
  color: var(--fl-text);
  background: transparent;
  border-color: transparent;
}

.leads-table tr:hover .row-call,
.leads-table .row-call:focus-visible {
  color: var(--fl-primary);
  border-color: var(--fl-light);
  background: #fff;
}

.sort-link {
  color: inherit;
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.sort-link:hover {
  color: var(--fl-link);
  text-decoration: none;
}

.sort-link.on {
  color: var(--fl-primary);
}

.sort-link.on::after {
  content: "↑";
  font-size: 11px;
}

.sort-link.on.desc::after {
  content: "↓";
}

.sort-menu .menu-body {
  min-width: 220px;
}

@media (max-width: 640px) {
  .density-toggle {
    display: none;
  }
}

.call-panel {
  display: grid;
  gap: 4px;
}

/* New lead (page and side panel) */
.lead-form .registry-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.lead-form .registry-status:empty {
  display: none;
}

.lead-form .registry-status {
  margin: -4px 0 0;
}

.lead-form fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
  min-width: 0;
}

.lead-form legend {
  font-weight: 600;
  color: var(--fl-dark);
  padding: 0;
  margin-bottom: 4px;
}

.lead-form-actions {
  position: sticky;
  bottom: 0;
  background: #fff;
  padding: 8px 0 2px;
}

.dup-hits {
  border: 1px solid #f2d39b;
  background: var(--warn-bg);
  color: var(--warn-fg);
  border-radius: var(--fl-radius);
  padding: 8px 12px;
}

.dup-hits .dup-title {
  margin: 0 0 4px;
  font-weight: 600;
  display: flex;
  gap: 6px;
  align-items: center;
}

.dup-hits ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.dup-hits li {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.dup-hits .muted {
  color: var(--warn-fg);
  opacity: 0.85;
}

/* lead header */
.lead-head {
  padding: 16px 20px 12px;
}

.lead-title {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.logo-letter {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--fl-secondary), var(--fl-primary));
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex: none;
}

.lead-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 2px;
}

.lead-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* lead grid: timeline first, the cards beside it from laptops on */
.lead-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

@media (min-width: 1100px) {
  .lead-grid {
    grid-template-columns: minmax(0, 1fr) 360px;
  }
}

@media (min-width: 1580px) {
  .lead-grid {
    grid-template-columns: minmax(0, 1fr) 420px;
  }
}

.lead-side {
  display: grid;
  gap: 10px;
}

.lead-side > .card,
.lead-main > .card {
  margin: 0;
}

.lead-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.lead-main > *,
.lead-side > * {
  min-width: 0;
}

.composer .tabs {
  overflow-x: auto;
  scrollbar-width: none;
}

.composer .tab {
  flex: none;
}

.fold > summary {
  cursor: pointer;
  padding: 8px 10px;
  color: var(--fl-link);
  list-style: none;
}

.fold > summary::before {
  content: "▸ ";
}

.fold[open] > summary::before {
  content: "▾ ";
}

@media (max-width: 640px) {
  .lead-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .lead-actions > .menu {
    grid-column: 1 / -1;
  }

  .lead-actions > .menu > summary {
    width: 100%;
    justify-content: center;
  }

  .lead-actions > .btn,
  .lead-actions > form > .btn {
    justify-content: center;
    padding-inline: 6px;
    font-size: 11.5px;
    white-space: normal;
    text-align: center;
  }

  .lead-actions > form {
    display: grid;
    min-width: 0;
  }
}

.inline-dl dt {
  padding: 7px 10px;
}

.inline-dl dd {
  padding: 2px 4px;
}

.inline-form {
  margin: 0;
}

.inline-input {
  border: 1px solid transparent !important;
  background: transparent !important;
  min-height: 30px !important;
  padding: 4px 6px !important;
  border-radius: 6px;
  width: 100%;
  cursor: pointer;
}

.inline-input:hover {
  background: var(--fl-zebra) !important;
  border-color: var(--fl-light) !important;
}

.inline-input:focus {
  background: #fff !important;
  border-color: var(--fl-secondary) !important;
  cursor: text;
}

select.inline-input {
  appearance: none;
}

textarea.inline-input {
  min-height: 54px !important;
  resize: vertical;
}

.contact-list,
.opp-list,
.task-list,
.mini-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.contact-list > li,
.opp-list > li,
.mini-list > li {
  padding: 9px 0;
  border-bottom: 1px solid var(--fl-row-border);
}

.contact-list > li:last-child,
.opp-list > li:last-child,
.mini-list > li:last-child {
  border-bottom: 0;
}

.contact-row,
.opp-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.contact-row .ic,
.task-row .ic {
  width: 13px;
  height: 13px;
}

.danger-zone summary {
  cursor: pointer;
  list-style: none;
}

/* composer */
.composer .card-body {
  padding-top: 12px;
}

.composer textarea {
  min-height: 70px;
}

/* timeline */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 87px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--fl-row-border);
}

.tl-item {
  display: grid;
  grid-template-columns: 72px 30px minmax(0, 1fr);
  gap: 0 6px;
  padding: 8px 0;
  position: relative;
}

.tl-when {
  text-align: right;
  font-size: 11px;
  line-height: 1.3;
  padding-top: 3px;
}

.tl-when b {
  display: block;
  color: var(--fl-dark);
}

.tl-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eef1f6;
  color: var(--fl-primary);
  position: relative;
  z-index: 1;
  border: 2px solid #fff;
}

.tl-dot .ic {
  width: 13px;
  height: 13px;
}

.kind-note .tl-dot {
  background: #fff5e0;
  color: #8a5a00;
}

.kind-call .tl-dot,
.kind-meeting .tl-dot {
  background: var(--ok-bg);
  color: var(--ok-fg);
}

.kind-call.missed .tl-dot {
  background: var(--bad-bg);
  color: var(--bad-fg);
}

.kind-email .tl-dot {
  background: var(--warn-bg);
  color: var(--warn-fg);
}

.kind-task_completed .tl-dot {
  background: #e6f7f8;
  color: #0b6b70;
}

.tl-title {
  color: var(--fl-dark);
  font-weight: 600;
}

.tl-text {
  color: var(--fl-dark);
  margin-top: 2px;
}

.tl-text p {
  margin: 0 0 4px;
}

/* tasks */
.task-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--fl-row-border);
}

.task-row:last-child {
  border-bottom: 0;
}

/* Môj deň of the whole team lists up to 200 tasks per section: rows off screen are not laid out or painted, so opening a
   menu or typing stays fast. A row with an open menu or editor renders normally, or its dropdown would be clipped.
   Only there: inside a <details> (the lead's Otvorené úlohy) Safari never paints such a row, an empty box instead. */
.day-grid .task-list > li {
  content-visibility: auto;
  contain-intrinsic-size: auto 60px;
}

.day-grid .task-list > li:has(details[open]) {
  content-visibility: visible;
}

.task-row.done b {
  text-decoration: line-through;
  color: var(--fl-text);
}

.check-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #c4ccd6;
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  color: transparent;
  flex: none;
}

.check-btn:hover {
  border-color: var(--fl-success);
  color: var(--fl-success);
}

.check-btn.checked {
  background: var(--fl-success);
  border-color: var(--fl-success);
  color: #fff;
}

.check-btn .ic {
  width: 14px;
  height: 14px;
}

.kind-ic .ic {
  color: var(--fl-primary);
}

.quick-add {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-add input[type="text"] {
  flex: 3 1 260px;
  width: auto;
}

.quick-add input[type="date"],
.quick-add select {
  flex: 1 1 150px;
  width: auto;
}

.day-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

@media (min-width: 1200px) {
  .day-grid {
    grid-template-columns: minmax(0, 1fr) 360px;
  }
}

@media (min-width: 2000px) {
  .day-grid {
    grid-template-columns: minmax(0, 1fr) 460px;
  }
}

/* inbox */
.inbox .tabs .pill {
  font-size: 10px;
}

/* pipeline */
.pipeline-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0;
  padding: 0;
}

.pipeline-summary > div {
  padding: 12px 18px;
  border-right: 1px solid var(--fl-row-border);
}

.pipeline-summary span {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--fl-text);
}

.pipeline-summary b {
  font-size: 20px;
  color: var(--fl-primary);
}

.kanban {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, 1fr);
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  align-items: start;
}

.kcol {
  background: #eceff4;
  border-radius: var(--fl-radius);
  padding: 8px;
  min-height: 240px;
  transition: box-shadow 0.1s;
}

.kcol.over,
.kzone.over {
  box-shadow: inset 0 0 0 2px var(--fl-secondary);
}

.khead {
  padding: 4px 4px 8px;
  color: var(--fl-dark);
}

.kcards {
  display: grid;
  gap: 8px;
}

.kcard {
  background: #fff;
  border-radius: var(--fl-radius);
  box-shadow: var(--fl-shadow-sm);
  padding: 10px 12px;
  cursor: grab;
  display: grid;
  gap: 3px;
  border-left: 3px solid var(--fl-secondary);
}

.kcard.dragging {
  opacity: 0.45;
}

.kvalue b {
  font-size: 15px;
  color: var(--fl-primary);
}

.kmeta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.knote > summary {
  cursor: pointer;
  color: var(--fl-link);
}

.knote .rich-note {
  margin-top: 4px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.kfoot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}

.kempty {
  border: 2px dashed #d5dbe4;
  border-radius: var(--fl-radius);
  padding: 18px;
  text-align: center;
  font-size: 12px;
}

.kmore {
  display: block;
  text-align: center;
  padding: 6px;
}

.kzones {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin: 10px 0;
}

.stage-info {
  cursor: help;
  color: var(--fl-text-muted, #6c757d);
  font-size: 12px;
}

.kzone {
  border: 2px dashed;
  border-radius: var(--fl-radius);
  padding: 12px 14px;
  background: #fff;
  min-height: 64px;
}

.kzone.won {
  border-color: var(--fl-success);
  color: var(--ok-fg);
}

.kzone.lost {
  border-color: #ecb4ad;
  color: var(--bad-fg);
}

.zone-names {
  display: flex;
  gap: 4px 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.lost-inline {
  border-top: 1px solid var(--fl-row-border);
  padding-top: 6px;
  margin-top: 4px;
}

/* Leads list: saved filters, conditions over the whole database ("Pridať filter"), columns */
.list-toolbar {
  padding: 6px 12px;
  display: grid;
  gap: 6px;
}

.list-toolbar-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.list-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  color: var(--fl-primary);
  padding: 2px 8px 2px 2px;
  border-radius: var(--fl-radius);
}

.list-title:hover {
  background: var(--fl-gray);
}

.list-title .caret {
  font-size: 13px;
  color: var(--fl-text);
}

.saved-filter-menu .menu-body {
  max-height: 70vh;
  overflow-y: auto;
}

.menu-item.on {
  background: var(--fl-gray);
  font-weight: 600;
}

.menu-row {
  display: flex;
  align-items: center;
  gap: 2px;
}

.menu-row > .menu-item {
  flex: 1;
  min-width: 0;
}

.pin-btn {
  background: none;
  border: 0;
  border-radius: 6px;
  padding: 6px;
  line-height: 0;
  color: #b6bec8;
  cursor: pointer;
}

.pin-btn:hover,
.pin-btn:focus-visible {
  background: var(--fl-gray);
  color: var(--fl-primary);
}

.pin-btn.on {
  color: var(--fl-primary);
}

.menu-body hr {
  border: 0;
  border-top: 1px solid var(--fl-light);
  margin: 4px 0;
  width: 100%;
}

.list-search {
  flex: 1 1 220px;
  min-width: 0;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--fl-light);
  border-radius: var(--fl-pill);
  padding: 0 12px;
  background: #fff;
}

.search-field input {
  border: 0;
  outline: 0;
  min-height: 34px;
  padding: 0;
  width: 100%;
  background: transparent;
  box-shadow: none;
}

.search-field:focus-within {
  border-color: var(--fl-secondary);
}

.list-toolbar-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  margin-left: auto;
}

.filter-chips {
  align-items: center;
}

.filter-chip {
  padding: 0;
  gap: 0;
  background: var(--fl-zebra);
  border-color: var(--fl-light);
}

.chip-edit {
  background: none;
  border: 0;
  font: inherit;
  color: var(--fl-dark);
  padding: 4px 4px 4px 11px;
  cursor: pointer;
  text-align: left;
}

.chip-edit:hover {
  text-decoration: underline;
}

.chip-remove {
  display: inline-grid;
  place-items: center;
  padding: 4px 8px 4px 4px;
  color: var(--fl-text);
}

.chip-remove:hover {
  color: var(--fl-danger);
}

.chip-remove .ic {
  width: 13px;
  height: 13px;
}

.filter-summary {
  margin: 0;
  color: var(--fl-text);
  font-size: 13px;
}

.info-tip {
  display: inline-grid;
  place-items: center;
  color: var(--fl-text);
  cursor: help;
  border-radius: 50%;
}

.info-tip:focus-visible {
  outline: 2px solid var(--fl-secondary);
}

.reset-view {
  margin-left: 4px;
}

.column-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 12px;
}

.column-choices label {
  display: flex;
  gap: 6px;
  align-items: center;
  color: var(--fl-dark);
  font-weight: 400;
  white-space: nowrap;
}

.danger-item {
  color: var(--fl-danger);
}

.filter-panel {
  display: grid;
  gap: 12px;
}

.filter-browser {
  display: grid;
  gap: 10px;
}

.filter-browser > p {
  margin: 0;
}

.filter-category h3 {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #a9b1bb;
  margin: 4px 0 4px;
}

.filter-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 8px;
}

.filter-item {
  text-align: left;
  background: none;
  border: 0;
  border-radius: 6px;
  padding: 6px 8px;
  font: inherit;
  color: var(--fl-dark);
  cursor: pointer;
}

.filter-item:hover,
.filter-item:focus-visible {
  background: var(--fl-gray);
}

.filter-field {
  border: 0;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
  min-width: 0;
}

.filter-field h3 {
  margin: 0;
  font-size: 15px;
}

.filter-field .link-btn {
  justify-self: start;
  font-size: 12px;
  padding: 0;
}

.choice-list {
  border: 1px solid var(--fl-light);
  border-radius: var(--fl-radius);
  padding: 8px 10px;
  margin: 0;
  display: grid;
  gap: 4px;
  max-height: 45vh;
  overflow-y: auto;
}

.choice-list label {
  display: flex;
  gap: 6px;
  align-items: center;
  color: var(--fl-dark);
  font-weight: 400;
}

.saved-filter-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.saved-filter-list li {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 20px;
  border-top: 1px solid var(--fl-row-border);
}

.saved-filter-list li:first-child {
  border-top: 0;
}

.saved-filter-link {
  flex: 1;
  display: flex;
  gap: 14px;
  align-items: center;
  color: var(--fl-text);
  min-width: 0;
}

.saved-filter-link:hover {
  text-decoration: none;
}

.saved-filter-link:hover b {
  text-decoration: underline;
}

.saved-filter-link > span:last-child {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.saved-filter-link b {
  color: var(--fl-dark);
}

.view-count {
  font-size: 26px;
  font-weight: 800;
  color: var(--fl-primary);
  line-height: 1.1;
  min-width: 48px;
  text-align: right;
}

.view-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

@media (max-width: 640px) {
  .list-toolbar-actions {
    margin-left: 0;
    width: 100%;
  }

  .list-toolbar-actions > .btn,
  .list-toolbar-actions > .menu {
    flex: 1 1 auto;
  }

  .list-toolbar-actions .menu > summary {
    width: 100%;
    justify-content: center;
  }

  .filter-items {
    grid-template-columns: minmax(0, 1fr);
  }

  .saved-filter-list li {
    padding: 10px 12px;
    flex-wrap: wrap;
  }
}

/* wide screens: hide columns on narrow, show extra on wide */
@media (max-width: 1280px) {
  .wide-only {
    display: none;
  }
}

@media (min-width: 1900px) {
  .content {
    padding: 6px 20px 28px;
  }

  body {
    font-size: 13.5px;
  }
}

@media (max-width: 960px) {
  .qsearch {
    margin-left: 4px;
    flex-basis: 260px;
  }

  .qsearch kbd {
    display: none;
  }

  .kzones {
    grid-template-columns: 1fr;
  }

  .hide-sm {
    display: none;
  }
}

@media (max-width: 640px) {
  .qsearch {
    position: static;
  }

  .qsearch-results {
    left: 8px;
    right: 8px;
    top: 60px;
  }

  .timeline::before {
    left: 69px;
  }

  .tl-item {
    grid-template-columns: 56px 26px minmax(0, 1fr);
  }
}

/* settings */
.settings-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 1500px) {
  .settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

.settings-grid.two {
  align-items: start;
}

@media (min-width: 1100px) {
  .settings-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.settings-table td {
  vertical-align: middle;
}

.settings-table input[type="text"],
.settings-table input[type="email"],
.settings-table select {
  min-height: 30px;
  padding: 4px 8px;
}

.settings-table input.tiny {
  width: 56px;
  min-height: 30px;
  padding: 4px 6px;
}

.settings-table input.small-num {
  width: 70px;
  min-height: 30px;
  padding: 4px 6px;
}

.settings-table .grant-list {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
  min-width: 220px;
}

.settings-table .grant-list label.checks {
  gap: 6px;
  align-items: center;
  flex-wrap: nowrap;
}

.add-row {
  align-items: center;
  margin-top: 10px;
}

.add-row > button {
  flex: 0 0 auto;
}

.title-form {
  align-items: center;
  flex: 1 1 auto;
}

.title-form > * {
  flex: 0 0 auto;
}

.inline-input.h2 {
  font-size: 15px;
  font-weight: 600;
  color: var(--fl-dark);
  width: 260px;
}

/* microsoft 365 wizard and e-mail rules */
.m365-status {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px 18px;
  align-items: center;
}

.m365-status span {
  display: block;
  font-size: 11px;
  font-weight: 600;
}

.m365-status b {
  color: var(--fl-dark);
  word-break: break-all;
}

.m365-test {
  justify-self: end;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}

.wizard > li::before {
  top: 18px;
  left: 2px;
}

.wizard > li {
  padding-left: 38px;
}

.wizard pre {
  max-height: 360px;
}

.small-banner {
  font-size: 12px;
}

.rule-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.decision {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: var(--fl-radius);
  background: var(--fl-zebra);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--fl-dark);
}

/* e-mail on the timeline, inbox e-mail and triage tabs */
.mail-body summary {
  cursor: pointer;
  color: var(--fl-dark);
  margin-top: 4px;
  list-style: none;
}

.mail-body summary::-webkit-details-marker {
  display: none;
}

.mail-body[open] summary {
  display: none;
}

.mail-body .tl-text {
  background: var(--fl-zebra);
  border-radius: 6px;
  padding: 8px 10px;
  margin-top: 4px;
  max-height: 420px;
  overflow: auto;
}

.attachments {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.mail-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.kind-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
}

.kind-dot.email {
  background: var(--warn-bg);
  color: var(--warn-fg);
}

.triage-note {
  margin: 10px 0 4px;
}

.triage-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.triage-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--fl-row-border);
  display: grid;
  gap: 8px;
}

.triage-head {
  display: flex;
  gap: 10px;
}

.triage-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding-left: 42px;
}

/* reports */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

@media (min-width: 760px) {
  .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .kpi-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.kpi-grid .counter {
  display: block;
  color: var(--fl-text);
}

.kpi-grid .counter:hover {
  text-decoration: none;
  box-shadow: var(--fl-shadow-soft);
}

.kpi-grid .counter .value {
  font-size: 28px;
}

/* The period bar of the Reports page sticks right under the app header. z-index 3 is inside .content (z-index 1), i.e.
   below the header and its menu and the sidebar; flatpickr's calendar sits on <body> at z-index 1000. */
.report-bar {
  position: sticky;
  top: var(--app-header-height);
  z-index: 3;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: flex-start;
  gap: 6px;
  box-shadow: var(--fl-shadow-sm);
}

/* A wrapping column would size its line by the widest row, so the tabs pushed the page sideways instead of scrolling. */
.report-tabs {
  min-width: 0;
  max-width: 100%;
  padding: 0;
  scrollbar-width: thin;
}

/* Filters above a report's table (channel, status) and its "Vysvetlivky" button. */
.report-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.report-toolbar .seg {
  max-width: 100%;
  overflow-x: auto;
}

.report-toolbar .seg a {
  white-space: nowrap;
}

.report-help {
  margin-left: auto;
}

.seg-count {
  margin-left: 4px;
  font-size: 11px;
  opacity: 0.75;
}

.report-help-body dt {
  margin-top: 10px;
  font-weight: 700;
  color: var(--fl-dark);
}

.report-help-body dd {
  margin: 2px 0 0;
}

.report-bar-presets {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.report-bar .report-range {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 340px;
  min-width: 220px;
  margin: 0;
}

.report-bar .report-range input {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  min-height: 32px;
  padding-top: 5px;
  padding-bottom: 5px;
}

.report-bar .report-range .btn {
  flex: none;
}

@media (max-width: 640px) {
  /* On a phone the bar (periods, range, tabs) would cover a third of the screen while scrolling: it stays at the top. */
  .report-bar {
    position: static;
    padding: 4px 8px;
    gap: 4px;
    margin-bottom: 8px;
  }

  .complaint-categories {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .complaint-category {
    flex: none;
  }

  .report-bar-presets {
    row-gap: 4px;
  }

  .report-bar .seg {
    flex: none;
  }

  .report-bar .seg a {
    padding: 4px 10px;
  }

  .report-bar-range {
    flex: none;
    font-size: 11px;
    white-space: nowrap;
  }

  .report-bar .report-range {
    flex: 1 1 100%;
    order: 3;
  }
}

.report-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

@media (min-width: 1100px) {
  .report-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-grid .span-2 {
    grid-column: span 2;
  }
}

@media (min-width: 1800px) {
  .report-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .report-grid .span-2 {
    grid-column: span 2;
  }
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(110px, 38%) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin: 6px 0 2px;
}

.bar-label {
  color: var(--fl-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar {
  position: relative;
  height: 12px;
  background: var(--fl-gray);
  border-radius: 6px;
  overflow: hidden;
}

.bar > span {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: color-mix(in srgb, var(--fl-secondary), white 45%);
  border-radius: 6px;
}

.bar > span.weighted {
  background: var(--fl-primary);
  height: 4px;
  top: 4px;
}

.bar > span.warn {
  background: var(--fl-warning);
}

.bar-value {
  font-variant-numeric: tabular-nums;
  color: var(--fl-dark);
  font-weight: 600;
}

.bar-names {
  margin: 0 0 6px;
}

.callback-report {
  display: grid;
  gap: 8px 24px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.callback-report .bar-row {
  grid-template-columns: minmax(0, 3fr) minmax(48px, 2fr) auto;
}

.callback-report .bar-label {
  white-space: normal;
  overflow-wrap: anywhere;
}

.callback-report h3 {
  margin: 4px 0 2px;
  font-size: 13px;
  color: var(--fl-text);
}

.intent-report th[scope="row"] {
  text-align: left;
  font-weight: 600;
}

.intent-report tbody tr > :first-child {
  white-space: nowrap;
}

.intent-menu-row td:first-child {
  padding-left: 18px;
  color: var(--fl-text);
}

.intent-report td.intent-mismatch {
  background: var(--warn-bg);
  font-weight: 600;
}

.wl {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.wl > div {
  flex: 1 1 100px;
  background: var(--fl-zebra);
  border-radius: var(--fl-radius);
  padding: 10px 12px;
  display: grid;
}

.wl span {
  font-size: 11px;
  font-weight: 600;
}

.wl b {
  font-size: 24px;
  color: var(--fl-dark);
}

.wl .ok b {
  color: var(--ok-fg);
}

.wl .bad b {
  color: var(--fl-danger);
}

.wl .warn b {
  color: var(--warn-fg);
}

.month-bars {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  height: 170px;
  align-items: end;
}

.month-col {
  display: grid;
  grid-template-rows: 1fr auto;
  height: 100%;
  text-align: center;
  gap: 4px;
}

.stack {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-start;
  background: var(--fl-zebra);
  border-radius: 6px;
  overflow: hidden;
}

.stack span {
  display: block;
  width: 100%;
}

.legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 4px;
}

/* calling from the CRM */
.call-options {
  display: grid;
  gap: 0;
  margin-bottom: 4px;
}

.call-options .menu-item {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-block: 6px;
}

.call-route {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 12px;
  white-space: nowrap;
}

.call-route .route-arrow {
  opacity: 0.6;
}

.call-menu {
  width: min(300px, calc(100vw - 32px));
}

.call-menu .call-recording-choice {
  padding: 4px 8px;
}

@media (hover: none) and (pointer: coarse) {
  .only-desktop {
    display: none !important;
  }
}

@media not ((hover: none) and (pointer: coarse)) {
  .only-touch {
    display: none !important;
  }
}

.call-options form.call-option {
  display: block;
}

.call-target {
  padding: 4px 8px 0;
  color: var(--fl-dark);
}

.lead-actions .menu-body {
  min-width: min(320px, calc(100vw - 32px));
  left: auto;
  right: 0;
}

.inline-menu > summary {
  cursor: pointer;
  color: var(--fl-link);
}

.toasts {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
}

.toast {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #fff;
  border-left: 4px solid var(--fl-info);
  border-radius: var(--fl-radius);
  padding: 10px 12px;
  box-shadow: 0 12px 30px rgba(7, 10, 46, 0.18);
  color: var(--fl-dark);
}

.toast.connected,
.toast.completed {
  border-color: var(--fl-success);
}

.toast.failed {
  border-color: var(--fl-danger);
}

.toast .toast-icon {
  color: var(--fl-primary);
  padding-top: 2px;
}

/* recordings, transcripts, summaries */
.conversation {
  border-top: 1px solid var(--fl-row-border);
  padding-top: 8px;
  margin-top: 8px;
  display: grid;
  gap: 6px;
}

.conversation audio {
  width: min(360px, 100%);
  height: 32px;
}

.transcript > summary {
  cursor: pointer;
  color: var(--fl-link);
  font-size: 12px;
}

.segments {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: grid;
  gap: 4px;
  max-height: 360px;
  overflow-y: auto;
}

.segment {
  display: grid;
  grid-template-columns: 52px 92px minmax(0, 1fr);
  gap: 6px;
  align-items: baseline;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 12px;
}

.segment .seek {
  background: none;
  border: 0;
  color: var(--fl-link);
  font: inherit;
  font-family: var(--mono);
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.segment.speaker-agent,
.segment.speaker-speaker_1 {
  background: #e6f7f8;
}

.segment.speaker-customer,
.segment.speaker-speaker_2 {
  background: #fff5e0;
}

.segment.speaker-agent b,
.segment.speaker-speaker_1 b {
  color: #00747a;
}

.segment.speaker-customer b,
.segment.speaker-speaker_2 b {
  color: #8a5300;
}

/* System speech whose words are known (prompts, AI answers): muted, it is not what a person said. */
.segment.segment-known {
  background: var(--fl-zebra);
  color: var(--fl-text);
}

.segment.segment-known b {
  color: var(--fl-text);
  font-weight: 600;
}

.known-badge {
  display: inline-block;
  margin-right: 4px;
  padding: 0 6px;
  border: 1px solid var(--fl-light);
  border-radius: var(--fl-pill);
  font-size: 10.5px;
  line-height: 16px;
  color: var(--fl-text);
  background: #fff;
  white-space: nowrap;
  cursor: help;
}

.call-summary {
  background: var(--fl-zebra);
  border-radius: var(--fl-radius);
  padding: 8px 10px;
  font-size: 12.5px;
  color: var(--fl-dark);
}

.call-summary p {
  margin: 0 0 4px;
}

@media (max-width: 640px) {
  .segment {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .segment b {
    grid-column: 2;
  }

  .segment span {
    grid-column: 1 / -1;
  }
}

.tracking {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  align-items: center;
  margin: 4px 0;
}

.tracking-item {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.tracking-item.ok {
  color: var(--fl-dark);
  font-weight: 500;
}

.tracking-item .ic {
  width: 15px;
  height: 15px;
}

.tracking-item.bad {
  color: var(--bad-fg);
  font-weight: 500;
}

.tracking-item.info {
  color: var(--info-fg);
}

.tracking-item.warn,
.delivery-short.warn {
  color: var(--warn-fg);
  font-weight: 500;
}

.tracking-item.muted,
.delivery-short.muted {
  color: var(--fl-text);
  opacity: 0.75;
}

.delivery-short.ok {
  color: var(--fl-dark);
  font-weight: 500;
}

.delivery-short.bad {
  color: var(--bad-fg);
  font-weight: 500;
}

.delivery-short .ic {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
}

.delivery-trace > summary {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  align-items: center;
  cursor: pointer;
}

.delivery-body,
.delivery-help-body {
  max-width: min(420px, calc(100vw - 32px));
}

.delivery-help-body p {
  margin: 0;
}

.delivery-explain.ok {
  color: var(--ok-fg);
}

.delivery-explain.warn {
  color: var(--warn-fg);
}

.delivery-explain.bad {
  color: var(--bad-fg);
}

.delivery-reason {
  color: var(--bad-fg);
}

.delivery-recipients {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.delivery-recipients .ic {
  width: 13px;
  height: 13px;
  vertical-align: -2px;
}

.delivery-recipients .ok {
  color: var(--ok-fg);
}

.delivery-recipients .warn {
  color: var(--warn-fg);
}

.delivery-recipients .bad {
  color: var(--bad-fg);
}

.composer-editor .fr-element a[href$="#qflow-cta"],
.composer-editor .fr-element a[href$="&qflow-cta"] {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 6px;
  background: var(--fl-primary);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.seg button {
  padding: 5px 12px;
  border-radius: var(--fl-pill);
  color: var(--fl-primary);
  font: inherit;
  font-size: 12px;
  background: none;
  border: 0;
  cursor: pointer;
}

.seg button.on {
  background: var(--fl-primary);
  color: #fff;
}

.interface-mode {
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 14px 0 0;
}

.section-tabs {
  background: #fff;
  border-radius: var(--fl-radius);
  box-shadow: var(--fl-shadow-sm);
  margin-bottom: 16px;
}

.page-intro {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin: 0 0 10px;
}

.page-intro p {
  margin: 0;
  color: var(--fl-text);
  max-width: 72ch;
}

.page-intro-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.page-intro-actions:empty {
  display: none;
}

details.more-info > summary,
details.more-settings > summary {
  cursor: pointer;
  color: var(--fl-primary);
  font-weight: 600;
  margin: 8px 0;
}

/* In-call transfer controls (lead page, live-call toast) */
.live-call-panel {
  border-left: 3px solid var(--fl-success);
  margin-bottom: 12px;
  padding: 10px 14px;
}

.live-call-panel h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  font-size: 14px;
}

.live-call-panel .call-control {
  max-width: 560px;
}

.toast.live-call .live-call-lead {
  width: fit-content;
  margin: 4px 0 6px;
}

.call-control {
  display: grid;
  gap: 6px;
}

.call-control-form {
  display: grid;
  gap: 8px;
}

.call-control .row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.segmented {
  display: inline-flex;
  border: 1px solid var(--fl-light);
  border-radius: 6px;
  overflow: hidden;
  width: fit-content;
}

.segmented label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 13px;
}

.segmented label + label {
  border-left: 1px solid var(--fl-light);
}

.segmented label:has(input:checked) {
  background: var(--fl-gray);
  color: var(--fl-primary);
  font-weight: 600;
}

.segmented input:focus-visible {
  outline: 2px solid var(--fl-secondary);
  outline-offset: 2px;
}

.toast.live-call {
  max-width: min(420px, calc(100vw - 32px));
}

.tl-transfer {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

.caller-id-choice {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  flex-wrap: wrap;
}

.access-mode {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 8px 10px;
  border: 1px solid var(--fl-light);
  border-radius: 6px;
  cursor: pointer;
}

.access-mode.on,
.access-mode:has(input:checked) {
  border-color: var(--fl-secondary);
  background: var(--fl-zebra);
}

.email-manage .menu-body {
  min-width: min(360px, calc(100vw - 32px));
}

.email-manage-forms {
  display: grid;
  gap: 10px;
}

.menu-form {
  display: grid;
  gap: 6px;
  padding: 6px 8px;
  border-top: 1px solid var(--fl-row-border);
}

.menu-form label.checks {
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 6px;
}

.menu-form label.checks input {
  margin-top: 2px;
  flex: none;
}

.menu-form > .btn {
  justify-self: start;
}

/* Pre-call brief */
.lead-brief .brief-who {
  margin: 4px 0 8px;
}

.lead-brief h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fl-text);
  margin: 10px 0 4px;
}

.brief-list {
  margin: 0;
  padding-left: 18px;
  font-size: 12.5px;
}

.brief-list li {
  margin-bottom: 3px;
}

.brief-stale {
  background: var(--warn-bg);
  color: var(--warn-fg);
  border-radius: var(--fl-radius);
  padding: 4px 8px;
}

.brief-progress {
  display: flex;
  align-items: center;
  gap: 8px;
}

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.8s linear infinite;
  opacity: 0.7;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation: none;
  }
}

/* Composer assistant */
.ai-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 6px 0;
}

.ai-tools .ai-hint {
  flex-basis: 100%;
}

/* Call outcomes and call queue */
.banner.info {
  background: var(--info-bg);
  color: var(--info-fg);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Scheduled e-mails on the lead page (sales/email_drafts/_scheduled_on_lead), below the action bar. */
.scheduled-emails {
  display: grid;
  gap: 8px;
  padding: 10px 14px;
}

.scheduled-email {
  display: flex;
  gap: 10px;
  align-items: center;
}

.outcome-choices {
  border: 0;
  margin: 0 0 8px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.outcome-choices legend {
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 4px;
  padding: 0;
}

.outcome-choice {
  display: inline-flex;
}

.outcome-choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.outcome-choice span {
  border: 1px solid var(--fl-row-border);
  border-radius: 999px;
  padding: 5px 12px;
  cursor: pointer;
  background: #fff;
  font-size: 12px;
}

.outcome-choice input:checked + span {
  background: var(--fl-primary);
  color: #fff;
  border-color: var(--fl-primary);
}

.outcome-choice input:focus-visible + span {
  outline: 2px solid var(--fl-primary);
  outline-offset: 2px;
}

.callback-field {
  max-width: 280px;
}

.outcome-menu {
  display: inline-block;
  margin-left: 4px;
}

.queue-head {
  flex-wrap: wrap;
}

.queue-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
}

.queue-progress .bar {
  flex: 1;
  height: 8px;
  background: var(--fl-gray);
  border-radius: 999px;
  overflow: hidden;
  max-width: 420px;
}

.queue-progress .bar span {
  display: block;
  height: 100%;
  background: var(--fl-success);
}

.queue-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

@media (min-width: 1100px) {
  .queue-grid {
    grid-template-columns: minmax(0, 1fr) 380px;
    grid-template-areas: "lead side" "outcome side" "recent side";
    grid-template-rows: auto auto 1fr;
  }

  .queue-lead {
    grid-area: lead;
  }

  .queue-side {
    grid-area: side;
  }

  .queue-outcome-card {
    grid-area: outcome;
  }

  .queue-recent {
    grid-area: recent;
  }
}

@media (min-width: 1800px) {
  .queue-grid {
    grid-template-columns: minmax(0, 1fr) 460px;
  }
}

.queue-lead .card-head h2 a {
  color: inherit;
}

.queue-contacts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.queue-contacts li {
  border-bottom: 1px solid var(--fl-row-border);
  padding-bottom: 8px;
}

.queue-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.split-call {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.split-call summary {
  font-size: 15px;
  padding: 0 10px;
}

.queue-buttons {
  gap: 8px;
  flex-wrap: wrap;
}

.queue-summary {
  margin: 10px 0;
  justify-content: center;
}

/* CSV export */
.export-menu .menu-body {
  min-width: 0;
}

.export-row {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.export-label {
  flex: 1;
  min-width: 90px;
  color: var(--fl-dark);
  font-weight: 600;
  font-size: 12px;
}

/* Command palette, quick add, inbox keys */
.palette {
  width: min(640px, calc(100vw - 32px));
  padding: 0;
  margin-top: 12vh;
}

.palette-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--fl-row-border);
}

.palette-search input {
  flex: 1;
  border: 0;
  outline: none;
  font: inherit;
  font-size: 15px;
  min-width: 0;
  background: transparent;
}

.palette-list {
  max-height: min(420px, 60vh);
  overflow-y: auto;
  padding: 6px;
}

.palette-group {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fl-text);
  padding: 8px 8px 2px;
}

.palette-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--fl-dark);
}

.palette-option small {
  color: var(--fl-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 55%;
}

.palette-option[aria-selected="true"] {
  background: var(--info-bg);
  color: var(--info-fg);
}

.palette-empty {
  padding: 14px;
  margin: 0;
}

.palette-foot {
  margin: 0;
  padding: 8px 14px;
  border-top: 1px solid var(--fl-row-border);
}

.palette-open kbd {
  font-size: 10px;
  margin-left: 4px;
}

@media (max-width: 640px) {
  .palette-open kbd,
  .palette-foot {
    display: none;
  }

  .palette {
    margin-top: 4vh;
  }
}

.quick-add-dialog {
  width: min(560px, calc(100vw - 32px));
}

.registry-row {
  align-items: flex-end;
  flex-wrap: wrap;
}

.registry-row p {
  margin: 0 0 6px;
}

.task-row.selected {
  background: var(--info-bg);
  box-shadow: inset 3px 0 0 var(--fl-primary);
  outline: none;
}

.task-row:focus-visible {
  outline: 2px solid var(--fl-primary);
  outline-offset: -2px;
}

.triage-hint {
  margin: 4px 0 6px;
}

@media (hover: none) {
  .triage-hint {
    display: none;
  }
}

/* Icons-only header at phone width (phone.css hides the labels): the search shrinks so the palette button fits. */
@media (max-width: 640px) {
  .header h1 {
    min-width: 0;
    flex: 0 1 auto;
  }

  .header-stack {
    flex-shrink: 0;
  }

  .header .palette-open {
    padding: 0 9px;
    flex-shrink: 0;
  }

  .qsearch {
    min-width: 0;
    flex: 1 1 auto;
  }
}

/* A phone names the page in a second line of the dark band, under the search, so the call detail or Hovory say where
   the user is; the band grows by it (--app-header-height, which the sticky bands below follow). A lead's head names
   the lead itself, and the Sales app has no band (its own bar shows the title). */
@media (max-width: 480px) {
  html:not(.native-app):not(:has(.content .lead-head)) {
    --app-header-height: 85px;
  }

  html:not(:has(.content .lead-head)) .header {
    padding-bottom: 26px;
  }

  .header h1 {
    position: absolute;
    right: 12px;
    bottom: 4px;
    left: 12px;
    font-size: 15px;
    line-height: 24px;
  }

  html:has(.content .lead-head) .header h1 {
    display: none;
  }
}

.callback-field[hidden] {
  display: none;
}

.queue-buttons > .btn {
  flex: 0 0 auto;
}

/* on phones every dropdown opens as a bottom sheet, so no menu sticks out of the screen */
@media (max-width: 640px) {
  .menu-body,
  .menu-body.wide,
  .right-menu .menu-body {
    position: fixed;
    left: 8px;
    right: 8px;
    top: auto;
    bottom: 8px;
    min-width: 0;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 60;
    box-shadow: 0 -8px 40px rgba(7, 10, 46, 0.35);
  }
}

.export-menu .menu-item {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.task-row.selected:focus-visible {
  outline-width: 1px;
}

/* Talk ratio */
.talk-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.talk-track {
  width: 90px;
  height: 8px;
  border-radius: 999px;
  background: var(--fl-success);
  overflow: hidden;
  display: inline-block;
}

.talk-agent {
  display: block;
  height: 100%;
  background: var(--fl-primary);
}

.report-split {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 1100px) {
  .report-split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Lead shares (who besides the owner may edit) */
.share-list {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  display: grid;
  gap: 6px;
}

.share-list li {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Access: invitation / password links, sign-in pages, sessions, TOTP */
.access-link h2 {
  margin: 0 0 4px;
  font-size: 16px;
}

.copy-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.copy-row code {
  flex: 1 1 320px;
  min-width: 0;
  overflow-wrap: anywhere;
  background: var(--neutral-bg);
  padding: 8px 10px;
  border-radius: var(--fl-radius);
  font-size: 12px;
}

.users-table .sign-in-cell {
  min-width: 170px;
}

.users-table .sign-in-cell .chips {
  margin-bottom: 4px;
}

.sign-in-policy .choice-list {
  border: 0;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.sign-in-policy .choice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.sign-in-policy .choice span {
  display: grid;
  gap: 2px;
}

.sign-in-policy .checklist {
  margin: 12px 0 8px;
}

.sign-in-policy .checklist li::before {
  content: "✓";
  display: inline-block;
  width: 18px;
  color: var(--ok-fg);
  font-weight: 700;
}

.sign-in-policy .checklist li.missing::before {
  content: "!";
  color: var(--warn-fg);
}

.sign-in-policy .banner,
.emergency-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.login .sign-in-note {
  margin-top: 10px;
}

.login .password-sign-in > summary {
  cursor: pointer;
  color: var(--muted, #6b7280);
  font-size: 13px;
  margin-top: 10px;
}

.login .password-sign-in[open] > summary {
  margin-bottom: 10px;
}

.login .divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted, #6b7280);
  font-size: 12px;
  margin: 14px 0;
}

.login .divider::before,
.login .divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid #e5e7eb;
}

.btn.microsoft {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  justify-content: center;
  background: #fff;
  border: 1px solid #8c8c8c;
  color: #3a3a3a;
  font-weight: 600;
}

.btn.microsoft svg {
  width: 18px;
  height: 18px;
}

.login .links {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  margin-top: 10px;
}

.otp-setup {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
}

.otp-setup .qr svg {
  width: 180px;
  height: 180px;
  display: block;
  background: #fff;
  padding: 8px;
  border-radius: var(--fl-radius);
}

.otp-secret {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 1px;
  overflow-wrap: anywhere;
}

.backup-codes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 18px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px;
  padding: 12px;
  background: var(--neutral-bg);
  border-radius: var(--fl-radius);
  max-width: 360px;
}

.session-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.session-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: space-between;
  border-bottom: 1px solid #eef0f4;
  padding-bottom: 8px;
}

.session-list .meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.session-list .ua {
  overflow-wrap: anywhere;
  font-size: 12px;
}

@media (max-width: 640px) {
  .otp-setup {
    grid-template-columns: 1fr;
  }
}

/* Inbound product events (Digitálny poštár) on the timeline and the product-stage badge */
.tl-item.severity-danger .tl-dot {
  background: var(--bad-bg);
  color: var(--bad-fg);
}

.tl-item.severity-ok .tl-dot {
  background: var(--ok-bg);
  color: var(--ok-fg);
}

.tl-item.severity-info .tl-dot {
  background: var(--info-bg);
  color: var(--info-fg);
}

.system-event {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.system-event-fields {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 2px 12px;
  font-size: 13px;
  margin: 6px 0 4px;
}

.system-event-fields dt {
  color: #6b7280;
}

.system-event-fields dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.system-event-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.pill.product-stage {
  border: 1px solid rgba(7, 10, 46, 0.08);
}

/* Inbound events admin */
.inbound-payload {
  max-height: 520px;
  overflow: auto;
  font-size: 12px;
  background: #0b1020;
  color: #e5e7eb;
  padding: 12px;
  border-radius: var(--fl-radius);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.inbound-meta {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 4px 14px;
  font-size: 13px;
}

.inbound-meta dt {
  color: #6b7280;
}

.inbound-meta dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.login .otp-setup {
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 10px;
}

.login .otp-setup ol {
  justify-self: stretch;
  margin: 0;
  padding-left: 20px;
}

.login .otp-secret {
  display: inline-block;
}

.backup-codes-wrap {
  display: grid;
  gap: 8px;
  justify-items: start;
  margin-bottom: 8px;
}

.inbound-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}

.inbound-discard {
  display: flex;
  gap: 8px;
  align-items: center;
}

.inbound-discard input {
  width: 200px;
  max-width: 50vw;
}

/* people at several companies */
.plain-link {
  color: inherit;
  text-decoration: none;
}

.plain-link:hover {
  color: var(--fl-link);
  text-decoration: underline;
}

.also-at {
  margin-top: 4px;
  color: var(--fl-text);
}

.person-fields {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
  display: grid;
  gap: 8px;
  position: relative;
}

.person-fields:disabled {
  opacity: 0.55;
}

/* Floats under the field being typed (contact_suggestions_controller.js sets its top). */
.person-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 30;
  background: #fff;
  box-shadow: var(--fl-shadow-soft);
  border: 1px solid var(--fl-light);
  border-radius: var(--fl-radius);
  padding: 6px;
  display: grid;
  gap: 4px;
}

.person-suggestions ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.person-suggestion {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  color: var(--fl-dark);
  background: none;
  border: 0;
  border-radius: 6px;
  padding: 8px 10px;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.person-suggestion:hover,
.person-suggestion:focus-visible {
  background: var(--fl-zebra);
  box-shadow: inset 0 0 0 1px var(--fl-light);
  outline: none;
}

.existing-person {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding: 8px 10px;
  border-radius: var(--fl-radius);
  background: var(--fl-zebra);
  border: 1px solid var(--fl-light);
  color: var(--fl-dark);
}

.person-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

@media (min-width: 1100px) {
  .person-grid {
    grid-template-columns: 360px minmax(0, 1fr);
  }

  .person-activity {
    grid-column: 1 / -1;
  }
}

.person-head h2 {
  margin: 0 0 4px;
  font-size: 18px;
  color: var(--fl-dark);
}

.relation-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.relation-list > li {
  padding: 9px 0;
  border-bottom: 1px solid var(--fl-row-border);
}

.relation-list > li:last-child {
  border-bottom: 0;
}

.relation-people {
  margin-top: 3px;
}

/* Kto volá */
.caller-card {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.caller-card-head {
  display: flex;
  gap: 6px;
  align-items: baseline;
  flex-wrap: wrap;
  color: var(--fl-dark);
}

.caller-people {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.caller-people li {
  overflow-wrap: anywhere;
}

.caller-people li > a {
  font-weight: 700;
  margin-right: 4px;
}

.caller-product {
  display: flex;
  gap: 4px 8px;
  flex-wrap: wrap;
  align-items: center;
}

.caller-section h4 {
  margin: 4px 0 2px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--fl-text);
  display: flex;
  gap: 6px;
  align-items: center;
}

.caller-section .mini-list > li {
  padding: 4px 0;
}

.caller-interactions .ic {
  width: 12px;
  height: 12px;
  vertical-align: -1px;
}

.caller-card.compact {
  gap: 4px;
  margin-top: 4px;
}

.caller-card.compact .caller-people li > a {
  color: inherit;
}

.bad-text {
  color: var(--bad-fg);
  font-weight: 600;
}

/* Návrhy kontaktov */
.suggestion-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.suggestion {
  padding: 10px 0;
  border-bottom: 1px solid var(--fl-row-border);
  display: grid;
  gap: 4px;
}

.suggestion:last-child {
  border-bottom: 0;
}

.suggestion-head {
  display: flex;
  gap: 4px 6px;
  flex-wrap: wrap;
  align-items: baseline;
  overflow-wrap: anywhere;
}

.suggestion-group {
  margin-top: 14px;
}

.suggestion-group-head {
  display: flex;
  gap: 6px 8px;
  flex-wrap: wrap;
  align-items: center;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--fl-row-border);
}

.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin: 6px 0;
}

.suggestion-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 2px;
}

/* Návrhy kontaktov (the page): one toolbar, then each suggestion in three columns on wide screens: who | contacts and
   where they came from | actions on the right. */
.suggestions-toolbar {
  display: flex;
  gap: 8px 16px;
  align-items: center;
  flex-wrap: wrap;
  padding: 4px 0 8px;
  border-bottom: 1px solid var(--fl-row-border);
}

.suggestions-toolbar .select-all {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--fl-dark);
  cursor: pointer;
}

.suggestions-filters {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-left: auto;
}

.suggestions-filters label {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.suggestions-filters select {
  width: auto;
  min-height: 30px;
  padding: 3px 8px;
}

.suggestions-filters select.on {
  border-color: var(--fl-primary);
  background-color: var(--info-bg);
}

.suggestions-page .suggestion-group-head {
  padding: 6px 0 4px;
}

.suggestions-page .group-actions {
  margin-left: auto;
  display: inline-flex;
  gap: 6px;
}

@media (min-width: 1100px) {
  .suggestions-page .suggestion {
    grid-template-columns: minmax(220px, 1.1fr) minmax(0, 1.4fr) auto;
    column-gap: 20px;
    row-gap: 2px;
    align-items: start;
    padding: 8px 4px;
  }

  .suggestions-page .suggestion > .suggestion-head {
    grid-column: 1;
    grid-row: 1 / span 6;
  }

  .suggestions-page .suggestion > div:not(.suggestion-head):not(.suggestion-actions) {
    grid-column: 2;
  }

  .suggestions-page .suggestion > .suggestion-actions {
    grid-column: 3;
    grid-row: 1 / span 6;
    margin: 0;
    justify-content: flex-end;
    align-self: center;
  }

  .suggestions-page .suggestion:hover {
    background: var(--fl-zebra);
  }

  .suggestions-page .suggestion-actions .menu-body {
    left: auto;
    right: 0;
  }
}

.warn-text {
  color: var(--warn-fg);
}

.contact-row > .grow {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Custom fields, GDPR and duplicates */
.custom-filters {
  flex: 1 1 100%;
}

.custom-filters > summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;
  padding: 4px 0;
}

.custom-filter-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  padding-top: 6px;
}

.custom-filter-grid .range-field .row {
  gap: 6px;
  flex-wrap: nowrap;
}

.custom-filter-grid .range-field input {
  width: 120px;
}

.custom-field-grid {
  display: grid;
  gap: 8px 14px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.custom-field-value .ts-wrapper {
  min-width: 180px;
}

.custom-field-group {
  margin: 14px 0 6px;
  font-size: 13px;
}

.custom-field-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.custom-field-list > li {
  border-bottom: 1px solid var(--fl-row-border);
  padding: 6px 0;
}

.custom-field-list summary {
  cursor: pointer;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.address-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.opt-out-menu > summary {
  cursor: pointer;
  font-size: 11px;
}

.erase-list {
  margin: 8px 0 12px;
  padding-left: 18px;
}

.erase-samples {
  margin: 4px 0;
}

.danger-card {
  border-top: 3px solid var(--fl-danger);
}

.retention-table td:first-child {
  min-width: 220px;
}

.records-table td.mono {
  word-break: break-word;
  max-width: 260px;
}

.duplicate-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.duplicate-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--fl-row-border);
}

.duplicate-records {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  flex: 1 1 420px;
  min-width: 0;
}

.duplicate-record {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--fl-row-border);
  border-radius: 8px;
  overflow-wrap: anywhere;
}

.duplicate-release {
  margin-top: 4px;
}

.duplicate-release .btn {
  white-space: normal;
  text-align: left;
}

.duplicate-reasons {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.duplicate-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.merge-table th:first-child {
  width: 160px;
}

.merge-table td,
.merge-table th {
  min-width: 140px;
}

.merge-choice,
.merge-keep {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.merge-with {
  margin-bottom: 10px;
}

@media (max-width: 640px) {
  .duplicate-records {
    grid-template-columns: 1fr;
  }

  .duplicate-actions {
    width: 100%;
  }
}

/* meetings: schedule dialog, list, detail, speakers, transcript */
.meeting-form .attendees-field {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.meeting-form legend {
  color: var(--fl-primary);
  font-weight: 600;
  font-size: 12px;
  padding: 0;
  margin-bottom: 4px;
}

.attendee-checks {
  flex-direction: column;
  gap: 6px;
  margin-bottom: 6px;
}

.attendee-checks label {
  flex-wrap: wrap;
}

.recording-choice {
  background: var(--fl-zebra);
  border-radius: var(--fl-radius);
  padding: 10px 12px;
  display: grid;
  gap: 6px;
}

.switch-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
  color: var(--fl-dark);
  font-weight: 400;
}

.notice-preview {
  margin: 0;
  color: var(--fl-text);
}

.notice-preview .ic {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
}

.organizer-line {
  margin: 0;
}

.meeting-head .card-body {
  display: grid;
  gap: 10px;
}

.meeting-head .card-body > *,
.meeting-title .grow {
  min-width: 0;
}

.meeting-title h1 {
  overflow-wrap: anywhere;
}

.meeting-link .copy {
  display: flex;
  min-width: 0;
}

.meeting-link .copy code {
  flex: 1 1 auto;
}

.meeting-title {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.meeting-title h1 {
  margin: 0;
  font-size: 20px;
  color: var(--fl-dark);
}

.meeting-title .logo-letter .ic {
  width: 22px;
  height: 22px;
}

.meeting-link .copy {
  max-width: 100%;
}

.meeting-link code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  min-width: 0;
}

.record-toggle {
  align-items: center;
}

.record-toggle > * {
  flex: 0 1 auto;
}

.meeting-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

@media (min-width: 1100px) {
  .meeting-grid {
    grid-template-columns: minmax(0, 1fr) 340px;
  }
}

.meeting-main,
.meeting-side {
  display: grid;
  gap: 10px;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
}

.attendee-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.attendee-list li {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.attendee-list .grow {
  flex: 1 1 140px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.summary-text {
  font-size: 14px;
  color: var(--fl-dark);
  margin: 0 0 8px;
}

.summary-grid {
  display: grid;
  gap: 4px 18px;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
}

.meeting-summary h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--fl-text);
  margin: 10px 0 4px;
}

.meeting-summary.compact h3 {
  margin-top: 6px;
}

.checks-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 4px;
}

.checks-list label {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  color: var(--fl-dark);
  font-weight: 400;
}

.checks-list input {
  margin-top: 3px;
}

.action-items .btn {
  margin-top: 6px;
}

.speakers-line {
  color: var(--fl-dark);
  margin: 2px 0 4px;
}

.speaker-bars {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.speaker-bar {
  display: grid;
  grid-template-columns: minmax(110px, 220px) minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: center;
}

.speaker-name {
  color: var(--fl-dark);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.speaker-bar .bar {
  display: block;
  height: 10px;
  border-radius: 5px;
  background: var(--fl-gray);
  overflow: hidden;
}

.speaker-bar .bar > span {
  display: block;
  height: 100%;
  background: #f2b96b;
}

.speaker-bar.role-team .bar > span {
  background: var(--fl-secondary);
}

.speaker-bar.role-unknown .bar > span {
  background: #b8c0cc;
}

.speaker-share {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--fl-dark);
}

.speaker-assign {
  margin-top: 8px;
}

.speaker-assign-row {
  align-items: center;
  margin-top: 6px;
}

.speaker-assign-row .speaker-key {
  flex: 0 0 140px;
  color: var(--fl-dark);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.speaker-assign-row select {
  flex: 1 1 200px;
}

@media (max-width: 640px) {
  .speaker-bar {
    grid-template-columns: minmax(0, 1fr) 44px;
  }

  .speaker-bar .bar {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

.transcript-search {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 8px 0 4px;
}

.transcript-search input {
  flex: 1 1 auto;
}

.segments.tall {
  max-height: 560px;
}

.segment.role-team {
  background: #e6f7f8;
}

.segment.role-team b {
  color: #00747a;
}

.segment.role-customer {
  background: #fff5e0;
}

.segment.role-customer b {
  color: #8a5300;
}

.segment[hidden] {
  display: none;
}

.meeting-transcript audio {
  width: 100%;
  max-width: 520px;
  height: 34px;
}

.meetings-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 10px;
}

.meetings-nav .chip:not(.active) {
  background: #fff;
}

.seg .count {
  opacity: 0.7;
  font-size: 11px;
  margin-left: 2px;
}

.meeting-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.meeting-row {
  display: flex;
  gap: 8px 14px;
  align-items: center;
  flex-wrap: wrap;
  padding: 10px 16px;
  border-bottom: 1px solid var(--fl-row-border);
}

.meeting-row:last-child {
  border-bottom: 0;
}

.meeting-row.cancelled .meeting-subject {
  text-decoration: line-through;
  color: var(--fl-text);
}

.meeting-when {
  flex: 0 0 74px;
  font-size: 11px;
  line-height: 1.3;
}

.meeting-when b {
  display: block;
  font-size: 14px;
  color: var(--fl-dark);
}

.meeting-what {
  flex: 1 1 260px;
  min-width: 0;
}

.meeting-subject {
  font-weight: 600;
  color: var(--fl-dark);
}

.meeting-state {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.meeting-state .ic {
  width: 15px;
  height: 15px;
  color: var(--fl-text);
}

.meeting-triage {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.meeting-mini {
  display: flex;
  gap: 6px;
  align-items: center;
}

.meeting-mini .grow {
  min-width: 0;
  overflow-wrap: anywhere;
}

.triage-card .row {
  margin-top: 8px;
}

.assign-row select {
  flex: 1 1 180px;
}

.assign-row button {
  flex: 0 0 auto;
}

.meetings-setup .check-results {
  margin-top: 14px;
}

.setup-checklist li {
  display: flex;
  gap: 6px;
  align-items: baseline;
  flex-wrap: wrap;
}

.setup-steps {
  margin: 14px 0 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}

.setup-steps h3 {
  margin: 0 0 4px;
  font-size: 14px;
}

.setup-steps pre {
  max-height: 300px;
  overflow: auto;
}

@media (max-width: 640px) {
  .meeting-row {
    padding: 10px 12px;
  }

  .meeting-title h1 {
    font-size: 17px;
  }

  .lead-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .speaker-assign-row .speaker-key {
    flex-basis: 100%;
  }

  .speakers-table th:nth-child(2),
  .speakers-table td:nth-child(2) {
    display: none;
  }

  .speakers-table .nowrap {
    white-space: normal;
  }

  .speakers-table th,
  .speakers-table td {
    padding-left: 4px;
    padding-right: 4px;
  }
}

.stack-menu .menu-item {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.stack-menu .menu-item b {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.confirm-name {
  max-width: 420px;
}

/* Sekvencie */
.sequence-editor {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

@media (min-width: 1200px) {
  .sequence-editor {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  }

  .sequence-aside {
    position: sticky;
    top: calc(var(--app-header-height) + 10px);
  }
}

fieldset.plain {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
  display: grid;
  gap: 12px;
}

fieldset.field {
  border: 0;
  padding: 0;
  margin: 0;
}

fieldset.field legend {
  color: var(--fl-primary);
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 4px;
}

.checkline {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--fl-dark);
}

.seq-steps,
.seq-preview,
.seq-candidates {
  list-style: none;
  margin: 0;
  padding: 0;
}

.seq-step {
  border: 1px solid var(--fl-row-border);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: #fff;
}

.seq-step-head {
  display: flex;
  gap: 10px;
  align-items: center;
}

.seq-step-number {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--fl-dark);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  flex: none;
}

.seq-step-title {
  overflow-wrap: anywhere;
}

.seq-step-tools {
  display: flex;
  gap: 4px;
  flex: none;
}

.seq-step-edit {
  margin-top: 8px;
}

.seq-step-edit summary {
  cursor: pointer;
  color: var(--fl-primary);
}

.seq-step.kind-wait {
  background: var(--fl-zebra);
}

.seq-preview-step {
  padding: 10px 0;
  border-bottom: 1px solid var(--fl-row-border);
}

.seq-preview-head {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}

.email-preview {
  border: 1px solid var(--fl-row-border);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.email-preview-body {
  margin-top: 8px;
  overflow-wrap: anywhere;
}

.email-preview-body p {
  margin: 0 0 8px;
}

.seq-kinds span {
  display: inline-flex;
  margin-right: 2px;
  color: var(--fl-primary);
}

.seq-candidates li {
  padding: 8px 0;
  border-bottom: 1px solid var(--fl-row-border);
}

.seq-candidates label {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.seq-candidates li.blocked {
  opacity: 0.8;
}

.seq-problem {
  margin-left: 4px;
}

.seq-dialog-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
}

.seq-dialog-steps span {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.seq-card-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  flex-wrap: wrap;
  padding: 8px 0;
}

.seq-actions {
  display: inline-flex;
  gap: 4px;
  flex-wrap: wrap;
}

.seq-card-recent {
  margin: 6px 0 0;
}

.seq-kpis {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 900px) {
  .seq-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1400px) {
  .seq-kpis {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.danger-text {
  color: var(--bad-fg);
}

/* slide-over panel (layout dialog "modal") */
.dialog.drawer {
  margin: 0 0 0 auto;
  height: 100dvh;
  max-height: 100dvh;
  width: min(560px, 100vw);
  max-width: 100vw;
  padding: 0;
  border-radius: 12px 0 0 12px;
  overflow-y: auto;
}

.dialog.drawer[open] {
  animation: drawer-in 0.18s ease-out;
}

.drawer > turbo-frame {
  display: block;
  min-height: 100%;
}

.drawer-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 20px;
  background: #fff;
  border-bottom: 1px solid var(--fl-light);
}

.drawer-head h2 {
  margin: 0;
  font-size: 16px;
}

.drawer-body {
  padding: 16px 20px 24px;
  display: grid;
  gap: 14px;
}

.drawer-body .form {
  margin: 0;
}

@keyframes drawer-in {
  from {
    transform: translateX(40px);
    opacity: 0;
  }

  to {
    transform: none;
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dialog.drawer[open] {
    animation: none;
  }
}

@media (max-width: 640px) {
  .dialog.drawer {
    border-radius: 0;
  }
}

/* "Zobraziť originál": a wider drawer with the headers, the attachments and the sandboxed e-mail frame */
.dialog.drawer:has(.email-original) {
  width: min(880px, 100vw);
}

.email-original {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.email-original-headers {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 4px 14px;
  margin: 0;
  font-size: 13px;
}

.email-original-headers dt {
  color: var(--fl-text);
  opacity: 0.75;
}

.email-original-headers dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.email-original-attachments h3 {
  margin: 0 0 6px;
  font-weight: 600;
}

.email-original-attachments ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.email-original-attachments li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border: 1px solid var(--fl-light);
  border-radius: var(--fl-radius);
}

.email-original-attachments .thumb {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 6px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--fl-zebra);
  color: var(--fl-dark);
}

.email-original-attachments .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.email-original-attachments .name {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.email-original-remote {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
  padding: 8px 12px;
  border-radius: var(--fl-radius);
  background: var(--warn-bg);
  color: var(--warn-fg);
  font-size: 13px;
}

.email-original-remote span {
  flex: 1;
  min-width: 180px;
}

.email-original-remote[hidden] {
  display: none;
}

.email-original-frame {
  display: block;
  width: 100%;
  height: max(420px, calc(100dvh - 320px));
  border: 1px solid var(--fl-light);
  border-radius: var(--fl-radius);
  background: #fff;
}

button.chip {
  cursor: pointer;
  font: inherit;
  font-size: 11.5px;
}

/* page intro: purpose (and the way back to Nastavenia) on the left, the primary action on the right */
.page-intro-text {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.page-intro-actions {
  margin-left: auto;
}

.crumb {
  color: var(--fl-primary);
  font-size: 12px;
  font-weight: 600;
}

/* settings hub */
.settings-hub {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

@media (min-width: 1000px) {
  .settings-hub {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.settings-hub .card {
  margin: 0;
}

.settings-links {
  list-style: none;
  margin: 0;
  padding: 0 8px 8px;
}

.settings-links a {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--fl-radius);
  color: var(--fl-dark);
}

.settings-links a:hover {
  background: var(--fl-gray);
  text-decoration: none;
}

.settings-links a > span:last-child {
  display: grid;
}

.settings-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--fl-gray);
  display: grid;
  place-items: center;
  color: var(--fl-primary);
  flex: none;
}

.center {
  text-align: center;
}

/* tables that turn into one card per row on phones (cells carry data-label) */
@media (max-width: 640px) {
  .table.stack-on-phone thead {
    display: none;
  }

  .table.stack-on-phone,
  .table.stack-on-phone tbody {
    display: block;
    width: 100%;
  }

  .table.stack-on-phone tr {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 3px 10px;
    padding: 10px 2px;
    border-bottom: 1px solid var(--fl-row-border);
  }

  .table.stack-on-phone td {
    display: block;
    grid-column: 2;
    border: 0;
    padding: 0;
    text-align: left;
    white-space: normal;
  }

  .table.stack-on-phone td.check {
    grid-column: 1;
    grid-row: 1 / span 8;
    padding-top: 2px;
  }

  .table.stack-on-phone td[data-label]::before {
    content: attr(data-label) " ";
    color: var(--fl-text);
    font-size: 11px;
    margin-right: 4px;
  }

  .table.stack-on-phone td:empty,
  .table.stack-on-phone .wide-only {
    display: none;
  }

  .table-wrap:has(> .stack-on-phone) {
    overflow: visible;
  }
}

/* Môj profil → Microsoft 365: consent notice and personal exclusions */
.consent-notice {
  border: 1px solid var(--fl-row-border);
  border-radius: var(--fl-radius);
  padding: 10px 14px;
  margin-bottom: 12px;
  background: var(--fl-zebra);
}

.consent-notice h3 {
  margin: 0 0 6px;
  font-size: 14px;
}

.exclusion-list {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
  display: grid;
  gap: 6px;
}

.exclusion-list li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.m365-matrix .mode-select {
  min-width: 12.5rem;
}

.folder-list {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
  display: grid;
  gap: 4px;
}

.import-progress {
  color: var(--fl-primary);
}

#microsoft365 h3.section-gap {
  margin-top: 18px;
}

.merge-pick {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.merge-pick select {
  max-width: 11rem;
}

td.nowrap .merge-pick {
  white-space: nowrap;
}

/* Firma: company data from the registers (Sales::CompanyEnrichment) */
.company-card .company-name {
  margin: 6px 10px 2px;
}

.company-card .company-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 6px 10px;
}

.company-card .company-flags:empty {
  display: none;
}

.company-facts dt {
  padding: 6px 10px;
}

.company-facts .mini-list {
  margin: 0;
}

.company-sources,
.company-links {
  margin: 6px 10px;
}

.company-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.sparkline {
  display: block;
  margin-top: 4px;
  color: var(--fl-info);
  overflow: visible;
}

.registry-candidates:empty {
  display: none;
}

.registry-candidates,
.candidate-list {
  display: grid;
  gap: 6px;
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
}

.candidate-list form {
  margin: 0;
}

.candidate {
  display: grid;
  gap: 2px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: 1px solid var(--fl-light);
  border-radius: var(--fl-radius);
  background: #fff;
  cursor: pointer;
  color: var(--fl-dark);
  font: inherit;
}

.candidate:hover,
.candidate:focus-visible {
  border-color: var(--fl-secondary);
  box-shadow: var(--fl-shadow-sm);
}

/* Nastavenia → Spotreba a náklady */
.cost-meta {
  margin: 0 0 10px;
}

.cost-periods {
  display: grid;
  gap: 0 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.cost-periods > * {
  min-width: 0;
}

.cost-budget-bar {
  position: relative;
  height: 14px;
  background: var(--fl-gray);
  border-radius: 7px;
  overflow: hidden;
  margin: 2px 0 10px;
}

.cost-budget-bar > span {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 7px;
}

.cost-budget-bar .spent {
  background: var(--fl-secondary);
}

.cost-budget-bar .spent.warning {
  background: var(--fl-warning);
}

.cost-budget-bar .spent.over {
  background: var(--fl-danger);
}

.cost-budget-bar .forecast {
  background: color-mix(in srgb, var(--fl-secondary), white 70%);
}

.cost-budget-bar .forecast.warning {
  background: color-mix(in srgb, var(--fl-warning), white 60%);
}

.cost-budget-bar .forecast.over {
  background: color-mix(in srgb, var(--fl-danger), white 65%);
}

.cost-budget-figures {
  max-width: 520px;
}

.cost-breakdown .cost-group td {
  background: var(--fl-zebra);
}

.cost-breakdown .cost-grand td {
  border-top: 2px solid var(--fl-light);
}

.cost-breakdown .cost-qty {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--fl-text);
}

.cost-period .label {
  color: var(--fl-dark);
  font-weight: 600;
}

.cost-total {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--fl-primary);
  margin: 4px 0 8px;
  font-variant-numeric: tabular-nums;
}

.cost-period.muted-card .cost-total {
  color: var(--fl-text);
}

.cost-parts {
  display: grid;
  gap: 2px;
  margin: 0 0 6px;
}

.cost-parts > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px dashed var(--fl-row-border);
  padding: 3px 0;
}

.cost-parts dt {
  color: var(--fl-text);
}

.cost-parts dd {
  margin: 0;
  font-weight: 600;
  color: var(--fl-dark);
  font-variant-numeric: tabular-nums;
}

.cost-zadarma {
  display: grid;
  gap: 6px;
}

.cost-zadarma .label {
  color: var(--fl-text);
  margin-right: 6px;
}

.cost-zadarma p {
  margin: 0;
}

.cost-tabs {
  margin: 4px 0 12px;
  padding: 0;
}

.cost-table td.num {
  white-space: nowrap;
}

.cost-export {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: flex-end;
  margin-bottom: 8px;
}

.cost-export .field {
  margin: 0;
}

.cost-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 160px;
  padding-bottom: 18px;
}

.cost-day {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column-reverse;
  position: relative;
}

.cost-day > span {
  display: block;
  width: 100%;
  border-radius: 2px 2px 0 0;
}

.cost-day > span.ai {
  background: var(--fl-primary);
}

.cost-day > span.speech {
  background: color-mix(in srgb, var(--fl-secondary), white 35%);
}

.cost-day > small {
  position: absolute;
  bottom: -18px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 10px;
  color: var(--fl-text);
}

.legend::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 4px;
  vertical-align: -1px;
}

.legend.ai::before {
  background: var(--fl-primary);
}

.legend.speech::before {
  background: color-mix(in srgb, var(--fl-secondary), white 35%);
}

@media (max-width: 640px) {
  .cost-breakdown .cost-qty {
    display: inline;
    margin-left: 4px;
  }

  .cost-day > small {
    display: none;
  }

  .cost-day:nth-child(5n + 1) > small {
    display: block;
  }

  .cost-total {
    font-size: 26px;
  }
}

/* Pošta and e-mail search hits */
mark {
  background: color-mix(in srgb, var(--fl-warning), white 65%);
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}

.mail-days {
  flex-wrap: wrap;
}

.mail-counts {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}

.mail-counts .pill:hover {
  text-decoration: none;
  filter: brightness(0.96);
}

.mail-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
  padding: 14px 18px 4px;
}

.mail-filters .field {
  flex: 1 1 150px;
  min-width: 0;
}

.mail-filters .field.grow {
  flex: 3 1 260px;
}

.mail-filter-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.mail-more {
  flex: 1 1 100%;
}

.mail-more > summary {
  display: none;
  list-style: none;
}

.mail-more > summary::-webkit-details-marker {
  display: none;
}

.mail-more-body {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}

.mail-more-body .field {
  flex: 1 1 120px;
  min-width: 0;
}

.mail-hint {
  margin: 6px 18px 0;
}

.mail-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.mail-row {
  position: relative;
  display: grid;
  grid-template-columns: 74px 18px minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: start;
  padding: 10px 18px;
  border-top: 1px solid var(--fl-row-border);
}

.mail-row:hover {
  background: var(--fl-zebra);
}

.mail-row.unprocessed {
  box-shadow: inset 3px 0 0 var(--fl-warning);
}

.mail-when {
  color: var(--fl-dark);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.mail-dir {
  color: var(--fl-text);
}

.mail-main {
  min-width: 0;
}

.mail-who,
.mail-subject,
.mail-preview {
  overflow-wrap: anywhere;
}

.mail-who b {
  color: var(--fl-dark);
}

.mail-box {
  display: inline-block;
  margin-left: 6px;
  padding: 0 7px;
  border-radius: var(--fl-pill);
  background: var(--fl-light);
  color: var(--fl-dark);
  font-size: 11px;
}

.mail-subject {
  color: var(--fl-dark);
}

.mail-topic {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.mail-open {
  color: var(--fl-link);
  text-align: left;
  font: inherit;
}

.search-mail {
  position: relative;
}

/* Only inside a positioned row: anywhere else the overlay would cover the whole page and swallow every click. */
.mail-row .mail-open::after,
.search-mail .mail-open::after {
  content: "";
  position: absolute;
  inset: 0;
}

.mail-lead,
.mail-row .pill,
.search-mail .pill {
  position: relative;
  z-index: 1;
}

.mail-clip .ic {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
  color: var(--fl-text);
}

.mail-preview {
  margin-top: 2px;
}

.mail-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  text-align: right;
  white-space: nowrap;
}

.mail-lead {
  font-size: 12px;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mail-lead .ic {
  width: 13px;
  height: 13px;
  vertical-align: -2px;
}

.mail-state {
  font-size: 12px;
  font-weight: 600;
}

.mail-state small {
  display: block;
  font-weight: 400;
  color: var(--fl-text);
}

.mail-state.open {
  color: var(--warn-fg);
}

.mail-state.done {
  color: var(--ok-fg);
}

.mail-pages {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 14px;
}

.search-mail .pill,
.search-mail .mail-lead {
  margin-left: 4px;
}

@media (max-width: 640px) {
  .mail-filters {
    padding: 12px 12px 2px;
  }

  .mail-filters .field {
    flex: 1 1 calc(50% - 10px);
  }

  .mail-filters .field.grow {
    flex-basis: 100%;
  }

  .mail-more > summary {
    display: inline-flex;
  }

  .mail-more[open] > summary {
    margin-bottom: 10px;
  }

  .mail-more-body .field {
    flex: 1 1 calc(50% - 10px);
  }

  .mail-hint {
    margin: 6px 12px 0;
  }

  .mail-row {
    grid-template-columns: 18px minmax(0, 1fr);
    padding: 10px 12px;
  }

  .mail-when {
    grid-column: 2;
    grid-row: 1;
    font-size: 12px;
    color: var(--fl-text);
  }

  .mail-dir {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .mail-main {
    grid-column: 2;
  }

  .mail-side {
    grid-column: 2;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    white-space: normal;
  }

  .mail-state small {
    display: inline;
    margin-left: 4px;
  }

  .mail-lead {
    max-width: 100%;
  }
}

/* Inbox: three tabs, filters inside "Inbox", rows with checkboxes, a bulk bar, inline task editing and undo toasts.
   Row controls are at least 32 px high so they are easy to hit; a row being done or snoozed fades out at once. */
.inbox-tabs .tab {
  font-size: 14px;
  padding: 12px 14px 10px;
}

.inbox-filters {
  padding: 10px 12px 0;
}

.inbox-filters .chip {
  min-height: 32px;
  padding: 4px 12px;
  font-size: 12.5px;
}

.chip-count {
  font-weight: 700;
  opacity: 0.75;
}

.inbox-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-height: 44px;
  padding: 4px 0;
  border-bottom: 1px solid var(--fl-row-border);
}

.inbox-toolbar .select-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  cursor: pointer;
  font-size: 12.5px;
}

.inbox-toolbar .triage-hint {
  margin: 0;
}

.bulk-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: var(--fl-primary);
  color: #fff;
  border-radius: var(--fl-radius);
  padding: 4px 10px;
  position: sticky;
  top: var(--app-header-height);
  z-index: 5;
}

.bulk-actions[hidden] {
  display: none;
}

.bulk-actions .btn {
  min-height: 32px;
}

.bulk-actions .btn.primary {
  background: #fff;
  color: var(--fl-primary);
}

.bulk-actions .btn.outline,
.bulk-actions .btn.ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}

.btn.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--fl-text);
}

.inbox-list .task-row,
.inbox .task-list .task-row {
  padding: 6px;
  font-size: 13.5px;
  flex-wrap: wrap;
}

/* A row reads as a list line: lead and subject on one line (the subject is cut with "…"), the rest below. Its buttons
   show on hover, on the row picked with j/k, on a ticked row and while one of them has focus; touch screens always
   show them. The round "done" check of a task stays. Of a task past its day only the date is red. */
.row-title {
  display: flex;
  gap: 6px;
  min-width: 0;
  align-items: baseline;
}

.row-title > :first-child {
  flex: none;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-subject {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-row.overdue,
.task-row.overdue .ic {
  color: inherit;
}

.task-row .overdue,
.task-row .overdue .ic {
  color: var(--fl-danger);
}

@media (hover: hover) and (pointer: fine) {
  .inbox-list .task-row > :is(form, details, a.btn):not(:has(.check-btn)) {
    opacity: 0;
    transition: opacity 0.1s;
  }

  .inbox-list .task-row:is(:hover, :focus-within, .selected, :has(> .row-check:checked)) > :is(form, details, a.btn),
  .inbox-list .task-row > details[open] {
    opacity: 1;
  }
}

.keys-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--fl-text);
}

.keys-button:hover {
  color: var(--fl-link);
}

/* Up to 200 rows: the browser skips laying out and painting the ones off screen, so typing or opening a menu stays
   fast. A row with an open menu or editor renders normally, or its dropdown would be clipped. */
.inbox-list > li {
  content-visibility: auto;
  contain-intrinsic-size: auto 54px;
}

.inbox-list > li:has(details[open]) {
  content-visibility: visible;
}

.inbox .task-row .btn.sm {
  min-height: 32px;
  padding: 6px 12px;
  font-size: 12px;
}

.inbox .task-row .check-btn {
  width: 28px;
  height: 28px;
}

.row-check {
  width: 18px;
  height: 18px;
  margin: 7px;
  flex: none;
  cursor: pointer;
  accent-color: var(--fl-primary);
}

.task-row.leaving {
  opacity: 0.35;
  pointer-events: none;
  transition: opacity 0.15s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .task-row.leaving {
    transition: none;
  }
}

.task-row .pill.bad {
  vertical-align: 1px;
}

.task-note {
  color: var(--fl-text);
  margin-top: 2px;
  white-space: pre-line;
}

.task-edit > summary {
  list-style: none;
}

.task-edit > summary::-webkit-details-marker {
  display: none;
}

.task-edit[open] {
  order: 10;
  flex: 1 0 100%;
}

.task-edit[open] > summary {
  display: none;
}

.task-edit-form {
  background: var(--fl-zebra, #f6f8fb);
  border-radius: var(--fl-radius);
  padding: 10px 12px;
  margin-top: 6px;
}

.task-edit-form .row {
  flex-wrap: wrap;
}

.task-edit-form .row > .field {
  flex: 1 1 160px;
}

.task-row.done.email-row b,
.task-row.done.email-row .strong {
  text-decoration: none;
}

.inbox-toast {
  border-left-color: var(--fl-success);
}

.inbox-toast .btn {
  flex: none;
}

.inbox-toast[hidden] {
  display: none;
}

.task-edit-form .row.end {
  align-items: center;
}

.task-edit-form .row.end > .btn {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 6px 16px;
}

.inbox-toolbar:has(.bulk-actions:not([hidden])) .triage-hint {
  display: none;
}

.task-row:has(> .task-edit[open]) {
  flex-wrap: wrap;
}

.task-edit-form .row > .field {
  min-width: 0;
}

@media (max-width: 640px) {
  .inbox .task-row > .grow {
    flex: 1 1 calc(100% - 100px);
    min-width: 0;
  }
}

/* "Všetko" also lists triage and the person's missed calls; ticked rows stay marked; on a narrow screen the highlighted
   row spells out its buttons, which elsewhere show icons only (with a tooltip). */
.kind-dot.triage {
  background: var(--neutral-bg);
  color: var(--neutral-fg);
}

.kind-dot.missed {
  background: var(--bad-bg);
  color: var(--bad-fg);
}

.task-row:has(> .row-check:checked) {
  background: var(--fl-zebra);
}

.task-row.selected:has(> .row-check:checked) {
  background: var(--info-bg);
}

.task-row .waiting {
  color: var(--fl-text);
}

@media (max-width: 960px) {
  .inbox .task-row.selected .hide-sm {
    display: inline;
  }
}

.toast-undo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* A rich-text field reserves the editor's height (one toolbar row + heightMin) before Froala replaces the textarea. */
textarea[data-controller~="rich-text"] {
  min-height: 140px;
}

/* The compact one-row Froala toolbar of rich-text fields (as in Flowis): smaller buttons and tighter groups. */
.fr-compact.fr-box {
  border-radius: var(--fl-radius);
}

.fr-compact .fr-toolbar .fr-btn-grp {
  margin: 0 3px;
}

.fr-compact .fr-toolbar .fr-command.fr-btn {
  height: 30px;
  margin: 2px 0;
}

.fr-compact .fr-toolbar .fr-command.fr-btn svg {
  width: 20px;
  margin: 5px;
}

.fr-compact .fr-toolbar .fr-command.fr-btn svg.fr-svg {
  height: 20px;
}

.fr-compact .fr-toolbar .fr-command.fr-btn.fr-dropdown::after {
  top: 13px;
}

.fr-compact .fr-toolbar .fr-more-toolbar.fr-expanded {
  height: 34px;
}

.fr-compact .fr-wrapper .fr-element {
  padding: 8px 10px;
}

.meeting-video video {
  width: 100%;
  max-height: 70vh;
  margin-top: 8px;
  background: #000;
  border-radius: var(--fl-radius);
}

.assistant-summary {
  display: grid;
  gap: 4px;
}

.assistant-summary.compact {
  margin-top: 4px;
  padding: 6px 10px;
  border-left: 3px solid var(--fl-secondary);
  background: var(--fl-zebra);
  border-radius: 0 6px 6px 0;
}

.assistant-turns {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 2px;
}

/* Opens and replies: the signed-in rep's row in the report, and the own/team lines above the templates. */
.email-stats tbody tr.mine {
  background: var(--info-bg);
}

.email-stats tfoot th,
.email-stats tfoot td {
  border-top: 2px solid var(--fl-row-border);
}

.email-stats-summary {
  display: grid;
  gap: 2px;
  margin-bottom: 12px;
  font-size: 14px;
}

/* How a call went (Calls::Journey): steps on the call page, one line on the lead and in the call list. */
.call-journey {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.call-journey li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.call-journey li .ic {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--fl-text);
}

.call-journey li.tone-good .ic {
  color: var(--ok-fg);
}

.call-journey li.tone-bad {
  color: var(--bad-fg);
}

.call-keys {
  margin-top: 12px;
}

.call-keys h3 {
  margin: 0 0 4px;
}

.call-keys ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.call-keys li {
  display: grid;
  grid-template-columns: 5.5em 2em 1fr;
  align-items: baseline;
  gap: 6px;
}

.call-keys li.key-duplicate,
.call-keys li.key-replaced,
.call-keys li.key-ignored {
  color: var(--fl-text);
}

.call-keys li.key-unmatched {
  color: var(--bad-fg);
}

.call-journey-line {
  max-width: 70ch;
}

/* "Čo je Na triedenie?" above the triage list. */
.triage-help {
  margin-bottom: 6px;
}

.triage-help > summary {
  cursor: pointer;
  color: var(--fl-link);
}

.triage-help p {
  margin: 6px 0 0;
  max-width: 80ch;
}

/* Knowledge: downloaded web texts and the passage an answer was built from. */
.passage {
  padding: 8px 0;
  border-bottom: 1px solid var(--fl-light);
}

.passage p {
  margin: 4px 0 0;
  white-space: pre-line;
}

.passage-page {
  margin: 16px 0 4px;
}

.passage-used {
  margin: 6px 0 0;
  padding-left: 10px;
  border-left: 3px solid var(--fl-success);
}

ol li.used {
  background: var(--fl-success-bg, rgba(46, 160, 67, 0.08));
  border-radius: 6px;
  padding: 4px 6px;
}

/* Reports: a number that opens its records in the side panel. */
button.drill {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--fl-primary);
  cursor: pointer;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}

button.drill:hover,
button.drill:focus-visible {
  text-decoration-style: solid;
}

.report-details .details-table td {
  vertical-align: top;
}

.report-details-cut {
  padding: 6px 10px;
  border-radius: var(--fl-radius);
  background: var(--warn-bg);
  color: var(--warn-fg);
}

/* Caller questions: the answer or topic a number filtered the list to, removable. */
.question-filters {
  margin: 8px 0 4px;
}

.filter-chip .chip-label {
  padding: 4px 4px 4px 11px;
  color: var(--fl-dark);
}

.call-summary td.num a {
  font-variant-numeric: tabular-nums;
}

/* Call page: the cost table and the live captions folded under a finished call. */
.call-cost tr.group th,
.call-cost tr.group td {
  padding-top: 12px;
  border-bottom: 1px solid var(--fl-border);
}

details.card > summary.card-head {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

details.card > summary.card-head::-webkit-details-marker {
  display: none;
}

.call-head-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
}

.call-head-row > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 120px;
}

/* E-mail attachments: the magnifier beside the download chip and the preview in the side panel. */
.chip-group {
  display: inline-flex;
  gap: 2px;
  align-items: center;
}

.chip.icon-only {
  padding-inline: 8px;
}

.attachment-preview {
  border: 1px solid var(--fl-border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--fl-surface-2, #f6f7f9);
  margin-bottom: 12px;
}

.attachment-preview img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.attachment-preview iframe {
  display: block;
  width: 100%;
  height: 75vh;
  border: 0;
}

/* Nastavenia → AI prompty */
.ai-prompt {
  border-bottom: 1px solid var(--fl-row-border);
  padding: 10px 0;
}

.ai-prompt > summary {
  cursor: pointer;
}

.ai-prompt-text {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  background: var(--fl-surface-2, #f6f7f9);
  padding: 10px;
  border-radius: 6px;
  max-height: 420px;
  overflow: auto;
}

/* Written, unsent drafts: a count on the lead's E-mail tab and on Mail's "My drafts", a strip beside the open editor. */
.tab-count {
  display: inline-block;
  min-width: 18px;
  padding: 0 6px;
  border-radius: var(--fl-pill);
  background: var(--fl-warning);
  color: var(--fl-primary);
  font-size: 11px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
}

.seg a .tab-count {
  margin-left: 4px;
}

.drafts-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 0 0 10px;
}

.drafts-strip .chip {
  text-decoration: none;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Nastavenia → AI prompty: dark text on the white card (the page read as grey on white), the prompts on a light panel. */
.ai-prompt {
  border-bottom: 1px solid var(--fl-row-border);
  padding: 4px 0;
  color: var(--fl-dark);
}

.ai-prompt > summary {
  cursor: pointer;
  padding: 8px 0;
  color: var(--fl-dark);
}

.ai-prompt > summary b {
  color: var(--fl-primary);
}

.ai-prompt p {
  color: var(--fl-dark);
}

.ai-prompt p.muted,
.ai-prompt .muted {
  color: #5b6670;
}

.ai-prompt-instructions {
  display: grid;
  gap: 6px;
  justify-items: start;
  margin: 8px 0 12px;
}

.ai-prompt-text {
  background: var(--fl-zebra);
  color: var(--fl-primary);
  border: 1px solid var(--fl-light);
  font-size: 12.5px;
  line-height: 1.5;
  max-height: 480px;
  justify-self: stretch;
}

/* Reporty → Sťažnosti: complaints per topic as pills with their counts (a filter), and the AI's themes. */
.complaint-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-bottom: 10px;
}

.complaint-category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px 2px 2px;
  border: 1px solid transparent;
  border-radius: var(--fl-pill);
  color: var(--fl-dark);
}

.complaint-category.on {
  border-color: var(--fl-primary);
  background: #fff;
}

/* Topic tables: a long category name wraps instead of pushing the numbers off a phone screen, and when a wide table
   (the call topics' handlings and flags, a report's per-rep columns) scrolls sideways, the first column stays in view. */
.category-report .pill {
  white-space: normal;
}

.category-report td:first-child,
.category-report thead th:first-child,
.category-report tr.group-row th,
.sticky-first-column > tbody > tr > :first-child,
.sticky-first-column > tfoot > tr > :first-child,
.sticky-first-column > thead > tr:first-child > th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
}

.email-stats.sticky-first-column > tbody > tr.mine > :first-child {
  background: var(--info-bg);
}

@media (max-width: 640px) {
  .category-report th,
  .category-report td {
    padding-left: 6px;
    padding-right: 6px;
  }
}

.complaint-list tr.resolved td {
  color: var(--fl-text);
}

.complaint-state .btn {
  margin-top: 4px;
}

.complaint-themes {
  display: grid;
  gap: 10px;
  margin: 12px 0;
  padding-left: 20px;
}

.complaint-themes .pill {
  margin-left: 6px;
}

/* VAT payer and Peppol provider beside a lead's name (lead page, lists, Inbox, call queue) */
.company-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  vertical-align: middle;
}

.company-badges .pill,
.leads-table .peppol-pill,
.leads-table .vat-pill {
  font-size: 11px;
  padding: 1px 7px;
}

.queue-excluded {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* Hromadný e-mail (sales/bulk_emails) */
.bulk-email-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 8px;
}

.bulk-email-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px;
}

.bulk-email-counts a {
  text-decoration: none;
}

.bulk-email-progress {
  height: 8px;
  border-radius: 999px;
  background: var(--fl-light);
  overflow: hidden;
  margin: 4px 0 6px;
}

.bulk-email-progress-bar {
  height: 100%;
  background: var(--fl-primary);
  transition: width 0.3s ease;
}

.bulk-email-template {
  margin-bottom: 12px;
}

.bulk-email-recipients td .small {
  display: block;
}

.bulk-email-actions {
  text-align: right;
}

.bulk-email-actions form.inline {
  display: inline-block;
}

.bulk-email-send .card-body {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: flex-end;
  justify-content: space-between;
}

.bulk-email-send .card-body > div p {
  margin: 0 0 4px;
}

.bulk-email-recipient {
  display: grid;
  gap: 12px;
}

/* Cancelled, not done: a cancelled task (sales/tasks/_task) and the timeline lines of a cancelled task or e-mail. */
.check-btn.cancelled {
  background: var(--fl-light);
  border-color: var(--fl-light);
  color: var(--fl-text);
}

.kind-task_cancelled .tl-dot,
.kind-email_cancelled .tl-dot {
  background: #fdecec;
  color: var(--fl-danger);
}

/* "Zrušiť úlohu" under the task editor, and the actions of a scheduled e-mail or "Ak neodpovedia…" rule. */
.task-cancel-form {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  padding: 8px 12px 0;
  border-top: 1px dashed var(--fl-light);
}

.task-cancel-form .row {
  gap: 6px;
  align-items: center;
}

.task-cancel-form input {
  min-width: 0;
}

.scheduled-actions {
  display: inline-flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
}

.btn.outline.cancel {
  color: var(--fl-danger);
}

.auto-tasks-kind {
  margin: 22px 0 2px;
}

.auto-task .card-body > p {
  margin: 0 0 8px;
}

.auto-task-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Hovory: on a phone the eleven filters fold behind "Filtre (n)" (fold_controller.js); Dnes, Tento týždeň, Moje stay. */
.call-filters-toggle {
  display: none;
}

@media (max-width: 640px) {
  .call-filters-toggle {
    display: inline-flex;
    margin-bottom: 8px;
  }

  .call-filters:not(.open) > form {
    display: none;
  }
}

/* anchored_menu_controller.js: on phones the lead's short choices open at the control that was tapped, not as a bottom
   sheet (in the Sales app a sheet slid under the tab bar). The controller places it; until then it stays invisible. */
@media (max-width: 640px) {
  .menu.anchored[open]::before {
    background: transparent;
  }

  .menu.anchored[open] > .menu-body {
    border-radius: var(--fl-radius);
    padding: 8px;
    box-shadow: 0 12px 30px rgba(7, 10, 46, 0.28);
  }

  .menu.anchored[open] > .menu-body:not([data-placed]) {
    visibility: hidden;
  }
}
