/* Lead page: compact header, details column with collapsible sections (left), activity feed (right). */
.btn.ghost {
  background: transparent;
  color: var(--fl-text);
  border-color: transparent;
}

.btn.ghost:hover {
  background: var(--fl-gray);
  color: var(--fl-primary);
  filter: none;
}

.btn.icon.ghost .ic {
  width: 15px;
  height: 15px;
}

/* header: one band under the page title (the company name) */
.lead-head {
  padding: 8px 12px;
}

.lead-head .lead-title {
  gap: 8px 12px;
  flex-wrap: nowrap;
}

.lead-head .lead-meta {
  flex: 1 1 auto;
  min-width: 0;
  gap: 6px 12px;
  font-size: 13px;
  margin: 0;
}

.lead-head .lead-meta .ic {
  width: 13px;
  height: 13px;
  vertical-align: -2px;
}

.lead-head .lead-actions {
  flex: none;
  margin-left: auto;
  display: flex;
  width: auto;
}

.lead-head-name {
  display: none;
  font-size: 17px;
  color: var(--fl-dark);
  overflow-wrap: anywhere;
}

.lead-domain {
  overflow-wrap: anywhere;
}

.status-menu > summary.status-pill {
  cursor: pointer;
  font-size: 13px;
  padding: 5px 12px;
  gap: 6px;
  border: 1.5px solid transparent;
}

.status-menu > summary.status-pill:hover,
.status-menu[open] > summary.status-pill {
  border-color: currentColor;
}

.status-menu > summary.status-pill:focus-visible {
  outline: 2px solid var(--fl-secondary);
  outline-offset: 2px;
}

.status-menu .menu-body {
  min-width: 230px;
}

.owner-menu > summary.owner-pill {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  list-style: none;
}

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

.owner-menu > summary.owner-pill:hover,
.owner-menu[open] > summary.owner-pill {
  border-color: var(--fl-border, currentColor);
}

.owner-menu > summary.owner-pill:focus-visible {
  outline: 2px solid var(--fl-secondary);
  outline-offset: 2px;
}

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

.owner-menu .menu-item.current {
  background: var(--fl-gray);
  font-weight: 600;
  cursor: default;
}

.owner-menu .menu-item .ic {
  width: 14px;
  height: 14px;
  color: var(--ok-fg);
}

.inline-static {
  display: block;
  padding: 4px 0;
  overflow-wrap: anywhere;
}

.status-item {
  min-height: 36px;
}

.status-item > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.status-item.current {
  background: var(--fl-gray);
  font-weight: 600;
  cursor: default;
}

.status-item:disabled {
  color: var(--fl-dark);
}

.status-item .ic {
  width: 14px;
  height: 14px;
  color: var(--ok-fg);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--neutral-fg);
  flex: none;
}

.status-dot.ok {
  background: var(--ok-fg);
}

.status-dot.warn {
  background: var(--warn-fg);
}

.status-dot.bad {
  background: var(--bad-fg);
}

.status-dot.info {
  background: var(--info-fg);
}

.status-dot.primary {
  background: var(--fl-primary);
}

/* A tablet or a half-screen window cuts the name in the dark band to "Advokátska k…": the head names the lead in full. */
@media (min-width: 481px) and (max-width: 1099px) {
  .lead-head .lead-title {
    flex-wrap: wrap;
  }

  .lead-head-name {
    display: block;
    flex-basis: 100%;
  }
}

@media (max-width: 480px) {
  .lead-head .lead-title {
    flex-wrap: wrap;
  }

  .lead-head-name {
    display: block;
    flex: 1 1 calc(100% - 110px);
  }

  .lead-head .lead-actions {
    order: 0;
  }

  .lead-head .lead-meta {
    order: 1;
    flex-basis: 100%;
  }
}

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

.lead-layout > * {
  min-width: 0;
}

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

.lead-feed > turbo-frame {
  display: block;
  min-width: 0;
}

.lead-feed > .card,
.lead-feed > turbo-frame > .card {
  margin: 0;
}

.lead-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-content: start;
}

.lead-details > .danger-zone {
  margin: 0;
}

.lead-panel {
  display: contents;
}

.lead-pane-tabs {
  display: flex;
  gap: 4px;
  background: #fff;
  border-radius: var(--fl-radius);
  box-shadow: var(--fl-shadow-sm);
  padding: 4px;
}

