:root {
  --page: #f5f7fb;
  --panel: #ffffff;
  --ink: #14213d;
  --muted: #66728a;
  --line: #dce3ef;
  --blue: #1269f3;
  --blue-soft: #eef5ff;
  --green: #15a85f;
  --green-soft: #eefaf4;
  --red: #ef5548;
  --shadow: 0 12px 32px rgba(18, 33, 62, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.45;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
}
button { cursor: pointer; }
h1, h2, p { margin: 0; }
strong { font-weight: 600; }

.app-shell { min-height: 100vh; padding: 10px; }

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 24px;
  border: 1px solid var(--line);
  border-radius: 10px 10px 0 0;
  background: #fff;
  box-shadow: var(--shadow);
}

.brand, .header-actions, .connection-status, .panel-title, .chat-row,
.voice-controls, .routing-panel, .ticket-actions, .connectors {
  display: flex;
  align-items: center;
}

.brand { gap: 12px; }
.brand strong { display: block; font-size: 18px; font-weight: 600; }
.brand span { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.menu-button { display: none; border: 0; background: transparent; color: var(--ink); }

.logo {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 9px;
  background: linear-gradient(145deg, #0d5fea, #3484ff);
  color: #fff;
  font-weight: 600;
}

.header-actions { gap: 14px; }
.connection-status { gap: 8px; }
.connection-status strong { display: block; font-size: 13px; }
.connection-status span:not(.status-dot) { display: block; color: var(--muted); font-size: 12px; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); }
.pwa-status {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fbff;
  color: var(--muted);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 500;
}
.pwa-status[data-mode="standalone"] {
  border-color: #bce6ce;
  background: var(--green-soft);
  color: var(--green);
}

.secondary-button, .neutral, .outline, .keyboard, .stop {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 0 14px;
}

.avatar {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 600;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(430px, 0.92fr) minmax(560px, 1.08fr);
  gap: 18px;
  max-width: 1480px;
  margin: 0 auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 10px 10px;
  background: #fff;
  box-shadow: var(--shadow);
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  padding: 18px;
}

.panel-title {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.panel-title h1 { font-size: 20px; font-weight: 600; }
.panel-title p { color: var(--muted); margin-top: 4px; }

.completion {
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.intent-bar, .object-switcher, .quick-prompts {
  display: grid;
  gap: 8px;
}

.intent-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 10px; }
.object-switcher { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 12px; }
.quick-prompts { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 14px; }

.intent-option, .object-option, .quick-prompts button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-weight: 500;
}

.quick-prompts button {
  color: var(--muted);
  padding: 0 10px;
  text-align: left;
  font-size: 13px;
  font-weight: 500;
}

.intent-option.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.object-option.active {
  border-color: #9fc1ff;
  background: var(--blue-soft);
  color: var(--blue);
}

.chat-area {
  display: grid;
  gap: 12px;
  min-height: 380px;
  max-height: 52vh;
  overflow: auto;
  padding: 4px 8px 14px 0;
  border-bottom: 1px solid var(--line);
}

.chat-row { gap: 12px; }
.user-row { justify-content: flex-end; }
.bot-icon, .user-icon {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
}
.user-icon { color: var(--ink); }

.bubble {
  max-width: 420px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 11px 13px;
}
.bubble.wide { max-width: 460px; }
.bubble.ai { background: var(--blue-soft); border-color: #c8dcff; }
.bubble.user { background: #fff; }
.bubble header { display: flex; gap: 10px; margin-bottom: 5px; font-size: 12px; }
.bubble header span { color: var(--muted); }
.bubble p { margin: 0; line-height: 1.45; }

.transcript-block { padding-top: 16px; }
.voice-search-block {
  margin-top: 14px;
  border: 2px solid #9fc1ff;
  border-radius: 9px;
  background: linear-gradient(180deg, #f7fbff 0%, #eef5ff 100%);
  padding: 14px;
  box-shadow: 0 8px 24px rgba(63, 99, 238, 0.12);
}
.voice-search-block .block-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.voice-search-block .block-heading strong {
  color: var(--blue);
  font-size: 18px;
}
.voice-search-block .block-heading span {
  border: 1px solid #bce6ce;
  border-radius: 999px;
  background: var(--green-soft);
  padding: 5px 9px;
}
.block-heading strong { display: block; }
.block-heading span, .listening { color: var(--green); font-size: 13px; font-weight: 500; }
.transcript-editor textarea, .mode-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 11px;
  resize: vertical;
  line-height: 1.45;
}
.transcript-editor textarea { margin-top: 9px; }
.voice-search-block .transcript-editor textarea {
  min-height: 136px;
  border-color: #9fc1ff;
  font-size: 15px;
  line-height: 1.5;
  box-shadow: inset 0 0 0 1px rgba(63, 99, 238, 0.05);
}
.voice-search-block .transcript-editor textarea:focus,
.search-query-highlight input:focus {
  outline: 3px solid rgba(63, 99, 238, 0.16);
  border-color: var(--blue);
}
.voice-controls { display: grid; grid-template-columns: 110px 1fr 110px; gap: 18px; margin-top: 14px; }
.microphone {
  justify-self: center;
  width: 86px;
  height: 86px;
  border: 8px solid #d9e7ff;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 600;
}
.microphone.is-recording { background: var(--red); border-color: #ffe0dc; }
.listening { margin: 8px 0 0; text-align: center; color: var(--blue); }

.routing-panel {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 10px;
  margin-bottom: 14px;
}
.routing-panel div, .form-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}
.routing-panel div { padding: 10px; }
.routing-panel strong, .routing-panel span { display: block; }
.routing-panel span { margin-top: 4px; color: var(--muted); font-size: 13px; }

.api-feedback {
  display: grid;
  gap: 4px;
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
  padding: 11px 12px;
}
.api-feedback strong { font-size: 13px; }
.api-feedback span { color: var(--muted); font-size: 13px; line-height: 1.4; }
.api-feedback[data-state="ok"] { border-color: #bce6ce; background: var(--green-soft); }
.api-feedback[data-state="error"] { border-color: #ffd0ca; background: #fff4f2; }
.api-feedback[data-state="warn"] { border-color: #f1d7a8; background: #fffaf0; }

.final-confirmation-summary {
  display: grid;
  gap: 10px;
  margin: 0 0 10px;
  border: 1px solid #f1d7a8;
  border-radius: 8px;
  background: #fffaf0;
  padding: 12px;
}
.final-confirmation-summary[hidden] { display: none; }
.final-confirmation-summary[data-state="ready"] {
  border-color: #bce6ce;
  background: var(--green-soft);
}
.final-confirmation-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.final-confirmation-header h2 {
  font-size: 15px;
  font-weight: 600;
}
.final-confirmation-header p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.final-confirmation-header span {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #fff;
  color: #9a6700;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 600;
}
.final-confirmation-summary[data-state="ready"] .final-confirmation-header span {
  color: var(--green);
}
.final-confirmation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.final-confirmation-grid article {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 8px 9px;
}
.final-confirmation-grid article[data-state="ok"] {
  border-color: #bce6ce;
}
.final-confirmation-grid article[data-state="blocked"] {
  border-color: #f1d7a8;
}
.final-confirmation-grid strong,
.final-confirmation-grid span {
  display: block;
}
.final-confirmation-grid strong {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 12px;
}
.final-confirmation-grid span {
  color: var(--ink);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.final-confirmation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.final-confirmation-actions button {
  min-height: 34px;
  border: 1px solid #9fc1ff;
  border-radius: 7px;
  background: #fff;
  color: var(--blue);
  padding: 0 11px;
  font-size: 12px;
  font-weight: 600;
}
.final-confirmation-actions button:hover {
  background: var(--blue-soft);
}

.linked-context-banner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin: 0 0 14px;
  border: 1px solid #bce6ce;
  border-radius: 8px;
  background: var(--green-soft);
  padding: 11px 12px;
}
.linked-context-banner[hidden] { display: none; }
.linked-context-banner strong,
.linked-context-banner span {
  display: block;
}
.linked-context-banner strong {
  font-size: 13px;
}
.linked-context-banner span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.linked-context-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.linked-context-prefill {
  min-width: 260px;
  max-width: 420px;
  border: 1px solid #d8eadf;
  border-radius: 7px;
  background: #fff;
  padding: 8px 9px;
}
.linked-context-prefill strong {
  margin-bottom: 5px;
}
.linked-prefill-status {
  display: grid;
  gap: 2px;
  margin: 0 0 7px;
}
.linked-prefill-status em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.3;
}
.linked-context-prefill ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.linked-context-prefill li {
  display: grid;
  grid-template-columns: minmax(82px, .45fr) 1fr;
  gap: 6px;
  align-items: start;
}
.linked-context-prefill b {
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.linked-context-actions button {
  border: 1px solid #9fc1ff;
  border-radius: 6px;
  background: #fff;
  color: var(--blue);
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 500;
}

.preview-panel, .readiness-panel {
  display: grid;
  gap: 12px;
  margin: 0 0 14px;
  border: 1px solid #bce6ce;
  border-radius: 8px;
  background: var(--green-soft);
  padding: 12px;
}
.preview-panel[hidden], .readiness-panel[hidden] { display: none; }
.readiness-panel { border-color: #f1d7a8; background: #fffaf0; }
.readiness-panel[data-state="ready"] { border-color: #bce6ce; background: var(--green-soft); }
.preview-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.preview-header h2 { font-size: 15px; font-weight: 600; }
.preview-header p { color: var(--muted); margin-top: 3px; font-size: 13px; }
.preview-header span {
  align-self: start;
  border-radius: 999px;
  background: #fff;
  color: var(--green);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 500;
}
.preview-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 10px;
}
.preview-grid > div {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 10px;
}
.preview-grid strong { display: block; margin-bottom: 7px; font-size: 13px; }
.payload-comparison {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
}
.payload-bucket,
.payload-section {
  display: grid;
  gap: 5px;
}
.payload-bucket h3,
.payload-section h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}
.payload-bucket {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px;
}
.payload-send {
  border-color: #bce6ce;
  background: var(--green-soft);
}
.payload-locked {
  border-color: #f1d7a8;
  background: #fffaf0;
}
.payload-bucket .preview-row,
.payload-section .preview-row {
  grid-template-columns: minmax(105px, 0.45fr) minmax(0, 1fr);
}
.preview-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 5px 0;
  border-top: 1px solid #edf1f6;
  font-size: 13px;
}
.preview-row:first-child { border-top: 0; }
.preview-row span { color: var(--muted); }
.preview-row code {
  color: var(--ink);
  font-family: Consolas, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
  text-align: right;
  white-space: normal;
}
.readiness-check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: start;
  border-top: 1px solid #f0e2c8;
  padding: 7px 0;
  font-size: 13px;
}
.readiness-check:first-child { border-top: 0; }
.readiness-check b {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
}
.readiness-check.ok b { color: var(--green); }
.readiness-check.blocked b { color: #b3261e; }
.readiness-check strong, .readiness-check span { display: block; }
.readiness-check span { color: var(--muted); margin-top: 2px; }
.readiness-check.info b { color: var(--blue); }
.readiness-checks-list {
  display: grid;
  gap: 2px;
}
.validation-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}
.validation-status-grid article {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 8px 10px;
  min-width: 0;
}
.validation-status-grid strong,
.validation-status-grid span {
  display: block;
}
.validation-status-grid strong {
  margin-bottom: 3px;
  font-size: 12px;
  color: var(--muted);
}
.validation-status-grid span {
  color: var(--ink);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.preview-panel pre {
  max-height: 240px;
  overflow: auto;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 10px;
  color: #26334f;
  font-family: Consolas, monospace;
  font-size: 12px;
  white-space: pre-wrap;
}

.result-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  border: 1px solid #bce6ce;
  border-radius: 9px;
  background: var(--green-soft);
  padding: 12px;
}
.result-panel[hidden] { display: none; }
.result-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.result-header h2 { font-size: 15px; font-weight: 600; }
.result-header p { color: var(--muted); margin-top: 3px; font-size: 13px; }
.result-header span {
  align-self: start;
  border-radius: 999px;
  background: #fff;
  color: var(--green);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 500;
}
.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.result-grid > div, .result-actions {
  border: 1px solid #d6eadf;
  border-radius: 7px;
  background: #fff;
  padding: 10px;
}
.result-grid strong, .result-actions strong {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
}
.result-grid a, .result-grid span { color: var(--ink); font-size: 13px; }
.result-actions .preview-row { border-color: #e4f0ea; }

.reference-status {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}
.reference-status article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
  padding: 10px;
}
.reference-status strong, .reference-status span { display: block; }
.reference-status strong { font-size: 13px; }
.reference-status span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.reference-status .live { border-color: #bce6ce; background: var(--green-soft); }
.reference-status .mock, .reference-status .mock_fallback { border-color: #f1d7a8; background: #fffaf0; }

.write-status {
  display: grid;
  gap: 3px;
  margin: 0 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
  padding: 10px 12px;
}
.write-status strong { font-size: 13px; }
.write-status span { color: var(--muted); font-size: 13px; line-height: 1.35; }
.write-status[data-state="write_enabled"] { border-color: #bce6ce; background: var(--green-soft); }
.write-status[data-state="write_locked"] { border-color: #f1d7a8; background: #fffaf0; }
.write-status[data-state="simulation_only"],
.write-status[data-state="unknown"] { border-color: #ffd0ca; background: #fff4f2; }

.operations-status {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
  border: 1px solid #dce5f2;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}
.operations-status[data-state="ok"] { border-color: #bce6ce; background: #f7fff9; }
.operations-status[data-state="warn"] { border-color: #f1d7a8; background: #fffaf0; }
.operations-status[data-state="error"] { border-color: #f3c7c7; background: #fff8f8; }
.operations-status-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.operations-status h2 {
  font-size: 15px;
  font-weight: 600;
}
.operations-status p,
.operations-status span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.operations-status-header button {
  border: 1px solid #c9d7ed;
  border-radius: 999px;
  background: #fff;
  color: var(--accent);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.operations-grid,
.operations-alerts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 8px;
}
.operations-grid article,
.operations-alerts article {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 9px;
  min-width: 0;
}
.operations-grid article[data-state="ok"],
.operations-alerts article[data-state="ok"] { border-color: #bce6ce; background: #f5fff8; }
.operations-grid article[data-state="warn"],
.operations-alerts article[data-state="warn"] { border-color: #f1d7a8; background: #fffaf0; }
.operations-grid article[data-state="error"],
.operations-alerts article[data-state="error"] { border-color: #f3c7c7; background: #fff8f8; }
.operations-grid strong,
.operations-grid span,
.operations-alerts strong,
.operations-alerts span {
  display: block;
  overflow-wrap: anywhere;
}
.operations-grid strong,
.operations-alerts strong {
  margin-bottom: 3px;
  font-size: 13px;
}
.operations-grid span + span {
  margin-top: 2px;
}

.admin-body {
  background: var(--page);
}
.admin-shell {
  min-height: 100vh;
  padding: 10px;
}
.admin-header {
  border-radius: 10px;
}
.admin-main {
  display: grid;
  gap: 16px;
  max-width: 1480px;
  margin: 0 auto;
  padding: 18px 0;
}
.admin-hero,
.admin-card {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  box-shadow: var(--shadow);
}
.admin-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
}
.admin-hero[data-state="ok"] { border-color: #bce6ce; background: #f7fff9; }
.admin-hero[data-state="warn"] { border-color: #f1d7a8; background: #fffaf0; }
.admin-hero[data-state="error"] { border-color: #f3c7c7; background: #fff8f8; }
.admin-hero h1 {
  font-size: 22px;
  font-weight: 600;
}
.admin-hero p,
.admin-hero span,
.admin-card span,
.admin-card button span {
  color: var(--muted);
  font-size: 12px;
}
.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 16px;
}
.admin-alerts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}
.admin-alerts article {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}
.admin-alerts article[data-state="ok"] { border-color: #bce6ce; background: #f5fff8; }
.admin-alerts article[data-state="warn"] { border-color: #f1d7a8; background: #fffaf0; }
.admin-alerts article[data-state="error"] { border-color: #f3c7c7; background: #fff8f8; }
.admin-alerts span {
  color: var(--muted);
  font-size: 12px;
}
.admin-card {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 14px;
}
.admin-card-wide {
  grid-column: 1 / -1;
}
.admin-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.admin-card h2 {
  font-size: 16px;
  font-weight: 600;
}
.admin-table,
.admin-list,
.admin-actions,
.admin-configuration {
  display: grid;
  gap: 8px;
}
.admin-table-row {
  display: grid;
  grid-template-columns: 95px minmax(180px, 1fr) 130px 76px 72px;
  gap: 8px;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px;
  background: #fbfcff;
}
.admin-table-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-table-head {
  background: #eef5ff;
  font-weight: 600;
}
.admin-list article {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px;
  background: #fbfcff;
}
.admin-list article[data-state="ok"] { border-color: #bce6ce; background: #f5fff8; }
.admin-list article[data-state="warn"] { border-color: #f1d7a8; background: #fffaf0; }
.admin-list article[data-state="error"] { border-color: #f3c7c7; background: #fff8f8; }
.admin-configuration {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.admin-configuration article {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  background: #fbfcff;
}
.admin-configuration article[data-state="ok"] { border-color: #bce6ce; background: #f5fff8; }
.admin-configuration article[data-state="warn"] { border-color: #f1d7a8; background: #fffaf0; }
.admin-configuration article[data-state="error"] { border-color: #f3c7c7; background: #fff8f8; }
.admin-configuration-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.admin-configuration-items {
  display: grid;
  gap: 5px;
}
.admin-configuration-items span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  border-top: 1px solid rgba(115, 132, 164, 0.2);
  padding-top: 5px;
}
.admin-configuration-items strong,
.admin-configuration-items em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-configuration-items em {
  color: var(--muted);
  font-style: normal;
}
.admin-configuration-items span[data-state="error"] em { color: #b42318; }
.admin-connector-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.admin-connector-detail {
  display: grid;
  gap: 2px;
  border-top: 1px solid rgba(18, 41, 77, 0.08);
  padding-top: 6px;
}
.admin-check-list,
.admin-module-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
}
.admin-check-list span,
.admin-module-list div {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 4px 7px;
  font-size: 11px;
}
.admin-check-list span[data-state="ok"],
.admin-module-list div[data-state="ok"] {
  border-color: #bce6ce;
  background: var(--green-soft);
  color: var(--green);
}
.admin-check-list span[data-state="warn"],
.admin-module-list div[data-state="warn"] {
  border-color: #f1d7a8;
  background: #fffaf0;
  color: #9a6512;
}
.admin-check-list span[data-state="error"] {
  border-color: #f3c7c7;
  background: #fff8f8;
  color: var(--red);
}
.admin-module-list div {
  display: grid;
  border-radius: 7px;
}
.admin-actions {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.admin-actions button {
  display: grid;
  gap: 4px;
  min-height: 62px;
  border: 1px solid #c9d7ed;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 10px;
  text-align: left;
}
.admin-actions button:not(:disabled):hover {
  border-color: var(--blue);
  background: var(--blue-soft);
}
.admin-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.admin-filterbar,
.admin-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.admin-filterbar button,
.admin-inline-actions button,
.admin-inline-actions a {
  min-height: 30px;
  border: 1px solid #c9d7ed;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.admin-filterbar button[data-active="true"],
.admin-inline-actions button:hover,
.admin-inline-actions a:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
}
.admin-result {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
  padding: 10px;
}
.admin-result[data-state="ok"] { border-color: #bce6ce; background: #f5fff8; }
.admin-result[data-state="warn"] { border-color: #f1d7a8; background: #fffaf0; }
.admin-result[data-state="error"] { border-color: #f3c7c7; background: #fff8f8; }
.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  width: max-content;
  border-radius: 999px;
  padding: 0 8px;
  background: #eef2f7;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
.status-badge.ok { background: var(--green-soft); color: var(--green); }
.status-badge.warn { background: #fff0d8; color: #9a6512; }
.status-badge.error { background: #fff4f2; color: var(--red); }
.admin-empty {
  border: 1px dashed var(--line);
  border-radius: 7px;
  color: var(--muted);
  padding: 12px;
}
.admin-report {
  max-height: 360px;
  margin: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
  color: var(--ink);
  padding: 12px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}
.admin-maintenance-report {
  max-height: 520px;
}

.project-status {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
}
.project-status-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.project-status h2 {
  font-size: 15px;
  font-weight: 600;
}
.project-status p,
.project-status-header span,
.project-status-grid span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.project-status-header span {
  white-space: nowrap;
}
.project-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}
.project-status-grid article {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 9px;
}
.project-status-grid article[data-state="ok"] {
  border-color: #bce6ce;
  background: #f5fff8;
}
.project-status-grid article[data-state="warn"] {
  border-color: #f1d7a8;
  background: #fffaf0;
}
.project-status-grid article[data-state="error"] {
  border-color: #f3c7c7;
  background: #fff8f8;
}
.project-status-grid strong,
.project-status-grid span {
  display: block;
}
.project-status-grid strong {
  margin-bottom: 3px;
  font-size: 13px;
}
.project-status-grid button {
  width: fit-content;
  margin-top: 7px;
  border: 1px solid #d5dfed;
  border-radius: 999px;
  background: #fff;
  color: var(--accent);
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.interface-activity {
  display: grid;
  gap: 9px;
  margin: 0 0 14px;
  border: 1px solid #dce5f2;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}
.interface-activity-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.interface-activity-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.interface-activity-header-actions button {
  border: 1px solid #d5dfed;
  border-radius: 999px;
  background: #fff;
  color: var(--accent);
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
#interfaceActivityTotals {
  border: 1px solid #eef2f7;
  border-radius: 999px;
  background: #fbfcff;
  padding: 5px 8px;
  color: var(--ink);
  font-weight: 600;
}
.interface-activity-body {
  display: grid;
  gap: 8px;
}
.interface-activity-body[hidden] {
  display: none;
}
.interface-activity h2 {
  font-size: 15px;
  font-weight: 600;
}
.interface-activity p,
.interface-activity-header span,
.interface-activity-log span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.interface-activity-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.interface-activity-filters button {
  border: 1px solid #d5dfed;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 6px 9px;
  font-size: 12px;
  cursor: pointer;
}
.interface-activity-filters button.is-active {
  border-color: #9ebcff;
  background: #eef4ff;
  color: var(--accent);
  font-weight: 600;
}
.interface-activity-log {
  display: grid;
  gap: 6px;
}
.interface-activity-log article {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 8px;
  border: 1px solid #eef2f7;
  border-radius: 7px;
  background: #fbfcff;
  padding: 7px 8px;
}
.interface-activity-log article.ok { border-color: #bce6ce; background: #f5fff8; }
.interface-activity-log article.warn { border-color: #f1d7a8; background: #fffaf0; }
.interface-activity-log article.error { border-color: #f3c7c7; background: #fff8f8; }
.interface-activity-log b,
.interface-activity-log strong,
.interface-activity-log span {
  display: block;
  font-size: 12px;
}
.interface-activity-log b,
.interface-activity-log strong {
  color: var(--ink);
  font-weight: 600;
}

.mode-form { display: none; gap: 12px; }
.mode-form.active { display: grid; }
.form-section { display: grid; gap: 12px; padding: 13px; }
.form-section h2 { font-size: 15px; font-weight: 600; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
label { display: grid; gap: 6px; font-weight: 500; color: #24304d; }
input, select {
  min-width: 0;
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
}
input[readonly] { background: #f1f4f8; color: var(--muted); }
.search-query-highlight {
  border: 2px solid #9fc1ff;
  border-radius: 9px;
  background: #f7fbff;
  padding: 12px;
  color: var(--blue);
  font-size: 15px;
}
.search-query-highlight input {
  min-height: 48px;
  border-color: #9fc1ff;
  font-size: 15px;
  font-weight: 500;
}

.reminder-section { border-color: #f1d7a8; background: #fffaf0; }
.compact-section { background: #fff; }

.search-scopes, .search-sources, .search-source-presets, .search-time-filters, .search-date-presets, .connectors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.search-request-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.search-request-controls label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.search-request-controls input,
.search-request-controls select {
  min-height: 34px;
  font-size: 13px;
}
.search-limit {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  width: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.search-limit select {
  min-height: 32px;
  width: auto;
  min-width: 76px;
}
.scope, .connector {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 500;
}
.scope {
  font-family: inherit;
  cursor: pointer;
}
.scope:hover { border-color: #9fc1ff; color: var(--blue); }
.scope.active, .connector.active { border-color: #9fc1ff; color: var(--blue); background: var(--blue-soft); }
.connector strong, .connector span { display: block; }
.connector span { font-weight: 500; color: var(--muted); margin-top: 2px; }

.search-interpretation {
  display: grid;
  gap: 3px;
  border: 1px solid #dce5f2;
  border-radius: 7px;
  background: #f8fbff;
  padding: 9px 10px;
}
.search-interpretation strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}
.search-interpretation span {
  color: var(--muted);
  font-size: 12px;
}
.search-interpretation .search-interpretation-hint {
  width: fit-content;
  border: 1px solid #dce5f2;
  border-radius: 999px;
  padding: 5px 8px;
  font-weight: 600;
}
.search-interpretation .search-interpretation-hint.ok {
  border-color: #bce6ce;
  background: #f5fff8;
  color: #247a43;
}
.search-interpretation .search-interpretation-hint.warn {
  border-color: #f1d7a8;
  background: #fffaf0;
  color: #8a5a00;
}

.search-live-sources {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.search-live-sources[hidden] { display: none; }
.search-live-sources article {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #dce5f2;
  border-radius: 7px;
  background: #fff;
  padding: 9px 10px;
}
.search-live-sources article.ok {
  border-color: #bce6ce;
  background: #f5fff8;
}
.search-live-sources article.error {
  border-color: #f3c7c7;
  background: #fff8f8;
}
.search-live-sources strong,
.search-live-sources span {
  display: block;
  font-size: 12px;
}
.search-live-sources strong {
  color: var(--ink);
  font-weight: 600;
}
.search-live-sources span {
  color: var(--muted);
  margin-top: 2px;
}
.search-live-sources b {
  flex: 0 0 auto;
  align-self: flex-start;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}
.search-live-source-side {
  flex: 0 0 auto;
  display: grid;
  justify-items: end;
  gap: 6px;
}
.search-live-source-side button {
  border: 1px solid #9fc1ff;
  border-radius: 6px;
  background: #fff;
  color: var(--blue);
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.search-live-source-side button:disabled {
  border-color: var(--line);
  color: var(--muted);
  background: #f8fafc;
  cursor: not-allowed;
}

.search-results-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.search-results-summary[hidden] { display: none; }
.search-results-summary article {
  border: 1px solid #dce5f2;
  border-radius: 7px;
  background: #fff;
  padding: 9px 10px;
}
.search-results-summary article.warn {
  border-color: #f1c27d;
  background: #fffaf0;
}
.search-results-summary strong,
.search-results-summary span {
  display: block;
  font-size: 12px;
}
.search-results-summary strong {
  color: var(--ink);
  font-weight: 600;
}
.search-results-summary span {
  color: var(--muted);
  margin-top: 2px;
}

.search-index-maintenance {
  display: grid;
  gap: 8px;
  border: 1px solid #dce5f2;
  border-radius: 7px;
  background: #f8fbff;
  padding: 9px 10px;
}
.search-index-maintenance > div:first-child,
.search-index-maintenance-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.search-index-maintenance strong,
.search-index-maintenance span {
  display: block;
  font-size: 12px;
}
.search-index-maintenance strong {
  color: var(--ink);
  font-weight: 600;
}
.search-index-maintenance span {
  color: var(--muted);
  margin-top: 2px;
}
.search-index-maintenance-actions button {
  border: 1px solid #d5dfed;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 6px 9px;
  font-size: 12px;
  cursor: pointer;
}
.search-index-maintenance-actions button:not(:disabled):last-child {
  border-color: #f1c27d;
  color: #8a5a00;
}
.search-index-maintenance-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}
.search-index-maintenance-cards article {
  border: 1px solid #dce5f2;
  border-radius: 7px;
  background: #fff;
  padding: 8px;
}
.search-index-maintenance-cards article.wide {
  grid-column: span 2;
}

.search-selection {
  display: grid;
  gap: 10px;
  border: 1px solid #bce6ce;
  border-radius: 7px;
  background: var(--green-soft);
  padding: 9px 10px;
}
.search-selection[hidden] { display: none; }
.search-selection strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}
.search-selection-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.search-selection button {
  border: 1px solid #9fc1ff;
  border-radius: 6px;
  background: #fff;
  color: var(--blue);
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.search-selection button:disabled {
  border-color: var(--line);
  color: var(--muted);
  background: #f8fafc;
  cursor: not-allowed;
}
.search-selection-plan {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}
.search-selection-plan article {
  border: 1px solid #d7eadf;
  border-radius: 7px;
  background: #fff;
  padding: 7px;
}
.search-selection-plan strong,
.search-selection-plan span {
  display: block;
  font-size: 11px;
}
.search-selection-plan strong {
  color: var(--ink);
  font-weight: 600;
}
.search-selection-plan span,
.search-selection-plan p {
  color: var(--muted);
}
.search-selection-plan p {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 12px;
}
.search-selection-linked-preview,
.search-detail-linked-preview {
  display: grid;
  gap: 8px;
  border: 1px solid #f1d7a8;
  border-radius: 7px;
  background: #fffaf0;
  padding: 9px;
}
.search-selection-linked-preview[hidden],
.search-detail-linked-preview[hidden] { display: none; }
.search-selection-linked-preview strong,
.search-selection-linked-preview span,
.search-detail-linked-preview strong,
.search-detail-linked-preview span {
  display: block;
  font-size: 12px;
}
.search-selection-linked-preview strong,
.search-detail-linked-preview strong {
  color: var(--ink);
  font-weight: 600;
}
.search-selection-linked-preview span,
.search-detail-linked-preview span {
  color: var(--muted);
  margin-top: 2px;
}
.search-selection-preview-fields,
.search-detail-preview-fields {
  display: grid;
  gap: 7px;
}
.search-selection-linked-preview-actions,
.search-detail-linked-preview-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.search-selection-linked-preview-actions button:first-child,
.search-detail-linked-preview-actions button:first-child {
  border-color: #9fc1ff;
  color: var(--blue);
}

.search-batch-queue {
  display: grid;
  gap: 8px;
  border: 1px solid #dce5f2;
  border-radius: 7px;
  background: #f8fbff;
  padding: 9px 10px;
}
.search-batch-queue[hidden] { display: none; }
.search-batch-queue-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.search-batch-queue-header strong,
.search-batch-queue-header span {
  display: block;
  font-size: 12px;
}
.search-batch-queue-header strong {
  color: var(--ink);
  font-weight: 600;
}
.search-batch-queue-header span {
  color: var(--muted);
  margin-top: 2px;
}
.search-batch-queue-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}
.search-batch-queue-header button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--blue);
  padding: 5px 7px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
}
.search-batch-queue-header button:disabled {
  color: var(--muted);
  background: #f8fafc;
  cursor: not-allowed;
}
.search-batch-queue-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.search-batch-queue-filters button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
}
.search-batch-queue-filters button.is-active {
  border-color: #9fc1ff;
  background: #eef5ff;
  color: var(--blue);
}
.search-batch-queue-list {
  display: grid;
  gap: 6px;
}
.search-batch-queue-list article {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 8px;
  border: 1px solid #eef2f7;
  border-radius: 7px;
  background: #fff;
  padding: 8px;
}
.search-batch-queue-list article.success { border-color: #bce6ce; background: #f5fff8; }
.search-batch-queue-list article.error { border-color: #f3c7c7; background: #fff8f8; }
.search-batch-queue-list article.ignored { border-color: #f1d79a; background: #fffaf0; }
.search-batch-queue-list article.empty { grid-template-columns: 1fr; color: var(--muted); }
.search-batch-queue-list b,
.search-batch-queue-list strong,
.search-batch-queue-list span {
  display: block;
  font-size: 12px;
}
.search-batch-queue-list b {
  color: var(--ink);
  font-weight: 600;
}
.search-batch-queue-list strong {
  color: var(--ink);
  font-weight: 600;
}
.search-batch-queue-list span {
  color: var(--muted);
  margin-top: 2px;
}

.search-batch-reports {
  display: grid;
  gap: 8px;
  border: 1px solid #e4eaf3;
  border-radius: 7px;
  background: #fff;
  padding: 9px 10px;
}
.search-batch-reports-header,
.search-batch-reports-list article {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.search-batch-reports-controls {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.search-batch-reports-controls input,
.search-batch-reports-controls select {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 5px 7px;
  font-size: 11px;
}
.search-batch-reports-controls input {
  width: 140px;
}
.search-batch-reports-header strong,
.search-batch-reports-list strong,
.search-batch-reports-header span,
.search-batch-reports-list span {
  display: block;
  font-size: 12px;
}
.search-batch-reports-header strong,
.search-batch-reports-list strong {
  color: var(--ink);
  font-weight: 600;
}
.search-batch-reports-header span {
  color: var(--muted);
  margin-top: 2px;
}
.search-batch-reports-summary-chips {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 7px;
}
.search-batch-reports-summary-chips button {
  border: 1px solid #d5dfed;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
}
.search-batch-reports-summary-chips button.is-active {
  border-color: #9ebcff;
  background: #eef4ff;
  color: var(--accent);
  font-weight: 600;
}
.search-batch-reports-header button,
.search-batch-reports-list button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--blue);
  padding: 5px 7px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
}
.search-batch-reports-header button:disabled {
  cursor: not-allowed;
  opacity: .55;
}
.search-batch-reports-list {
  display: grid;
  gap: 6px;
}
.search-batch-reports-list article {
  border: 1px solid #eef2f7;
  border-radius: 7px;
  background: #fbfcff;
  padding: 8px;
}
.search-batch-report-select {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 5px;
}
.search-batch-report-select input {
  width: 14px;
  height: 14px;
}
.search-batch-reports-list span {
  color: var(--muted);
  margin-top: 2px;
}
.search-batch-report-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.search-batch-report-detail {
  display: grid;
  gap: 9px;
  border: 1px solid #dce5f2;
  border-radius: 7px;
  background: #fbfcff;
  padding: 10px;
}
.search-batch-report-detail[hidden] { display: none; }
.search-batch-report-detail-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.search-batch-report-detail-header strong,
.search-batch-report-detail-header span {
  display: block;
  font-size: 12px;
}
.search-batch-report-detail-header strong {
  color: var(--ink);
  font-weight: 600;
}
.search-batch-report-detail-header span {
  color: var(--muted);
  margin-top: 2px;
}
.search-batch-report-detail-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  gap: 6px;
}
.search-batch-report-detail-summary div {
  border: 1px solid #eef2f7;
  border-radius: 7px;
  background: #fff;
  padding: 7px;
}
.search-batch-report-detail-summary span,
.search-batch-report-detail-summary strong {
  display: block;
  font-size: 12px;
}
.search-batch-report-detail-summary span { color: var(--muted); }
.search-batch-report-detail-summary strong { color: var(--ink); margin-top: 2px; }
.report-linked-preview {
  display: grid;
  gap: 8px;
  border: 1px solid #f1d7a8;
  border-radius: 7px;
  background: #fffaf0;
  padding: 9px 10px;
}
.report-linked-preview[hidden] { display: none; }
.report-linked-preview strong,
.report-linked-preview span {
  display: block;
  font-size: 12px;
}
.report-linked-preview strong {
  color: var(--ink);
  font-weight: 600;
}
.report-linked-preview span {
  color: var(--muted);
  margin-top: 2px;
}
.report-linked-preview-fields {
  display: grid;
  gap: 7px;
}
.report-linked-preview-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.report-linked-preview-actions button {
  border: 1px solid #d5dfed;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 6px 9px;
  font-size: 12px;
  cursor: pointer;
}
.report-linked-preview-actions button:first-child {
  border-color: #9ebcff;
  color: var(--accent);
  font-weight: 600;
}
.search-batch-report-detail-tools {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.search-batch-report-detail-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.search-batch-report-detail-tools button {
  border: 1px solid #d5dfed;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 6px 9px;
  font-size: 12px;
  cursor: pointer;
}
.search-batch-report-detail-tools button.is-active {
  border-color: #9ebcff;
  background: #eef4ff;
  color: var(--accent);
  font-weight: 600;
}
.search-batch-report-detail-tools button:disabled {
  cursor: not-allowed;
  opacity: .55;
}
.search-batch-report-detail pre {
  max-height: 180px;
  overflow: auto;
  border: 1px solid #eef2f7;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 9px;
  font-size: 11px;
  white-space: pre-wrap;
}
.search-batch-report-detail-rows {
  display: grid;
  gap: 6px;
}
.search-batch-report-detail-rows article {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 8px;
  border: 1px solid #eef2f7;
  border-radius: 7px;
  background: #fff;
  padding: 8px;
}
.search-batch-report-detail-rows article.success { border-color: #bce6ce; background: #f5fff8; }
.search-batch-report-detail-rows article.error { border-color: #f3c7c7; background: #fff8f8; }
.search-batch-report-detail-rows article.ignored { border-color: #f1d79a; background: #fffaf0; }
.search-batch-report-detail-rows b,
.search-batch-report-detail-rows strong,
.search-batch-report-detail-rows span {
  display: block;
  font-size: 12px;
}
.search-batch-report-detail-rows b,
.search-batch-report-detail-rows strong {
  color: var(--ink);
  font-weight: 600;
}
.search-batch-report-detail-rows span {
  color: var(--muted);
  margin-top: 2px;
}
.search-batch-report-row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 7px;
}
.search-batch-report-row-actions button {
  border: 1px solid #d5dfed;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 5px 8px;
  font-size: 11px;
  cursor: pointer;
}
.search-batch-report-row-actions button:hover {
  border-color: #9ebcff;
  color: var(--accent);
}
.search-batch-report-row-actions button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.search-history {
  display: grid;
  gap: 6px;
}
.search-history article {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid #eef2f7;
  border-radius: 7px;
  background: #fff;
  padding: 8px 10px;
}
.search-history article > div { min-width: 0; }
.search-history strong,
.search-history span {
  display: block;
  font-size: 12px;
}
.search-history strong {
  color: var(--ink);
  font-weight: 600;
}
.search-history span {
  color: var(--muted);
  margin-top: 2px;
}
.search-history button {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--blue);
  padding: 5px 7px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
}

.search-context {
  display: grid;
  gap: 8px;
  border: 1px solid #bce6ce;
  border-radius: 7px;
  background: var(--green-soft);
  padding: 9px 10px;
}
.search-context[hidden] { display: none; }
.search-context strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}
.search-context span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}
.search-context-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.search-context-actions button {
  border: 1px solid #9fc1ff;
  border-radius: 6px;
  background: #fff;
  color: var(--blue);
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.search-detail {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 12px;
}
.search-detail[hidden] { display: none; }
.search-detail-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.search-detail-header strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}
.search-detail-header span,
.search-detail p {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.search-detail p { margin: 0; }
.search-detail-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}
.search-detail-actions button,
.search-detail-actions a {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 7px 9px;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
.search-detail-actions .primary {
  border-color: #9ab6ff;
  color: var(--blue);
  background: #f5f8ff;
}
.search-detail-actions button:disabled {
  color: var(--muted);
  background: #f8fafc;
  cursor: not-allowed;
}
.search-detail-action-plan {
  display: grid;
  gap: 8px;
  border: 1px solid #d8e5f6;
  border-radius: 8px;
  background: #f8fbff;
  padding: 10px;
}
.search-detail-action-plan-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.search-detail-action-plan-head strong,
.search-detail-action-plan-head span {
  display: block;
  font-size: 12px;
}
.search-detail-action-plan-head span {
  color: var(--muted);
  text-align: right;
}
.search-detail-recommendation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #bcd0ff;
  border-radius: 8px;
  background: #f4f7ff;
  padding: 10px;
}
.search-detail-recommendation strong,
.search-detail-recommendation span {
  display: block;
  font-size: 12px;
  line-height: 1.35;
}
.search-detail-recommendation span {
  color: var(--muted);
  margin-top: 2px;
}
.search-detail-recommendation button {
  min-height: 34px;
  border: 1px solid #9ab6ff;
  border-radius: 7px;
  background: var(--blue);
  color: #fff;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
}
.search-detail-action-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}
.search-detail-action-cards article {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 8px;
}
.search-detail-action-cards button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 5px 7px;
  font-size: 12px;
  font-weight: 500;
}
.search-detail-action-cards button.primary {
  border-color: #9ab6ff;
  background: var(--blue-soft);
  color: var(--blue);
}
.search-detail-action-cards span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}
.search-detail-highlights {
  display: grid;
  gap: 8px;
  border: 1px solid #d9eadf;
  border-radius: 8px;
  background: #f7fff9;
  padding: 10px;
}
.search-detail-highlights:empty {
  display: none;
}
.search-detail-highlights-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.search-detail-highlights-head strong {
  color: var(--ink);
  font-size: 13px;
}
.search-detail-highlight-badge {
  border: 1px solid #dce5f2;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
}
.search-detail-highlight-badge.ok {
  border-color: #bce6ce;
  color: #247a43;
  background: #fff;
}
.search-detail-highlight-badge.warn {
  border-color: #f1d7a8;
  color: #8a5a00;
  background: #fff;
}
.search-detail-highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.search-detail-highlight-grid article {
  border: 1px solid #dfeee4;
  border-radius: 7px;
  background: #fff;
  padding: 8px;
}
.search-detail-highlight-grid span,
.search-detail-highlight-grid strong {
  display: block;
  font-size: 12px;
  line-height: 1.35;
}
.search-detail-highlight-grid span {
  color: var(--muted);
}
.search-detail-highlight-grid strong {
  color: var(--ink);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.search-detail-resources {
  display: grid;
  gap: 8px;
  border: 1px solid #e3eaf4;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}
.search-detail-resources:empty {
  display: none;
}
.search-detail-resources-head,
.search-detail-resource {
  display: grid;
  grid-template-columns: minmax(120px, 0.35fr) 1fr;
  gap: 8px;
  align-items: start;
}
.search-detail-resources-head strong,
.search-detail-resources-head span,
.search-detail-resource span,
.search-detail-resource strong,
.search-detail-resource a {
  display: block;
  font-size: 12px;
}
.search-detail-resources-head span,
.search-detail-resource span {
  color: var(--muted);
}
.search-detail-resource-list {
  display: grid;
  gap: 6px;
}
.search-detail-resource strong,
.search-detail-resource a {
  color: var(--ink);
  font-weight: 500;
  overflow-wrap: anywhere;
}
.search-detail-resource a {
  color: var(--blue);
  text-decoration: none;
}
.search-detail-resource a:hover {
  text-decoration: underline;
}
.search-detail-resource-ok strong { color: var(--green); }
.search-detail-resource-warn strong { color: #9a6b00; }
.search-detail-fields {
  display: grid;
  gap: 6px;
}
.search-detail-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.45fr) 1fr;
  gap: 8px;
  border-top: 1px solid #eef2f7;
  padding-top: 6px;
  font-size: 12px;
}
.search-detail-row:first-child {
  border-top: 0;
  padding-top: 0;
}
.search-detail-row span {
  color: var(--muted);
}
.search-detail-row strong {
  color: var(--ink);
  font-weight: 500;
  overflow-wrap: anywhere;
}
.search-detail-row a {
  color: var(--blue);
  font-weight: 500;
  overflow-wrap: anywhere;
  text-decoration: none;
}
.search-detail-row a:hover {
  text-decoration: underline;
}

.search-results { display: grid; gap: 8px; }
.search-result-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 10px;
}
.search-result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.search-result-select {
  flex: 0 0 auto;
  display: inline-flex;
  gap: 5px;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}
.search-result-head > div { min-width: 0; }
.search-result-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
  align-items: flex-start;
}
.search-result-title {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}
.search-result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5px;
}
.search-result-meta span {
  border: 1px solid #dce5f2;
  border-radius: 999px;
  background: #f8fbff;
  color: var(--muted);
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 500;
}
.search-result-meta .search-origin.indexed {
  border-color: #bce6ce;
  background: var(--green-soft);
  color: #166534;
}
.search-result-meta .search-origin.live {
  border-color: #f1d79a;
  background: #fff8e6;
  color: #8a5a00;
}
.search-result-meta .search-quality-chip.exact {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}
.search-result-meta .search-action-chip {
  border-color: #bcd0ff;
  background: var(--blue-soft);
  color: var(--blue);
}
.search-result-meta .search-linked-chip.linked {
  border-color: #c7d2fe;
  background: #f5f6ff;
  color: #3730a3;
}
.search-result-meta .search-linked-chip.draft {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #475569;
}
.search-result-fingerprint {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.search-result-tools {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}
.search-result-tools button {
  border: 1px solid #9fc1ff;
  border-radius: 6px;
  background: #fff;
  color: var(--blue);
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.search-result-tools button:disabled {
  border-color: var(--line);
  color: var(--muted);
  background: #f8fafc;
  cursor: not-allowed;
}
.search-result-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.search-result-linked-actions {
  display: grid;
  grid-template-columns: auto repeat(4, minmax(0, 1fr));
  gap: 6px;
  align-items: center;
  border-top: 1px solid #eef2f7;
  padding-top: 8px;
}
.search-result-linked-actions span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.search-result-linked-actions button {
  min-height: 30px;
  border: 1px solid #d5dfed;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.search-result-linked-actions button:hover {
  border-color: #9fc1ff;
  color: var(--blue);
  background: var(--blue-soft);
}
.search-result-link {
  flex: 0 0 auto;
  border: 1px solid #9fc1ff;
  border-radius: 6px;
  color: var(--blue);
  background: var(--blue-soft);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.checklist {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
  padding: 12px;
}
.checklist span { color: var(--muted); font-weight: 500; }
.checklist .checked { color: var(--green); }
.connectors { margin-top: 10px; }
.ticket-actions { gap: 10px; margin-top: 14px; }
.ticket-actions button { flex: 1; font-weight: 500; }
.outline { color: var(--blue); border-color: #9fc1ff; }
.create-button {
  width: 100%;
  min-height: 42px;
  margin-top: 12px;
  border: 0;
  border-radius: 7px;
  background: linear-gradient(180deg, #19b867, #0d994f);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}
.danger-button {
  width: 100%;
  min-height: 40px;
  margin-top: 8px;
  border: 1px solid #f0b5ae;
  border-radius: 7px;
  background: #fff7f6;
  color: #b3261e;
  font-size: 15px;
  font-weight: 600;
}
.danger-button:disabled {
  cursor: not-allowed;
  border-color: var(--line);
  background: #f5f7fb;
  color: var(--muted);
}
.safe-note { margin: 9px 0 0; text-align: center; color: var(--muted); font-size: 13px; }

.connector-drawer {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: flex-end;
  background: rgba(12, 24, 45, 0.35);
  z-index: 20;
}
.connector-drawer.is-open { display: flex; }
.drawer-panel {
  width: min(480px, 100%);
  height: 100%;
  overflow: auto;
  background: #fff;
  box-shadow: -12px 0 32px rgba(18, 33, 62, 0.18);
  padding: 20px;
}
.drawer-panel header { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.drawer-panel h2 { font-size: 20px; }
.drawer-panel p { color: var(--muted); margin-top: 4px; }
.drawer-panel header button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}
.connector-health, .connector-list, .audit-log, .directory-results, .readiness-summary { display: grid; gap: 10px; }
.connector-health, .readiness-summary-section { margin-bottom: 16px; }
.connector-health article, .audit-log article, .directory-results article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
  padding: 12px;
}
.connector-health strong, .connector-health span, .audit-log strong, .audit-log span,
.directory-results strong, .directory-results span { display: block; }
.connector-health span, .audit-log span, .directory-results span { margin-top: 3px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.connector-health .configured { border-color: #bce6ce; background: var(--green-soft); }
.connector-health .not_configured { border-color: #f1d7a8; background: #fffaf0; }
.connector-health .error { border-color: #ffd0ca; background: #fff4f2; }
.readiness-summary-section h3, .directory-section h3 { margin: 0 0 8px; font-size: 15px; font-weight: 600; }
.readiness-summary article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
  padding: 12px;
}
.readiness-summary strong, .readiness-summary span { display: block; }
.readiness-summary span { margin-top: 3px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.readiness-summary[data-state="ready"] article { border-color: #bce6ce; background: var(--green-soft); }
.readiness-summary[data-state="not_configured"] article { border-color: #f1d7a8; background: #fffaf0; }
.readiness-summary[data-state="error"] article { border-color: #ffd0ca; background: #fff4f2; }
.directory-section { margin-bottom: 16px; }
.directory-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 10px;
}
.directory-search button {
  min-height: 38px;
  border: 1px solid #9fc1ff;
  border-radius: 7px;
  background: #fff;
  color: var(--blue);
  padding: 0 12px;
}
.inline-directory-search { margin: 4px 0 10px; }
.compact-results {
  margin-bottom: 12px;
  gap: 8px;
}
.directory-results .selectable-user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.directory-results .selectable-user button {
  min-height: 32px;
  border: 1px solid #9fc1ff;
  border-radius: 7px;
  background: #fff;
  color: var(--blue);
  padding: 0 10px;
  font-size: 12px;
}
.directory-results .selectable-user button:disabled {
  color: var(--muted);
  border-color: var(--line);
}
.directory-results .ok, .directory-results .configured { border-color: #bce6ce; background: var(--green-soft); }
.directory-results .not_configured { border-color: #f1d7a8; background: #fffaf0; }
.directory-results .warn { border-color: #f1d7a8; background: #fffaf0; }
.directory-results .error { border-color: #ffd0ca; background: #fff4f2; }
.contact-validation {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
  border: 1px solid #bce6ce;
  border-radius: 8px;
  background: var(--green-soft);
  padding: 12px;
}
.contact-validation[hidden] { display: none; }
.contact-validation[data-state="pending"] {
  border-color: #f1d7a8;
  background: #fffaf0;
}
.contact-validation[data-state="dirty"] {
  border-color: #ffd0ca;
  background: #fff4f2;
}
.contact-validation[data-state="validated"] {
  border-color: #bce6ce;
  background: var(--green-soft);
}
.contact-validation-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.contact-validation-header strong,
.contact-validation-header span {
  display: block;
}
.contact-validation-header span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}
.contact-validation-header button {
  min-height: 32px;
  border: 1px solid #9fc1ff;
  border-radius: 7px;
  background: #fff;
  color: var(--blue);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 500;
}
.contact-validation-header button:disabled {
  cursor: not-allowed;
  border-color: var(--line);
  color: var(--muted);
}
.contact-validation-grid,
.contact-validation-diff {
  display: grid;
  gap: 7px;
}
.validation-subsection {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 10px;
}
.validation-subsection h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}
.validation-subsection p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.validation-summary-section {
  border-color: #d8e4ff;
  background: #f8fbff;
}
.contact-validation-row {
  display: grid;
  grid-template-columns: minmax(90px, 0.4fr) 1fr;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}
.contact-validation-row strong {
  color: var(--ink);
  font-weight: 500;
}
.contact-validation-row input,
.contact-validation-row textarea {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font-size: 13px;
}
.contact-validation-row textarea {
  min-height: 96px;
  padding: 8px 10px;
  resize: vertical;
}
.mail-validation-body,
.meeting-validation-body,
.note-validation-body {
  align-items: flex-start;
}
.contact-action-button {
  width: 100%;
  min-height: 38px;
  border: 1px solid #9fc1ff;
  border-radius: 7px;
  background: #fff;
  color: var(--blue);
  font-weight: 500;
}
.contact-action-button:disabled {
  cursor: not-allowed;
  border-color: var(--line);
  background: #f5f7fb;
  color: var(--muted);
}
.audit-section { margin-bottom: 16px; }
.audit-section h3 { margin: 0 0 8px; font-size: 15px; font-weight: 600; }
.audit-log .success { border-color: #bce6ce; background: var(--green-soft); }
.audit-log .blocked { border-color: #f1d7a8; background: #fffaf0; }
.audit-log .error { border-color: #ffd0ca; background: #fff4f2; }
.connector-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}
.connector-row.enabled { border-color: #bce6ce; background: var(--green-soft); }
.connector-row strong, .connector-row span { display: block; }
.connector-row span { margin-top: 3px; color: var(--muted); font-size: 13px; }
.connector-row button {
  align-self: start;
  min-width: 68px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  font-weight: 500;
}

@media (max-width: 980px) {
  .app-shell,
  .admin-shell { padding: 0; background: #fff; }
  .app-header {
    min-height: 64px;
    border-width: 0 0 1px;
    border-radius: 0;
    box-shadow: none;
    padding: 0 12px;
  }
  .menu-button { display: block; }
  .brand { gap: 8px; }
  .brand span, .connection-status, .avatar, .pwa-status { display: none; }
  .logo { width: 32px; height: 32px; }
  .workspace {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .admin-main {
    padding: 10px;
  }
  .admin-hero,
  .admin-card header {
    display: grid;
  }
  .admin-grid {
    grid-template-columns: 1fr;
  }
  .admin-table-row {
    grid-template-columns: 1fr;
  }
  .admin-table-head {
    display: none;
  }
  .panel { padding: 12px; }
  .panel-title h1 { font-size: 16px; }
  .clear-button { display: none; }
  .quick-prompts, .object-switcher, .form-grid, .routing-panel, .reference-status, .preview-grid, .result-grid, .validation-status-grid, .final-confirmation-grid, .search-context-actions, .search-live-sources, .search-results-summary, .search-result-linked-actions, .search-index-maintenance-cards, .search-detail-action-cards, .search-detail-highlight-grid, .search-request-controls, .search-selection-plan { grid-template-columns: 1fr; }
  .search-index-maintenance-cards article.wide { grid-column: auto; }
  .search-result-head { display: grid; }
  .linked-context-banner { display: grid; }
  .linked-context-prefill { max-width: none; min-width: 0; }
  .search-detail-header { display: grid; }
  .search-detail-recommendation { grid-template-columns: 1fr; }
  .search-detail-action-plan-head { display: grid; }
  .search-detail-action-plan-head span { text-align: left; }
  .search-detail-actions { justify-content: flex-start; }
  .search-detail-resources-head, .search-detail-resource { grid-template-columns: 1fr; }
  .chat-area { min-height: 270px; max-height: none; }
  .bot-icon, .user-icon { display: none; }
  .bubble { max-width: 84%; font-size: 12px; }
  .voice-controls { grid-template-columns: 64px 1fr 64px; gap: 10px; }
  .keyboard, .stop { padding: 0 8px; }
  .microphone { width: 74px; height: 74px; }
  .ticket-actions { display: grid; }
}
