/* The page of Fred (src/views/fredPage.ts, the owner 29. 11. 2026; the same as INTECHI CRM public/css/johnypage.css): K řešení, Agenti, Znalosti on one page. Every row: the square of its icon
   (the shared .req-row-ico), the name over one line of what it is, the action on the right; the icons of all rows on one axis. */
/* the heading of Agenti (the owner, 30. 11. 2026; as CRM) */
html.sd .bot-part-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
html.sd .bot-part-h {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
html.sd .bot-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
html.sd .bot-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
html.sd .bot-row:first-child {
  border-top: 0;
  padding-top: 0;
}
html.sd .bot-row-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
html.sd .bot-row-name {
  font-weight: 600;
  overflow-wrap: anywhere;
}
html.sd a.bot-row-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
html.sd .bot-row-sub {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}
html.sd .bot-row-act {
  flex: none;
}
/* what an agent works on now: the notes as soft orange labels with the icon of their state */
html.sd .bot-row-now {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
/* a note an agent works on: one line inside the card, a long title ends with an ellipsis (never runs out of the card) */
html.sd .bot-row-now {
  min-width: 0;
  max-width: 100%;
}
html.sd .badge.bot-now {
  min-width: 0;
  flex: 0 1 auto;
}
html.sd .bot-now-t {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html.sd .badge.bot-now {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  background: var(--sd-action-orange-bg);
  border-color: var(--sd-action-orange-line);
  color: var(--sd-action-orange-ink);
  text-decoration: none;
  overflow-wrap: anywhere;
}
/* the choices of a question of Fred: buttons (one click), or ticks and Odeslat for more */
html.sd .bot-choices {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}
/* what Fred noticed by himself (src/botWatch.ts): the lines of the findings under the name, the link in the colour of links */
html.sd .bot-found {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 2px;
}
html.sd .bot-found li {
  overflow-wrap: anywhere;
}
html.sd .bot-found .bot-row-sub {
  display: inline;
}
html.sd .bot-choice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--sd-radius-md, 8px);
  cursor: pointer;
}
html.sd .bot-choice:has(input:checked) {
  background: var(--sd-action-orange-bg);
  border-color: var(--sd-action-orange-line);
  color: var(--sd-action-orange-ink);
}
@media (pointer: coarse) {
  html.sd .bot-choices .btn,
  html.sd .bot-choice {
    min-height: 44px;
  }
}
/* the phone: the action goes under the text, from the axis of the text */
@media (max-width: 640px) {
  html.sd .bot-row {
    flex-wrap: wrap;
  }
  html.sd .bot-row-act {
    flex-basis: 100%;
    padding-left: 56px;
  }
}
/* the squares of the icons in the colour of their meaning (the shared .req-row-ico of INTECHI CRM, public/css/requests-list.css there) */
html.sd .req-row-ico {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  font-size: 16px;
}
html.sd .req-row-ico.rt-grey {
  background: var(--sd-action-grey-bg);
  color: var(--sd-action-grey-ink);
}
html.sd .req-row-ico.rt-orange {
  background: var(--sd-action-orange-bg);
  color: var(--sd-action-orange-ink);
}
/* the orange question mark top left of the button of Fred: Fred asks, or a card / a request waits for the person's decision (the owner,
   29. 11. 2026: a question is orange, red only for an error); the effects switch decides its pulse like the red one (INTECHI CRM johny.css) */
html.sd .bot-dot.bot-dot-ask {
  right: auto;
  left: -6px;
  min-width: 20px;
  padding: 0;
  background: var(--sd-color-orange-600, #ea580c);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
html.sd .bot-dot.bot-dot-ask[hidden] {
  display: none;
}
html.sd .bot-dot.bot-dot-ask .fa-solid {
  font-size: 10px;
  line-height: 1;
}
html.sd:not([data-fx='off']) .bot-dot.bot-dot-ask:not([hidden]) {
  animation: bot-dot-ask-pulse 2.4s ease-in-out infinite;
}
@keyframes bot-dot-ask-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--sd-color-orange-600, #ea580c) 45%, transparent);
  }
  50% {
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--sd-color-orange-600, #ea580c) 0%, transparent);
  }
}
/* a question of Fred with choices in the chat: the question with its icon, the choices as buttons under it (44 px on touch) */
html.sd .johny-ask {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
html.sd .johny-ask-q {
  margin: 0;
  display: flex;
  gap: 6px;
  align-items: baseline;
  font-weight: 600;
  color: var(--sd-action-orange-ink, #c2410c);
}
html.sd .johny-ask-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
html.sd .johny-ask-choice.is-on {
  background: var(--sd-action-orange-bg);
  border-color: var(--sd-action-orange-line);
  color: var(--sd-action-orange-ink);
}
@media (pointer: coarse) {
  html.sd .johny-ask-choices .btn {
    min-height: 44px;
  }
}
/* an agent of an administrator: a tap on the row opens „Co smí sám“ (folded at the start); the chevron at the right on the axis of the row */
html.sd .bot-row-fold {
  border-top: 1px solid var(--line);
}
html.sd .bot-row-fold:first-child {
  border-top: 0;
}
html.sd .bot-row-fold > .bot-fold > summary.bot-row {
  list-style: none;
  cursor: pointer;
  border-top: 0;
}
html.sd .bot-row-fold:first-child > .bot-fold > summary.bot-row {
  padding-top: 0;
}
html.sd .bot-fold > summary::-webkit-details-marker {
  display: none;
}
html.sd .bot-fold > summary > .fa-chevron-down {
  flex: none;
  color: var(--muted);
  transition: transform 0.18s ease;
}
html.sd .bot-fold[open] > summary > .fa-chevron-down {
  transform: rotate(180deg);
}
html.sd .bot-auto {
  margin: 0 0 12px 48px;
  display: grid;
  gap: 6px;
}
html.sd .bot-auto-h {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
html.sd .bot-auto-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}
html.sd .bot-auto-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 6px 0;
  border-top: 1px solid var(--line);
}
html.sd .bot-auto-name {
  flex: 1 1 12rem;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  overflow-wrap: anywhere;
}
/* the three choices of one row: one segment, the chosen one blue; Sám locked (only the lock) where it may never be */
html.sd .bot-modes {
  flex: none;
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
/* three equal buttons with the content in the middle, so the rows with a lock stand on the same axis (the owner, 30. 11. 2026; as CRM) */
html.sd .bot-modes .bot-mode {
  white-space: nowrap;
  justify-content: center;
}
/* the lock alone: no margin of a picture before words, so it stands in the very middle of its button */
html.sd .bot-modes .bot-mode:disabled > .fa-solid {
  margin: 0;
}
/* the chosen one: its own colour, stronger (a ring of its ink); the others stay lighter (the owner, 30. 11. 2026; as INTECHI CRM 1.138.1) */
html.sd .bot-modes .bot-mode.ia:not(.is-on):not(:disabled) {
  opacity: 0.72;
}
html.sd .bot-modes .bot-mode.is-on {
  border-color: var(--ia-ink);
  box-shadow: inset 0 0 0 1px var(--ia-ink);
  opacity: 1;
}
html.sd .bot-modes .bot-mode:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
@media (pointer: coarse) {
  html.sd .bot-modes .bot-mode {
    min-height: 44px;
  }
}
@media (max-width: 640px) {
  html.sd .bot-auto {
    margin-left: 0;
  }
  html.sd .bot-auto-row {
    flex-wrap: wrap;
  }
  html.sd .bot-modes {
    flex: 1 1 100%;
  }
  html.sd .bot-modes .bot-mode {
    flex: 1 1 0;
    justify-content: center;
  }
}
/* the law inside the row of the contracts agent: its folded parts without the frame of a card, on the axis of the text of the row */
html.sd .bot-law {
  margin: 0 0 12px 48px;
  gap: 6px;
}
html.sd .bot-law .card {
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  padding: 6px 0;
  background: transparent;
  margin: 0;
}
html.sd .bot-law > :first-child .card:first-child,
html.sd .bot-law > .card:first-child {
  border-top: 0;
}
@media (max-width: 640px) {
  html.sd .bot-law {
    margin-left: 0;
  }
}
html.sd .bot-law summary,
html.sd .bot-law h2,
html.sd .bot-law h3 {
  font-size: 15px;
}
/* the instances of an agent (one per open task): one line each, the subject ends with an ellipsis inside the card, the state at the right */
html.sd .bot-inst-list {
  list-style: none;
  margin: 0 0 10px 48px;
  padding: 0;
  display: grid;
  gap: 6px;
  min-width: 0;
}
html.sd .bot-inst {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  text-decoration: none;
}
html.sd .bot-inst-av {
  position: relative;
  flex: none;
  display: inline-flex;
}
html.sd .bot-inst-n {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 10px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
  color: var(--ink);
}
html.sd .bot-inst > .bot-now {
  flex: 0 1 auto;
  min-width: 0;
}
html.sd .bot-inst > .bot-inst-st {
  margin-left: auto;
}
@media (max-width: 640px) {
  html.sd .bot-inst-list {
    margin-left: 0;
  }
}
/* the chip of a note in the real colour of its paper (the owner, 29. 11. 2026: recognisable as on the board) */
html.sd .badge.bn-paper-yellow,
html.sd .badge.bn-paper-green,
html.sd .badge.bn-paper-blue,
html.sd .badge.bn-paper-pink,
html.sd .badge.bn-paper-orange,
html.sd .badge.bn-paper-purple {
  color: var(--bn-ink);
  border-color: color-mix(in srgb, var(--bn-ink) 18%, transparent);
}
html.sd .badge.bn-paper-yellow {
  background: var(--bn-yellow);
}
html.sd .badge.bn-paper-green {
  background: var(--bn-green);
}
html.sd .badge.bn-paper-blue {
  background: var(--bn-blue);
}
html.sd .badge.bn-paper-pink {
  background: var(--bn-pink);
}
html.sd .badge.bn-paper-orange {
  background: var(--bn-orange);
}
html.sd .badge.bn-paper-purple {
  background: var(--bn-purple);
}
html.sd a.badge.agent-count {
  text-decoration: none;
}
html.sd .bot-inst-list > li {
  min-width: 0;
}
html.sd .bot-inst > .badge.bot-now {
  width: auto;
}
/* on a phone the three choices are ONE row of equal thirds, each word on one line (the owner, 29. 11. 2026: no wrapping; the same as INTECHI
   CRM johnypage.css) */
@media (max-width: 640px) {
  html.sd .bot-modes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  html.sd .bot-modes .bot-mode {
    white-space: nowrap;
    min-width: 0;
    padding: 0 4px;
    gap: 4px;
    font-size: 12px;
    letter-spacing: 0;
    justify-content: center;
  }
  html.sd .bot-modes .bot-mode .fa-solid {
    margin-right: 0;
    font-size: 11px;
  }
}
html.sd .bot-law-fold > summary > .bot-row-name {
  flex: 1;
  min-width: 0;
}
/* all the counts at the TOP RIGHT of the button of Fred (the owner, 29. 11. 2026, like Nibbit in RARELO; the same as INTECHI CRM johny.css):
   red first at the corner, then the orange question mark, then the green count, side by side along the top edge to the left (never over the
   face of the icon) */
html.sd .fred-btn .bot-dot,
html.sd .fred-btn .bot-dot.bot-dot-done,
html.sd .fred-btn .bot-dot.bot-dot-ask {
  top: -10px;
  bottom: auto;
  left: auto;
  right: -10px;
}
html.sd .fred-btn:has(.bot-dot:not(.bot-dot-done):not(.bot-dot-ask):not([hidden])) .bot-dot.bot-dot-ask,
html.sd .fred-btn:has(.bot-dot:not(.bot-dot-done):not(.bot-dot-ask):not([hidden])) .bot-dot.bot-dot-done,
html.sd .fred-btn:has(.bot-dot-ask:not([hidden])) .bot-dot.bot-dot-done {
  right: 12px;
}
html.sd
  .fred-btn:has(.bot-dot:not(.bot-dot-done):not(.bot-dot-ask):not([hidden])):has(.bot-dot-ask:not([hidden]))
  .bot-dot.bot-dot-done {
  right: 34px;
}
/* one finding = one row of chips on one axis (the record link with its icon, the fact, the phase) */
html.sd .bot-found-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  min-width: 0;
}
html.sd .bot-found-row .badge > .fa-solid {
  margin-right: 5px;
}
/* the law in the lawyers (src/views/contracts.ts lawAgentPart, lawShared): compact rows, the chip and the action on the axis of the name */
html.sd .bot-law .bot-auto-row > .badge {
  margin-left: auto;
}
html.sd .bot-law .bot-inline {
  margin: 0;
  flex: none;
}
html.sd .law-fold > summary {
  list-style: none;
  cursor: pointer;
}
html.sd .law-fold > summary::-webkit-details-marker {
  display: none;
}
html.sd .law-fold > summary > .fa-chevron-down {
  flex: none;
  color: var(--muted);
}
html.sd .law-fold[open] > summary > .fa-chevron-down {
  transform: rotate(180deg);
}
html.sd .law-fold-in {
  padding: 6px 0 10px;
  gap: 8px;
}
html.sd .law-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
html.sd .law-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
html.sd .law-row-name {
  flex: 1 1 auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
html.sd .law-row-name > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html.sd .law-add {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
}
html.sd .law-fold > summary.bot-auto-row {
  flex-wrap: nowrap;
  font-size: inherit;
  font-weight: inherit;
}
html.sd .law-fold > summary > .bot-auto-name {
  flex: 1 1 auto;
}
html.sd .bot-law .bot-auto-row {
  flex-wrap: nowrap;
}
html.sd .bot-law .bot-auto-row > .bot-auto-name {
  flex: 1 1 auto;
}
html.sd .bot-law .bot-auto-row .btn {
  white-space: nowrap;
}
@media (max-width: 640px) {
  html.sd .bot-law .bot-auto-row:has(> .bot-inline) {
    flex-wrap: wrap;
  }
  html.sd .bot-law .bot-auto-row > .bot-inline {
    flex-basis: 100%;
  }
}
/* the findings of Fred in the chat (public/js/fred-chat.js foundList): one row of chips each */
.johny-found {
  list-style: none;
  margin: 4px 0 8px;
  padding: 0;
  display: grid;
  gap: 6px;
  text-align: left;
}
.johny-found .badge > .fa-solid {
  margin-right: 5px;
}
/* the record of a finding wraps inside the bubble or the card (a long name of a supplier never runs out of it) */
html.sd .bot-found-row > .chat-page-link {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
/* the morning brief of Fred in the chat (public/js/fred-chat.js briefRows, src/brief.ts; the same as Johny in INTECHI CRM): a block = its icon,
   name and count on one line, its items as rows of chips under it, the rest as a count */
.johny-brief {
  display: grid;
  gap: 10px;
  margin-top: 6px;
}
.johny-brief-h {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.johny-brief-h > .fa-solid {
  width: 16px;
  text-align: center;
  color: var(--accent);
}
.johny-brief .johny-found {
  margin: 6px 0 0;
}
.johny-brief-more {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}