.lead-pane-tabs button {
  flex: 1;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  border: 0;
  background: none;
  padding: 8px;
  border-radius: 6px;
  font: inherit;
  font-weight: 600;
  color: var(--fl-text);
  cursor: pointer;
}

.lead-pane-tabs button[aria-selected="true"] {
  background: var(--fl-primary);
  color: #fff;
}

@media (max-width: 1099px) {
  .lead-layout[data-pane="activity"] > .lead-details,
  .lead-layout[data-pane="details"] > .lead-feed {
    display: none;
  }

  /* Open deals stay in sight above the activity too; without one the panel belongs to the details. */
  .lead-layout[data-pane="activity"] > .deal-panel:not(.has-open) {
    display: none;
  }

  .lead-layout[data-pane="activity"]
    > .deal-panel
    :is(.deals-closed, .deal-panel-head .btn, [data-section-target="reveal"], .deal-note, .deal-extra) {
    display: none;
  }
}

@media (min-width: 1100px) {
  /* The lead's name, status and Call stay under the app header while the activity scrolls; its height is
     --lead-head-height (sticky_height_controller.js). */
  .lead-head {
    position: sticky;
    top: var(--app-header-height);
    z-index: 4;
  }

  .lead-layout {
    grid-template-columns: var(--lead-details-width, 340px) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    position: relative;
  }

  .lead-layout > .deal-panel {
    grid-column: 1;
    grid-row: 1;
  }

  .lead-layout > .lead-details {
    grid-column: 1;
    grid-row: 2;
  }

  .lead-layout > .lead-feed {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .lead-pane-tabs {
    display: none;
  }

  /* The details column scrolls on its own, below the app header and the lead's head; the feed scrolls with the page. */
  .lead-details {
    position: sticky;
    top: calc(var(--app-header-height) + var(--lead-head-height, 0px) + 8px);
    max-height: calc(100dvh - var(--app-header-height) - var(--lead-head-height, 0px) - 16px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    padding-bottom: 4px;
  }
}

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

/* The divider between the details and the activity (pane-resize): drag, arrow keys, double click resets. */
.pane-handle {
  display: none;
}

@media (min-width: 1100px) {
  .pane-handle {
    display: block;
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(var(--lead-details-width, 340px) + 1px);
    width: 8px;
    cursor: col-resize;
    touch-action: none;
    z-index: 2;
    border-radius: 4px;
  }

  .pane-handle::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 3px;
    width: 2px;
    border-radius: 1px;
    background: transparent;
    transition: background 0.15s;
  }

  .pane-handle:hover::after,
  .pane-handle:focus-visible::after,
  .lead-layout.resizing .pane-handle::after {
    background: var(--fl-secondary);
  }

  .pane-handle:focus-visible {
    outline: none;
  }

  .lead-layout.resizing {
    cursor: col-resize;
    user-select: none;
  }
}

@media (min-width: 1580px) {
  .pane-handle {
    left: calc(var(--lead-details-width, 380px) + 1px);
  }
}

/* collapsible sections */
.side-section {
  background: #fff;
  border-radius: var(--fl-radius);
  box-shadow: var(--fl-shadow-sm);
}

.side-head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 4px 8px 4px 12px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.side-head::-webkit-details-marker {
  display: none;
}

.side-head::before {
  content: "";
  width: 7px;
  height: 7px;
  border: solid var(--fl-text);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(-45deg);
  transition: transform 0.15s;
  flex: none;
  margin-right: 2px;
}

.side-section[open] > .side-head::before {
  transform: rotate(45deg);
}

.side-title {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  font-size: 13px;
  color: var(--fl-dark);
}

.side-count {
  display: inline-block;
  min-width: 18px;
  padding: 0 6px;
  border-radius: var(--fl-pill);
  background: var(--fl-light);
  color: var(--fl-dark);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

.side-tools {
  display: flex;
  gap: 2px;
  align-items: center;
  flex: none;
}

.side-tools .pill {
  font-size: 10.5px;
}

.side-body {
  padding: 0 12px 10px;
}

.side-body .empty.small {
  padding: 8px 0;
  text-align: left;
}

/* Cards rendered elsewhere too (pre-call brief, sequences) sit flat inside a section. */
.side-body > .card {
  box-shadow: none;
  margin: 0;
  background: none;
}

.side-body > .card > .card-head {
  padding: 0 0 6px;
}

.side-body > .card > .card-head > h2 {
  display: none;
}

.side-body > .card > .card-body {
  padding: 0;
}

.about-dl dd.static {
  padding: 7px 10px;
  color: var(--fl-dark);
}

.fold.fill-in > summary {
  color: var(--fl-link);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.fold.fill-in > summary .ic {
  width: 13px;
  height: 13px;
}

.fold.fill-in > summary::before {
  content: none;
}

.lead-code {
  justify-content: space-between;
  gap: 10px;
  cursor: default;
}

.lead-code code {
  font-size: 12px;
}

.about-dl dd.with-link {
  display: flex;
  align-items: center;
  gap: 2px;
}

.about-dl dd.with-link form {
  flex: 1;
  min-width: 0;
}

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

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

.contact-row {
  align-items: center;
}

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

.contact-actions {
  display: flex;
  align-items: center;
  gap: 0;
  flex: none;
}

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

.task-list.compact .task-row {
  padding: 7px 0;
  gap: 8px;
}

.task-list.compact .task-row .menu > summary .hide-sm {
  display: none;
}

.file-list {
  list-style: none;
  margin: 0 0 6px;
  padding: 0;
}

.file-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  color: var(--fl-dark);
}

.company-card {
  padding-top: 2px;
}

/* deals: the most important thing on the lead, so large type and an accent while one is open */
.deal-panel {
  background: #fff;
  border-radius: var(--fl-radius);
  box-shadow: var(--fl-shadow-sm);
  padding: 10px 12px 12px;
  display: grid;
  gap: 8px;
}

.deal-panel.has-open {
  border-left: 4px solid var(--fl-secondary);
  padding-left: 12px;
}

.deal-panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.deal-panel-title {
  flex: 1;
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--fl-dark);
  display: flex;
  align-items: center;
  gap: 6px;
}

.deal-empty {
  margin: 0;
}

/* "Add" in the panel head opens the new deal form; its own summary only closes it again. */
.deal-panel > .inline-open:not([open]) {
  display: none;
}

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

.deal-card {
  border: 1px solid var(--fl-row-border);
  border-left: 4px solid #f2c94c;
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--fl-zebra);
}

