/* Original Escalio shared controls and account entry. */
:root {
  --ink: #192b47;
  --muted: #61728b;
  --line: #dee6f2;
  --paper: #fff;
  --canvas: #f5f8fd;
  --accent: #245edb;
  --accent-soft: #ebf2ff;
  --nav: #10264c;
  --note: #fff8e5;
  --note-ink: #735217;
  --radius: 9px;
  --font: Inter, 'Segoe UI', system-ui, -apple-system, sans-serif;
}
* {
  box-sizing: border-box;
}
input,
textarea,
select {
  font: inherit;
  max-width: 100%;
  border: 1px solid var(--field-line, #cbd7e8);
  border-radius: 6px;
  background: var(--paper);
  padding: 9px 10px;
  color: var(--ink);
}
input,
textarea {
  width: 100%;
}
textarea {
  resize: vertical;
  min-height: 115px;
}
.button {
  padding: 9px 13px;
  min-height: 40px;
  border: 1px solid var(--field-line, #cbd7e8);
  background: var(--surface, white);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
body {
  margin: 0;
  font: 14px/1.5 var(--font);
  color: var(--ink);
  background: var(--canvas);
}
.waitlist-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(145deg, #edf5ff, #fff);
}
.waitlist-card {
  width: min(100%, 560px);
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  box-shadow: 0 16px 56px #19365b0d;
  display: grid;
  gap: 20px;
}
.waitlist-card .brand {
  padding: 0;
  margin-bottom: 8px;
}
.waitlist-card h1 {
  font-size: 32px;
  line-height: 1.2;
}
.waitlist-card p {
  overflow-wrap: anywhere;
}
.waitlist-badge {
  width: fit-content;
  padding: 4px 10px;
  border-radius: 99px;
  color: #2452a2;
  background: #ebf2ff;
  font-size: 12px;
  font-weight: 600;
}
.waitlist-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.waitlist-actions a {
  text-decoration: none;
}
.waitlist-admin-link {
  color: #b7c9e3;
  padding: 11px 12px;
  text-decoration: none;
  font-weight: 550;
}
.waitlist-admin-link:hover {
  background: #18365f;
  color: white;
}
@media (max-width: 480px) {
  .waitlist-card {
    padding: 26px;
  }
  .waitlist-card h1 {
    font-size: 27px;
  }
  .waitlist-actions > * {
    width: 100%;
  }
}
button {
  font: inherit;
}
button {
  cursor: pointer;
}
button {
  border-radius: 6px;
}
button {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--focus, #2563eb);
  outline-offset: 3px;
}
button:disabled {
  cursor: default;
  opacity: 0.55;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 22px;
  letter-spacing: -0.6px;
}
h2 {
  font-size: 19px;
  letter-spacing: -0.3px;
}
h3 {
  font-size: 14px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 700;
}
.icon {
  width: 19px;
  height: 19px;
  display: inline-block;
  flex: none;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.invitation-page {
  width: min(100% - 40px, 440px);
  margin: 64px auto;
}
.invitation-page h1 {
  margin-top: 32px;
}
.invitation-page a {
  color: var(--accent);
}
.invitation-page .brand {
  color: var(--ink);
  text-decoration: none;
  padding: 0;
}
.invitation-page .brand img {
  margin-right: 8px;
}
.invitation-page form {
  margin: 24px 0;
}
.invitation-page label {
  display: block;
  margin: 16px 0 6px;
}
.invitation-page input,
.invitation-page button {
  width: 100%;
}
.button:hover {
  background: var(--hover-bg, #f0f5ff);
}
.primary {
  background: var(--accent-bg, var(--accent));
  border-color: var(--accent-bg, var(--accent));
  color: var(--on-accent, white);
}
.primary:hover {
  background: var(--accent-bg-hover, #194bb9);
}
.prototype-banner {
  background: #eff5ff;
  border-bottom: 1px solid #d7e4f7;
  color: #344c72;
  padding: 8px 22px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  min-height: 35px;
}
.prototype-banner a {
  color: #194bb9;
  text-underline-offset: 3px;
  white-space: nowrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -0.8px;
  padding: 0 10px;
}
.brand-mark {
  width: 29px;
  height: 29px;
  color: #80bcff;
}
.brand[href] {
  color: inherit;
  text-decoration: none;
  width: fit-content;
}
.workspace-home {
  border: 0;
  background: transparent;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
}
.nav {
  display: grid;
  gap: 7px;
}
.avatar {
  height: 30px;
  width: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--avatar-bg, #eaf1fd);
  color: var(--avatar-ink, #3c5680);
  font-size: 11px;
  font-weight: 700;
  flex: none;
}
.search-wrap {
  position: relative;
}
.search-wrap svg {
  position: absolute;
  left: 10px;
  top: 10px;
  width: 17px;
  color: var(--faint, #7b8faa);
}
.filters {
  display: flex;
  gap: 5px;
  margin-top: 13px;
}
.filter {
  border: 0;
  background: transparent;
  color: var(--ink-soft, #506583);
  font-size: 12px;
  padding: 6px 9px;
  min-height: 34px;
}
.filter[aria-pressed='true'] {
  background: var(--sel-bg, #e4edff);
  color: var(--sel-ink, #214fa7);
  font-weight: 700;
}
.filter:hover {
  background: var(--hover-bg, #edf3fe);
}
.row-top,
.row-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.row-top {
  font-size: 11px;
  color: var(--ink-soft, #506583);
}
.ticket-preview {
  display: block;
  color: var(--ink-soft, #667793);
  font-size: 12px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  margin-bottom: 11px;
}
.row-bottom {
  font-size: 11px;
  color: var(--ink-soft, #60738e);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 5px;
  padding: 3px 7px;
  background: var(--subtle, #edf2fa);
  color: var(--subtle-ink, #526686);
  font-size: 11px;
  line-height: 1.4;
  font-weight: 600;
}
.badge.open {
  background: var(--sel-bg, #e5efff);
  color: var(--sel-ink, #2452a2);
}
.badge.pending {
  background: var(--warn-soft, #f6efdd);
  color: var(--warn-ink, #785b21);
}
.badge.resolved {
  background: var(--subtle, #eef1f8);
  color: var(--subtle-ink, #5a6882);
}
.dot {
  height: 6px;
  width: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.ticket-detail {
  min-width: 0;
}
.ticket-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 10px;
}
.message.internal .message-meta {
  color: var(--note-ink);
  font-weight: 650;
}
.message.internal .avatar {
  background: var(--note-avatar, #f0e3b6);
  color: var(--note-ink);
}
.message.reply .avatar {
  background: var(--sel-bg, #e0edff);
  color: var(--sel-ink, #2452a2);
}
.composer {
  border: 1px solid var(--composer-line, #c2d5f2);
  border-radius: var(--radius);
  margin-top: 25px;
  overflow: visible;
  background: var(--surface, white);
}
.composer.note-mode {
  border-color: var(--note-border, #d0b56a);
  background: var(--note);
}
.composer-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 11px;
  border-bottom: 1px solid var(--soft-line, #dee8f7);
  flex-wrap: wrap;
}
.composer-head button {
  border: 0;
  background: transparent;
  padding: 7px 9px;
  font-size: 12px;
  min-height: 36px;
}
.composer-head button[aria-pressed='true'] {
  background: var(--accent-soft);
  color: var(--sel-ink, #214fa7);
  font-weight: 650;
}
.composer.note-mode .composer-head button[aria-pressed='true'] {
  background: var(--note-head, #eee0b1);
  color: var(--note-head-ink, #664b12);
}
.composer textarea:focus-visible {
  outline: 2px solid var(--focus, #3478f6);
  outline-offset: -4px;
}
.composer-foot {
  padding: 11px 14px;
  border-top: 1px solid var(--soft-line, #dee8f7);
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.composer.note-mode .primary {
  background: var(--note-button, #73571d);
  border-color: var(--note-button, #73571d);
}
.field {
  display: grid;
  gap: 6px;
  margin-bottom: 20px;
  min-width: 0;
}
.contact-company {
  font-size: 11px;
  color: var(--ink-soft, #61758f);
  margin-top: 11px;
}
.empty-state {
  padding: 35px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.empty-state p {
  margin-bottom: 12px;
}
.report-intro {
  font-size: 13px;
  color: var(--muted);
  max-width: 700px;
  margin-bottom: 26px;
}
.bar-row {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) 20px;
  gap: 12px;
  align-items: center;
  font-size: 12px;
  margin: 18px 0;
}
.bar-track {
  height: 9px;
  background: var(--chart-track, #edf3fc);
  border-radius: 3px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: var(--chart, #3273d6);
  border-radius: 3px;
}
.bar-value {
  text-align: right;
  color: var(--muted);
}
dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0;
  width: min(530px, calc(100vw - 28px));
  box-shadow: 0 22px 90px var(--shadow, #10264c30);
  color: var(--ink);
}
dialog::backdrop {
  background: #10264c60;
}
.dialog-head {
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.dialog-head h2 {
  font-size: 18px;
}
.dialog-body {
  padding: 22px 24px;
}
.dialog-body p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 20px;
}
.dialog-body label {
  font-size: 12px;
  font-weight: 550;
  display: block;
  margin: 14px 0 6px;
}
.dialog-foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 17px 24px;
  border-top: 1px solid var(--line);
  background: var(--canvas-2, #f8faff);
}
.icon-button {
  border: 0;
  background: transparent;
  font-size: 23px;
  line-height: 1;
  padding: 8px;
  min-height: 38px;
  min-width: 38px;
}
.status-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--toast-bg, #18365f);
  color: var(--toast-ink, white);
  box-shadow: 0 5px 20px var(--shadow, #10264c20);
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 12px;
  max-width: calc(100% - 28px);
  z-index: 5;
}
.status-toast:empty {
  display: none;
}
[hidden] {
  display: none !important;
}
.skip-link {
  position: fixed;
  left: 10px;
  top: -100px;
  background: white;
  padding: 10px;
  z-index: 10;
}
.skip-link:focus {
  top: 10px;
}
.row-top > span:first-child {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.row-top > span:last-child {
  flex: none;
}
.message-top > div:not(.avatar) {
  min-width: 0;
  overflow-wrap: anywhere;
}
@media (max-width: 1280px) {
  .brand {
    font-size: 21px;
    gap: 6px;
  }
}
@media (max-width: 950px) {
  .brand {
    padding: 0;
  }
}
@media (max-width: 760px) {
  .brand {
    font-size: 21px;
  }
  .brand-mark {
    width: 25px;
    height: 25px;
  }
  .nav {
    display: flex;
    gap: 5px;
  }
  .page-head .button {
    font-size: 12px;
  }
  .ticket-preview {
    margin-bottom: 8px;
  }
  .prototype-banner {
    font-size: 10px;
    padding: 8px 10px;
  }
  .composer-foot .button {
    font-size: 12px;
  }
  .dialog-body,
  .dialog-head,
  .dialog-foot {
    padding-left: 18px;
    padding-right: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
.icon-definitions {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.connection-view {
  min-height: 75vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  text-align: center;
  padding: 30px;
}
.connection-view .brand-mark {
  color: var(--accent);
}
.auth-view {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(480px, 1.1fr);
  min-height: calc(100vh - 35px);
}
.auth-card #signup-fields {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.auth-card .optional-label {
  font-weight: 400;
  color: var(--muted);
}
.auth-card .signup-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 21px;
}
.auth-card .signup-consent input {
  width: 16px;
  min-height: 16px;
  flex: 0 0 16px;
  margin: 3px 0;
  accent-color: var(--accent);
}
.auth-card .signup-consent label {
  margin: 0;
  font-size: 11px;
  line-height: 1.7;
  font-weight: 400;
}
.auth-card .address-field {
  display: flex;
  align-items: stretch;
}
.auth-card .address-field input {
  flex: 1 1 auto;
  min-width: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.auth-card .address-suffix {
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid #cbd7e8;
  border-left: 0;
  border-radius: 0 6px 6px 0;
  background: var(--canvas);
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.signup-honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.signup-limit {
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 17px;
}
.signup-complete {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--accent-soft);
}
.signup-complete h3 {
  font-size: 18px;
  margin: 0 0 12px;
}
.signup-complete p {
  font-size: 12px;
  line-height: 1.7;
  margin-top: 12px;
}
.signup-complete .button {
  width: 100%;
  margin-top: 12px;
}
.auth-card #signup-error {
  margin-top: 15px;
}
.auth-story {
  background: var(--nav);
  color: white;
  padding: 55px max(36px, 7vw);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 80px;
}
.auth-story .brand {
  padding: 0;
}
.auth-story .eyebrow {
  color: #a4c8ff;
  margin-bottom: 20px;
}
.auth-story h1 {
  font-size: clamp(32px, 3vw, 48px);
  line-height: 1.17;
  letter-spacing: -1.6px;
  max-width: 450px;
}
.auth-story p:not(.eyebrow) {
  color: #b5c9e6;
  margin-top: 24px;
  line-height: 1.8;
  max-width: 440px;
}
.auth-story .auth-story-foot {
  font-size: 11px;
}
.auth-panel {
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px 36px;
}
.auth-card {
  width: 100%;
  max-width: 400px;
}
.auth-switch {
  display: flex;
  border-bottom: 1px solid var(--line);
  gap: 16px;
  margin-bottom: 33px;
}
.auth-switch button {
  border: 0;
  border-radius: 0;
  background: none;
  padding: 10px 0 13px;
  font-size: 12px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
}
.auth-switch button[aria-pressed='true'] {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 650;
}
.auth-card h2 {
  font-size: 26px;
  letter-spacing: -0.8px;
  margin-bottom: 6px;
}
.auth-card > .muted {
  font-size: 13px;
  margin-bottom: 23px;
}
.auth-card label {
  display: block;
  font-size: 12px;
  font-weight: 550;
  margin: 16px 0 6px;
}
.auth-card input {
  min-height: 42px;
}
.auth-card .primary {
  width: 100%;
  margin-top: 25px;
  min-height: 43px;
}
.auth-limit {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 24px;
}
.form-help {
  font-size: 11px;
  color: var(--muted);
  margin-top: 7px;
}
.error-message {
  background: var(--danger-soft, #fff1f0);
  border: 1px solid var(--danger-line, #efc9c5);
  color: var(--danger-ink, #8d3028);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.notice-message {
  background: var(--info-soft, #edf4ff);
  border: 1px solid var(--accent-line, #d6e3fc);
  color: var(--info-ink, #345d95);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 12px;
}
.inline-error {
  margin: 10px 14px;
}
.filters {
  flex-wrap: wrap;
  gap: 2px;
}
.filter {
  padding-left: 7px;
  padding-right: 7px;
}
.badge.new {
  background: var(--violet-soft, #e9edff);
  color: var(--violet-ink, #4c4c9f);
}
.badge.solved,
.badge.closed {
  background: var(--subtle, #eef1f8);
  color: var(--subtle-ink, #5a6882);
}
.empty-state {
  overflow-wrap: anywhere;
}
.empty-state .button {
  font-size: 12px;
  margin-top: 12px;
}
.empty-state h2 {
  font-size: 16px;
  margin: 8px 0;
}
.empty-state p {
  line-height: 1.7;
}
.queue .empty-state {
  font-size: 12px;
}
.dialog-body .error-message {
  color: var(--danger-ink, #8d3028);
}
.dialog-body select {
  width: 100%;
}
.ticket-row:disabled {
  opacity: 1;
  cursor: wait;
}
@media (max-width: 950px) {
  .auth-view {
    grid-template-columns: minmax(270px, 0.8fr) minmax(400px, 1.2fr);
  }
  .auth-story {
    padding: 35px 28px;
  }
  .auth-story h1 {
    font-size: 35px;
  }
  .auth-panel {
    padding: 36px 28px;
  }
}
@media (max-width: 760px) {
  .auth-view {
    display: block;
  }
  .auth-story {
    padding: 26px;
    gap: 24px;
  }
  .auth-story > div:not(.brand),
  .auth-story .auth-story-foot {
    display: none;
  }
  .auth-panel {
    padding: 35px 24px;
  }
  .auth-switch {
    margin-bottom: 27px;
  }
  .ticket-meta {
    flex-wrap: wrap;
  }
  .auth-card h2 {
    font-size: 24px;
  }
  .bar-row {
    grid-template-columns: 65px minmax(0, 1fr) 24px;
  }
  .dialog-body {
    padding-top: 16px;
    padding-bottom: 16px;
  }
  .dialog-body p {
    margin-bottom: 14px;
  }
}
.report-meter {
  width: 100%;
  height: 10px;
  border: 0;
  appearance: none;
  background: var(--chart-track, #edf3fc);
  border-radius: 3px;
  overflow: hidden;
}
.report-meter::-webkit-meter-bar {
  background: var(--chart-track, #edf3fc);
  border: 0;
  border-radius: 3px;
}
.report-meter::-webkit-meter-optimum-value {
  background: var(--chart, #3273d6);
  border-radius: 3px;
}
.report-meter::-moz-meter-bar {
  background: var(--chart, #3273d6);
  border-radius: 3px;
}
.management-toolbar h2 {
  margin-bottom: 4px;
}
.management-toolbar p {
  font-size: 12px;
  color: var(--muted);
}
.management-search {
  display: flex;
  gap: 8px;
  align-items: end;
  flex: 1;
  max-width: 460px;
}
.management-search > div {
  flex: 1;
  min-width: 0;
}
.directory-filter-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  padding: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.directory-filter-trigger:hover,
.directory-filter-trigger[data-active='true'] {
  color: var(--accent);
}
.directory-filter-indicator {
  font-size: 10px;
}
.directory-filter-dialog {
  position: fixed;
  margin: 0;
  width: min(300px, calc(100vw - 24px));
  max-height: calc(100svh - 24px);
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 12px 40px var(--shadow, #192b4726);
  font-size: 13px;
  white-space: normal;
}
.directory-filter-dialog::backdrop {
  background: transparent;
}
.directory-filter-dialog fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.directory-filter-dialog legend {
  font-weight: 600;
  margin-bottom: 12px;
}
.directory-filter-option {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 7px 0;
  cursor: pointer;
}
.directory-filter-option input {
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
}
.directory-filter-range {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}
.directory-filter-range input {
  width: 100%;
}
.directory-filter-actions,
.directory-filter-selection {
  display: flex;
  justify-content: space-between;
  gap: 6px;
}
.directory-filter-actions {
  margin-top: 18px;
}
.directory-filter-selection {
  margin-bottom: 8px;
}
.directory-filter-selection .button {
  border: 0;
  padding: 0;
  min-height: 28px;
  color: var(--accent);
}
#management-content[data-loading='true'] .management-table-wrap {
  opacity: 0.55;
  pointer-events: none;
}
.management-search label,
.management-form label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 7px;
}
.management-form {
  display: grid;
  gap: 17px;
  max-width: 660px;
}
.management-form select {
  width: 100%;
}
.management-form .button {
  justify-self: start;
}
.management-card-body > p {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 17px;
}
.management-table-wrap {
  width: 100%;
  overflow: auto;
}
.management-table tr:last-child td {
  border-bottom: 0;
}
.management-pagination {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-top: 17px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}
.management-pagination > div {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.pagination-size {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.pagination-size select {
  width: 76px;
  min-height: 34px;
  font-size: 12px;
}
.management-invitations {
  margin-top: 28px;
}
.management-invitations > summary {
  cursor: pointer;
  font-size: 17px;
  font-weight: 600;
  padding: 12px 0;
}
.management-invitations[open] > summary {
  margin-bottom: 12px;
}
.management-pagination .button {
  font-size: 12px;
}
.management-back {
  margin-bottom: 18px;
}
.membership-summary {
  background: var(--canvas-2, #f5f8fe);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.badge.active {
  background: var(--ok-soft, #eaf5ef);
  color: var(--ok-ink, #276948);
}
.badge.inactive {
  background: var(--danger-soft, #f5edef);
  color: var(--danger-ink, #864354);
}
.management-timezone {
  font-size: 11px;
  color: var(--muted);
  margin-top: 13px;
}
.empty-workspace {
  max-width: 680px;
  margin: 35px auto;
  padding: 35px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--canvas);
}
.empty-workspace h2 {
  margin-bottom: 12px;
}
.empty-workspace p {
  color: var(--muted);
  line-height: 1.8;
}
@media (max-width: 760px) {
  .management-search {
    max-width: none;
    flex-basis: 100%;
  }
  .management-form .button {
    width: 100%;
    justify-self: stretch;
  }
  .management-pagination {
    align-items: flex-start;
  }
  .empty-workspace {
    margin: 0;
    padding: 25px;
  }
}
.workspace-topbar .identity-strip {
  display: grid;
  gap: 2px;
  padding: 0;
  border: 0;
  background: none;
  min-width: 0;
  min-height: 0;
  font-size: 13px;
}
.profile-menu button:disabled {
  opacity: 0.4;
}
.queue-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 13px 16px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}
.queue-pagination .button {
  min-height: 32px;
  padding: 4px 10px;
}
@media (min-width: 761px) {
  .queue .tickets {
    max-height: max(280px, calc(100vh - 390px));
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}
#reports-state .button {
  margin: 8px 4px;
}
#reports-state {
  max-width: 620px;
  margin: 20px auto;
}
@media (max-width: 760px) {
  .workspace-topbar .identity-strip {
    display: none;
  }
  .queue-pagination {
    padding: 10px 18px;
  }
}

/* Workspace: a sidebar and the page (VOVA-075). */
.main {
  min-width: 0;
  width: 100%;
  background: var(--page, white);
}

.organization-picker {
  min-width: 0;
  max-width: 300px;
  padding-left: 22px;
  border-left: 1px solid var(--line);
}
.organization-picker select {
  width: 100%;
  border: 0;
  font-size: 13px;
  padding: 8px 26px 8px 0;
  text-overflow: ellipsis;
}
.workspace-context {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  overflow-wrap: anywhere;
  min-width: 0;
}
.shell[data-scope='platform'] .workspace-context {
  color: var(--warn-ink, #7c551a);
}

.nav-count {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.profile-area {
  position: relative;
  flex: none;
}
.profile-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 99px;
  min-height: 42px;
}
.profile-toggle:hover,
.profile-toggle[aria-expanded='true'] {
  background: var(--accent-soft);
}
.profile-toggle .avatar {
  background: var(--accent-soft);
  color: #2452a2;
  border-radius: 50%;
  width: 32px;
  height: 32px;
}

.profile-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 9px);
  width: 280px;
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 100px);
  overflow: auto;
  padding: 7px;
  background: var(--surface, white);
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: 0 12px 35px var(--shadow, #182c4b18);
}
.profile-identity {
  display: grid;
  gap: 3px;
  padding: 12px 12px 15px;
  overflow-wrap: anywhere;
}
.profile-identity strong {
  font-size: 14px;
  font-weight: 600;
}
.profile-identity > span {
  font-size: 12px;
  color: var(--muted);
}
.profile-group {
  display: grid;
  gap: 2px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
/* VOVA-079: a menu group whose items are all hidden takes no room. */
.profile-group:not(:has(> :not([hidden]))) {
  display: none;
}
.menu-heading {
  padding: 2px 12px 7px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}
.profile-menu button,
.profile-menu a {
  display: block;
  width: 100%;
  padding: 9px 12px;
  text-align: left;
  border: 0;
  background: none;
  min-height: 38px;
  border-radius: 5px;
  font-size: 13px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 400;
}
.profile-menu button:hover,
.profile-menu a:hover,
.profile-menu button[aria-current='page'] {
  background: var(--accent-soft);
  color: var(--sel-ink, #214fa7);
}
.profile-signout {
  padding-top: 7px;
  border-top: 1px solid var(--line);
}
.profile-signout button {
  color: var(--danger-ink, #724550);
}
.page-head {
  padding: 28px 32px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.page-head h1 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.7px;
  line-height: 1.3;
}
.page-head p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 6px;
}
.count-pill {
  display: inline-block;
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 0;
  font-weight: 400;
}
.head-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.head-actions .button {
  white-space: nowrap;
  font-size: 12px;
}
#refresh {
  border-color: transparent;
  color: var(--muted);
}
.workspace-error {
  margin: 12px 32px;
}
.section-tabs {
  display: flex;
  gap: 24px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: var(--page, white);
  overflow-x: auto;
}
.section-tabs button {
  flex: none;
  padding: 12px 0;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: none;
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
  min-height: 44px;
}
.section-tabs button:hover {
  color: var(--ink);
}
.section-tabs button[aria-current='page'] {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* Work: queue and conversation. Frequent controls stay above the thread. */
.inbox-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  min-height: calc(100dvh - 286px);
}
.queue {
  min-width: 0;
  border-right: 1px solid var(--line);
  background: var(--page, white);
}
.queue-tools {
  padding: 20px 18px 12px;
}
.search-wrap input {
  padding-left: 33px;
  background: var(--canvas);
  border-color: transparent;
  font-size: 12px;
  min-height: 39px;
}
.queue-caption {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 20px 12px;
  font-size: 11px;
  color: var(--muted);
}
.tickets {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  padding: 0 8px;
}
.ticket-row {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  text-align: left;
  padding: 15px 12px;
  position: relative;
  margin-bottom: 3px;
}
.ticket-row:hover {
  background: var(--canvas);
}
.ticket-row[aria-pressed='true'] {
  background: var(--accent-soft);
  border-bottom-color: transparent;
  box-shadow: none;
}
.ticket-subject {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 7px 0 5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.ticket-group-heading {
  padding: 14px 12px 10px;
  font-size: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  overflow-wrap: anywhere;
  background: var(--canvas);
  border-radius: 5px;
}
.ticket-group-heading span {
  font-weight: 400;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
#detail-content {
  max-width: 1100px;
  margin: 0 auto;
}
.ticket-head {
  padding: 26px 32px 20px;
}
.ticket-head h2 {
  font-size: 22px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  font-weight: 600;
}
.ticket-requester {
  font-size: 12px;
  color: var(--muted);
  margin-top: 9px;
  overflow-wrap: anywhere;
}
.ticket-controls {
  display: grid;
  grid-template-columns: minmax(100px, 150px) minmax(140px, 240px) auto;
  align-items: end;
  gap: 14px 20px;
  margin: 0 32px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.ticket-controls .field {
  margin: 0;
}
.field label,
.field-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}
.field select {
  font-size: 13px;
  width: 100%;
  padding: 7px 9px;
  min-height: 36px;
}
.ticket-properties {
  display: block;
  grid-column: 1 / -1;
  min-width: 0;
}
.ticket-properties > summary {
  width: fit-content;
  margin-left: auto;
  cursor: pointer;
  padding: 8px 0 8px 12px;
  color: var(--accent);
  font-size: 12px;
}
.ticket-properties[open] > .properties {
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: minmax(100px, 150px) minmax(100px, 1fr) minmax(100px, 1fr);
  align-items: start;
  gap: 16px 20px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.properties-foot {
  grid-column: 1/-1;
  font-size: 11px;
  color: var(--muted);
}
.source {
  color: var(--ink);
  font-size: 13px;
}
.contact-card {
  min-width: 0;
  overflow-wrap: anywhere;
}
.contact-card .avatar {
  display: none;
}
.contact-name {
  font-size: 13px;
  margin-top: 6px;
  font-weight: 500;
}
.contact-email {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}
.property-error {
  margin: 14px 32px;
}
.detail-body {
  min-width: 0;
}
.conversation {
  padding: 26px 32px 32px;
  min-width: 0;
}
.day-divider {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 18px;
}
.day-divider:before,
.day-divider:after {
  display: none;
}
.message {
  margin-bottom: 22px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface, white);
  overflow: hidden;
}
.message.internal {
  background: var(--note);
  border: 1px solid var(--note-line, #e9dcae);
  border-left: 3px solid var(--note-strong, #b4882a);
  border-radius: 6px;
}
.message-top {
  padding: 6px 0 0;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.message.internal .message-top {
  padding: 14px 16px 0;
}
.message-author {
  font-size: 13px;
  font-weight: 600;
}
.message-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
  max-width: 100%;
}
.message-time {
  font-size: 11px;
  color: var(--muted);
  margin-left: auto;
  align-self: flex-start;
  white-space: nowrap;
}
.message-body {
  padding: 15px 0 24px 40px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.75;
  max-width: 85ch;
}
.message.internal .message-body {
  padding: 12px 16px 17px;
}
.composer-recipient {
  padding: 12px 17px 0;
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.composer textarea {
  border: 0;
  background: transparent;
  padding: 12px 17px;
  min-height: 138px;
  font-size: 14px;
  display: block;
  resize: vertical;
}
.composer-foot .small {
  font-size: 11px;
  color: var(--muted);
}

/* Reports: numbers and aligned charts instead of nested cards. */
.reports {
  padding: 12px 32px 36px;
  max-width: 1600px;
  margin: auto;
}
.stat-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px;
  padding: 0 0 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
}
.stat-card {
  min-width: 0;
}
.stat-card .eyebrow {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 400;
}
.report-link {
  appearance: none;
  border: 0;
  border-radius: 4px;
  padding: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.18em;
}
.report-link:hover,
.report-link:focus-visible {
  text-decoration-color: currentColor;
}
.report-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}
.stat-value {
  font-size: 32px;
  letter-spacing: -0.8px;
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
}
.report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.report-card {
  min-width: 0;
  padding: 0;
}
.report-card h2 {
  font-size: 16px;
}
.report-card p {
  font-size: 12px;
  color: var(--muted);
  margin: 5px 0 24px;
}
.report-updated {
  font-size: 12px;
  color: var(--muted);
  margin-top: 28px;
}

/* Administration: full-width tables and identifiers available on demand. */
.management-view {
  padding: 26px 32px 36px;
}
.management-content,
.management-stack {
  display: grid;
  gap: 24px;
  min-width: 0;
}
.management-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.management-card {
  background: transparent;
  min-width: 0;
}
/* Settings sections share the page surface; controls keep their own boundaries.
   Name buttons provide visible keyboard focus and directory row navigation. */
.shell[data-scope='platform'] .management-toolbar {
  margin-bottom: 0;
}
.management-table:has(.management-open-row) {
  border-collapse: separate;
  border-spacing: 0;
}
.management-open-row {
  cursor: pointer;
}
.management-open-row:hover,
.management-open-row:focus-within {
  background: var(--hover-bg, var(--surface));
}
.management-open-row td {
  vertical-align: middle;
}
.management-table .management-open-row td:first-child {
  padding-left: 12px;
  border-radius: 8px 0 0 8px;
}
.management-table .management-open-row td:last-child {
  padding-right: 12px;
  border-radius: 0 8px 8px 0;
}
.platform-user-page {
  display: grid;
  gap: 24px;
  min-width: 0;
}
.platform-user-page > .management-back {
  justify-self: start;
  margin: 0;
}
.platform-user-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.platform-user-heading h2 {
  margin: 0 0 4px;
  font-size: 22px;
  overflow-wrap: anywhere;
}
.platform-user-heading p {
  margin: 0;
  overflow-wrap: anywhere;
}
.platform-user-avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 14px;
  background: var(--surface);
  font-weight: 600;
}
.platform-user-panel {
  display: grid;
  gap: 24px;
  min-width: 0;
}
.management-facts.platform-user-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 0 32px;
  max-width: 1040px;
}
.platform-user-facts > div {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.platform-user-security {
  max-width: 760px;
}
.platform-user-security-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 12px 0 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.management-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0 0 18px;
}
.management-card-head h2 {
  font-size: 17px;
  overflow-wrap: anywhere;
}
.management-card-body {
  padding: 4px 0 24px;
}
.management-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
  text-align: left;
}
.management-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
}
.management-table td,
.management-table th {
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.management-table td:first-child,
.management-table th:first-child {
  padding-left: 0;
  min-width: 220px;
}
.management-table td:last-child,
.management-table th:last-child {
  padding-right: 0;
}
.management-table td {
  overflow-wrap: anywhere;
  min-width: 100px;
  max-width: 420px;
}
.management-table .cell-main {
  font-weight: 500;
  margin-bottom: 4px;
  font-size: 14px;
}
.management-table .cell-sub {
  font-size: 12px;
  color: var(--muted);
}
.management-table .button {
  font-size: 12px;
  min-height: 34px;
  padding: 6px 10px;
  white-space: nowrap;
}
.identity-details {
  margin-top: 7px;
}
.identity-details > summary {
  width: fit-content;
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
}
.id-value {
  font-size: 11px;
  overflow-wrap: anywhere;
  color: var(--muted);
  display: block;
  margin: 5px 0;
}
.copy-button {
  border: 0;
  background: none;
  color: var(--accent);
  padding: 4px 0;
  font-size: 11px;
  min-height: 28px;
}
.copy-button:hover {
  text-decoration: underline;
}
.management-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  max-width: 1000px;
}
.management-facts dt {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.management-facts dd {
  margin: 0;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.management-facts .fact-action {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: start;
  max-width: 100%;
}
.management-facts .fact-action:hover {
  text-decoration: underline;
}
.management-facts .fact-action .id-value {
  margin: 0;
}
.organization-language-fact select {
  width: 160px;
  min-height: 32px;
  padding: 4px 8px;
  font: inherit;
}
.management-notice {
  padding: 0;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 24px;
  max-width: 90ch;
  line-height: 1.7;
}

.organization-page {
  display: grid;
  gap: 24px;
  min-width: 0;
}
.organization-page > .management-back {
  justify-self: start;
  margin: 0;
  min-height: 34px;
  padding: 6px 10px;
  font-size: 12px;
}
.organization-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.organization-heading .organization-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.organization-access {
  padding: 4px 9px;
  border-radius: 5px;
  background: var(--accent-soft, #edf3ff);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.section-tabs.organization-tabs {
  padding: 0;
  gap: 28px;
}
.organization-tabs button[aria-selected='true'] {
  border-bottom-color: var(--accent);
  color: var(--accent);
}
.organization-tab-panel {
  min-width: 0;
}
.organization-settings {
  display: grid;
  gap: 24px;
  max-width: 680px;
}
.organization-settings .management-notice,
.organization-overview .management-notice {
  margin-bottom: 0;
}

/* Responsive layouts keep navigation labels and organization scope visible. */
@media (min-width: 1550px) {
  .inbox-layout {
    grid-template-columns: 330px minmax(0, 1fr);
  }
}
@media (max-width: 1050px) {
  .page-head {
    padding-left: 24px;
    padding-right: 24px;
  }
  .inbox-layout {
    grid-template-columns: 260px minmax(0, 1fr);
  }
  .ticket-head,
  .conversation {
    padding-left: 24px;
    padding-right: 24px;
  }
  .ticket-controls {
    margin: 0 24px;
    gap: 14px 12px;
  }
  .property-error {
    margin: 14px 24px;
  }
  .organization-picker {
    max-width: 250px;
  }
}
@media (max-width: 760px) {
  .page-head {
    padding: 23px 18px 18px;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 14px;
  }
  .page-head h1 {
    font-size: 23px;
  }
  .page-head p {
    font-size: 12px;
  }
  .head-actions {
    margin-left: auto;
  }
  .section-tabs {
    padding: 0 18px;
    gap: 20px;
  }

  .workspace-error {
    margin: 12px 18px;
  }
  .inbox-layout {
    display: block;
  }
  .queue {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .queue-tools {
    padding: 17px 18px 12px;
  }
  .tickets {
    max-height: 290px;
    overflow: auto;
  }
  .ticket-head,
  .conversation {
    padding: 22px 18px;
  }
  .ticket-head h2 {
    font-size: 20px;
  }
  .ticket-controls {
    margin: 0 18px;
    grid-template-columns: minmax(90px, 1fr) minmax(100px, 1.3fr) auto;
    gap: 14px 10px;
  }
  .ticket-controls .field select {
    font-size: 12px;
    padding-left: 6px;
    padding-right: 2px;
  }
  .ticket-properties > summary {
    padding-left: 0;
  }
  .ticket-properties[open] > .properties {
    grid-template-columns: 1fr 1fr;
  }
  .contact-card {
    grid-column: 1/-1;
  }
  .property-error {
    margin: 14px 18px;
  }
  .message-body {
    padding-left: 0;
  }
  .message-time {
    width: 100%;
    margin-left: 40px;
  }
  .reports {
    padding: 12px 18px 28px;
  }
  .stat-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px 12px;
  }
  .stat-card .eyebrow {
    font-size: 11px;
  }
  .stat-value {
    font-size: 29px;
  }
  .report-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .management-view {
    padding: 22px 18px 30px;
  }
  .management-facts {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .management-table td,
  .management-table th {
    padding: 14px 13px;
  }
}
@media (max-width: 370px) {
  .stat-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (pointer: coarse) {
  .profile-toggle,
  .section-tabs button,
  .profile-menu button,
  .profile-menu a,
  .button,
  .ticket-properties > summary {
    min-height: 44px;
  }
  input,
  textarea,
  select {
    font-size: 16px;
  }
}

.email-settings {
  max-width: 880px;
}
.email-settings .management-form {
  max-width: 620px;
}
.email-authorization {
  display: grid;
  gap: 14px;
  justify-items: start;
  padding: 20px 0;
}
.email-device-code {
  font-size: 1.5rem;
  letter-spacing: 0.12em;
  padding: 12px 16px;
  background: var(--sel-bg, #eef4ff);
  border-radius: 8px;
}
.email-test-preview {
  margin: 20px 0;
}
.email-test-preview summary {
  cursor: pointer;
}
.email-test-preview pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  color: var(--ink-soft, #52627a);
}

/* Slack setup and escalation use the shared quiet form vocabulary. */
.slack-settings {
  max-width: 960px;
}
.slack-rule,
.escalation-panel {
  border: 1px solid var(--line, #d9e2f0);
  border-radius: 10px;
  padding: 16px;
}
.slack-rule summary,
.escalation-panel summary {
  cursor: pointer;
  font-weight: 600;
}
.slack-rule-body {
  display: grid;
  gap: 12px;
  padding-top: 16px;
}
.slack-rule-body input,
.slack-rule-body select {
  width: 100%;
  min-width: 0;
}
.slack-field-mapping {
  display: grid;
  grid-template-columns: 20px minmax(90px, 1fr) minmax(0, 2fr);
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}
.slack-field-mapping input[type='checkbox'],
.slack-check input {
  width: auto;
}
.slack-check {
  display: flex;
  gap: 10px;
  align-items: center;
}
.escalation-panel {
  margin-top: 20px;
}
.escalation-panel .management-form {
  margin-top: 16px;
}
.escalation-panel textarea {
  min-height: 110px;
}
.escalation-output {
  overflow-wrap: anywhere;
}
.escalation-output:empty {
  display: none;
}
.feature-switch {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.feature-switch input {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--blue, #245be8);
}
.feature-switch input[role='switch'] {
  appearance: none;
  width: 38px;
  height: 22px;
  padding: 2px;
  border-radius: 20px;
  border: 1px solid var(--switch-off, #93a4bb);
  background: var(--switch-off, #93a4bb);
  flex-shrink: 0;
  cursor: pointer;
}
.feature-switch input[role='switch']::before {
  content: '';
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
}
.feature-switch input[role='switch']:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.feature-switch input[role='switch']:checked::before {
  transform: translateX(16px);
}
@media (forced-colors: active) {
  .feature-switch input[role='switch'] {
    appearance: auto;
  }
  .feature-switch input[role='switch']::before {
    display: none;
  }
}
.channel-settings {
  max-width: 960px;
}
.organization-settings {
  max-width: 960px;
  width: 100%;
  gap: 28px;
}
.settings-group > h2 {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 4px;
}
.settings-save-bar {
  display: flex;
}
.settings-save-bar > .button {
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 12px;
}
.settings-save-bar > .button:disabled:not(.primary) {
  background: var(--surface, white);
  border-color: var(--line);
  color: var(--muted);
  opacity: 1;
}
.settings-save-feedback .error-message {
  margin: 4px 0 0;
}
.management-tab-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: var(--page, white);
}
.management-tab-bar:has(.settings-save-bar) {
  position: sticky;
  top: 0;
  z-index: 9;
}
.management-tab-bar > .section-tabs {
  min-width: 0;
  padding: 0;
  border-bottom: 0;
}
.settings-actions {
  flex-shrink: 0;
  padding: 6px 0;
}
.settings-actions:empty,
.settings-actions:not(:has(> :not([hidden]))) {
  display: none;
}
.organization-tab-bar {
  padding: 0;
}
@media (max-width: 760px) {
  .management-tab-bar {
    gap: 12px;
    padding: 0 18px;
  }
  .organization-tab-bar {
    padding: 0;
  }
  .management-tab-bar > .section-tabs {
    gap: 16px;
  }
}
.organization-settings .channel-section {
  padding: 16px 0;
}
.organization-settings .channel-heading {
  flex-direction: row;
  align-items: center;
}
.organization-settings .channel-heading > div:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
.organization-settings .channel-heading h3 {
  font-size: 14px;
  margin-bottom: 4px;
}
.organization-settings .cell-sub {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}
.organization-settings .channel-configuration {
  margin-top: 4px;
}
.organization-settings .channel-configuration > summary {
  padding: 8px 0 0;
  font-size: 12px;
}
.channel-section {
  border-bottom: 1px solid var(--line);
  padding: 24px 0;
}
.channel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.channel-heading h3 {
  font-size: 16px;
  margin: 0 0 6px;
}
.channel-heading .feature-switch {
  margin: 0;
  flex-shrink: 0;
}
.channel-heading select {
  max-width: 250px;
}
.channel-configuration {
  margin-top: 20px;
}
.channel-configuration > summary {
  cursor: pointer;
  padding: 12px 0;
  font-weight: 600;
}
.channel-configuration-body {
  padding: 12px 0 0;
}
.member-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.member-link:hover {
  text-decoration: underline;
}
.ticket-events {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding: 16px 0;
}
.submit-action {
  position: relative;
  margin-left: auto;
  display: inline-flex;
  align-items: stretch;
  min-width: 224px;
}
.submit-action > .button:first-child {
  flex: 1;
  border-radius: 6px 0 0 6px;
}
.submit-action .status-toggle {
  width: 42px;
  min-width: 42px;
  margin: 0;
  padding: 0;
  border-left-color: #ffffff66;
  border-radius: 0 6px 6px 0;
}
.status-toggle[aria-expanded='true'] svg {
  transform: rotate(180deg);
}
.composer.note-mode .status-toggle {
  border-left-color: #ffffff66;
}
.submit-status-menu {
  position: absolute;
  z-index: 20;
  bottom: calc(100% + 8px);
  right: 0;
  width: 100%;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface, white);
  box-shadow: 0 8px 28px var(--shadow, #142c5026);
}
.submit-status-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-size: 13px;
  font-weight: 500;
}
.submit-status-menu button::before {
  content: '';
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  border-radius: 2px;
  background: #8996a8;
}
.submit-status-menu [data-reply-status='new']::before {
  background: #dba13a;
}
.submit-status-menu [data-reply-status='open']::before {
  background: #e45d6b;
}
.submit-status-menu [data-reply-status='pending']::before {
  background: #299acf;
}
.submit-status-menu [data-reply-status='closed']::before {
  background: #536175;
}
.submit-status-menu [aria-checked='true'] {
  background: var(--accent-soft);
}
.submit-status-menu [aria-checked='true']::after {
  content: '✓';
  margin-left: auto;
  color: var(--accent);
}
.submit-status-menu button:hover,
.submit-status-menu button:focus-visible {
  background: var(--hover-bg, #f0f5ff);
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.message.outgoing .message-top {
  flex-wrap: nowrap;
}
.message.outgoing .message-top > div:not(.avatar) {
  text-align: right;
}
.message.outgoing .message-time {
  margin-left: 0;
  margin-right: auto;
  width: auto;
}
.message.outgoing .message-body {
  margin-left: auto;
  padding-left: 0;
  padding-right: 40px;
  width: fit-content;
  min-width: min(60%, 500px);
}
.message-body {
  white-space: normal;
}
.message-text,
.quoted-text {
  white-space: pre-wrap;
}
.quoted-history {
  margin: 12px 0;
  color: var(--muted);
  font-size: 12px;
}
.quoted-history summary {
  width: fit-content;
  cursor: pointer;
}
.quoted-text {
  border-left: 2px solid var(--line);
  padding-left: 12px;
  margin-top: 10px;
}
@media (max-width: 600px) {
  .message.outgoing .message-body {
    padding-right: 0;
    min-width: 0;
    max-width: 100%;
  }
  .message.outgoing .message-time {
    white-space: normal;
    flex-shrink: 0;
    max-width: 35%;
  }
}
.ticket-events > summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
}
.ticket-events ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.message-event {
  border-top: 1px solid var(--line);
  padding: 12px 0;
  font-size: 13px;
}
.message-event p {
  margin: 4px 0;
}
@media (max-width: 600px) {
  .channel-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
}

.portal-auth-settings {
  margin-top: 32px;
}
.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.state-action {
  margin-top: 12px;
}
.connection-view a.button {
  text-decoration: none;
}
.portal-auth-fields {
  padding: 0;
}
.portal-auth-fields .channel-section {
  padding: 12px 0;
}

/* ANTON-006: Administration → Portal page blocks. */
.portal-blocks {
  display: grid;
  gap: 12px;
  margin: 12px 0;
}
.portal-block {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.portal-block-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.portal-block-head input[type='text'],
.portal-block-head input:not([type]) {
  flex: 1;
  min-width: 180px;
  font-weight: 600;
}
.portal-block-kind {
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
}
.portal-block-visible {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.portal-block-items {
  display: grid;
  gap: 8px;
}
.portal-block-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.portal-block-item.faq textarea,
.portal-block-item.starters textarea {
  grid-column: 1 / -1;
  resize: vertical;
}
.portal-block-item.links {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 2fr);
}
.portal-block-item.links > :nth-child(2) {
  order: 3;
}
.portal-block > .button,
.portal-block-adder {
  justify-self: start;
}
.portal-block-adder {
  display: flex;
  gap: 8px;
  align-items: center;
}
@media (max-width: 600px) {
  .portal-block-item.links {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .portal-block-item.links > :nth-child(3) {
    grid-column: 1 / -1;
  }
}

.portal-appearance-settings {
  margin-top: 12px;
}
.portal-appearance-image {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 8px 0 14px;
  border-bottom: 1px solid var(--line);
}
.portal-appearance-image .setting-description {
  flex: 1;
  min-width: 160px;
}
.portal-appearance-image h4 {
  margin: 0;
  font-size: 14px;
}
.portal-appearance-image .cell-sub {
  margin: 2px 0 0;
}
.portal-appearance-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.portal-appearance-actions a.button {
  color: var(--ink);
  text-decoration: none;
}
.portal-branding-preview {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  object-fit: contain;
}

.attachment-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
}
.attachment-picker[hidden],
.attachment-links[hidden] {
  display: none;
}
.attachment-picker ul {
  flex-basis: 100%;
  list-style: none;
  padding: 0;
  margin: 0;
}
.attachment-picker li {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-wrap: anywhere;
  padding: 4px 0;
}
.attachment-picker li button {
  padding: 4px 8px;
  margin-left: auto;
  font-size: 12px;
}
.attachment-links {
  list-style: none;
  margin: 12px 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.attachment-links a {
  display: block;
  padding: 8px 12px;
  border: 1px solid var(--soft-line, #d9e2f3);
  border-radius: 6px;
  overflow-wrap: anywhere;
  font-size: 13px;
}
.link-button {
  border: 0;
  background: none;
  padding: 0;
  color: var(--accent);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
}
.auth-forgot {
  margin-top: 14px;
}
.plain-fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.mfa-links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}
.security-heading {
  font-size: 15px;
  margin: 0 0 8px;
}
.security-password {
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 18px;
}
.security-password label {
  display: block;
  font-size: 12px;
  font-weight: 550;
  margin: 12px 0 6px;
}
.security-password .button {
  margin-top: 14px;
}
.security-body {
  max-width: 460px;
}
.security-qr {
  display: block;
  width: 180px;
  height: 180px;
  margin: 12px 0;
  image-rendering: pixelated;
}
.security-secret {
  font-size: 12px;
  word-break: break-all;
}
.recovery-codes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 18px;
  padding-left: 22px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
}
.dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
}
#security-setup .primary,
#security-disable .button {
  margin-top: 14px;
}
.trial-setting {
  display: grid;
  grid-template-columns: 1fr 5rem;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}
.trial-setting .cell-sub {
  grid-column: 1 / -1;
}
.billing-page {
  max-width: 76rem;
  width: 100%;
}
.billing-page [hidden] {
  display: none !important;
}
.billing-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.75rem;
}
.billing-tabs [aria-current='page'] {
  background: var(--accent-soft);
  color: var(--accent);
}
.billing-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.billing-summary-card {
  display: grid;
  align-content: start;
  gap: 0.5rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.billing-summary-card p {
  margin: 0;
}
.billing-summary-card .billing-price {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  overflow-wrap: anywhere;
}
.billing-plan,
.billing-calculator,
.billing-method-choice,
.billing-crypto {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.billing-plan > :first-child,
.billing-calculator > :first-child {
  margin-top: 0;
}
.billing-plan > :last-child {
  margin-bottom: 0;
}
.billing-plan-fields,
.billing-profile-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
.billing-plan-fields label,
.billing-profile-fields label {
  display: grid;
  gap: 0.6rem;
}
.billing-profile-fields :is(input, textarea) {
  width: 100%;
}
.billing-profile-fields .billing-recipients {
  grid-column: 1 / -1;
}
.billing-seat-stepper {
  display: flex;
  gap: 0.5rem;
}
.billing-seat-stepper input {
  min-width: 4rem;
  width: 7rem;
  text-align: center;
}
.billing-seat-stepper .button {
  min-width: 2.5rem;
}
.billing-breakdown {
  display: grid;
  gap: 0.75rem;
  margin: 1.5rem 0;
}
.billing-price-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.billing-calculated-total {
  display: grid;
  gap: 0.5rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}
.billing-calculated-total p {
  margin-bottom: 0;
}
.billing-sandbox-notice {
  color: var(--muted);
  font-size: 0.85rem;
}
.billing-address {
  overflow-wrap: anywhere;
  font-size: 0.85rem;
}
.billing-planned {
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}
.billing-planned > summary {
  cursor: pointer;
}
.billing-planned > section {
  margin-top: 1.5rem;
}
@media (max-width: 700px) {
  .billing-summary-grid,
  .billing-plan-fields,
  .billing-profile-fields {
    grid-template-columns: 1fr;
  }
  .billing-plan,
  .billing-calculator,
  .billing-method-choice,
  .billing-crypto {
    padding: 1rem;
  }
}
.billing-page > section {
  display: grid;
  gap: 0.6rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}
.billing-page > section:last-of-type {
  border-bottom: 0;
}
.billing-page > section > :is(h2, p) {
  margin: 0;
}
.billing-page > section > .button {
  justify-self: start;
}
.billing-controls {
  max-width: 52rem;
  gap: 12px;
  margin: 24px 0;
}
.billing-controls > label {
  display: grid;
  gap: 6px;
  max-width: 22rem;
}
.billing-controls .button {
  justify-self: start;
}
.billing-controls p {
  margin: 0;
}
.billing-change-preview {
  gap: 8px;
  margin-top: 8px;
}
.billing-price {
  font-size: 1.65rem;
  font-weight: 700;
}
.billing-trial {
  font-weight: 600;
}
.billing-card-details {
  display: grid;
  gap: 0.6rem;
  min-width: 0;
}
.billing-card-details > :is(h3, p) {
  margin: 0;
}
.billing-card-details > h3:not(:first-child) {
  margin-top: 1rem;
}
.billing-card-details > .button {
  justify-self: start;
}
.billing-invoices :is(td, th):first-child {
  min-width: 9rem;
}
.billing-invoices :is(td, th) {
  min-width: 5rem;
  padding: 0.8rem;
}
.billing-invoice-links .button {
  display: inline-block;
  white-space: nowrap;
  margin: 0 0.35rem 0.35rem 0;
}
.onboarding-steps {
  padding-left: 1.5rem;
}
.onboarding-steps li {
  padding: 0.25rem 0;
}
.onboarding-steps .button {
  white-space: normal;
  text-align: left;
}
.onboarding-done {
  color: var(--muted);
}
.billing-checkout {
  margin-top: 1rem;
}
.manual-plan-fields {
  display: grid;
  gap: 0.5rem;
  max-width: 36rem;
  margin-top: 1rem;
}
.manual-plan-fields[hidden] {
  display: none;
}

/* VOVA-011: selection, bulk changes, ticket edits and Deleted. */
.danger {
  color: var(--danger-ink, #9b2c22);
  border-color: var(--danger-line, #e5b8b2);
}
.danger:hover {
  background: var(--danger-soft, #fff1f0);
}
.danger[data-confirm='true'] {
  background: var(--danger, #b3261e);
  border-color: var(--danger, #b3261e);
  color: white;
}
.queue-caption {
  align-items: center;
}
.queue-caption-start {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.select-page {
  display: inline-flex;
  align-items: center;
  margin: 0;
}
.select-page input,
.ticket-check {
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  accent-color: var(--accent);
  flex: none;
}
.ticket-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  min-width: 0;
}
.ticket-item .ticket-check {
  margin: 17px 0 0 4px;
}
.ticket-item[data-selected='true'] .ticket-row {
  background: var(--accent-soft);
}
.bulk-bar {
  display: grid;
  gap: 8px;
  margin: 0 8px 10px;
  padding: 10px 12px;
  border: 1px solid var(--accent-line, #d6e3fc);
  border-radius: 8px;
  background: var(--sel-bg, #edf4ff);
}
.bulk-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--sel-ink, #214fa7);
}
.bulk-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.bulk-actions .button,
.ticket-head-actions .button,
.contact-card .button {
  min-height: 32px;
  padding: 5px 10px;
  font-size: 12px;
}
.bulk-actions .icon-button {
  margin-left: auto;
  min-height: 32px;
  min-width: 32px;
  padding: 4px;
  font-size: 20px;
}
.ticket-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.ticket-head-actions {
  display: flex;
  flex: none;
  gap: 6px;
  padding-top: 2px;
}
.subject-form {
  display: grid;
  flex: 1;
  gap: 4px;
  min-width: 0;
}
.subject-form input {
  width: 100%;
  min-width: 0;
  font-size: 20px;
  font-weight: 600;
  padding: 4px 8px;
}
/* VOVA-014: the whole subject is the edit control. */
.subject-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}
.subject-hit {
  position: absolute;
  inset: -4px -8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: text;
}
.subject-hit:hover,
.subject-hit:focus-visible {
  background: var(--hover-bg, #2a5bd70d);
  box-shadow: inset 0 0 0 1px var(--line);
}
.subject-hit:disabled {
  cursor: default;
  background: transparent;
  box-shadow: none;
}
.deleted-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin: 0 32px 16px;
  padding: 14px 16px;
  border: 1px solid var(--danger-line, #efc9c5);
  border-radius: 8px;
  background: var(--danger-soft, #fff6f5);
}
.deleted-title {
  font-weight: 600;
  color: var(--danger-ink, #8d3028);
}
.deleted-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.deleted-note {
  flex-basis: 100%;
  color: var(--muted);
}
.contact-card .button {
  margin-top: 10px;
}
.permission-note {
  margin-top: 4px;
}
@media (max-width: 760px) {
  .deleted-banner {
    margin: 0 18px 14px;
  }
  .ticket-title-row {
    flex-direction: column;
  }
}

/* VOVA-012: CCs and merged tickets. */
.cc-card {
  grid-column: 1 / -1;
  min-width: 0;
}
.cc-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
  padding: 0;
  list-style: none;
}
.cc-list li {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 2px 4px 2px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--canvas);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.cc-list li.empty {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
}
.cc-list .icon-button {
  min-height: 26px;
  min-width: 26px;
  padding: 2px;
  font-size: 16px;
}
.cc-form {
  display: flex;
  gap: 8px;
  max-width: 460px;
  margin-bottom: 6px;
}
.cc-form input {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  padding: 6px 9px;
}
.cc-form .button {
  flex: none;
  margin-top: 0;
}
.merged-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin: 0 32px 16px;
  padding: 12px 16px;
  border: 1px solid var(--accent-line, #d6e3fc);
  border-radius: 8px;
  background: var(--sel-bg, #edf4ff);
  color: var(--sel-ink, #214fa7);
  font-weight: 600;
}
.merged-banner .button {
  min-height: 32px;
  padding: 5px 10px;
  font-size: 12px;
}
.merge-results {
  margin: 12px 0 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.dialog-body .merge-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0 0 6px;
  cursor: pointer;
  font-weight: 400;
}
.merge-option input {
  width: 16px;
  height: 16px;
  margin: 3px 0 0;
  accent-color: var(--accent);
}
.merge-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.merge-option strong {
  display: block;
  overflow-wrap: anywhere;
}
.merge-option small {
  display: block;
  color: var(--muted);
  overflow-wrap: anywhere;
}
@media (max-width: 760px) {
  .merged-banner {
    margin: 0 18px 14px;
  }
}

/* VOVA-013: ticket fields. */
.ticket-fields {
  grid-column: 1 / -1;
  min-width: 0;
}
.ticket-fields-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 12px;
  margin-bottom: 8px;
}
.ticket-fields-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px 20px;
}
.ticket-field {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
}
.ticket-field-textarea {
  grid-column: 1 / -1;
}
.ticket-field input:not([type='checkbox']),
.ticket-field select,
.ticket-field textarea {
  width: 100%;
  font-size: 13px;
  padding: 6px 9px;
  min-height: 34px;
}
.ticket-field textarea {
  min-height: 70px;
}
.ticket-field input[type='checkbox'] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}
.field-checkbox,
.field-choice,
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 400;
}
.checkbox-row input {
  width: 16px;
  height: 16px;
  margin: 0;
}
.field-choices {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.field-choices legend {
  padding: 0;
  margin-bottom: 4px;
}
.required-mark {
  color: var(--danger-ink, #b3261e);
}
.field-link {
  font-size: 12px;
  overflow-wrap: anywhere;
}
.ticket-fields-error {
  grid-column: 1 / -1;
}
.field-form {
  max-width: 640px;
}
.field-options {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
}
.option-list,
.option-archived {
  display: grid;
  gap: 6px;
}
.option-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.option-row input {
  flex: 1;
  min-width: 0;
}
.option-row.archived span {
  flex: 1;
  color: var(--muted);
}
.button.compact {
  min-height: 32px;
  min-width: 32px;
  padding: 4px 8px;
}

/* VOVA-015: groups and tags. */
.tag-card {
  grid-column: 1 / -1;
  min-width: 0;
}
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
  padding: 0;
  list-style: none;
}
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  max-width: 100%;
  padding: 1px 8px;
  border: 1px solid var(--accent-line, #d6e3fc);
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--sel-ink, #214fa7);
  font-size: 12px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.tag-list li.tag-chip {
  padding-right: 2px;
}
.tag-list li.empty {
  color: var(--muted);
  font-size: 12px;
}
.tag-list .icon-button {
  min-height: 24px;
  min-width: 24px;
  padding: 2px;
  font-size: 15px;
}
.tag-form {
  display: flex;
  gap: 8px;
  max-width: 460px;
  margin-bottom: 6px;
}
.tag-form input {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  padding: 6px 9px;
}
.tag-form .button {
  flex: none;
  margin-top: 0;
}
.ticket-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 6px 0 0;
}
.row-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: -6px 0 8px;
}
.row-tags .tag-chip {
  padding: 0 6px;
  font-size: 11px;
}
.tag-more {
  color: var(--muted);
  font-size: 11px;
  align-self: center;
}
.row-group {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-align: right;
}
.group-members {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  max-height: 320px;
  overflow: auto;
}
.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.inline-form input {
  min-width: 0;
  width: 180px;
}
#tag-filter {
  max-width: 280px;
}

/* VOVA-016: ticket tabs, the view page table and the three-panel ticket. */
.inbox-layout {
  display: block;
  min-height: calc(100dvh - 240px);
}
.ticket-tabs {
  display: flex;
  align-items: stretch;
  gap: 4px;
  padding: 6px 32px 0;
  border-bottom: 1px solid var(--line);
  background: var(--canvas);
  overflow-x: auto;
  scrollbar-width: thin;
}
.open-tabs {
  display: flex;
  gap: 4px;
  min-width: 0;
}
.ticket-tab-item {
  display: flex;
  align-items: center;
  flex: none;
  max-width: 240px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: var(--tab-bg, #eaf0f9);
}
.ticket-tab {
  min-height: 38px;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px 8px 0 0;
  background: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 100%;
}
.ticket-tab-item .ticket-tab {
  padding-right: 4px;
}
.view-tab {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-bottom: 0;
  background: var(--tab-bg, #eaf0f9);
  font-weight: 600;
}
.ticket-tab[aria-current='page'],
.ticket-tab-item:has(.ticket-tab[aria-current='page']) {
  background: var(--page, white);
  color: var(--ink);
}
.ticket-tab-item:has(.ticket-tab[aria-current='page']) {
  margin-bottom: -1px;
  padding-bottom: 1px;
}
.view-tab[aria-current='page'] {
  margin-bottom: -1px;
  padding-bottom: 9px;
}
.ticket-tab:hover {
  color: var(--ink);
}
.tab-count {
  color: var(--muted);
  font-weight: 500;
}
.tab-close {
  flex: none;
  min-height: 28px;
  min-width: 28px;
  margin-right: 4px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
}
.tab-close:hover {
  background: var(--canvas);
  color: var(--ink);
}
.view-page {
  background: var(--page, white);
}
.view-page .section-tabs {
  border-bottom: 0;
}
.view-page .queue-tools {
  padding: 16px 32px 8px;
  max-width: 560px;
}
.view-page .queue-caption {
  padding: 4px 32px 10px;
}
.view-page .bulk-bar {
  margin: 0 32px 10px;
}
.view-page > .empty-state {
  margin: 12px 32px;
}
.ticket-table-wrap {
  padding: 0 20px 8px;
}
.ticket-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
  font-size: 12px;
}
.ticket-table thead th {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}
.ticket-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  min-width: 0;
}
.ticket-table .cell-check {
  width: 28px;
  padding-right: 0;
}
.ticket-table td.cell-check {
  padding-top: 13px;
}
.ticket-item {
  display: table-row;
  cursor: pointer;
}
.ticket-item:hover td {
  background: var(--canvas);
}
.ticket-item[data-selected='true'] td {
  background: var(--accent-soft);
}
.ticket-item .ticket-check {
  margin: 0;
}
.ticket-table .cell-subject {
  width: 38%;
  max-width: 0;
}
.cell-subject-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}
a.ticket-row {
  display: block;
  width: auto;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  overflow-wrap: anywhere;
}
a.ticket-row:hover {
  background: none;
  color: var(--accent);
  text-decoration: underline;
}
.ticket-table .ticket-preview {
  margin: 0;
}
.ticket-table .row-tags {
  margin: 2px 0 0;
}
.ticket-table .cell-main,
.ticket-table .cell-sub {
  display: block;
  overflow-wrap: anywhere;
}
.ticket-table .cell-sub {
  color: var(--muted);
  font-size: 11px;
}
.cell-date,
.cell-status,
.cell-priority {
  white-space: nowrap;
}
.cell-date,
.cell-group,
.cell-assignee,
.cell-priority {
  color: var(--ink-soft, #445772);
}
.priority-urgent {
  color: var(--danger-ink, #b3261e);
  font-weight: 600;
}
.priority-high {
  color: var(--warn-ink, #8c5a12);
  font-weight: 600;
}
.ticket-group-heading th {
  padding: 14px 12px 8px;
  border-bottom: 1px solid var(--line);
  background: var(--canvas);
  font-size: 12px;
  text-align: left;
}
.ticket-group-heading th span {
  margin-left: 8px;
  font-weight: 400;
  color: var(--muted);
  font-size: 11px;
}
.view-page .queue-pagination {
  padding: 13px 32px;
}
.ticket-page {
  background: var(--page, white);
}
.ticket-page > .empty-state {
  margin: 24px 32px;
}
#detail-content {
  max-width: none;
}
.ticket-page .ticket-head {
  padding: 22px 32px 16px;
  border-bottom: 1px solid var(--line);
}
.ticket-page .deleted-banner,
.ticket-page .merged-banner {
  margin: 16px 32px 0;
}
.ticket-page .property-error {
  margin: 14px 32px 0;
}
.ticket-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 280px;
  align-items: start;
  min-height: 60vh;
}
.ticket-params {
  min-width: 0;
  border-right: 1px solid var(--line);
  align-self: stretch;
}
.ticket-params > summary {
  display: none;
}
.params {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 20px 22px 24px;
  min-width: 0;
}
.params .field {
  margin: 0;
}
.params .field select {
  width: 100%;
}
.params .tag-form,
.params .cc-form {
  max-width: none;
}
.params .ticket-fields {
  display: grid;
  gap: 14px;
}
.ticket-main {
  min-width: 0;
}
.ticket-main .conversation {
  padding: 22px 32px 32px;
}
.ticket-contact {
  display: grid;
  align-content: start;
  gap: 22px;
  min-width: 0;
  padding: 20px 22px 24px;
  border-left: 1px solid var(--line);
  align-self: stretch;
}
.ticket-contact .contact-card .avatar {
  display: grid;
  margin-top: 10px;
}
.requester-tickets h3,
.ticket-feedback h3 {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}
.requester-list {
  display: grid;
  gap: 2px;
  margin: 0 0 6px;
  padding: 0;
  list-style: none;
}
.requester-list li {
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 6px;
}
.requester-list li.current {
  background: var(--accent-soft);
}
.requester-ticket {
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
}
a.requester-ticket:hover {
  color: var(--accent);
  text-decoration: underline;
}
.requester-ticket-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}
@media (min-width: 761px) {
  /* The contact panel names the requester. */
  .ticket-page .ticket-requester {
    display: none;
  }
}
@media (max-width: 1250px) {
  .ticket-grid {
    grid-template-columns: 260px minmax(0, 1fr);
    grid-template-areas: 'params main' 'contact main';
  }
  .ticket-params {
    grid-area: params;
    align-self: auto;
  }
  .ticket-main {
    grid-area: main;
    border-left: 1px solid var(--line);
    align-self: stretch;
  }
  .ticket-contact {
    grid-area: contact;
    border-left: 0;
    border-top: 1px solid var(--line);
    align-self: auto;
  }
  .ticket-params {
    border-right: 0;
  }
}
@media (max-width: 1050px) {
  .ticket-tabs,
  .view-page .queue-tools,
  .view-page .queue-caption,
  .view-page .queue-pagination {
    padding-left: 24px;
    padding-right: 24px;
  }
  .ticket-page .ticket-head,
  .ticket-main .conversation {
    padding-left: 24px;
    padding-right: 24px;
  }
}
@media (max-width: 760px) {
  .ticket-tabs {
    padding: 6px 12px 0;
  }
  .view-page .queue-tools,
  .view-page .queue-caption,
  .view-page .queue-pagination {
    padding-left: 18px;
    padding-right: 18px;
  }
  .view-page .bulk-bar,
  .view-page > .empty-state {
    margin-left: 18px;
    margin-right: 18px;
  }
  .ticket-table-wrap {
    padding: 0 10px 8px;
  }
  .ticket-table,
  .ticket-table tbody {
    display: block;
  }
  .ticket-table thead tr {
    display: flex;
    padding: 0 8px 6px;
  }
  .ticket-table thead th:not(.cell-check) {
    display: none;
  }
  .ticket-table thead th.cell-check {
    border: 0;
    padding: 0;
  }
  .ticket-item {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) auto;
    gap: 4px 8px;
    padding: 12px 8px;
    border-bottom: 1px solid var(--line);
  }
  .ticket-item td {
    display: block;
    padding: 0;
    border: 0;
    background: none;
  }
  .ticket-item:hover td,
  .ticket-item[data-selected='true'] td {
    background: none;
  }
  .ticket-item[data-selected='true'] {
    background: var(--accent-soft);
  }
  .ticket-item td.cell-check {
    grid-row: 1 / span 3;
    padding-top: 2px;
  }
  .ticket-table .cell-subject {
    width: auto;
    max-width: none;
    grid-column: 2 / -1;
  }
  .ticket-table .cell-requester {
    grid-column: 2;
    font-size: 11px;
  }
  .ticket-table .cell-requester .cell-sub {
    display: none;
  }
  .ticket-table .cell-status {
    grid-column: 3;
    grid-row: 2;
  }
  .ticket-table .cell-priority,
  .ticket-table .cell-group {
    display: none;
  }
  .ticket-table .cell-assignee,
  .ticket-table .cell-date {
    grid-row: 3;
    font-size: 11px;
  }
  .ticket-table .cell-assignee {
    grid-column: 2;
  }
  .ticket-table .cell-date {
    grid-column: 3;
    text-align: right;
  }
  .ticket-group-heading {
    display: block;
  }
  .ticket-group-heading th {
    display: block;
  }
  .ticket-page .ticket-head,
  .ticket-main .conversation {
    padding: 18px;
  }
  .ticket-page .deleted-banner,
  .ticket-page .merged-banner,
  .ticket-page .property-error {
    margin-left: 18px;
    margin-right: 18px;
  }
  .ticket-grid {
    display: block;
  }
  .ticket-params {
    border: 0;
    border-bottom: 1px solid var(--line);
  }
  .ticket-params > summary {
    display: list-item;
    padding: 12px 18px;
    color: var(--accent);
    font-size: 13px;
    cursor: pointer;
  }
  .params {
    padding: 4px 18px 20px;
    grid-template-columns: 1fr 1fr;
  }
  .params .tag-card,
  .params .cc-card,
  .params .ticket-fields,
  .params .ticket-fields-error,
  .params .properties-foot,
  .params .channel-field {
    grid-column: 1 / -1;
  }
  .ticket-main {
    border: 0;
  }
  .ticket-contact {
    border: 0;
    border-top: 1px solid var(--line);
    padding: 18px;
  }
}

/* VOVA-017: the view switcher, table settings and the view editor. */
.view-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 16px 32px 0;
}
.view-picker,
.view-actions {
  position: relative;
}
.view-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.view-switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface, white);
  color: var(--ink);
  font-size: 16px;
  font-weight: 650;
}
.view-switcher:hover {
  background: var(--canvas);
}
.view-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 36px));
  max-height: min(520px, 70vh);
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface, white);
  box-shadow: 0 12px 32px var(--shadow, rgb(25 43 71 / 16%));
}
.view-menu[hidden] {
  display: none;
}
.table-menu {
  left: auto;
  right: 0;
}
.view-menu input[type='search'] {
  width: 100%;
  font-size: 13px;
}
.view-section h3 {
  margin: 4px 4px 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.view-section ul {
  display: grid;
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.view-section li {
  display: flex;
  align-items: center;
  border-radius: 6px;
}
.view-section li.current,
.view-section li:hover {
  background: var(--canvas);
}
.view-option {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 1px;
  padding: 7px 8px;
  border: 0;
  background: none;
  text-align: left;
}
.view-option-name {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.view-option-meta {
  color: var(--muted);
  font-size: 11px;
}
.view-pin {
  flex: none;
  min-height: 32px;
  min-width: 32px;
  border: 0;
  background: none;
  color: var(--faint, #9aa8bd);
  font-size: 16px;
}
.view-pin[aria-pressed='true'] {
  color: var(--accent, #c48a12);
}
/* VOVA-077: a pin marks the list that opens first. */
.view-pin {
  display: grid;
  place-items: center;
}
.pin-icon {
  display: block;
  width: 15px;
  height: 15px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 3.5h4v5.5l3 4H7l3-4z' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'/%3E%3Cpath d='M12 13v7.5' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E")
    center / contain no-repeat;
}
.view-pin[aria-pressed='true'] .pin-icon {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 3.5h4v5.5l3 4H7l3-4z' fill='black' stroke='black' stroke-width='1.8' stroke-linejoin='round'/%3E%3Cpath d='M12 13v7.5' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}
.view-pin:not([aria-pressed='true']) {
  opacity: 0.55;
}
.view-section li:hover .view-pin,
.view-pin:focus-visible {
  opacity: 1;
}
.view-empty {
  color: var(--muted);
  font-size: 12px;
  padding: 4px;
}
.view-menu-foot {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.column-picker {
  margin: 0;
  padding: 0;
  border: 0;
}
.column-picker legend,
.table-menu > label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.column-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 12px;
}
.column-list .checkbox-row {
  font-size: 12px;
  overflow-wrap: anywhere;
}
.table-menu select {
  width: 100%;
}
.sort-header {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  white-space: nowrap;
  cursor: pointer;
}
.sort-header:hover {
  color: var(--ink);
}
th[aria-sort] .sort-header {
  color: var(--ink);
  font-weight: 600;
}
.sort-mark {
  font-size: 11px;
}
.ticket-table-wrap {
  overflow-x: auto;
}
.cell-field,
.cell-tags,
.cell-channel,
.cell-created-at,
.cell-updated-at,
.cell-solved-at,
.cell-deleted-at {
  color: var(--ink-soft, #445772);
}
.cell-created-at,
.cell-updated-at,
.cell-solved-at,
.cell-deleted-at {
  white-space: nowrap;
}
.view-dialog {
  width: min(720px, calc(100vw - 24px));
}
.view-dialog fieldset {
  margin: 14px 0 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.view-dialog legend {
  font-size: 12px;
  font-weight: 600;
  padding: 0 4px;
}
.radio-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin: 4px 0;
}
.radio-row input {
  width: auto;
  margin: 0;
}
.condition-list {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}
.condition-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) minmax(160px, 2fr) auto;
  align-items: start;
  gap: 8px;
}
.condition-row select,
.condition-row input {
  width: 100%;
  min-width: 0;
  font-size: 13px;
}
.choice-list {
  display: grid;
  gap: 2px;
  max-height: 160px;
  overflow: auto;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.choice-list .checkbox-row {
  font-size: 12px;
}
.view-table .column-list {
  margin-bottom: 10px;
}
.view-table select {
  width: 100%;
}
.dialog-foot #delete-view {
  margin-right: auto;
}
@media (max-width: 1050px) {
  .view-head {
    padding-left: 24px;
    padding-right: 24px;
  }
}
@media (max-width: 760px) {
  .view-head {
    padding: 14px 18px 0;
  }
  .view-actions {
    margin-left: 0;
  }
  .table-menu {
    left: 0;
    right: auto;
  }
  .ticket-table-wrap {
    overflow-x: visible;
  }
  .ticket-item {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
  }
  .ticket-item td {
    flex: none;
    font-size: 11px;
  }
  .ticket-item td.cell-check {
    flex: 0 0 22px;
  }
  .ticket-table .cell-subject {
    flex: 1 1 calc(100% - 40px);
    width: auto;
    font-size: inherit;
  }
  .ticket-table .cell-subject ~ td:nth-child(3) {
    margin-left: 32px;
  }
  .ticket-table .cell-priority,
  .ticket-table .cell-group,
  .ticket-table .cell-requester .cell-sub {
    display: block;
  }
  .ticket-table .cell-requester .cell-sub {
    display: none;
  }
  .condition-row {
    grid-template-columns: 1fr auto;
  }
  .condition-row > select:first-child,
  .condition-row > select:nth-child(2),
  .condition-row > .condition-value {
    grid-column: 1;
  }
  .condition-row > .icon-button {
    grid-column: 2;
    grid-row: 1;
  }
  .column-list {
    grid-template-columns: 1fr;
  }
}
.ticket-table .ticket-group-heading {
  display: table-row;
  padding: 0;
  background: none;
  border-radius: 0;
}
.view-dialog .dialog-body label.checkbox-row,
.view-dialog .dialog-body label.radio-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 3px 0;
  font-weight: 400;
}
.view-dialog .checkbox-row input,
.view-dialog .radio-row input {
  flex: none;
  width: 16px;
  height: 16px;
  margin: 0;
}
@media (max-width: 760px) {
  .ticket-table .ticket-group-heading {
    display: block;
  }
}

/* VOVA-018: automations. */
.automation-form fieldset {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
}
.automation-form legend {
  font-size: 12px;
  font-weight: 600;
  padding: 0 4px;
}
.action-list {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}
.action-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(160px, 2fr) auto;
  gap: 8px;
  align-items: start;
}
.action-row select,
.action-row input {
  width: 100%;
  min-width: 0;
}
.badge.prebuilt {
  margin-top: 4px;
  background: var(--subtle, #eef1f8);
  color: var(--subtle-ink, #5a6882);
}
@media (max-width: 760px) {
  .action-row {
    grid-template-columns: 1fr auto;
  }
  .action-row > :nth-child(2) {
    grid-column: 1;
  }
  .action-row > .icon-button {
    grid-column: 2;
    grid-row: 1;
  }
}

/* VOVA-019: automations that run when a ticket changes. */
.run-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-bottom: 8px;
}
.event-list {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  max-height: none;
}
.automation-form label.checkbox-row {
  display: flex;
  margin-bottom: 0;
  font-size: 13px;
  font-weight: 400;
}
.automation-form .checkbox-row input {
  flex: none;
  width: 16px;
}
.automation-form .choice-list .checkbox-row {
  font-size: 12px;
}

/* VOVA-020: follow-up tickets. */
.ticket-links {
  display: grid;
  gap: 2px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.ticket-links .ticket-link {
  color: var(--accent);
  font-weight: 600;
}
.ticket-links .badge {
  vertical-align: middle;
}

/* VOVA-021: comments and emails in automations. */
.action-message {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.action-message textarea {
  width: 100%;
  min-height: 90px;
}
.action-message .form-help {
  margin: 0;
}

/* VOVA-022: Slack channel settings. */
.slack-channel-list,
.slack-emoji-list {
  display: grid;
  gap: 10px;
}
.slack-channel {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(200px, 1.5fr);
  gap: 6px 12px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.slack-channel .cell-main .badge {
  margin-left: 6px;
}
.slack-channel-settings {
  grid-column: 2;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
}
.slack-channel select,
.slack-channel input,
.slack-emoji-rule select,
.slack-emoji-rule input {
  width: 100%;
  min-width: 0;
}
.slack-emoji-rule {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) minmax(120px, 1fr) minmax(120px, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.slack-preview {
  margin-top: 16px;
}
/* VOVA-026: a message's link to Slack. */
.message-slack-link {
  color: var(--accent);
}
/* VOVA-063: replies by email in the incoming copies card. */
.copy-replies {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.copy-replies h3 {
  margin: 0;
  font-size: 15px;
}
/* VOVA-061: a customer email whose sender domain did not confirm it. */
.message-unverified {
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: var(--note);
  color: var(--note-ink);
  font-size: 13px;
}
/* VOVA-025: messages edited or deleted in Slack. */
.message-slack-deleted {
  margin: 0;
  color: var(--muted);
  font-style: italic;
}
.slack-versions {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}
.slack-versions summary {
  cursor: pointer;
}
.slack-version {
  margin-top: 6px;
  padding-left: 10px;
  border-left: 2px solid var(--line);
}
/* VOVA-024: channel lists by role. */
.slack-channel-lists {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.slack-channel-lists [aria-pressed='true'] {
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}
.slack-channel-note {
  grid-column: 2;
  margin: 0;
}
/* VOVA-023: the welcome message and replies as members. */
.slack-welcome-button {
  grid-column: 2;
  justify-self: start;
}
.slack-live textarea {
  width: 100%;
  min-height: 160px;
  resize: vertical;
}
.slack-welcome-preview {
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
}
.composer-slack {
  margin: 0;
  padding: 4px 17px 0;
  font-size: 12px;
  color: var(--muted);
}
.composer-slack-connect {
  margin-left: 6px;
}
.ticket-slack-link {
  color: var(--accent);
}
@media (max-width: 760px) {
  .slack-channel,
  .slack-channel-settings {
    grid-template-columns: 1fr;
  }
  .slack-channel-settings,
  .slack-channel-note,
  .slack-welcome-button {
    grid-column: 1;
  }
  .slack-emoji-rule {
    grid-template-columns: 1fr 1fr auto;
  }
  .slack-emoji-rule > :nth-child(3) {
    grid-column: 1 / 3;
  }
}
.slack-field {
  display: grid;
  gap: 3px;
  min-width: 0;
}

/* VOVA-036: webhooks. */
.management-stack > .management-back {
  justify-self: start;
  margin: 0;
}
.webhook-headers {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
}
.webhook-headers legend {
  font-size: 12px;
  font-weight: 600;
  padding: 0 4px;
}
.webhook-headers .form-help {
  margin: 8px 0 0;
}
.secret-value {
  display: block;
  margin: 10px 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  word-break: break-all;
}
.webhook-body {
  max-width: min(520px, 70vw);
  max-height: 260px;
  overflow: auto;
  margin: 6px 0 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}
.webhook-request {
  display: grid;
  grid-template-columns: minmax(90px, 110px) minmax(0, 1fr);
  gap: 8px;
}
.webhook-request input {
  width: 100%;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.webhook-request-line {
  font-size: 12px;
  word-break: break-all;
}
.management-card-body .webhook-request {
  max-width: 520px;
  margin-bottom: 12px;
}
.action-message textarea[id^='automation-action-template-'] {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

/* VOVA-037: a group where mentions may not reach the Telegram bot. */
.telegram-mentions-unseen {
  max-width: 46ch;
  color: var(--note-ink);
}

.portal-themes .management-stack {
  gap: 14px;
}
.theme-version {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.theme-preview-frame {
  display: block;
  width: 100%;
  height: 680px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 16px auto;
  background: white;
}
.theme-preview-frame.mobile {
  width: 375px;
  max-width: 100%;
}
.theme-preview .portal-appearance-actions {
  flex-wrap: wrap;
}
.theme-preview label {
  display: grid;
  gap: 6px;
}
/* VOVA-091: the portal's error pages: their contact and preview. */
.portal-error-pages {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.portal-error-contact {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}
.portal-error-contact legend {
  margin-bottom: 6px;
  font-weight: 600;
}
.portal-error-contact .checkbox-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.portal-error-contact input:not([type='radio']) {
  width: min(100%, 420px);
  margin-left: 26px;
}
#auth-view.company-theme {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  color: var(--ink);
  background: var(--canvas);
  background-size: cover;
}
#auth-view.company-theme .auth-story {
  background: transparent;
  padding: 24px clamp(20px, 4vw, 60px);
  color: var(--ink);
}
#auth-view.company-theme .auth-story p {
  color: var(--muted);
}
#auth-view.company-theme .auth-panel {
  flex: 1;
  background: transparent;
  padding: 24px 20px 48px;
}
#auth-view.company-theme .auth-card {
  max-width: 440px;
  background: var(--paper);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
}
#auth-view .auth-powered {
  padding: 16px 20px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
#auth-view .auth-powered a {
  color: var(--ink);
  font-weight: 650;
}
#auth-view.company-theme .button.primary {
  background: var(--accent);
  color: var(--company-accent-text);
}
#auth-view.company-theme .brand-mark {
  width: auto;
  max-width: 180px;
  height: 32px;
  object-fit: contain;
}

/* VOVA-041: On-call — incidents and escalation policies. */
.oncall .oncall-tabs {
  padding: 0;
  background: none;
}
.badge.oncall-triggered {
  background: var(--danger-soft, #fde8e6);
  color: var(--danger-ink, #a2321f);
}
.badge.oncall-acknowledged {
  background: var(--warn-soft, #f6efdd);
  color: var(--warn-ink, #785b21);
}
.badge.oncall-resolved {
  background: var(--ok-soft, #e4f4ea);
  color: var(--ok-ink, #23683d);
}
.oncall-link {
  color: var(--accent);
  font-weight: 600;
}
.oncall-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.oncall-head > :first-child {
  flex: 1 1 320px;
  min-width: 0;
}
.oncall-title {
  margin: 0 0 6px;
  font-size: 20px;
  overflow-wrap: anywhere;
}
.oncall-details {
  margin: 0;
  max-width: 80ch;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.oncall-timeline {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.oncall-timeline .cell-sub {
  display: inline;
  margin-right: 6px;
}
.oncall-levels {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
}
.oncall-levels-editor {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.oncall-levels-editor > button {
  justify-self: start;
}
.oncall-level {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--canvas);
}
.oncall-level-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.oncall-level-head > button {
  margin-left: auto;
}
.management-form .oncall-wait {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}
.management-form .oncall-members .checkbox-row {
  display: flex;
  margin: 0;
  font-size: 13px;
  font-weight: 400;
}
.oncall-wait input {
  width: 80px;
}
.oncall-members {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 4px 16px;
}
.oncall-request {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 180px);
  gap: 8px;
}
.ticket-oncall {
  display: block;
}
@media (max-width: 640px) {
  .oncall-request {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* VOVA-047: On-call integrations — the address shown once and setup steps. */
.oncall-address-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.oncall-address {
  flex: 1 1 320px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--canvas);
  font-size: 13px;
  overflow-wrap: anywhere;
  user-select: all;
}
.oncall-setup-title {
  margin: 8px 0 0;
  font-size: 15px;
}
.oncall-setup {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
}
.oncall-snippet {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--canvas);
  border: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.oncall-source-link {
  color: var(--accent);
}

/* VOVA-044: On-call — a member's own notifications. */
.oncall-steps {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.oncall-step {
  display: flex;
  align-items: center;
  gap: 8px;
}
.oncall-step > select {
  flex: 1 1 0;
  min-width: 0;
  max-width: 180px;
  margin: 0;
}
.oncall-step > .icon-button {
  flex: none;
}
.oncall-warning {
  margin: 0;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: var(--note);
  color: var(--note-ink);
}
.oncall-channels {
  display: grid;
  gap: 0;
}
.oncall-channel {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.oncall-channel:first-child {
  border-top: 0;
  padding-top: 0;
}
.oncall-channel-text {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1 1 260px;
}
.oncall-channel-text p {
  margin: 0;
}
.oncall-telegram-link {
  justify-self: start;
  margin-top: 6px;
  text-decoration: none;
}

/* VOVA-043: On-call schedules — the timeline and the layer editor. */
.oncall-target {
  color: var(--muted);
  margin-right: 4px;
}
.oncall-timeline-grid {
  display: grid;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.oncall-row {
  display: grid;
  grid-template-columns: 170px minmax(560px, 1fr);
  gap: 10px;
  align-items: center;
}
.oncall-row-label {
  display: grid;
  gap: 2px;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.oncall-row-label > span {
  display: grid;
  gap: 2px;
}
.oncall-row-sub {
  color: var(--muted);
  font-size: 11px;
}
.oncall-track {
  position: relative;
  height: 30px;
  border-radius: 6px;
  background: var(--canvas);
}
.oncall-row-head .oncall-track {
  height: 22px;
  background: none;
}
.oncall-row-final .oncall-track {
  height: 36px;
}
.oncall-day {
  position: absolute;
  top: 0;
  padding: 2px 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.oncall-day-line,
.oncall-now-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line);
  pointer-events: none;
}
.oncall-now-line {
  z-index: 2;
  width: 2px;
  background: #d9480f;
}
.oncall-shift {
  position: absolute;
  top: 3px;
  bottom: 3px;
  display: block;
  min-width: 2px;
  min-height: 0;
  padding: 0 4px;
  overflow: hidden;
  border: 0;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  line-height: 24px;
  text-align: left;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #10264c;
}
.oncall-row-final .oncall-shift {
  line-height: 30px;
}
button.oncall-shift {
  cursor: pointer;
}
button.oncall-shift:hover {
  filter: brightness(0.95);
  outline: 2px solid var(--accent);
}
.oncall-color-0 {
  background: #dbe7ff;
}
.oncall-color-1 {
  background: #d5f0e1;
}
.oncall-color-2 {
  background: #fde2c8;
}
.oncall-color-3 {
  background: #ead9fb;
}
.oncall-color-4 {
  background: #fbd9e5;
}
.oncall-color-5 {
  background: #d4eef4;
}
.oncall-color-6 {
  background: #f3ecc4;
}
.oncall-color-7 {
  background: #e1e5ea;
}
.oncall-shift.oncall-override {
  box-shadow: inset 0 0 0 2px #10264c;
}
.oncall-shift.oncall-gap {
  background: repeating-linear-gradient(135deg, #fff5f2, #fff5f2 6px, #fde8e6 6px, #fde8e6 12px);
  color: #a2321f;
  font-weight: 500;
}
.management-form .oncall-field {
  display: grid;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
}
.oncall-inline {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.oncall-order {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 20px;
  font-weight: 400;
  font-size: 13px;
}
.oncall-order li {
  display: list-item;
}
.oncall-order li > span:first-child {
  margin-right: 8px;
}
.oncall-order .toolbar-actions {
  display: inline-flex;
  vertical-align: middle;
}
.oncall-days {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}
.management-form .oncall-days .checkbox-row {
  display: flex;
  margin: 0;
  font-size: 13px;
  font-weight: 400;
}
@media (max-width: 640px) {
  .oncall-row {
    grid-template-columns: 110px minmax(560px, 1fr);
  }
}

/* ANTON-003: the customer's own close and rating from the portal. */
.ticket-feedback[hidden] {
  display: none;
}
.ticket-feedback p {
  margin: 0 0 6px;
}
.feedback-rating {
  font-weight: 600;
}
.feedback-comment {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ANTON-004: macros in the composer. */
.macro-picker {
  position: relative;
  margin-left: auto;
}
.macro-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 30;
  display: grid;
  gap: 6px;
  width: min(320px, 80vw);
  max-height: 360px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface, var(--panel, #fff));
  box-shadow: 0 12px 30px var(--shadow, rgb(15 23 42 / 16%));
}
.macro-menu[hidden] {
  display: none;
}
.macro-list,
.macro-admin-list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.composer-head .macro-item {
  width: 100%;
  text-align: left;
  border-radius: 6px;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.composer-head .macro-item:hover,
.composer-head .macro-item:focus-visible {
  background: var(--accent-soft);
}
.macro-admin-list li {
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.macro-editor {
  display: grid;
  gap: 6px;
}
.macro-editor[hidden],
#macro-overview[hidden] {
  display: none;
}
.macro-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.macro-fields > div {
  display: grid;
  gap: 6px;
}
.macro-groups {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}
.macro-groups .check {
  display: flex;
  gap: 8px;
  align-items: center;
}
/* The organization entry shares the portal choice, scoped away from workspace. */
#auth-view.company-theme {
  color-scheme: light;
  --company-accent-text: #fff;
}
#auth-view.company-theme[data-theme='dark'] {
  color-scheme: dark;
  --ink: #f1f5fc;
  --muted: #b2c0d5;
  --paper: #182337;
  --canvas: #101827;
  --line: #40516a;
  --accent: #8baaff;
  --company-accent-text: #101827;
}
#auth-view.company-theme .brand {
  color: var(--ink);
}
#auth-view.company-theme input {
  border-color: var(--line);
}
#auth-view .theme-toggle {
  display: grid;
  place-items: center;
  margin: 0 0 0 auto;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}
#auth-view .auth-entry-tools {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
#auth-view .auth-entry-tools[hidden] {
  display: none;
}
#auth-view .auth-portal-link {
  color: var(--ink);
  font-size: 13px;
  text-underline-offset: 3px;
}
#auth-view .theme-toggle[hidden],
#auth-view .theme-toggle .theme-sun,
#auth-view .theme-toggle[data-mode='dark'] .theme-moon {
  display: none;
}
#auth-view .theme-toggle[data-mode='dark'] .theme-sun {
  display: block;
}
#auth-view .theme-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}

/* Administration → Escalations (VOVA-049): suggestions to review. */
.escalation-suggestion {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.escalation-suggestion:last-child {
  border-bottom: 0;
}
.escalation-suggestion > input[type='checkbox'] {
  flex: none;
  width: auto;
  margin: 0;
}
.escalation-suggestion > input:not([type='checkbox']),
.escalation-suggestion > select {
  flex: 0 1 240px;
  min-width: 0;
  margin: 0;
}
.escalation-suggestion > .cell-main {
  flex: 0 1 220px;
  min-width: 0;
  margin: 0;
}
.escalation-channel {
  flex: 0 1 auto;
  color: var(--muted);
}

/* A ticket's escalations (VOVA-051). */
.escalation-item {
  padding: 4px 0 12px;
  border-bottom: 1px solid var(--line);
}
.escalation-item > p {
  margin: 4px 0;
}
.escalation-item a.button {
  color: var(--ink);
  text-decoration: none;
}
.escalation-files {
  display: grid;
  gap: 6px;
}

/* Analytics (VOVA-052). */
.analytics-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.segmented {
  display: inline-flex;
  gap: 4px;
}
.segmented .button[aria-pressed='true'] {
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}
.analytics-severity {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.analytics-severity select {
  flex: 0 1 240px;
  margin: 0;
}
.analytics-severity .error-message {
  flex-basis: 100%;
}
.analytics-digests .checkbox-row label {
  display: inline;
  margin: 0;
}
.analytics-digests .form-help {
  margin-top: 4px;
}

/* Incident banner on the portal (ANTON-013): the form and its preview. */
.incident-banner-form textarea {
  resize: vertical;
}
.incident-banner-count {
  justify-self: end;
}
.incident-banner-preview {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--info-soft, #eaf0fc);
  color: var(--info-ink, #2f548c);
}
.incident-banner-preview[hidden] {
  display: none;
}
.incident-banner-preview.issue {
  background: var(--warn-soft, #f6efdd);
  color: var(--warn-ink, #785b21);
}
.incident-banner-preview.resolved {
  background: var(--ok-soft, #e4f4ea);
  color: var(--ok-ink, #23683d);
}
.incident-banner-preview-text {
  margin: 0;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

/* Own portal domain (VOVA-054). */
.portal-domain-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.portal-domain-records {
  display: grid;
  gap: 10px;
  max-width: 660px;
}
.portal-domain-record {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px 14px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.portal-domain-record dt {
  color: var(--muted);
  font-size: 12px;
}
.portal-domain-record dd {
  margin: 0;
}
.portal-domain-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
  user-select: all;
}

/* VOVA-065: members' photos */
.avatar.has-photo {
  overflow: hidden;
  padding: 0;
}
.avatar.has-photo > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.profile-body {
  max-height: min(70vh, 640px);
  overflow-y: auto;
}
.profile-photo {
  display: flex;
  gap: 16px;
  align-items: center;
}
.profile-photo .profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  font-size: 22px;
}
.profile-photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.profile-photo-actions .form-help {
  flex-basis: 100%;
  margin: 0;
}
.dialog-body .profile-photo-actions label.button {
  display: inline-flex;
  margin: 0;
  font-size: 13px;
  font-weight: 500;
}
.profile-photo-actions input[type='file']:focus-visible + label.button {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.profile-body textarea {
  width: 100%;
  resize: vertical;
}

/* VOVA-066: Discord settings */
.management-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
}
.telegram-settings a.button {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

/* VOVA-067: a customer's personal data */
.personal-data-actions {
  display: grid;
  gap: 6px;
  justify-items: start;
}
.personal-data-list {
  display: grid;
  gap: 4px;
  margin: 0 0 8px;
  padding-left: 18px;
}
.personal-data-erase {
  max-width: 560px;
}
.ticket-contact #contact-personal-data {
  margin-top: 6px;
}
/* VOVA-068: retention periods */
.retention-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.retention-field {
  display: grid;
  gap: 6px;
  min-width: 220px;
}
.retention-facts:empty {
  display: none;
}

/* VOVA-070: an organization scheduled for deletion */
.view-progress {
  position: relative;
  min-height: 0;
}
.view-progress-text {
  display: block;
  padding: 8px 0;
  color: var(--muted);
  font-size: 13px;
}
[data-view-progress='refresh'] {
  position: relative;
  height: 0;
  min-height: 0;
  padding: 0 !important;
  margin: 0 !important;
  overflow: visible;
  z-index: 1;
}
[data-view-progress='refresh'] .view-progress-text {
  position: absolute;
  bottom: 4px;
  right: 0;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--paper);
}
.view-skeleton {
  display: grid;
  gap: 22px;
  padding: 28px 0;
  min-height: 220px;
}
.view-skeleton span {
  height: 16px;
  width: 85%;
  max-width: 720px;
  border-radius: 6px;
  background: var(--subtle, var(--soft-line));
}
.view-skeleton span:first-child {
  width: 35%;
}
.view-skeleton span:last-child {
  width: 60%;
}
[data-view-pending] {
  cursor: progress;
}
/* No fades/shimmers: the existing reading position stays still, including
   for reduced-motion users. Progress is local to the changing section. */

.closing-banner {
  margin: 0 32px 12px;
  padding: 10px 14px;
  border: 1px solid var(--danger-line, #efc9c5);
  border-radius: 8px;
  background: var(--danger-soft, #fff6f5);
  color: var(--danger-ink, #8d3028);
  font-size: 14px;
}
@media (max-width: 760px) {
  .closing-banner {
    margin: 0 18px 12px;
  }
}

/* Shared Escalio palette: workspace, account entry and service pages.
   Tenant sign-in themes continue to define their own scoped color tokens. */
body:has(> #app-view:not([hidden])),
body:has(> #connection-view:not([hidden])),
body:has(> #auth-view:not([hidden])),
body:has(> #waitlist-view:not([hidden])),
body:has(> .invitation-page) {
  color-scheme: dark;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --page: #262624;
  --surface: #30302e;
  --paper: #30302e;
  --canvas: #2b2a28;
  --canvas-2: #2b2a28;
  --side: #1f1e1d;
  --ink: #f5f4ef;
  --ink-soft: #d3d0c7;
  --muted: #b6b3aa;
  --faint: #9a978f;
  --line: #3d3c38;
  --soft-line: #3a3936;
  --field-line: #4d4b47;
  --composer-line: #4d4b47;
  --hover-bg: #353431;
  --sel-bg: #2d3650;
  --sel-ink: #b8caff;
  --subtle: #3a3936;
  --subtle-ink: #d3d0c7;
  --tab-bg: #2b2a28;
  --accent: #86a8ff;
  --accent-soft: #2d3650;
  --accent-line: #3d4c78;
  --accent-bg: #2f62d8;
  --accent-bg-hover: #3a6fe6;
  --on-accent: #ffffff;
  --focus: #86a8ff;
  --avatar-bg: #3a3936;
  --avatar-ink: #f5f4ef;
  --note: #33301f;
  --note-ink: #ecd593;
  --note-line: #5b4f2a;
  --note-strong: #b4882a;
  --note-border: #6b5a2a;
  --note-head: #4a4122;
  --note-head-ink: #f1dc9e;
  --note-avatar: #4a4122;
  --note-button: #8a6a22;
  --danger: #c7372d;
  --danger-ink: #ffb4a9;
  --danger-soft: #3b2422;
  --danger-line: #6b3a35;
  --ok-soft: #20362a;
  --ok-ink: #8fd6a8;
  --warn-soft: #3a3020;
  --warn-ink: #e9bf68;
  --violet-soft: #2e2c4a;
  --violet-ink: #c4c1ff;
  --info-soft: #2a3142;
  --info-ink: #b8caff;
  --chart: #6f95f0;
  --chart-track: #3a3936;
  --switch-off: #5c5a55;
  --shadow: rgb(0 0 0 / 40%);
  --toast-bg: #45443f;
  --toast-ink: #f5f4ef;
  background: var(--page);
  color: var(--ink);
}
html[data-workspace-theme='light'] body:has(> #app-view:not([hidden])),
html[data-workspace-theme='light'] body:has(> #connection-view:not([hidden])),
html[data-workspace-theme='light'] body:has(> #auth-view:not([hidden])),
html[data-workspace-theme='light'] body:has(> #waitlist-view:not([hidden])),
html[data-workspace-theme='light'] body:has(> .invitation-page) {
  color-scheme: light;
  --page: #faf9f5;
  --surface: #ffffff;
  --paper: #ffffff;
  --canvas: #f3f1ea;
  --canvas-2: #f6f4ee;
  --side: #f2f0e8;
  --ink: #1f1e1d;
  --ink-soft: #3d3b37;
  --muted: #5c5a54;
  --faint: #6f6c65;
  --line: #e3dfd5;
  --soft-line: #e8e4da;
  --field-line: #cfcabd;
  --composer-line: #d5d0c4;
  --hover-bg: #ebe8df;
  --sel-bg: #e6edfb;
  --sel-ink: #1f4fb8;
  --subtle: #eeebe4;
  --subtle-ink: #57554f;
  --tab-bg: #efece4;
  --accent: #245edb;
  --accent-soft: #e6edfb;
  --accent-line: #cad8f6;
  --accent-bg: #245edb;
  --accent-bg-hover: #1d4fbf;
  --on-accent: #ffffff;
  --focus: #245edb;
  --avatar-bg: #e8e4da;
  --avatar-ink: #3d3b37;
  --note: #fbf1d6;
  --note-ink: #6b4f12;
  --note-line: #ead9a6;
  --note-strong: #b4882a;
  --note-border: #d0b56a;
  --note-head: #f1e2b3;
  --note-head-ink: #5e4510;
  --note-avatar: #f0e3b6;
  --note-button: #73571d;
  --danger: #b3261e;
  --danger-ink: #9b2c22;
  --danger-soft: #fdecea;
  --danger-line: #efc9c5;
  --ok-soft: #e6f3ea;
  --ok-ink: #23683d;
  --warn-soft: #f6efdd;
  --warn-ink: #785b21;
  --violet-soft: #ecebfb;
  --violet-ink: #4c4c9f;
  --info-soft: #eaf0fc;
  --info-ink: #2f548c;
  --chart: #3273d6;
  --chart-track: #ebe8df;
  --switch-off: #a8a397;
  --shadow: rgb(40 35 25 / 14%);
  --toast-bg: #2b2a28;
  --toast-ink: #f5f4ef;
}
body:has(> #app-view:not([hidden])) dialog::backdrop {
  background: rgb(0 0 0 / 55%);
}
#app-view.shell {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  min-height: 100dvh;
}
#app-view a:not(.button):not(.sidebar-ticket) {
  color: var(--accent);
}
.mobile-bar,
.sidebar-backdrop,
.workspace-sidebar .icon-button.sidebar-close {
  display: none;
}
.workspace-sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 10px 10px;
  background: var(--side);
  border-right: 1px solid var(--line);
  z-index: 20;
}
.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 6px 4px;
}
.workspace-sidebar .brand,
.mobile-bar .brand {
  gap: 8px;
  padding: 0;
  color: var(--ink);
  font-size: 18px;
  letter-spacing: -0.4px;
}
.workspace-sidebar .brand-mark,
.mobile-bar .brand-mark {
  width: 22px;
  height: 22px;
}
.workspace-sidebar .organization-picker {
  max-width: none;
  padding: 0 4px;
  border: 0;
}
.workspace-sidebar .organization-picker select {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}
.workspace-sidebar .workspace-context {
  padding: 0 10px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.sidebar-new {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  margin-top: 4px;
  padding: 6px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-weight: 500;
  text-align: left;
}
.sidebar-new:hover,
.sidebar-new[aria-current='page'] {
  background: var(--hover-bg);
}
.sidebar-new-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-bg);
  color: var(--on-accent);
  flex: none;
}
.sidebar-new-icon .icon {
  width: 15px;
  height: 15px;
}
.sidebar-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 8px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--subtle) transparent;
}
.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-label {
  padding: 4px 10px;
  color: var(--faint);
  font-size: 12px;
}
.sidebar-list-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
}
.sidebar-list-head .view-picker {
  position: static;
  flex: 1 1 auto;
  min-width: 0;
}
.workspace-sidebar .view-switcher {
  max-width: 100%;
  min-height: 34px;
  padding: 6px 8px 6px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}
.workspace-sidebar .view-switcher #view-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.workspace-sidebar .view-switcher svg {
  flex: none;
  color: var(--faint);
}
.workspace-sidebar .view-switcher:hover,
.workspace-sidebar .view-switcher[aria-expanded='true'] {
  background: var(--hover-bg);
}
.workspace-sidebar .view-menu {
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  width: auto;
  max-height: min(520px, 60vh);
}
.workspace-sidebar .icon-button,
.mobile-bar .icon-button {
  display: grid;
  place-items: center;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
}
.workspace-sidebar .icon-button:hover,
.mobile-bar .icon-button:hover {
  background: var(--hover-bg);
  color: var(--ink);
}
.sidebar-table {
  flex: none;
}
.sidebar-table .icon {
  width: 17px;
  height: 17px;
}
.sidebar-table .nav-count {
  display: none;
}
.sidebar-table[aria-current='page'] {
  background: var(--hover-bg);
  color: var(--ink);
}
.sidebar-ticket-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sidebar-ticket {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}
button.sidebar-ticket {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
}
.sidebar-ticket:hover {
  background: var(--hover-bg);
  color: var(--ink);
}
.sidebar-ticket[aria-current='page'] {
  background: var(--hover-bg);
  color: var(--ink);
  font-weight: 500;
}
.sidebar-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
  background: var(--accent);
}
.sidebar-dot.new {
  background: var(--violet-ink);
}
.sidebar-dot.pending {
  background: var(--warn-ink);
}
.sidebar-dot.solved,
.sidebar-dot.closed {
  background: var(--ok-ink);
}
.sidebar-ticket-subject {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
/* VOVA-112: example tickets. */
.sample-badge {
  flex: none;
  margin-left: 6px;
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}
.badge.sample-badge {
  justify-self: start;
  align-self: start;
  width: fit-content;
  margin: 2px 0;
  background: transparent;
}
.ticket-sample {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 6px 0 0;
  padding: 8px 12px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
}
.ticket-sample[hidden] {
  display: none;
}
.sidebar-empty {
  padding: 2px 10px;
  color: var(--faint);
  font-size: 13px;
}
.sidebar-empty:empty {
  display: none;
}
.sidebar-more,
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  text-align: left;
}
.sidebar-more {
  min-height: 32px;
  font-size: 12px;
}
.sidebar-more:hover,
.sidebar-link:hover,
.sidebar-link[aria-current='page'],
.sidebar-link[data-active] {
  background: var(--hover-bg);
  color: var(--ink);
}
.sidebar-link .icon {
  width: 18px;
  height: 18px;
}
.workspace-sidebar .sidebar-link:focus-visible,
.workspace-sidebar .sidebar-more:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}
.sidebar-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.sidebar-foot .sidebar-link {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
}
.theme-switch {
  display: flex;
  gap: 2px;
  flex: none;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.theme-switch button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--faint);
}
.theme-switch button[aria-pressed='true'] {
  background: var(--hover-bg);
  color: var(--ink);
}
.theme-switch .icon {
  width: 16px;
  height: 16px;
}
.workspace-sidebar .profile-area {
  position: relative;
}
.workspace-sidebar .profile-toggle {
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 6px 8px;
  border: 0;
  border-radius: 8px;
  text-align: left;
}
.workspace-sidebar .profile-toggle:hover,
.workspace-sidebar .profile-toggle[aria-expanded='true'] {
  background: var(--hover-bg);
}
.workspace-sidebar .profile-toggle .avatar {
  width: 30px;
  height: 30px;
  background: var(--accent-bg);
  color: var(--on-accent);
}
.profile-names {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}
.profile-name,
.profile-role {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.profile-name {
  color: var(--ink);
  font-size: 13px;
}
.profile-role {
  color: var(--faint);
  font-size: 12px;
}
.workspace-sidebar .profile-menu {
  top: auto;
  right: 0;
  bottom: calc(100% + 6px);
  left: 0;
  width: auto;
  max-height: calc(100dvh - 120px);
}
.workspace-sidebar .profile-menu button:hover,
.workspace-sidebar .profile-menu a:hover,
.workspace-sidebar .profile-menu button[aria-current='page'] {
  background: var(--hover-bg);
  color: var(--ink);
}

/* The home: a chat with Escalio AI (in development). */
.home-view {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 64px 24px;
}
.home-view[hidden] {
  display: none;
}
.home-greeting {
  font-family: ui-serif, 'New York', Georgia, 'Times New Roman', serif;
  font-size: 38px;
  font-weight: 400;
  letter-spacing: -0.4px;
  line-height: 1.2;
  text-align: center;
}
.home-composer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(100%, 720px);
  padding: 14px 14px 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 8px 28px var(--shadow);
}
.home-composer:focus-within {
  border-color: var(--field-line);
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.home-composer textarea {
  min-height: 0;
  padding: 2px 4px;
  border: 0;
  background: transparent;
  resize: none;
  font-size: 16px;
  line-height: 1.5;
}
.home-composer textarea:focus-visible {
  outline: 0;
}
.home-composer-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.home-plus,
.home-send {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
}
.home-plus {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
}
.home-send {
  border: 0;
  border-radius: 10px;
  background: var(--accent-bg);
  color: var(--on-accent);
}
.home-plus:disabled,
.home-send:disabled {
  opacity: 1;
}
.home-send:disabled {
  background: var(--subtle);
  color: var(--faint);
}
.home-note {
  max-width: 560px;
  color: var(--faint);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}
#main:has(> #home-view:not([hidden])) > .page-head {
  display: none;
}

/* VOVA-076: a thread with Escalio AI. */
.thread-view {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}
.thread-view[hidden] {
  display: none;
}
#main:has(> #thread-view:not([hidden])) > .page-head {
  display: none;
}
.thread-head {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--page);
}
.thread-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.thread-private {
  color: var(--faint);
  font-size: 12px;
  white-space: nowrap;
}
.thread-head .button {
  min-height: 34px;
  font-size: 12px;
}
.thread-messages {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  gap: 16px;
  width: min(100%, 780px);
  margin: 0 auto;
  padding: 28px 24px;
  list-style: none;
}
.thread-message {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.thread-message.assistant {
  align-items: flex-start;
}
.thread-body {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 16px;
  background: var(--subtle);
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.thread-message.assistant .thread-body {
  padding: 0;
  background: transparent;
}
.thread-time {
  color: var(--faint);
  font-size: 11px;
}
.thread-foot {
  position: sticky;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(100%, 780px);
  margin: 0 auto;
  padding: 12px 24px 22px;
  background: linear-gradient(transparent, var(--page) 24px);
}
.thread-note {
  color: var(--faint);
  font-size: 13px;
  line-height: 1.5;
}
.thread-composer {
  width: 100%;
  box-shadow: none;
}
.home-send:disabled {
  cursor: default;
}

/* VOVA-077: Settings → the sidebar's ticket lists. */
.list-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 80px 96px;
  align-items: center;
  gap: 12px;
  padding: 2px 16px;
  border-top: 1px solid var(--line);
}
.list-head {
  padding-top: 10px;
  padding-bottom: 10px;
  border-top: 0;
  color: var(--faint);
  font-size: 12px;
}
.list-head span:not(:first-child) {
  text-align: center;
}
.list-name {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.list-name > span:first-child {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.list-kind {
  color: var(--faint);
  font-size: 12px;
}
.list-cell {
  display: grid;
  place-items: center;
  min-height: 44px;
  cursor: pointer;
}
.list-cell input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-bg, var(--accent));
}
.list-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.workspace-sidebar .view-menu-foot {
  gap: 8px;
}
.workspace-sidebar .view-menu-foot .button {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 12px;
  white-space: nowrap;
}

/* Settings: a section list beside the page; the list keeps its place. */
#main:has(> #admin-tabs:not([hidden])) {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  align-items: start;
}
#main:has(> #admin-tabs:not([hidden])) > * {
  grid-column: 2;
}
#main:has(> #admin-tabs:not([hidden])) > #admin-tabs {
  grid-column: 1;
  grid-row: 1 / span 30;
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow-y: auto;
  padding: 22px 12px;
  border-right: 1px solid var(--line);
  scrollbar-width: thin;
  scrollbar-color: var(--subtle) transparent;
}
.settings-sections {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.settings-nav-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.settings-nav-section[hidden] {
  display: none;
}
.settings-nav-group {
  padding: 14px 10px 4px;
  color: var(--faint);
  font-size: 12px;
}
.settings-nav-section:first-child .settings-nav-group {
  padding-top: 0;
}
.settings-sections button {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  text-align: left;
}
.settings-sections button:hover,
.settings-sections button[aria-current='page'] {
  background: var(--hover-bg);
  color: var(--ink);
}
.soon-badge {
  margin-left: 6px;
  padding: 1px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
}
#admin-settings-actions {
  position: sticky;
  top: 0;
  z-index: 9;
  display: flex;
  justify-content: flex-end;
  padding: 8px 32px;
  border-bottom: 1px solid var(--line);
  background: var(--page);
}
#admin-settings-actions:empty,
#admin-settings-actions:not(:has(> :not([hidden]))) {
  display: none;
}
.settings-page {
  max-width: 900px;
  padding: 0 32px 48px;
}
.settings-page-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.settings-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.settings-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  background: transparent;
}
.settings-card h2 {
  font-size: 16px;
}
.settings-card p {
  color: var(--muted);
  line-height: 1.55;
}
.email-settings > .management-card,
.email-setup-help {
  border-top: 1px solid var(--line);
  background: transparent;
}
.email-settings > .management-card {
  padding: 20px 0 0;
}
.email-settings > .management-card > .management-card-head {
  padding: 0 0 12px;
}
.email-settings > .management-card > .management-card-body {
  padding: 0;
}
.email-setup-help > summary {
  padding: 16px 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.email-setup-help > summary:focus-visible {
  border-radius: 8px;
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.email-setup-guide {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.email-setup-guide ol {
  margin: 0;
  padding-left: 20px;
}
.email-setup-guide li + li {
  margin-top: 8px;
}
.email-setup-guide .toolbar-actions {
  justify-content: flex-start;
}
.email-setup-guide .error:empty {
  display: none;
}
.email-next-step {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--line);
}
.email-help-label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}
.settings-placeholder {
  padding: 24px;
  color: var(--muted);
  line-height: 1.55;
  text-align: center;
}
@media (max-width: 760px) {
  #app-view.shell {
    display: block;
  }
  .mobile-bar {
    position: sticky;
    top: 0;
    z-index: 15;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--line);
    background: var(--side);
  }
  .workspace-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(86vw, 320px);
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    z-index: 40;
    box-shadow: 0 0 40px var(--shadow);
  }
  #app-view[data-sidebar='open'] .workspace-sidebar {
    transform: none;
  }
  #app-view[data-sidebar='open'] .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 35;
    display: block;
    background: rgb(0 0 0 / 45%);
  }
  .workspace-sidebar .icon-button.sidebar-close {
    display: grid;
  }
  .home-view {
    min-height: calc(100dvh - 54px);
    padding: 40px 16px;
  }
  .home-greeting {
    font-size: 30px;
  }
  .thread-view {
    min-height: calc(100dvh - 54px);
  }
  .thread-head {
    top: 54px;
    padding: 10px 16px;
  }
  .thread-messages,
  .thread-foot {
    padding-left: 16px;
    padding-right: 16px;
  }
  #main:has(> #admin-tabs:not([hidden])) {
    display: block;
  }
  #main:has(> #admin-tabs:not([hidden])) > #admin-tabs {
    position: static;
    height: auto;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .settings-sections {
    flex-direction: row;
    overflow-x: auto;
  }
  .settings-nav-section {
    flex-direction: row;
  }
  .settings-sections button {
    flex: none;
  }
  .settings-nav-group {
    display: none;
  }
  #admin-settings-actions {
    padding: 8px 18px;
  }
  .settings-page-tabs {
    padding: 0 18px;
  }
  .settings-page {
    padding: 0 18px 40px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .workspace-sidebar {
    transition: none;
  }
}
#nav-portal::after {
  content: ' ↗';
}

/* VOVA-078: a ticket's sections — Chat, Ticket and Details. */
.ticket-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-bottom: 12px;
}
.ticket-bar .ticket-meta {
  margin-bottom: 0;
}
.ticket-sections {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--side, #f2f0e8);
}
.ticket-sections button {
  min-height: 32px;
  padding: 5px 14px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}
.ticket-sections button:hover {
  color: var(--ink);
}
.ticket-sections button[aria-pressed='true'] {
  background: var(--surface, white);
  color: var(--ink);
  box-shadow: 0 1px 2px var(--shadow);
}
.ticket-sections button[hidden] {
  display: none;
}
/* VOVA-081: an open ticket has the page to itself: no list header or tab strip. */
#main:has(> #inbox-view:not([hidden]) > #ticket-page:not([hidden])) > .page-head,
#inbox-view:has(> #ticket-page:not([hidden])) > .ticket-tabs {
  display: none;
}
.ticket-back {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
}
.ticket-back:hover {
  background: var(--hover-bg);
  color: var(--ink);
}
.ticket-back .icon {
  width: 17px;
  height: 17px;
}
#detail-content[data-section] .ticket-grid {
  display: block;
  min-height: 0;
}
#detail-content[data-section='ticket'] .ticket-params,
#detail-content[data-section='ticket'] .ticket-contact,
#detail-content[data-section='chat'] .ticket-params,
#detail-content[data-section='chat'] .ticket-contact,
#detail-content[data-section='chat'] .ticket-main,
#detail-content[data-section='details'] .ticket-main {
  display: none;
}
#detail-content[data-section='ticket'] .ticket-main {
  max-width: 940px;
  margin: 0 auto;
  border: 0;
}
#detail-content[data-section='details'] .ticket-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 16px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 22px 32px 40px;
  align-items: start;
}
#detail-content[data-section='details'] .ticket-params,
#detail-content[data-section='details'] .ticket-contact {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface, white);
  align-self: start;
}
#detail-content[data-section='details'] .ticket-params > summary {
  display: none;
}
#detail-content[data-section='details'] .params {
  padding: 18px;
}
#detail-content[data-section='details'] .ticket-contact {
  padding: 18px;
}

/* The conversation reads as a chat: the customer on the left, the team on the right. */
#ticket-page .message {
  margin-bottom: 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}
#ticket-page .message.internal .message-top {
  padding: 6px 0 0;
}
#ticket-page .message-body,
#ticket-page .message.internal .message-body,
#ticket-page .message.outgoing .message-body {
  width: fit-content;
  min-width: 0;
  max-width: min(78%, 85ch);
  margin-top: 6px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface, white);
  line-height: 1.6;
}
#ticket-page .message.customer .message-body {
  margin-left: 40px;
  border-top-left-radius: 6px;
}
#ticket-page .message.outgoing .message-body {
  margin-left: auto;
  margin-right: 40px;
  border-color: var(--accent-line, #cad8f6);
  border-top-right-radius: 6px;
  background: var(--accent-soft, #e6edfb);
}
#ticket-page .message.internal .message-body {
  border-color: var(--note-line, #ead9a6);
  background: var(--note, #fbf1d6);
}
@media (max-width: 760px) {
  #detail-content[data-section='details'] .ticket-grid {
    padding: 16px 18px 32px;
  }
  #detail-content[data-section='details'] .params,
  #detail-content[data-section='details'] .ticket-contact {
    padding: 16px;
  }
}
@media (max-width: 600px) {
  #ticket-page .message-body,
  #ticket-page .message.internal .message-body,
  #ticket-page .message.outgoing .message-body {
    max-width: 92%;
  }
  #ticket-page .message.customer .message-body {
    margin-left: 0;
  }
  #ticket-page .message.outgoing .message-body {
    margin-right: 0;
  }
}

/* Each member's chat with Escalio AI about the ticket. */
.ticket-chat {
  display: none;
}
#detail-content[data-section='chat'] .ticket-chat {
  display: flex;
  flex-direction: column;
  min-height: 62vh;
}
.ticket-chat-note,
.ticket-chat-empty,
#ticket-chat-saved,
.ticket-chat-others {
  width: min(100%, 780px);
  margin: 0 auto;
  padding: 0 24px;
}
.ticket-chat-note {
  padding-top: 18px;
  color: var(--faint);
  font-size: 13px;
  text-align: center;
}
.ticket-chat-empty {
  padding-top: 36px;
  padding-bottom: 12px;
  color: var(--muted);
  text-align: center;
}
.ticket-chat-empty[hidden] {
  display: none;
}
.ticket-chat-empty h2 {
  margin-bottom: 8px;
  color: var(--ink);
  font-family: ui-serif, 'New York', Georgia, 'Times New Roman', serif;
  font-size: 26px;
  font-weight: 400;
}
.ticket-chat-empty p {
  max-width: 460px;
  margin: 0 auto;
  font-size: 14px;
  line-height: 1.55;
}
.ticket-chat .ticket-chat-messages {
  flex: 0 0 auto;
  padding-top: 18px;
  padding-bottom: 10px;
}
.ticket-chat .ticket-chat-messages:empty {
  display: none;
}
#ticket-chat-saved[hidden] {
  display: none;
}
.ticket-chat-others {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.ticket-chat-others:empty {
  display: none;
}
.ticket-chat-other {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface, white);
}
.ticket-chat-other > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
}
.ticket-chat-member {
  font-weight: 500;
}
.ticket-chat-kind {
  color: var(--faint);
  font-size: 12px;
}
.ticket-chat-other .ticket-chat-messages {
  width: 100%;
  padding: 4px 14px 14px;
}
.thread-message.other {
  align-items: flex-start;
}
.ticket-chat-foot {
  margin-top: auto;
}
.shared-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--subtle, #eeebe4);
  color: var(--ink);
  font-size: 13px;
}
.shared-chip[hidden] {
  display: none;
}
.shared-chip .icon {
  width: 15px;
  height: 15px;
}

/* The "+" menu of the chats with Escalio AI. */
.plus-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}
.home-plus[aria-expanded='true'] {
  background: var(--hover-bg);
  color: var(--ink);
}
.plus-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: min(310px, calc(100vw - 48px));
  max-height: min(440px, 70dvh);
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface, white);
  box-shadow: 0 12px 32px var(--shadow);
  text-align: left;
}
.plus-menu[hidden] {
  display: none;
}
.plus-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  text-align: left;
}
button.plus-row:hover,
label.plus-row:hover {
  background: var(--hover-bg);
}
label.plus-row {
  cursor: pointer;
}
.plus-row .icon {
  width: 17px;
  height: 17px;
  color: var(--muted);
}
.plus-row .soon-badge {
  margin-left: auto;
}
.plus-words {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
}
.plus-note,
.plus-value {
  color: var(--faint);
  font-size: 12px;
}
.plus-off {
  color: var(--muted);
}
.plus-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 4px 4px;
}
.plus-head strong {
  flex: 1 1 auto;
  font-weight: 500;
}
.plus-back {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
}
.plus-back:hover {
  background: var(--hover-bg);
  color: var(--ink);
}
.plus-back .icon {
  width: 16px;
  height: 16px;
}
.plus-line {
  margin: 4px 6px;
  border: 0;
  border-top: 1px solid var(--line);
}
.plus-hint {
  padding: 6px 10px;
  color: var(--faint);
  font-size: 12px;
}
.plus-row input[role='switch'] {
  flex: none;
  width: 34px;
  height: 20px;
  margin: 0;
  padding: 2px;
  border: 1px solid var(--switch-off, #a8a397);
  border-radius: 999px;
  background: var(--switch-off, #a8a397);
  appearance: none;
  cursor: pointer;
}
.plus-row input[role='switch']::before {
  content: '';
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
}
.plus-row input[role='switch']:checked {
  border-color: var(--accent);
  background: var(--accent);
}
.plus-row input[role='switch']:checked::before {
  transform: translateX(14px);
}
@media (forced-colors: active) {
  .plus-row input[role='switch'] {
    appearance: auto;
  }
  .plus-row input[role='switch']::before {
    display: none;
  }
}

/* VOVA-080: Settings → AI → Models and system administration's AI models. */
.ai-settings {
  max-width: 980px;
}
.ai-card {
  gap: 14px;
}
.ai-card h3 {
  font-size: 14px;
}
.ai-card .field {
  display: grid;
  gap: 6px;
  max-width: 520px;
  margin: 0;
}
.ai-card .field[hidden] {
  display: none;
}
.ai-card > .button,
.ai-key-form > .button {
  align-self: flex-start;
}
.ai-switch {
  font-weight: 500;
}
.ai-table-wrap {
  overflow-x: auto;
}
.ai-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.ai-table th {
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  color: var(--faint);
  font-weight: 500;
  text-align: left;
}
.ai-table td {
  padding: 8px;
  border-bottom: 1px solid var(--soft-line, var(--line));
  vertical-align: middle;
}
.ai-table tr:last-child td {
  border-bottom: 0;
}
.ai-note {
  display: block;
  color: var(--faint);
  font-size: 12px;
}
.ai-catalog input:not([type='checkbox']),
.ai-catalog select {
  min-width: 0;
  width: 100%;
  min-height: 34px;
  padding: 4px 8px;
  font-size: 13px;
}
.ai-catalog td:nth-child(2) {
  min-width: 150px;
}
.ai-catalog td:nth-child(3),
.ai-catalog td:nth-child(5) {
  min-width: 120px;
}
.ai-catalog td:nth-child(4) {
  min-width: 150px;
}
.ai-settings.ai-wide {
  max-width: 1280px;
}
.ai-catalog td:nth-child(6),
.ai-catalog td:nth-child(7) {
  min-width: 90px;
}
.ai-keys {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ai-key {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.ai-key-words {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  overflow-wrap: anywhere;
  flex: 1 1 300px;
}
.ai-key-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.ai-key-actions,
.ai-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.ai-key-actions input {
  width: min(220px, 100%);
  min-height: 36px;
}
.ai-key-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.ai-test-result {
  color: var(--muted);
}

/* VOVA-083: two switches on Settings → AI → Models, each source's settings
   under its switch, and a dropdown to choose a key's models. */
.ai-intro {
  max-width: 760px;
}
.ai-switch {
  align-items: flex-start;
  cursor: pointer;
}
.ai-switch input[role='switch'] {
  margin-top: 1px;
}
.ai-switch-words {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-weight: 400;
}
.ai-switched {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.ai-switched > .ai-key-form:first-child {
  padding-top: 0;
  border-top: 0;
}
.ai-model-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}
.ai-model-chips li {
  padding: 1px 8px;
  border: 1px solid var(--accent-line, #d6e3fc);
  border-radius: 6px;
  background: var(--accent-soft);
  font-size: 12px;
}
.ai-key-editor {
  display: flex;
  flex-basis: 100%;
  flex-direction: column;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.ai-gone {
  color: var(--danger-ink, #9b2c22);
  overflow-wrap: anywhere;
}
.ai-checked {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  max-width: 520px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow-wrap: anywhere;
}
.multi-select {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 520px;
}
.multi-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--field-line, #cbd7e8);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.multi-select-caret {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  margin: 0 2px 4px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
}
.multi-select-trigger[aria-expanded='true'] .multi-select-caret {
  margin: 4px 2px 0;
  transform: rotate(-135deg);
}
.multi-select-panel {
  position: absolute;
  top: 46px;
  right: 0;
  left: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: min(380px, 60dvh);
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface, white);
  box-shadow: 0 12px 32px var(--shadow);
}
.multi-select-panel[hidden],
.multi-select-option[hidden] {
  display: none;
}
.multi-select-search {
  min-height: 36px;
  padding: 6px 10px;
}
.multi-select-options {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
}
.multi-select-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 6px;
  font-size: 14px;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.multi-select-option:hover {
  background: var(--hover-bg, var(--accent-soft));
}
.multi-select-option input {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  padding: 0;
  accent-color: var(--accent);
}
.multi-select-none {
  padding: 6px 8px;
}
.multi-select-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.multi-select-foot p {
  margin-right: auto;
}
.multi-select-foot .button {
  min-height: 34px;
  padding: 6px 12px;
}
.multi-select-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.multi-select-chips:empty {
  display: none;
}
.multi-select-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  max-width: 100%;
  padding: 2px 2px 2px 10px;
  border: 1px solid var(--accent-line, #d6e3fc);
  border-radius: 6px;
  background: var(--accent-soft);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.multi-select-chip button {
  display: inline-grid;
  flex-shrink: 0;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.multi-select-chip button:hover {
  color: var(--ink);
}

/* VOVA-082: Escalio AI's answers. */
.thread-message.assistant .thread-body {
  max-width: 100%;
}
/* VOVA-102: Escalio AI's answers in light Markdown. */
.thread-body.markdown {
  white-space: normal;
}
.thread-body.markdown > * {
  margin: 0 0 8px;
}
.thread-body.markdown > :last-child {
  margin-bottom: 0;
}
.thread-body.markdown ul,
.thread-body.markdown ol {
  padding-left: 22px;
}
.thread-body.markdown li + li {
  margin-top: 3px;
}
.thread-body.markdown .md-heading {
  font-weight: 650;
}
.thread-body.markdown code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--subtle);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}
.thread-body.markdown pre {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--subtle);
  overflow-x: auto;
  white-space: pre;
}
.thread-body.markdown pre code {
  padding: 0;
  background: none;
}
.thread-body.markdown blockquote {
  padding-left: 10px;
  border-left: 3px solid var(--line);
  color: var(--muted);
}
.thread-body.markdown hr {
  border: 0;
  border-top: 1px solid var(--line);
}
.thread-body.markdown .md-host {
  color: var(--muted);
  font-size: 0.9em;
}
.answer-dots {
  display: inline-flex;
  gap: 5px;
  padding: 8px 2px;
}
.answer-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--faint);
  animation: answer-dot 1.2s ease-in-out infinite;
}
.answer-dots span:nth-child(2) {
  animation-delay: 0.2s;
}
.answer-dots span:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes answer-dot {
  0%,
  80%,
  100% {
    opacity: 0.3;
  }
  40% {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .answer-dots span {
    animation: none;
  }
}
.answer-failed {
  gap: 8px;
}
.answer-failed .thread-body {
  color: var(--danger-ink, #9b2c22);
}
/* VOVA-084: what Escalio AI looked at, under its answer. */
/* VOVA-085: Settings → AI → Connectors, and an action waiting for the member. */
.connectors {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.connector {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.connector-words {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.connector-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.connector-status {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--subtle, var(--canvas));
  color: var(--muted);
  font-size: 11px;
}
.connector-status.active {
  background: var(--ok-soft);
  color: var(--ok-ink);
}
.connector-status.failed {
  background: var(--warn-soft);
  color: var(--warn-ink);
}
.connector-note {
  color: var(--muted);
}
.connector-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.connector-editor {
  display: flex;
  flex-basis: 100%;
  flex-direction: column;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.connector-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.connector-form .field {
  display: grid;
  gap: 6px;
  max-width: 520px;
}
.connector-kinds {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.connector-kind {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--field-line, #cbd7e8);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.connector-kind[aria-checked='true'] {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.connector-kind:disabled {
  cursor: default;
}
.answer-action {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 640px;
  padding: 12px 14px;
  border: 1px solid var(--accent);
  border-radius: 12px;
}
.answer-action-arguments {
  max-height: 220px;
  margin: 0;
  padding: 8px 10px;
  overflow: auto;
  border-radius: 8px;
  background: var(--subtle, var(--canvas));
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.answer-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
/* The newest message comes into view above the composer that stays at the bottom. */
.thread-messages > li {
  scroll-margin-bottom: 170px;
}
.answer-sources {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 12px;
}
.answer-sources-title {
  color: var(--faint);
}
.answer-source {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  max-width: 100%;
  min-height: 0;
  padding: 2px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  overflow-wrap: anywhere;
}
button.answer-source {
  cursor: pointer;
}
button.answer-source:hover {
  border-color: var(--accent);
  color: var(--ink);
}
.answer-source-kind {
  color: var(--faint);
}
.ai-spent {
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
}
.ai-meter {
  width: 100%;
  height: 8px;
  accent-color: var(--accent);
}

/* VOVA-088: Escalio in Claude. */
.claude-url {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.claude-url code {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-wrap: anywhere;
}
.claude-connect .dialog-body .claude-connect-who {
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 12px;
}
.claude-connect-list {
  margin: 0 0 16px 18px;
  font-size: 13px;
  display: grid;
  gap: 6px;
}
.message-via {
  color: var(--muted);
}

/* VOVA-090: ownership. */
.ownership-owners,
.ownership-history {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  display: grid;
  gap: 6px;
}
.ownership-owner {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ownership-open {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.ownership-open p {
  margin: 0 0 4px;
}
.ownership-dialog .dialog-body label {
  display: block;
  margin: 12px 0 6px;
}
.ownership-dialog .dialog-body input {
  width: 100%;
}
.ownership {
  margin-bottom: 18px;
}
.ownership h3 {
  margin: 0 0 8px;
}

/* VOVA-092: the setup thread's cards and steps. */
.home-setup {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 14px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.home-setup[hidden] {
  display: none;
}

/* VOVA-095: the advisor's suggestion under the home's message box, the trial's
   line in the sidebar and, near its end, what the trial gave. */
.home-suggestion {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 12px;
  max-width: 720px;
  margin-top: -6px;
  font-size: 13px;
}
.home-suggestion[hidden],
.home-suggestion [hidden] {
  display: none;
}
.home-suggestion-use,
.home-suggestion-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 4px 8px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}
.home-suggestion-use {
  color: var(--ink);
}
.home-suggestion-use:hover,
.home-suggestion-link:hover {
  background: var(--subtle);
}
.home-suggestion-use:focus-visible,
.home-suggestion-link:focus-visible,
.sidebar-trial:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}
@media (pointer: coarse) {
  .home-suggestion kbd {
    display: none;
  }
}
.home-suggestion kbd {
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--subtle);
  color: var(--muted);
  font: inherit;
  font-size: 12px;
}
.sidebar-trial {
  display: block;
  width: 100%;
  margin: 4px 0 0;
  padding: 6px 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--faint);
  font: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}
.sidebar-trial[hidden] {
  display: none;
}
.sidebar-trial:hover {
  background: var(--subtle);
  color: var(--muted);
}
#home-trial[hidden] {
  display: none;
}
.home-trial {
  width: 100%;
  max-width: 560px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 14px;
}
.home-trial-title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
}
.home-trial-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
}
.home-trial-facts li {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--subtle);
  color: var(--ink);
  font-size: 13px;
}
.home-trial-next {
  margin: 0 0 10px;
  color: var(--muted);
}
.home-setup:hover {
  background: var(--accent-bg, var(--accent));
  color: var(--on-accent, #fff);
}
.thread-setup {
  border-bottom: 1px solid var(--line);
}
.thread-setup[hidden] {
  display: none;
}
.setup-progress {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  width: min(100%, 780px);
  margin: 0 auto;
  padding: 10px 24px;
  font-size: 12px;
}
.setup-steps {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.setup-step {
  padding: 2px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  white-space: nowrap;
}
.setup-step.done {
  border-color: var(--ok-ink, #276948);
  background: var(--ok-soft, #eaf5ef);
  color: var(--ok-ink, #276948);
}
.setup-step.skipped {
  color: var(--faint);
  text-decoration: line-through;
}
.setup-count {
  color: var(--faint);
  white-space: nowrap;
}
.setup-progress .button {
  min-height: 30px;
  font-size: 12px;
}
.setup-card {
  gap: 10px;
}
.setup-card > * {
  max-width: min(100%, 640px);
}
.setup-lead {
  font-weight: 600;
}
.setup-hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.setup-places {
  display: grid;
  gap: 10px;
  width: min(100%, 640px);
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.setup-places dt {
  color: var(--faint);
  font-size: 12px;
}
.setup-places dd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 2px 0 0;
  overflow-wrap: anywhere;
}
.setup-places code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--subtle);
  font-size: 13px;
}
.setup-places .setup-hint {
  margin-top: 4px;
}
.setup-state {
  color: var(--faint);
  font-size: 12px;
}
.setup-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.setup-option {
  min-height: 34px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.setup-option:hover:not(:disabled) {
  border-color: var(--accent);
}
.setup-option[aria-pressed='true'] {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.setup-option:disabled {
  cursor: default;
  opacity: 0.7;
}
.setup-option:disabled[aria-pressed='true'] {
  opacity: 1;
}
.setup-actions,
.setup-results {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--accent);
  border-radius: 12px;
  list-style: none;
}
.setup-results {
  border-color: var(--line);
}
.setup-action {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.setup-swatch {
  width: 14px;
  height: 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.setup-buttons,
.setup-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.setup-links .button {
  min-height: 32px;
  font-size: 13px;
  text-decoration: none;
}
.setup-mark {
  display: inline-block;
  min-width: 1em;
  text-align: center;
}
.setup-ok .setup-mark {
  color: var(--ok-ink, #276948);
}
.setup-failed {
  color: var(--danger-ink, #8d3028);
}
.setup-quote {
  padding: 8px 12px;
  border-left: 3px solid var(--accent);
  background: var(--subtle);
  border-radius: 0 8px 8px 0;
}
.setup-focus {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  transition: outline-color 0.6s;
}
@media (max-width: 640px) {
  .setup-progress {
    padding: 8px 16px;
  }
}
.setup-action input[type='checkbox'] {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
}
.setup-links a.button {
  color: var(--ink);
}
.setup-admin .ai-table input {
  max-width: 140px;
}
/* VOVA-093: the website's draft of the portal. */
.setup-site {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
}
.setup-site .setup-hint {
  flex-basis: 100%;
}
.setup-site-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: contain;
}
.setup-site-icon.small {
  width: 18px;
  height: 18px;
  border-radius: 4px;
}
.setup-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.setup-color {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 2px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
}
.setup-color[aria-checked='true'] {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px var(--page);
}
.setup-color:disabled {
  cursor: default;
}
.setup-site-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 0 26px;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 12px;
}
.setup-site-links li {
  padding: 1px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.setup-ready {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

/* VOVA-110: a Settings section's pages as tabs under its title. */
.settings-page-tabs {
  padding: 0 32px;
}
.page-about {
  margin-top: -4px;
}
/* VOVA-110: Billing's planned prices and payment preview, folded. */
.billing-page > .billing-planned {
  padding: 1.25rem 0;
}
.billing-planned > summary {
  width: fit-content;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
}
.billing-planned > section {
  display: grid;
  gap: 0.6rem;
  padding: 1rem 0 0;
}
.billing-planned > section > :is(h3, p) {
  margin: 0;
}
.billing-planned > section > .button {
  justify-self: start;
}
#main:has(> #settings-tabs:not([hidden])) > .settings-page {
  padding-top: 20px;
}
.automation-rule {
  min-width: 190px;
}
.automation-controls {
  display: grid;
  gap: 8px;
  justify-items: start;
}
/* VOVA-109: a setting's longer explanation, folded under it. */
.setting-more > summary {
  width: fit-content;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}
.setting-more > summary:focus-visible {
  border-radius: 6px;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.setting-more > p {
  margin: 6px 0 0;
}
/* VOVA-094: importing history from another help desk. */
/* VOVA-109: on the Import page the panel is the page; no fold. */
.history-import.standalone > summary {
  display: none;
}
.history-import .import-systems {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.import-field {
  display: grid;
  gap: 4px;
  font-size: 13px;
}
.import-columns {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px 16px;
}
.import-values {
  display: grid;
  gap: 6px;
}
.import-values h4,
.history-import h3,
.history-import h4 {
  margin: 4px 0 0;
  font-size: 13px;
}
.import-values .import-field {
  grid-template-columns: minmax(120px, 1fr) minmax(140px, 200px);
  align-items: center;
}
.import-extra {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.import-extra input[type='checkbox'] {
  width: auto;
}
.import-sample-wrap {
  overflow-x: auto;
}
.import-sample {
  border-collapse: collapse;
  font-size: 12px;
}
.import-sample th,
.import-sample td {
  max-width: 220px;
  padding: 4px 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.import-counts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 12px;
  margin: 0;
  font-size: 13px;
}
.import-counts dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}
.import-notes,
.import-warnings,
.import-samples {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
}
.import-notes,
.import-warnings {
  color: var(--muted);
}
.import-bar {
  width: 100%;
  height: 8px;
  accent-color: var(--accent);
}
.import-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.import-history ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  font-size: 13px;
  list-style: none;
}
.import-history p {
  margin: 2px 0 0;
}
.history-import .management-stack {
  gap: 14px;
}
.history-import .management-stack > .button {
  justify-self: start;
}
/* VOVA-098: Settings → Channels → Website chat. */
.website-chat .management-stack > .button {
  justify-self: start;
}
.website-chat .chat-snippet {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--canvas);
  border: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
/* VOVA-096: sharing the setup conversation to improve the setup. */
.setup-share {
  display: flex;
  flex-basis: 100%;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  color: var(--ink, inherit);
}
.setup-share input {
  width: auto;
  margin: 0;
}
.setup-share-note {
  flex-basis: 100%;
  margin: -4px 0 0 24px;
  color: var(--faint);
}
/* VOVA-096: System administration → Improving the setup. */
.setup-learning-edit textarea,
.setup-learning-edit input {
  width: 100%;
  margin: 6px 0;
  font: inherit;
}
.setup-learning-edit textarea {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 12px;
}
.setup-learning-item,
.setup-learning-run,
.setup-learning-shared {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.setup-learning-shared {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
}
.setup-learning-shared .button {
  margin-left: auto;
}
.setup-learning-shared .button + .button {
  margin-left: 0;
}
.setup-learning-item.active {
  border-color: var(--ok-ink, #276948);
}
.setup-learning-item.rejected,
.setup-learning-item.retired,
.setup-learning-shared.off {
  opacity: 0.7;
}
.setup-learning-diff {
  max-height: 360px;
  overflow: auto;
  margin: 6px 0 0;
  padding: 8px;
  border-radius: var(--radius);
  background: var(--canvas);
  font-size: 12px;
  white-space: pre-wrap;
}
.setup-learning-diff .added {
  color: var(--ok-ink, #276948);
}
.setup-learning-diff .removed {
  color: var(--danger, #b42318);
}
.setup-learning-result {
  margin: 8px 0 0;
}
.setup-learning-result.failed strong {
  color: var(--danger, #b42318);
}
.setup-learning-result.passed strong {
  color: var(--ok-ink, #276948);
}
.setup-learning-messages {
  display: grid;
  gap: 8px;
  margin: 8px 0;
  padding: 0;
  list-style: none;
}
.setup-learning-message {
  padding: 8px 10px;
  border-radius: var(--radius);
  background: var(--canvas);
}
.setup-learning-message p {
  margin: 4px 0;
  white-space: pre-wrap;
}
.setup-learning-case {
  display: grid;
  gap: 6px;
  margin-top: 6px;
}

/* Wallet proof inherits the current workspace/portal colors. */
.wallet-dialog {
  max-width: 32rem;
  width: calc(100% - 2rem);
  padding: 1.5rem;
  border-radius: 1rem;
  background: var(--surface, var(--paper, #fff));
  color: var(--text, var(--ink, inherit));
  border: 1px solid var(--border, var(--line, #dce3ed));
}
.wallet-dialog::backdrop {
  background: #0009;
}
.wallet-dialog canvas {
  display: block;
  margin: 1rem auto;
}
.wallet-dialog label,
.wallet-dialog input {
  display: block;
  margin: 0.75rem 0;
}
.wallet-dialog p {
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.wallet-dialog button {
  margin: 0.5rem 0.5rem 0.5rem 0;
}

.wallet-dialog [hidden] {
  display: none;
}

/* VOVA-113: System administration → Onboarding. */
.funnel-step {
  display: grid;
  gap: 6px;
  min-width: 140px;
}
.funnel-bar {
  appearance: none;
  width: 100%;
  height: 6px;
  border: 0;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}
.funnel-bar::-webkit-progress-bar {
  background: var(--line);
}
.funnel-bar::-webkit-progress-value {
  background: var(--accent);
}
.funnel-bar::-moz-progress-bar {
  background: var(--accent);
}
.onboarding-step {
  white-space: nowrap;
}
.onboarding-done {
  margin-right: 4px;
  color: var(--accent);
}

/* License dates and recovery stay visible outside Settings. */
.license-banner {
  margin: 12px 20px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--ink);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
}
.license-banner[hidden] {
  display: none;
}
.license-banner > span:first-child {
  flex: 1 1 260px;
}

/* CODEX-067: account pages share the landing/workspace's restrained layout. */
#auth-view:not(.company-theme) {
  min-height: 100svh;
  grid-template-columns: minmax(300px, 1fr) minmax(440px, 1fr);
  background: var(--page);
}
#auth-view:not(.company-theme) .auth-story {
  background: var(--side);
  color: var(--ink);
  border-right: 1px solid var(--line);
  padding: 44px clamp(28px, 6vw, 96px);
}
#auth-view:not(.company-theme) .auth-story > div {
  margin-block: auto;
}
#auth-view:not(.company-theme) .auth-story h1 {
  font-size: clamp(36px, 4vw, 58px);
  line-height: 1.08;
  letter-spacing: -2px;
  max-width: 500px;
}
#auth-view:not(.company-theme) .auth-story p:not(.eyebrow) {
  color: var(--muted);
  max-width: 440px;
  font-size: 15px;
}
#auth-view:not(.company-theme) .auth-story .eyebrow {
  color: var(--muted);
}
#auth-view:not(.company-theme) .auth-panel {
  background: var(--page);
  padding: 44px clamp(24px, 5vw, 80px);
  position: relative;
}
#auth-view:not(.company-theme) .auth-card {
  max-width: 440px;
}
#auth-view:not(.company-theme) .auth-card h2 {
  font-size: 28px;
  letter-spacing: -0.8px;
}
#auth-view:not(.company-theme) .auth-card label {
  font-size: 13px;
}
#auth-view:not(.company-theme) .auth-card .muted {
  font-size: 14px;
}
#auth-view:not(.company-theme) .auth-card .form-help,
#auth-view:not(.company-theme) .auth-limit,
#auth-view:not(.company-theme) .signup-limit {
  font-size: 12px;
  line-height: 1.65;
}
#auth-view:not(.company-theme) a {
  color: var(--accent);
}
#auth-view:not(.company-theme) .brand {
  color: var(--ink);
}
#auth-view:not(.company-theme) .address-suffix {
  border-color: var(--field-line);
  background: var(--side);
}
#auth-view:not(.company-theme) .auth-card input:not([type='checkbox']) {
  background: transparent;
}
#auth-view:not(.company-theme) .error-message {
  background: var(--danger-soft);
  color: var(--danger-ink);
  border-color: var(--danger-line);
}
#auth-view:not(.company-theme) .notice-message {
  background: var(--info-soft);
  color: var(--info-ink);
  border-color: var(--accent-line);
}
.auth-card .signup-consent input {
  appearance: none;
  display: grid;
  place-content: center;
  width: 17px;
  height: 17px;
  min-height: 17px;
  padding: 0;
  border: 1px solid var(--field-line, var(--line));
  border-radius: 3px;
  background: transparent;
  color: var(--on-accent, #fff);
  cursor: pointer;
}
.auth-card .signup-consent input:checked {
  background: var(--accent-bg, var(--accent));
  border-color: var(--accent-bg, var(--accent));
}
.auth-card .signup-consent input:checked::after {
  content: '';
  width: 8px;
  height: 4px;
  border: solid currentColor;
  border-width: 0 0 2px 2px;
  transform: translateY(-1px) rotate(-45deg);
}
@media (forced-colors: active) {
  .auth-card .signup-consent input {
    appearance: auto;
  }
  .auth-card .signup-consent input::after {
    content: none;
  }
}
.account-theme {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
}
.auth-panel > .account-theme {
  position: absolute;
  top: 20px;
  right: 20px;
}
.company-theme .account-theme {
  display: none;
}
.invitation-page {
  width: min(100% - 48px, 480px);
  margin: clamp(32px, 8vh, 80px) auto;
}
.invitation-page .account-theme {
  float: right;
  width: 36px;
}
.invitation-page h1 {
  margin-bottom: 12px;
  font-size: 30px;
  letter-spacing: -0.8px;
}
.invitation-page p {
  margin: 14px 0;
}
.invitation-page .error-message {
  color: var(--danger-ink);
  background: var(--danger-soft);
  border-color: var(--danger-line);
}
.waitlist-view {
  background: var(--page);
}
.waitlist-card {
  background: var(--paper);
  border-radius: 8px;
  box-shadow: none;
}
.waitlist-badge {
  background: var(--accent-soft);
  color: var(--accent);
}
@media (max-width: 760px) {
  #auth-view:not(.company-theme) {
    display: block;
  }
  #auth-view:not(.company-theme) .auth-story {
    padding: 24px;
    background: var(--page);
    border: 0;
  }
  #auth-view:not(.company-theme) .auth-panel {
    padding: 24px 24px 40px;
  }
  .auth-panel > .account-theme {
    top: -58px;
    right: 24px;
  }
}

/* VOVA-114: System administration → Licenses. */
.license-expiring,
.license-grace,
.license-over {
  color: var(--warn-ink, #785b21);
  font-weight: 600;
}
.license-ended {
  color: var(--danger-ink, #864354);
  font-weight: 600;
}
.licenses .badge,
.licenses .license-date {
  white-space: nowrap;
}
.licenses .management-table {
  min-width: 1040px;
}
.license-mix {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.license-mix .management-table {
  min-width: 0;
}
.license-rates {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  align-items: end;
}
.license-rate {
  display: grid;
  gap: 6px;
  font-size: 13px;
}
.licenses a.button {
  text-decoration: none;
}
.license-payment_failed {
  color: var(--danger-ink, #864354);
  font-weight: 600;
}
.license-payment_review,
.license-cancelling {
  color: var(--warn-ink, #785b21);
  font-weight: 600;
}
/* VOVA-122: "Why are you leaving?" in Billing. */
.leaving-card fieldset {
  display: grid;
  gap: 8px;
  border: 0;
  margin: 0;
  padding: 0;
}
.leaving-card label {
  display: flex;
  gap: 8px;
  align-items: center;
}
.leaving-card textarea {
  width: 100%;
  min-height: 72px;
}
.leaving-card form {
  display: grid;
  gap: 12px;
}
.performance-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
}
.performance-field {
  display: grid;
  gap: 6px;
  min-width: 160px;
  max-width: 300px;
}
.performance-parameters {
  flex-basis: 100%;
}
.performance-parameters:empty {
  display: none;
}
.performance .management-facts {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.performance-parameter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.performance-parameter > * {
  max-width: 240px;
}
.performance-relay {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.resolution-review {
  flex-basis: 100%;
  gap: 12px;
  padding: 16px 0;
}
.resolution-review select {
  max-width: 100%;
}
.resolution-evidence pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
}
.member-recovery > button {
  justify-self: start;
}

.settings-group > .sign-in-heading,
.portal-auth-settings > .sign-in-heading {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}
.portal-sso-provider {
  margin-top: 16px;
  max-width: 720px;
}
.portal-sso-provider > div {
  margin: 12px 0;
}
/* VOVA-133: broadcasts from the organization's bots. */
.broadcast-chats {
  display: grid;
  gap: 12px;
}
.broadcast-chat-group {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.broadcast-chat-group legend {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
}
.broadcast-chat-group .choice-list {
  max-height: 220px;
}
.broadcasts .management-form label.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  font-weight: 400;
}
.broadcast-chat-group .checkbox-row .cell-sub {
  margin-left: auto;
  font-size: 12px;
}
.broadcasts .broadcast-chats-label {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 7px;
}
.broadcast-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.broadcast-posts {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.broadcast-post {
  display: grid;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.broadcast-post:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.broadcast-post-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
}
.broadcast-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
}
.broadcasts .broadcast-add {
  margin-top: 22px;
}
/* VOVA-134: an item's delete sits apart from Cancel and Save. */
.toolbar-actions > .item-delete {
  margin-right: auto;
}
.confirm-dialog {
  width: min(440px, calc(100vw - 28px));
}
.confirm-dialog .dialog-body p.confirm-subject {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}
.confirm-dialog .dialog-body p:last-child {
  margin-bottom: 0;
}
.confirm-dialog .dialog-foot .button.danger {
  background: var(--danger, #b3261e);
  border-color: var(--danger, #b3261e);
  color: white;
}
/* VOVA-135: the status page and its monitors. */
.status-page .management-toolbar {
  justify-content: flex-start;
  gap: 10px;
}
.status-picker-row select:disabled {
  opacity: 0.45;
}
.status-page .oncall-tabs {
  padding: 0;
  background: none;
}
.status-public {
  display: grid;
  gap: 10px;
}
.status-public-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0;
}
.status-address {
  color: var(--accent);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.status-headline {
  margin: 0;
  padding: 10px 12px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  background: var(--ok-soft, #eaf5ef);
  color: var(--ok-ink, #276948);
}
.status-headline.sh-maintenance {
  background: var(--sel-bg, #e5efff);
  color: var(--sel-ink, #2452a2);
}
.status-headline.sh-degraded {
  background: var(--warn-soft, #f6efdd);
  color: var(--warn-ink, #785b21);
}
.status-headline.sh-partial_outage,
.status-headline.sh-major_outage {
  background: var(--danger-soft, #fde8e6);
  color: var(--danger-ink, #a2321f);
}
.badge.danger {
  background: var(--danger-soft, #fde8e6);
  color: var(--danger-ink, #a2321f);
}
.status-badge,
.status-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.status-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1f9d55;
  flex: none;
}
.status-badge.sb-degraded::before {
  background: #c8941a;
}
.status-badge.sb-partial_outage::before {
  background: #dd6b20;
}
.status-badge.sb-major_outage::before {
  background: #d93a3a;
}
.status-badge.sb-maintenance::before {
  background: #3a7bd5;
}
.status-state {
  border-radius: 5px;
  padding: 2px 7px;
  background: var(--subtle, #edf2fa);
  color: var(--subtle-ink, #526686);
}
.status-state.st-investigating {
  background: var(--danger-soft, #fde8e6);
  color: var(--danger-ink, #a2321f);
}
.status-state.st-identified,
.status-state.st-monitoring {
  background: var(--warn-soft, #f6efdd);
  color: var(--warn-ink, #785b21);
}
.status-state.st-resolved,
.status-state.st-completed {
  background: var(--ok-soft, #eaf5ef);
  color: var(--ok-ink, #276948);
}
.status-state.st-scheduled,
.status-state.st-in_progress {
  background: var(--sel-bg, #e5efff);
  color: var(--sel-ink, #2452a2);
}
.status-impacts p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 0 0 4px;
}
.status-picker {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
  display: grid;
  gap: 6px;
}
.status-picker legend {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
}
.status-picker-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}
.status-page .management-form label.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  font-weight: 400;
}
.status-picker-row select {
  width: auto;
  min-width: 190px;
  margin-left: auto;
}
.status-updates,
.status-events {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.status-updates li {
  display: grid;
  gap: 6px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.status-updates li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.status-update-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.status-update-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  margin: 0;
}
.status-events li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.status-test-result {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}
.status-test-result.ok {
  color: var(--ok-ink, #276948);
}
.status-test-result.failed {
  color: var(--danger-ink, #a2321f);
}
.status-token-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}
.status-token-form > div {
  flex: 1 1 220px;
}