/* The stripe tells the state at a glance, as in Close: won green, active yellow, lost grey. */
.deal-card.deal-won {
  border-left-color: #8bc34a;
}

.deal-card.deal-lost {
  border-left-color: #b4bcc6;
}

.deal-card:hover {
  border-color: var(--fl-light);
}

.deal-card > .inline-open > summary {
  display: grid;
  gap: 4px;
}

.deal-top {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  justify-content: space-between;
}

.deal-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.deal-top .pill {
  font-size: 13px;
  padding: 3px 10px;
  flex: none;
}

.deal-figures {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--fl-dark);
}

.deal-value {
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.deal-value small {
  font-size: 14px;
  font-weight: 600;
  color: var(--fl-text);
}

.deal-confidence {
  font-size: 15px;
  font-weight: 600;
  color: var(--fl-text);
}

.deal-facts {
  display: flex;
  gap: 4px 14px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 15px;
  color: var(--fl-dark);
}

.deal-facts .ic {
  width: 15px;
  height: 15px;
  vertical-align: -2px;
}

.deal-extra {
  font-size: 14px;
}

.deal-note {
  font-size: 15px;
  line-height: 1.45;
  color: var(--fl-dark);
  background: #fff;
  border-radius: 6px;
  padding: 6px 8px;
}

.deal-card .inline-open-body {
  background: #fff;
  border-radius: 6px;
}

.deal-card.closed {
  background: #fff;
  padding: 6px 10px;
}

.deal-card.closed :is(.deal-title, .deal-value) {
  font-size: 14px;
}

.deal-card.closed :is(.deal-facts, .deal-confidence, .deal-note) {
  font-size: 13px;
}

.deal-card.closed .deal-top .pill {
  font-size: 11px;
}

.deal-card.closed .deal-note {
  display: none;
}

.deals-closed > summary {
  cursor: pointer;
  color: var(--fl-link);
  font-size: 13px;
  padding: 2px 0;
}

.deals-closed[open] > summary {
  margin-bottom: 6px;
}

/* composer = action bar */
.composer .action-bar {
  padding: 0 6px;
}

.composer .action-bar .tab {
  padding: 10px 10px 8px;
  font-size: 12.5px;
}

.composer .action-bar .tab .ic {
  width: 15px;
  height: 15px;
}

.composer-close {
  margin-left: auto;
  font-size: 18px;
  line-height: 1;
}

.composer:not(.open) .composer-close {
  display: none;
}

.composer:not(.open) .action-bar {
  border-bottom: 0;
}

@media (max-width: 640px) {
  .composer .action-bar .tab span {
    display: none;
  }

  .composer .action-bar .tab {
    padding-inline: 12px;
  }
}

/* feed toolbar */
.tl-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--fl-row-border);
}

.tl-tabs {
  display: flex;
  gap: 2px;
  background: var(--fl-gray);
  border-radius: var(--fl-pill);
  padding: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  max-width: 100%;
}

.tl-tabs a {
  padding: 5px 12px;
  border-radius: var(--fl-pill);
  color: var(--fl-dark);
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
}

.tl-tabs a:hover {
  text-decoration: none;
  background: #fff;
}

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

.tl-filters {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  flex: 1 1 260px;
  justify-content: flex-end;
}

.tl-filter-menu .menu-body {
  left: auto;
  right: 0;
  min-width: 220px;
}

.tl-filter-menu .menu-body select {
  max-width: none;
  width: 100%;
}

.tl-filter-menu .tab-count {
  background: var(--fl-primary);
  color: #fff;
}

.tl-filters select {
  font: inherit;
  font-size: 12px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--fl-light);
  border-radius: var(--fl-pill);
  background-color: #fff;
  color: var(--fl-dark);
  flex: 0 1 auto;
  width: auto;
  min-width: 0;
  max-width: 150px;
}

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

.tl-search {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  border: 1px solid var(--fl-light);
  border-radius: var(--fl-pill);
  padding: 0 10px;
  background: #fff;
  flex: 1 1 170px;
  max-width: 240px;
}

.tl-search:focus-within {
  border-color: var(--fl-primary);
}

.tl-search .ic {
  width: 14px;
  height: 14px;
  color: var(--fl-text);
}

.tl-search input {
  border: 0;
  outline: 0;
  font: inherit;
  font-size: 12.5px;
  width: 100%;
  min-width: 0;
  padding: 2px 0;
  background: none;
}

.tl-narrowed {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: var(--info-bg);
  border-bottom: 1px solid var(--fl-row-border);
  font-size: 12.5px;
  color: var(--fl-dark);
}

.tl-narrowed .ic {
  width: 14px;
  height: 14px;
  color: var(--fl-primary);
  flex: none;
}

.tl-narrowed .grow {
  min-width: 0;
  overflow-wrap: anywhere;
}

.tl-narrowed .btn {
  background: #fff;
  flex: none;
}

/* feed */
.feed {
  list-style: none;
  margin: 0;
  padding: 0;
}

.feed .tl-item {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 0 10px;
  padding: 10px 14px;
  border-top: 1px solid var(--fl-row-border);
}

.feed > .tl-item:first-child,
.feed > .tl-group:first-child {
  border-top: 0;
}

.feed .tl-dot {
  width: 26px;
  height: 26px;
  border: 0;
}

.feed .tl-body {
  min-width: 0;
  font-size: 13px;
  color: var(--fl-dark);
}

.tl-head {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-height: 24px;
}

.tl-head .tl-title {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 600;
  color: var(--fl-dark);
}

.tl-head .tl-title .muted {
  font-weight: 400;
}

.tl-head .avatar.xs {
  vertical-align: -5px;
}

.feed-time {
  margin-left: auto;
  color: var(--fl-text);
  font-size: 11.5px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.tl-head .feed-time {
  order: 9;
}

.feed .tl-text {
  margin-top: 4px;
  line-height: 1.55;
}

.note-text {
  background: #fffaf0;
  border-left: 3px solid #f1d49b;
  border-radius: 0 6px 6px 0;
  padding: 7px 10px;
}

.note-text p:last-child {
  margin-bottom: 0;
}

.tl-more {
  margin-top: 4px;
}

.tl-more > summary {
  cursor: pointer;
  color: var(--fl-link);
  list-style: none;
  display: inline-block;
}

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

.tl-more > summary::after {
  content: " ▸";
}

.tl-more[open] > summary::after {
  content: " ▾";
}

.tl-more.inline {
  display: inline-block;
  margin: 0 10px 0 0;
}

.tl-links {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.dir {
  font-weight: 700;
  display: inline-block;
  width: 14px;
  text-align: center;
  flex: none;
}

.dir.in {
  color: var(--fl-link);
}

.dir.out {
  color: var(--ok-fg);
}

/* single-line updates and their groups */
.feed .tl-item.tl-line {
  padding-block: 5px;
}

.feed .tl-line .tl-dot {
  width: 20px;
  height: 20px;
  margin-left: 3px;
}

.feed .tl-line .tl-dot .ic {
  width: 11px;
  height: 11px;
}

.feed .tl-line .tl-title {
  font-weight: 400;
  font-size: 12.5px;
}

.feed .tl-line .tl-title b {
  font-weight: 600;
}

.tl-group {
  border-top: 1px solid var(--fl-row-border);
}

.tl-group > details > summary {
  cursor: pointer;
  list-style: none;
  padding: 7px 14px 7px 50px;
  font-size: 12px;
  color: var(--fl-text);
}

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

.tl-group > details > summary:hover {
  background: var(--fl-zebra);
}

.tl-group > details > summary .ic {
  width: 13px;
  height: 13px;
}

.tl-group > details[open] > summary {
  border-bottom: 1px solid var(--fl-row-border);
}

.tl-group .feed .tl-item:first-child {
  border-top: 0;
}

.tl-group .feed-time {
  margin: 0;
}

/* e-mail thread cards */
.kind-thread .tl-dot {
  background: var(--warn-bg);
  color: var(--warn-fg);
}

.kind-thread.needs-reply .tl-dot {
  background: var(--fl-warning);
  color: #fff;
}

.thread-head {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  min-height: 26px;
}

.thread-subject {
  flex: 1 1 260px;
  min-width: 0;
  color: var(--fl-dark);
  display: flex;
  gap: 6px;
  align-items: baseline;
  flex-wrap: wrap;
}

.thread-subject b {
  font-weight: 700;
  font-size: 13.5px;
  overflow-wrap: anywhere;
}

.thread-tools {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.thread-tools .people {
  display: inline-flex;
}

.thread-tools .people .avatar {
  border: 2px solid #fff;
  margin-left: -6px;
  width: 22px;
  height: 22px;
}

.thread-tools .people .avatar:first-child {
  margin-left: 0;
}

.msg-lines {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  border: 1px solid var(--fl-row-border);
  border-radius: 8px;
}

.msg-lines .msg-lines {
  margin: 0;
  border: 0;
  border-radius: 0;
}

.msg + .msg,
.thread-earlier-wrap + .msg,
.msg-lines .msg-lines .msg {
  border-top: 1px solid var(--fl-row-border);
}

.msg-line > summary {
  display: flex;
  gap: 8px;
  align-items: baseline;
  padding: 7px 10px;
  cursor: pointer;
  list-style: none;
  min-width: 0;
}

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

.msg-line > summary:hover {
  background: var(--fl-zebra);
}

.msg-line[open] > summary {
  background: var(--fl-zebra);
}

.msg-from {
  flex: 0 1 auto;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--fl-dark);
  font-weight: 600;
}

.msg-snippet {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--fl-text);
}

.msg-line[open] .msg-snippet {
  visibility: hidden;
}

.msg-clip .ic,
.msg-opened .ic {
  width: 13px;
  height: 13px;
  color: var(--fl-text);
  vertical-align: -2px;
}

.msg-opened .ic,
.msg-replied .ic {
  color: var(--ok-fg);
}

.msg-replied .ic {
  width: 13px;
  height: 13px;
  vertical-align: -2px;
}

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

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

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

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

.msg-delivery.muted .ic {
  color: var(--fl-text);
  opacity: 0.6;
}

.msg-full {
  padding: 4px 10px 10px 32px;
}

.msg-meta {
  overflow-wrap: anywhere;
}

.msg-subject {
  color: var(--fl-dark);
  overflow-wrap: anywhere;
}

.msg-text {
  background: #fff;
  border: 1px solid var(--fl-row-border);
  border-radius: 6px;
  padding: 8px 10px;
  margin-top: 6px;
  max-height: 480px;
  overflow: auto;
  overflow-wrap: anywhere;
}

/* a message's formatted body (Sales::EmailBodyHtml): the sender's layout, kept inside the box */
.msg-body {
  display: block;
}

.msg-body-loading {
  margin: 6px 0 0;
  display: flex;
  gap: 6px;
  align-items: center;
}

.email-html {
  font-size: 14px;
  line-height: 1.5;
  max-height: min(70vh, 720px);
  overflow-x: auto;
}

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

.email-html img {
  max-width: 100%;
  height: auto;
}

.email-html table {
  max-width: 100%;
}

.email-html blockquote {
  margin: 0 0 8px;
  padding-left: 10px;
  border-left: 3px solid var(--fl-light);
  color: var(--fl-text);
}

.email-html pre {
  white-space: pre-wrap;
  font: inherit;
  margin: 0;
}

.email-html a {
  color: var(--fl-link);
  text-decoration: underline;
}

.email-quote {
  margin-top: 8px;
}

.email-quote > summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--fl-link);
  font-size: 12.5px;
  padding: 2px 8px;
  border: 1px solid var(--fl-light);
  border-radius: var(--fl-pill);
}

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

.email-quote-body {
  margin-top: 8px;
  padding-left: 10px;
  border-left: 3px solid var(--fl-light);
  color: var(--fl-text);
}

.email-remote-note {
  margin: 6px 0 0;
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.email-remote-note .ic {
  width: 13px;
  height: 13px;
}

.thread-earlier > summary {
  cursor: pointer;
  list-style: none;
  padding: 6px 10px 6px 32px;
  color: var(--fl-link);
  font-size: 12px;
  background: var(--fl-zebra);
}

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

.thread-earlier[open] > summary {
  display: none;
}

@media (max-width: 640px) {
  .tl-toolbar {
    padding: 8px 10px;
  }

  .tl-search {
    flex-basis: 100%;
    max-width: none;
  }

  .tl-filters select {
    flex: 1 1 calc(50% - 6px);
    max-width: none;
  }

  .msg-line > summary {
    flex-wrap: wrap;
    row-gap: 0;
  }

  .msg-snippet {
    flex-basis: 100%;
    order: 5;
    padding-left: 22px;
  }

  .msg-full {
    padding-left: 10px;
  }

  .feed .tl-item {
    padding-inline: 10px;
    gap: 0 8px;
  }
}

/* meetings */
.meeting-card {
  background: var(--fl-zebra);
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: 6px;
}

.meeting-card-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--fl-text);
  display: flex;
  gap: 4px;
  align-items: center;
}

.meeting-card-label .ic {
  width: 12px;
  height: 12px;
}

.meeting-card .summary-text {
  margin: 4px 0;
}

.clamp {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mini-list.bullets {
  list-style: disc;
  padding-left: 18px;
  margin: 2px 0;
}

.load-older {
  display: block;
  text-align: center;
  padding: 10px;
  border-top: 1px solid var(--fl-row-border);
}

/* Once loaded, the frame holds the older entries: laid out like the rest of the feed, not centred like its button. */
.load-older:has(> .feed) {
  text-align: start;
  padding: 0;
  border-top: 0;
}

/* a meeting (timeline entry, Meetings panel), a contact or a deal of the left column, opened in place */
.inline-open > summary {
  cursor: pointer;
  list-style: none;
}

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

.inline-open-label {
  color: var(--fl-link);
}

.inline-open > summary .inline-open-label::after {
  content: " \25B8";
}

.inline-open[open] > summary .inline-open-label::after {
  content: " \25BE";
}

.inline-open[open] ~ .meeting-preview {
  display: none;
}

.inline-open-body {
  margin-top: 6px;
  padding: 8px 10px;
  border-left: 3px solid var(--fl-light);
  display: grid;
  gap: 8px;
  min-width: 0;
}

.inline-open-body > p {
  margin: 0;
}

.inline-open-body .form.compact {
  margin: 0;
}

.contact-row:has(.inline-open[open]) {
  align-items: flex-start;
}

.attendee-list.compact {
  gap: 4px;
}

.rich-note {
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.rich-note > :first-child {
  margin-top: 0;
}

.rich-note > :last-child {
  margin-bottom: 0;
}

.deal-card.just-added {
  outline: 2px solid var(--fl-primary);
  outline-offset: 2px;
  border-radius: var(--fl-radius);
}

/* "Zmazať lead": the header's ⋯ menu and the confirmation in the slide-over panel */
.lead-head .lead-more {
  margin-left: 6px;
}

.lead-more .menu-body {
  min-width: 200px;
}

.lead-deletion h3 {
  margin: 14px 0 4px;
  font-size: 14px;
}

.lead-deletion label.radio {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 6px 0;
}

.lead-deletion label.radio > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Opportunity category (product line) on deal cards, board cards and the deal list */
.pill.category-pill {
  background: transparent;
  color: var(--fl-dark);
  border: 1px solid var(--fl-border, #d0d5dd);
  font-weight: 500;
  white-space: normal;
}

.deal-category {
  margin: 2px 0 4px;
}

/* Every call, note and meeting is one line (views/sales/activities/_entry): the head is the <summary>, the time and the
   outcome picker sit beside it. Only the newest entry starts open (Sales::LeadTimeline#expanded?). */
.tl-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

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

.tl-entry > summary {
  list-style: none;
  cursor: pointer;
}

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

.tl-entry > summary:hover {
  background: var(--fl-zebra);
  border-radius: 6px;
}

.tl-entry > summary::after {
  content: "\25B8";
  flex: none;
  color: var(--fl-text);
  font-size: 11px;
}

.tl-entry[open] > summary::after {
  content: "\25BE";
}

.tl-row .tl-head {
  flex-wrap: nowrap;
  overflow: hidden;
}

.tl-row .tl-head > * {
  flex: none;
}

.tl-row .tl-head .tl-title {
  flex: 0 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tl-row .tl-head .tl-snippet {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 400;
}

.tl-entry[open] > summary .tl-snippet {
  visibility: hidden;
}

.tl-entry-body {
  padding-bottom: 2px;
}

.tl-entry-body > :first-child {
  margin-top: 4px;
}

.tl-tools {
  flex: none;
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  cursor: pointer;
}

.tl-tools .feed-time {
  margin-left: 0;
}

.tl-tools .outcome-menu {
  margin-left: 0;
}

/* A phone has no room for the line and its tools side by side: the tools squeezed a call down to "↙ …", hiding who
   called. The tools go under the line. */
@media (max-width: 640px) {
  .tl-row {
    flex-wrap: wrap;
  }

  .tl-row .tl-entry {
    flex-basis: 100%;
  }

  .tl-row .tl-head {
    flex-wrap: wrap;
  }

  .tl-row .tl-head .tl-title {
    white-space: normal;
  }

  .tl-row .tl-tools {
    margin-left: auto;
  }
}

/* × of a timeline entry: delete one's own note or hide anything else; shown on hover (always on touch screens). */
.tl-item {
  position: relative;
}

.tl-hide-form {
  position: absolute;
  top: 2px;
  right: -4px;
  margin: 0;
}

.tl-hide {
  opacity: 0;
  padding: 0 6px;
  font-size: 16px;
  line-height: 1.4;
  color: var(--fl-text);
}

.tl-item:hover > .tl-hide-form .tl-hide,
.tl-hide:focus-visible {
  opacity: 1;
}

@media (hover: none) {
  .tl-hide {
    opacity: 0.6;
  }
}

.tl-item:has(> .tl-hide-form) > .tl-body .tl-head,
.tl-item:has(> .tl-hide-form) > .tl-body .tl-row {
  padding-right: 18px;
}

/* New task right in the sidebar (the "+" of Open tasks). */
.side-task-new {
  margin-top: 6px;
}

.side-task-new > summary {
  cursor: pointer;
  color: var(--fl-link);
  list-style: none;
}

.side-task-new > summary::-webkit-details-marker {
  display: none;
}

.side-task-new[open] > summary {
  display: none;
}

.side-task-form {
  display: grid;
  gap: 6px;
  max-width: none;
}

.side-task-form .row {
  gap: 6px;
  flex-wrap: nowrap;
}

.side-task-form .row > * {
  min-width: 0;
  flex: 1 1 0;
}
