@font-face {
  font-family: "Andito Poppins";
  src: url("brand/fonts/Poppins-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Andito Poppins";
  src: url("brand/fonts/Poppins-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Andito Poppins";
  src: url("brand/fonts/Poppins-SemiBold.ttf") format("truetype");
  font-weight: 650;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Andito Poppins";
  src: url("brand/fonts/Poppins-Bold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --andito-rust: #ab420f;
  --andito-rust-dark: #82300a;
  --andito-rust-soft: #f8e8df;
  --andito-charcoal: #333333;
  --andito-black: #141414;
  --andito-cream: #fbf7f2;
  --andito-sand: #f1e7dd;
  --ink: #262626;
  --muted: #706962;
  --line: #e1d7cc;
  --soft: #f7efe8;
  --panel: #fffdf9;
  --panel-2: #fbf5ee;
  --nav: #222222;
  --nav-2: #333333;
  --teal: #2f6f65;
  --teal-soft: #e7f3ef;
  --blue: #315d7a;
  --blue-soft: #e9f1f5;
  --amber: #ab420f;
  --amber-soft: #f8e8df;
  --red: #9b2f1a;
  --red-soft: #f9e3dc;
  --green: #326d47;
  --green-soft: #e8f3e9;
  --violet: #6f4d8f;
  --violet-soft: #f1e9f6;
  --shadow: 0 16px 34px rgba(51, 51, 51, 0.09);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --andito-rust: #d36a2e;
  --andito-rust-dark: #f0ad85;
  --andito-rust-soft: #352118;
  --andito-charcoal: #f3ede6;
  --andito-black: #050505;
  --andito-cream: #161311;
  --andito-sand: #24201c;
  --ink: #f4eee8;
  --muted: #baaea3;
  --line: #3d342d;
  --soft: #211c18;
  --panel: #181513;
  --panel-2: #211c18;
  --nav: #12100f;
  --nav-2: #1e1915;
  --teal: #63b9aa;
  --teal-soft: #18332f;
  --blue: #82abc6;
  --blue-soft: #182b36;
  --amber: #e28749;
  --amber-soft: #3a2419;
  --red: #ef9078;
  --red-soft: #3a1f1a;
  --green: #79c992;
  --green-soft: #183322;
  --violet: #b99ad6;
  --violet-soft: #2b2331;
  --shadow: 0 16px 34px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(251, 247, 242, 0.92), rgba(241, 231, 221, 0.92)),
    #f4ece4;
  color: var(--ink);
  font-family: "Andito Poppins", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

:root[data-theme="dark"] body {
  background:
    linear-gradient(180deg, rgba(17, 15, 13, 0.94), rgba(28, 23, 19, 0.94)),
    #11100f;
}

button,
input,
select,
textarea {
  font: inherit;
  max-width: 100%;
}

button {
  cursor: pointer;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(31, 31, 30, 0.86), rgba(31, 31, 30, 0.78)),
    var(--andito-charcoal);
}

.auth-gate[hidden] {
  display: none;
}

.auth-card {
  display: grid;
  gap: 16px;
  width: min(420px, 100%);
  padding: 24px;
  border: 1px solid rgba(255, 253, 249, 0.22);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.auth-logo {
  width: 150px;
  height: auto;
}

.auth-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.auth-theme-toggle {
  flex: 0 0 auto;
}

:root[data-theme="dark"] .auth-logo {
  filter: invert(1) brightness(1.35);
}

.auth-card h1 {
  margin: 0;
  color: var(--andito-charcoal);
  font-size: 28px;
}

.auth-card p,
.auth-note {
  color: var(--muted);
}

.auth-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-card input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--panel);
  color: var(--ink);
  font-size: 15px;
  text-transform: none;
}

.auth-locked .app-shell {
  filter: blur(2px);
  pointer-events: none;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 22px 18px;
  overflow-y: auto;
  scrollbar-width: thin;
  color: #fffaf4;
  background:
    linear-gradient(180deg, rgba(20, 20, 20, 0.94), rgba(51, 51, 51, 0.96)),
    url("brand/patterns/Black.png");
  background-size: cover;
}

.brand {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 12px;
  min-height: 88px;
}

.brand-logo {
  width: 132px;
  height: auto;
  flex: 0 0 auto;
}

.brand-name {
  font-size: 18px;
  font-weight: 780;
}

.brand-subtitle {
  color: #dccdc0;
  font-size: 12px;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.mobile-nav-menu {
  display: none;
}

.nav-link {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 8px;
  color: #f8eee6;
  text-decoration: none;
  font-weight: 650;
}

.nav-link:hover,
.nav-link.active {
  color: #241f1b;
  background: #fff8ef;
  box-shadow: inset 4px 0 0 var(--andito-rust);
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 10px;
}

.account-card,
.integration-card {
  display: grid;
  min-width: 0;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(255, 248, 239, 0.18);
  border-radius: 8px;
  background: rgba(255, 248, 239, 0.08);
}

.account-name {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #fffaf4;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
}

.account-role {
  color: #dccdc0;
  font-size: 12px;
  line-height: 1.35;
}

.account-signout {
  justify-self: start;
  min-height: 30px;
  border: 1px solid rgba(255, 248, 239, 0.28);
  border-radius: 8px;
  background: rgba(255, 248, 239, 0.12);
  color: #fff8ef;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.integration-card .pill {
  white-space: normal;
}

.main {
  min-width: 0;
  padding: 22px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
  line-height: 1.1;
  color: var(--andito-charcoal);
}

#page-subtitle {
  margin-top: 6px;
  color: var(--muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar-collection-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.topbar-zoho-sync {
  white-space: nowrap;
}

.topbar-new-client-button {
  white-space: nowrap;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--andito-charcoal);
  padding: 0 10px 0 12px;
  font-weight: 800;
}

.theme-toggle:hover {
  border-color: var(--andito-rust);
  color: var(--andito-rust-dark);
}

.theme-toggle-track {
  position: relative;
  width: 38px;
  height: 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  transition: background 160ms ease, border-color 160ms ease;
}

.theme-toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--andito-rust);
  transition: transform 160ms ease, background 160ms ease;
}

.theme-toggle[aria-pressed="true"] .theme-toggle-track {
  border-color: rgba(211, 106, 46, 0.56);
  background: var(--andito-rust-soft);
}

.theme-toggle[aria-pressed="true"] .theme-toggle-knob {
  transform: translateX(18px);
  background: var(--andito-rust-dark);
}

.sync-label {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.primary-button,
.icon-button,
.quiet-button,
.status-button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  padding: 0 13px;
  font-weight: 700;
}

.quiet-button,
.icon-button,
.status-button {
  text-decoration: none;
  color: var(--andito-charcoal);
}

.primary-button {
  border-color: var(--andito-rust-dark);
  background: var(--andito-rust);
  color: #ffffff;
}

.primary-button:disabled {
  cursor: progress;
  opacity: 0.7;
}

.quiet-button:disabled,
.status-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.status-button[data-complete-pending-action]:disabled,
.status-button[data-complete-action-entry]:disabled {
  cursor: progress;
  opacity: 0.72;
}

.status-button.danger-soft {
  border-color: #d9a087;
  background: #fae4db;
  color: #8f2c17;
}

.full-width {
  width: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.quiet-button:hover,
.icon-button:hover,
.status-button:hover {
  border-color: var(--andito-rust);
  color: var(--andito-rust-dark);
}

.router-collect-button {
  width: 132px;
}

.content {
  display: grid;
  gap: 16px;
}

.toast {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #d9a087;
  border-radius: 8px;
  background: #fff4ec;
  color: var(--andito-rust-dark);
  font-weight: 650;
}

:root[data-theme="dark"] .toast {
  border-color: #78412b;
  background: #2f1d16;
  color: #ffd7c3;
}

.activity-progress {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 70;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: min(360px, calc(100vw - 28px));
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--andito-rust);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.96);
  box-shadow: 0 20px 54px rgba(31, 27, 24, 0.22);
  backdrop-filter: blur(12px);
}

:root[data-theme="dark"] .activity-progress {
  background: rgba(24, 21, 18, 0.96);
}

.activity-progress[hidden] {
  display: none;
}

.activity-progress.complete {
  border-left-color: var(--green);
}

.activity-progress.bad {
  border-left-color: var(--red);
}

.activity-ring {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, var(--panel) 58%, transparent 60%),
    conic-gradient(var(--andito-rust) var(--progress), #eadfd5 0);
}

.activity-progress.complete .activity-ring {
  background:
    radial-gradient(circle at center, var(--panel) 58%, transparent 60%),
    conic-gradient(var(--green) var(--progress), #dce9df 0);
}

.activity-progress.bad .activity-ring {
  background:
    radial-gradient(circle at center, var(--panel) 58%, transparent 60%),
    conic-gradient(var(--red) var(--progress), #f2d8d1 0);
}

.activity-ring span {
  color: var(--andito-charcoal);
  font-size: 11px;
  font-weight: 800;
}

.activity-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.activity-copy strong {
  color: var(--andito-charcoal);
  font-size: 13px;
}

.activity-copy span {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.activity-track {
  overflow: hidden;
  height: 6px;
  border-radius: 999px;
  background: #eadfd5;
}

.activity-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--andito-rust);
  transition: width 280ms ease;
}

.activity-progress.complete .activity-fill {
  background: var(--green);
}

.activity-progress.bad .activity-fill {
  background: var(--red);
}

.codex-helper {
  position: relative;
  z-index: 88;
  flex: 0 0 auto;
  pointer-events: none;
}

.codex-helper * {
  pointer-events: auto;
}

.codex-helper-blob {
  display: inline-grid;
  grid-template-columns: auto auto;
  place-items: center;
  gap: 7px;
  width: auto;
  min-width: 98px;
  height: 40px;
  padding: 0 10px;
  border: 1px solid rgba(130, 48, 10, 0.34);
  border-radius: 8px;
  background: var(--panel);
  color: var(--andito-charcoal);
  box-shadow: none;
}

.codex-helper-blob span {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 999px;
  background: var(--andito-rust);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
}

.codex-helper-blob strong {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.codex-helper-panel {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 89;
  display: none;
  grid-template-rows: auto minmax(0, auto) minmax(150px, 1fr) auto;
  width: min(410px, calc(100vw - 28px));
  max-height: min(720px, calc(100dvh - 36px));
  overflow: hidden;
  border: 1px solid rgba(130, 48, 10, 0.22);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.98);
  box-shadow: 0 24px 68px rgba(31, 27, 24, 0.24);
  backdrop-filter: blur(16px);
}

:root[data-theme="dark"] .codex-helper-panel {
  background: rgba(24, 21, 18, 0.98);
}

.codex-helper.is-open .codex-helper-blob {
  display: none;
}

.codex-helper.is-open .codex-helper-panel {
  display: grid;
}

.codex-helper-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: #2b2b2b;
  color: #ffffff;
}

:root[data-theme="dark"] .codex-helper-header {
  background: #12100f;
}

.codex-helper-header .small-label {
  display: block;
  color: #f1d6c8;
  font-size: 9px;
  line-height: 1.15;
}

.codex-helper-header strong {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.18;
}

.codex-helper-header .icon-button {
  min-width: 30px;
  min-height: 30px;
  padding: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.22);
}

.codex-helper-context {
  display: grid;
  gap: 7px;
  min-height: 0;
  max-height: min(108px, calc((100dvh - 36px) / 4));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.codex-helper-context:focus {
  outline: 2px solid rgba(171, 66, 15, 0.28);
  outline-offset: -2px;
}

.codex-helper-context .small-label {
  color: var(--andito-rust-dark);
}

.codex-helper-context strong {
  color: var(--andito-charcoal);
}

.codex-helper-context p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.codex-context-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.codex-context-list div {
  min-width: 0;
  padding: 5px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

:root[data-theme="dark"] .codex-context-list div {
  background: var(--panel);
}

.codex-context-list span {
  display: block;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.codex-context-list strong {
  display: block;
  margin-top: 1px;
  overflow-wrap: anywhere;
  font-size: 10px;
  line-height: 1.2;
}

.codex-helper-messages {
  display: grid;
  align-content: start;
  gap: 7px;
  min-height: 0;
  overflow: auto;
  padding: 8px 10px;
  background: var(--panel);
}

.codex-helper-message {
  max-width: 92%;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

:root[data-theme="dark"] .codex-helper-message {
  background: var(--panel-2);
}

.codex-helper-message.assistant {
  justify-self: start;
  border-color: #eadfd5;
  background: #fffdf9;
}

:root[data-theme="dark"] .codex-helper-message.assistant {
  border-color: var(--line);
  background: var(--panel);
}

.codex-helper-message.user {
  justify-self: end;
  border-color: #cbd9d4;
  background: var(--teal-soft);
}

.codex-helper-message span {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.codex-helper-message p {
  margin: 0;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.35;
}

.codex-helper-message .readable-message {
  display: grid;
  gap: 5px;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.codex-helper-message .readable-message p {
  margin: 0;
}

.codex-helper-message .readable-heading {
  margin-top: 2px;
  color: var(--ink);
  font-size: 10px;
  font-weight: 900;
}

.codex-helper-message .readable-message ul,
.codex-helper-message .readable-message ol {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 16px;
}

.codex-helper-message .readable-message li {
  padding-left: 1px;
}

.codex-helper-message .readable-message strong {
  color: var(--ink);
  font-weight: 900;
}

.codex-helper-message .readable-message code {
  padding: 1px 3px;
  border-radius: 4px;
  background: #efe6dc;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
}

.codex-helper-relay-note {
  display: grid;
  gap: 2px;
  padding: 6px 7px;
  border: 1px dashed #d6beb0;
  border-radius: 8px;
  background: #fffaf5;
}

.codex-helper-relay-note span {
  color: var(--andito-rust-dark);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.codex-helper-relay-note p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
}

.codex-helper-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  padding: 8px 10px;
  border-top: 1px solid var(--line);
  background: #fffaf5;
}

:root[data-theme="dark"] .codex-helper-form {
  background: var(--panel-2);
}

.codex-helper-form textarea {
  width: 100%;
  min-height: 38px;
  max-height: 86px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 9px;
  color: var(--ink);
  font: inherit;
  font-size: 11px;
}

.codex-helper-form .primary-button {
  align-self: end;
  min-width: 54px;
  min-height: 34px;
  padding: 0 10px;
  font-size: 11px;
}

.grid {
  display: grid;
  gap: 14px;
}

.grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(255, 253, 249, 1), rgba(251, 245, 238, 0.72));
}

:root[data-theme="dark"] .panel-header {
  background: linear-gradient(90deg, rgba(31, 27, 24, 1), rgba(34, 28, 24, 0.72));
}

.panel-title {
  font-size: 16px;
  font-weight: 800;
}

.panel-body {
  padding: 16px;
}

.collapsible-panel > .panel-header {
  cursor: pointer;
  list-style: none;
}

.collapsible-panel > .panel-header .panel-title {
  flex: 1;
  min-width: 0;
}

.collapsible-panel > .panel-header > :first-child {
  flex: 1;
  min-width: 0;
}

.collapsible-panel > .panel-header::-webkit-details-marker {
  display: none;
}

.collapsible-panel:not([open]) > .panel-header {
  border-bottom: 0;
}

.collapsible-panel > .panel-header::after {
  content: "+";
  color: var(--muted);
  font-weight: 900;
}

.collapsible-panel[open] > .panel-header::after {
  content: "-";
}

.metric {
  min-height: 118px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.metric-value {
  font-size: 34px;
  line-height: 1;
  font-weight: 820;
}

.metric-label {
  margin-top: 8px;
  color: var(--muted);
  font-weight: 650;
}

.metric-detail {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.metric.teal {
  border-top: 4px solid var(--andito-rust);
}

.metric.amber {
  border-top: 4px solid #d06a1b;
}

.metric.red {
  border-top: 4px solid #8f2c17;
}

.metric.blue {
  border-top: 4px solid var(--andito-charcoal);
}

.metric.violet {
  border-top: 4px solid var(--violet);
}

.coverage-banner {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.coverage-banner strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.coverage-banner span {
  color: var(--muted);
  font-size: 13px;
}

.coverage-banner.good {
  border-left: 4px solid #5fa978;
}

.coverage-banner.warn {
  border-left: 4px solid var(--andito-rust);
}

.compact-banner {
  margin: 14px 0;
  box-shadow: none;
}

.finance-metrics {
  margin-bottom: 14px;
}

.finance-metrics .metric {
  min-height: 104px;
  box-shadow: none;
}

.finance-table {
  margin-top: 4px;
}

.daily-finance-page .panel-body {
  display: grid;
  gap: 14px;
}

.daily-finance-section {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.daily-finance-section + .daily-finance-section {
  margin-top: 2px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.daily-finance-section > .panel-header {
  align-items: flex-start;
  min-height: 0;
  padding: 0;
  border-bottom: 0;
  background: transparent;
}

.daily-finance-section > .panel-body {
  display: grid;
  gap: 14px;
  padding: 0;
}

.daily-finance-data-banner {
  align-items: center;
}

.daily-finance-tools {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.daily-finance-date-field {
  min-width: 170px;
}

.daily-finance-flow {
  align-items: start;
}

.daily-finance-cash-metrics,
.daily-finance-operations .finance-metrics {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 0;
}

.daily-finance-cash-collected-card {
  display: grid;
  align-content: start;
  gap: 4px;
}

.daily-finance-cash-form {
  display: grid;
  grid-template-columns: minmax(150px, 0.35fr) minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.daily-finance-cash-form .status-button {
  min-height: 38px;
}

.daily-finance-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.compact-header {
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
}

.daily-finance-promise-list {
  display: grid;
  gap: 8px;
}

.daily-finance-promise-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.daily-finance-promise-row strong {
  color: var(--andito-charcoal);
  white-space: nowrap;
}

.daily-finance-adjacent {
  display: grid;
  gap: 10px;
}

.daily-finance-details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  overflow: hidden;
}

.daily-finance-details > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 24px;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

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

.daily-finance-details > summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
  color: var(--muted);
  font-weight: 800;
}

.daily-finance-details[open] > summary::after {
  content: "-";
}

.daily-finance-details > summary + * {
  margin: 0 12px 12px;
}

.business-finance-entry {
  align-items: center;
}

.coverage-detail {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 6px;
  max-width: 46%;
  flex-wrap: wrap;
}

.coverage-detail .pill {
  height: auto;
  min-height: 24px;
  white-space: normal;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.activity-search-form {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 420px;
  min-width: min(420px, 100%);
}

.activity-search-input {
  flex: 1 1 240px;
  width: auto;
  min-width: 180px;
}

.client-search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 440px;
  min-width: min(440px, 100%);
}

.client-search-input {
  flex: 1 1 280px;
  width: auto;
  min-width: 220px;
}

.followup-search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.followup-search-input {
  flex: 1 1 360px;
  width: auto;
}

.followup-search-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 13px;
}

.followup-search-summary strong {
  color: var(--andito-charcoal);
}

.team-report-toolbar {
  align-items: stretch;
}

.team-control-field {
  display: grid;
  gap: 4px;
  min-width: 150px;
}

.team-control-field.wide {
  min-width: 220px;
}

.team-control-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.team-control-field input,
.team-control-field select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--panel);
  color: var(--ink);
  font-weight: 700;
}

.segmented {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.segmented button {
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 0 10px;
  font-weight: 750;
  color: var(--muted);
}

.segmented button.active {
  background: var(--panel);
  color: var(--andito-rust-dark);
  box-shadow: 0 2px 6px rgba(24, 34, 45, 0.1);
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

tbody tr:hover {
  background: var(--panel-2);
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  max-width: 100%;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.pill.neutral {
  color: #574d45;
  background: #eee3d8;
}

.pill.good {
  color: #226344;
  background: var(--green-soft);
}

.pill.warn {
  color: var(--andito-rust-dark);
  background: var(--amber-soft);
}

.pill.bad {
  color: #7e2714;
  background: var(--red-soft);
}

.pill.info {
  color: var(--andito-rust-dark);
  background: var(--andito-rust-soft);
}

.pill.violet {
  color: #5634a2;
  background: var(--violet-soft);
}

.account-name-line {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  gap: 7px;
  vertical-align: middle;
}

.account-name-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-baseline-badge {
  width: 22px;
  height: 22px;
  display: inline-grid;
  flex: 0 0 22px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #eee3d8;
  color: #6b625b;
  box-shadow: none;
}

.account-baseline-badge.compact {
  width: 18px;
  height: 18px;
  flex-basis: 18px;
}

.account-baseline-badge.signed {
  border-color: rgba(255, 255, 255, 0.72);
  background: var(--green);
  color: #fff;
  box-shadow: 0 0 0 2px rgba(50, 109, 71, 0.12);
}

.account-baseline-badge.signed::before {
  content: "";
  width: 9px;
  height: 5px;
  margin-top: -2px;
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: rotate(-45deg);
}

.account-baseline-badge.review {
  border-color: #d6ac93;
  background: var(--amber-soft);
  color: var(--andito-rust-dark);
  box-shadow: 0 0 0 2px rgba(171, 66, 15, 0.1);
}

.account-baseline-badge.review::before {
  content: "";
  width: 8px;
  height: 8px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
}

.account-baseline-badge.none::before {
  content: "";
  width: 9px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.account-baseline-card {
  display: grid;
  gap: 12px;
}

.account-baseline-toggle {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: var(--panel);
  color: var(--rust);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.account-baseline-toggle:hover,
.account-baseline-toggle:focus-visible {
  background: var(--andito-rust-soft);
  outline: 0;
}

.account-baseline-body {
  display: grid;
  gap: 12px;
}

.account-baseline-card.is-collapsed {
  gap: 0;
}

.account-baseline-card.is-collapsed .account-baseline-body {
  display: none;
}

.account-baseline-summary {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.account-baseline-summary strong {
  color: var(--andito-charcoal);
  font-size: 17px;
  line-height: 1.25;
}

.account-baseline-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.account-baseline-actions {
  display: grid;
  gap: 10px;
}

.account-baseline-actions textarea {
  min-height: 76px;
  resize: vertical;
}

.account-baseline-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.continuity-profile-card,
.case-wire-section.continuity-profile {
  gap: 12px;
}

.continuity-profile-card {
  display: block;
}

.continuity-profile-card > summary {
  cursor: pointer;
  list-style: none;
}

.continuity-profile-card > summary::-webkit-details-marker {
  display: none;
}

.continuity-profile-card > summary > div {
  flex: 1;
  min-width: 0;
}

.continuity-profile-card > summary::after {
  content: "+";
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--panel);
  color: var(--rust);
  font-weight: 800;
}

.continuity-profile-card[open] > summary::after {
  content: "-";
}

.continuity-profile-card[open] > .continuity-profile-body {
  padding-top: 12px;
}

.case-wire-section.continuity-profile > summary {
  cursor: pointer;
  list-style: none;
}

.case-wire-section.continuity-profile > summary::-webkit-details-marker {
  display: none;
}

.case-wire-section.continuity-profile:not([open]) > summary {
  padding-bottom: 0;
  border-bottom: 0;
}

.case-wire-section.continuity-profile:not([open]) {
  gap: 0;
}

.continuity-profile-body {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.continuity-profile-body.compact {
  gap: 10px;
}

.continuity-profile-summary {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.case-wire-section .continuity-profile-summary {
  background: var(--panel);
}

.continuity-profile-summary strong {
  color: var(--andito-charcoal);
  font-size: 16px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.continuity-profile-summary p,
.continuity-profile-empty span,
.continuity-profile-badge-row span {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.continuity-profile-rule {
  padding: 10px 12px;
  border-left: 3px solid var(--rust);
  border-radius: 6px;
  background: var(--panel);
  color: var(--andito-charcoal);
  font-size: 13px;
  line-height: 1.4;
}

.continuity-profile-badges {
  display: grid;
  gap: 8px;
}

.continuity-profile-badge-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.continuity-profile-badge-row div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.continuity-profile-badge-row strong {
  color: var(--andito-charcoal);
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.continuity-profile-guardrails {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0 0 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.continuity-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.continuity-profile-empty {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
}

.continuity-profile-empty strong {
  color: var(--andito-charcoal);
  font-size: 14px;
  line-height: 1.25;
}

.priority {
  font-weight: 820;
}

.priority.Urgent {
  color: #8f2c17;
}

.priority.High {
  color: var(--andito-rust);
}

.priority.Medium {
  color: var(--blue);
}

.priority.Monitor {
  color: var(--muted);
}

.client-card-list,
.task-list,
.router-list,
.event-list,
.activity-list {
  display: grid;
  gap: 10px;
}

.client-row,
.task-row,
.router-row,
.event-row,
.activity-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.2fr) minmax(180px, 1.6fr) minmax(120px, 0.8fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 4px 14px rgba(51, 51, 51, 0.04);
}

.client-row > *,
.task-row > *,
.router-row > *,
.event-row > *,
.activity-row > * {
  min-width: 0;
}

.task-row {
  grid-template-columns: minmax(140px, 1fr) minmax(180px, 1.5fr) minmax(104px, 0.7fr) minmax(150px, auto);
}

.task-row.ownership-unclaimed {
  border-color: #d8b9a4;
  background: linear-gradient(90deg, rgba(248, 232, 223, 0.68), var(--panel) 42%);
  box-shadow: inset 4px 0 0 var(--andito-rust), 0 4px 14px rgba(51, 51, 51, 0.04);
}

.task-row.ownership-owned {
  border-color: #b8d3be;
  background: linear-gradient(90deg, rgba(232, 243, 233, 0.64), var(--panel) 42%);
  box-shadow: inset 4px 0 0 var(--green), 0 4px 14px rgba(51, 51, 51, 0.04);
}

.task-row.ownership-claimed-other {
  border-color: #d3cbc4;
  background: linear-gradient(90deg, rgba(241, 231, 221, 0.72), var(--panel) 42%);
  box-shadow: inset 4px 0 0 #a79c92, 0 4px 14px rgba(51, 51, 51, 0.04);
}

.client-card-list .client-row {
  grid-template-columns: minmax(120px, 0.9fr) minmax(150px, 1.2fr) minmax(116px, 0.8fr) minmax(112px, auto);
}

.attention-gap-panel .panel-body {
  padding-top: 12px;
}

.attention-gap-row {
  border-left: 4px solid var(--andito-rust);
  background: linear-gradient(90deg, rgba(248, 232, 223, 0.35), var(--panel));
}

.attention-gap-row .mini-stack {
  align-items: flex-start;
}

.task-row.compact {
  grid-template-columns: minmax(120px, 1fr) minmax(170px, 1.35fr) minmax(76px, auto) minmax(64px, auto);
}

.row-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.row-actions .quiet-button,
.client-row .quiet-button {
  display: inline-flex;
  align-items: center;
  min-width: 84px;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
}

.task-row.compact .quiet-button {
  justify-self: end;
  min-width: 64px;
  padding-inline: 10px;
}

.router-row {
  grid-template-columns: minmax(130px, 1.05fr) minmax(150px, 1fr) minmax(150px, 0.95fr) minmax(118px, 0.75fr);
  align-items: start;
}

.router-row .mini-stack {
  justify-content: flex-end;
}

.router-row .pill {
  height: auto;
  min-height: 24px;
  white-space: normal;
  text-align: center;
}

.event-row {
  grid-template-columns: 130px 160px 1fr;
}

.activity-row {
  grid-template-columns: minmax(132px, 0.8fr) minmax(160px, 0.9fr) minmax(160px, 1fr) minmax(240px, 1.6fr) minmax(112px, auto);
  align-items: start;
}

.team-case-list,
.team-risk-list {
  display: grid;
  gap: 10px;
}

.team-case-row,
.team-risk-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(220px, 1.5fr) minmax(140px, 0.8fr) minmax(150px, auto);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 4px 14px rgba(51, 51, 51, 0.04);
}

.team-case-row.compact {
  grid-template-columns: minmax(180px, 1.2fr) minmax(150px, 0.9fr) minmax(150px, auto);
}

.team-risk-row {
  grid-template-columns: minmax(220px, 1fr) minmax(150px, auto);
  align-items: start;
}

.team-case-row > *,
.team-risk-row > * {
  min-width: 0;
}

.team-case-row .action-group,
.team-risk-row .action-group {
  justify-content: flex-end;
}

.row-title {
  overflow-wrap: anywhere;
  font-weight: 820;
}

.row-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.priority {
  overflow-wrap: anywhere;
}

.meter {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #eadfd5;
}

.meter-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--andito-rust);
}

.meter-fill.warn {
  background: #d06a1b;
}

.meter-fill.bad {
  background: #8f2c17;
}

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

.action-group {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.status-button[data-status="Resolved"] {
  border-color: #9dd3b2;
  background: var(--green-soft);
}

.status-button[data-status="New"] {
  border-color: #d9a087;
  background: var(--amber-soft);
}

.status-button[data-status="No answer"] {
  border-color: #d9a087;
  background: var(--amber-soft);
}

.status-button[data-status="Ignored"] {
  border-color: #c8d1d8;
  background: #eef2f5;
}

.search-box {
  min-height: 38px;
  width: min(340px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--panel);
}

.followup-layout {
  grid-template-columns: minmax(0, 1fr) 430px;
  align-items: start;
}

.queue-sections {
  display: grid;
  gap: 16px;
}

.queue-section {
  display: grid;
  gap: 10px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.section-heading h3 {
  color: var(--andito-charcoal);
  font-size: 14px;
  font-weight: 800;
}

.my-case-section {
  padding: 10px 0 0;
  border-top: 1px solid #eee4da;
}

.my-case-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.my-case-section > summary {
  cursor: pointer;
  list-style: none;
}

.my-case-section > summary::-webkit-details-marker {
  display: none;
}

.my-case-section > summary::after {
  content: "+";
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--andito-rust);
  font-weight: 900;
}

.my-case-section[open] > summary::after {
  content: "-";
}

.my-case-section-body {
  margin-top: 10px;
}

.my-case-panel {
  margin-top: 14px;
}

.case-panel {
  position: sticky;
  top: 22px;
  align-self: start;
  max-height: calc(100vh - 44px);
  overflow: auto;
}

.client-panel {
  max-height: calc(100vh - 44px);
  overflow: auto;
}

.client-panel .panel-header {
  position: sticky;
  top: 0;
  z-index: 1;
}

.case-backdrop,
.case-overlay-backdrop,
.matching-overlay-backdrop,
.client-overlay-backdrop,
.new-client-overlay-backdrop,
.client-backdrop {
  display: none;
}

.case-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.case-close-button,
.client-close-button {
  display: none;
}

.case-body {
  display: grid;
  gap: 16px;
}

body.case-overlay-open,
body.matching-overlay-open,
body.client-overlay-open,
body.zoho-comms-overlay-open {
  overflow: hidden;
}

.case-overlay-backdrop.is-open,
.matching-overlay-backdrop.is-open,
.client-overlay-backdrop.is-open,
.new-client-overlay-backdrop.is-open {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 70;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: rgba(31, 27, 24, 0.58);
}

.zoho-comms-preview-panel .panel-header {
  align-items: flex-start;
}

.whatsapp-comms-page {
  display: grid;
  gap: 14px;
}

.whatsapp-comms-tabs {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  overflow-x: auto;
}

.whatsapp-comms-tab {
  display: grid;
  min-width: 170px;
  gap: 3px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 9px 12px;
  background: transparent;
  color: var(--andito-charcoal);
  text-align: left;
  cursor: pointer;
}

.whatsapp-comms-tab:hover,
.whatsapp-comms-tab.active {
  border-color: var(--line);
  background: var(--panel-2);
}

.whatsapp-comms-tab.active {
  box-shadow: inset 0 0 0 1px rgba(178, 84, 52, 0.24);
}

.whatsapp-comms-tab span,
.whatsapp-comms-tab strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.whatsapp-comms-tab span {
  font-weight: 800;
  line-height: 1.2;
}

.whatsapp-comms-tab strong {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.whatsapp-comms-tab strong.good {
  color: var(--green);
}

.whatsapp-comms-tab strong.warn {
  color: var(--amber);
}

.whatsapp-comms-tab strong.bad {
  color: var(--rust);
}

.andito-whatsapp-page {
  display: grid;
  gap: 14px;
}

.andito-whatsapp-boundary .panel-body {
  display: grid;
  gap: 8px;
}

.andito-whatsapp-connection-summary {
  cursor: pointer;
  list-style: none;
}

.andito-whatsapp-connection-summary::-webkit-details-marker {
  display: none;
}

.andito-whatsapp-connection-summary::after {
  content: "Show";
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.andito-whatsapp-connection[open] .andito-whatsapp-connection-summary::after {
  content: "Hide";
}

.andito-whatsapp-connection-body {
  display: grid;
  grid-template-columns: minmax(190px, 240px) minmax(0, 1fr);
  gap: 14px;
  padding: 0 16px 16px;
}

.andito-whatsapp-link-box {
  display: grid;
  place-items: center;
  min-height: 190px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--muted);
  padding: 14px;
  text-align: center;
}

.andito-whatsapp-link-box img {
  display: block;
  width: min(180px, 100%);
  height: auto;
}

.andito-whatsapp-pairing-display,
.andito-whatsapp-code-chip {
  display: grid;
  gap: 6px;
}

.andito-whatsapp-pairing-display {
  justify-items: center;
}

.andito-whatsapp-pairing-display span,
.andito-whatsapp-code-chip span,
.andito-whatsapp-phone-form label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.andito-whatsapp-pairing-display strong,
.andito-whatsapp-code-chip strong {
  color: var(--andito-charcoal);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.andito-whatsapp-pairing-display p,
.andito-whatsapp-session-controls p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.andito-whatsapp-session-controls {
  display: grid;
  align-content: start;
  gap: 10px;
}

.andito-whatsapp-session-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.andito-whatsapp-scan-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 16px;
}

.andito-whatsapp-scan-stats span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--muted);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 750;
}

.andito-whatsapp-scan-stats strong {
  color: var(--andito-charcoal);
  font-size: 14px;
}

.andito-whatsapp-phone-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  max-width: 520px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.andito-whatsapp-phone-form label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.andito-whatsapp-phone-form input {
  width: 100%;
  min-width: 0;
}

.andito-whatsapp-code-chip {
  width: fit-content;
  max-width: 100%;
  padding: 9px 10px;
  border: 1px solid rgba(178, 84, 52, 0.22);
  border-radius: 8px;
  background: rgba(248, 232, 223, 0.54);
}

.andito-whatsapp-dashboard-context {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.andito-whatsapp-dashboard-summary {
  cursor: pointer;
  list-style: none;
}

.andito-whatsapp-dashboard-summary::-webkit-details-marker {
  display: none;
}

.andito-whatsapp-dashboard-summary::after {
  content: "Show";
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.andito-whatsapp-dashboard-context[open] .andito-whatsapp-dashboard-summary::after {
  content: "Hide";
}

.andito-whatsapp-dashboard-context-body {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(240px, 1fr) minmax(280px, 1.2fr);
  gap: 12px;
  padding: 0 14px 14px;
}

.andito-whatsapp-dashboard-kv {
  align-content: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.andito-whatsapp-dashboard-kv div {
  display: grid;
  grid-template-columns: minmax(64px, auto) minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
}

.andito-whatsapp-dashboard-kv span,
.andito-whatsapp-dashboard-kv strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.compact-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.andito-whatsapp-workbench {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(360px, 1fr) minmax(280px, 360px);
  gap: 12px;
  min-height: min(720px, calc(100vh - 260px));
}

.andito-whatsapp-thread-list {
  min-height: 0;
}

.andito-whatsapp-name-line {
  display: inline-flex;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  gap: 8px;
  vertical-align: middle;
}

.andito-whatsapp-name-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.andito-whatsapp-approved-badge {
  flex: 0 0 22px;
}

.zoho-comms-thread-top .andito-whatsapp-name-line {
  align-items: flex-start;
}

.zoho-comms-thread-top .andito-whatsapp-approved-badge {
  margin-top: 1px;
}

.zoho-comms-search-form.andito-whatsapp-search-form {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.andito-whatsapp-search-header,
.andito-whatsapp-search-row {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.andito-whatsapp-search-header {
  align-items: start;
}

.andito-whatsapp-search-header .small-label {
  display: block;
  margin: 0 0 5px;
  color: var(--andito-rust);
  opacity: 0.72;
  font-size: 11px;
  line-height: 1.1;
}

.andito-whatsapp-search-header strong {
  display: block;
  color: var(--andito-black);
  font-size: 20px;
  line-height: 1.1;
}

.andito-whatsapp-search-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.andito-whatsapp-search-row input {
  min-height: 44px;
  font-size: 15px;
}

.andito-whatsapp-search-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
}

.andito-whatsapp-search-actions .status-button,
.andito-whatsapp-search-actions .quiet-button {
  min-height: 44px;
}

.andito-whatsapp-search-status {
  min-height: 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.andito-whatsapp-thread-list .zoho-comms-thread.is-contact {
  border-color: rgba(50, 109, 71, 0.24);
  background: linear-gradient(90deg, rgba(232, 243, 233, 0.7), var(--panel) 36%);
}

.andito-whatsapp-thread-list .zoho-comms-thread.is-contact.is-active {
  border-color: var(--green);
  box-shadow: inset 4px 0 0 var(--green);
}

.andito-whatsapp-rail {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  overflow: auto;
  padding: 0;
}

.andito-whatsapp-summary-card,
.andito-whatsapp-scan-card,
.andito-whatsapp-rail-drawer {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.andito-whatsapp-summary-card {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.andito-whatsapp-summary-title,
.andito-whatsapp-scan-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.andito-whatsapp-summary-card h3,
.andito-whatsapp-rail-heading h3 {
  margin: 0;
  color: var(--andito-black);
  font-size: 18px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.andito-whatsapp-summary-card p,
.andito-whatsapp-scan-card p,
.andito-whatsapp-rail-empty,
.andito-whatsapp-rail-row p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.andito-whatsapp-summary-actions {
  display: flex;
  align-items: center;
  padding-top: 2px;
}

.andito-whatsapp-workspace-button {
  width: 100%;
  min-width: 0;
}

.andito-whatsapp-rail-group {
  display: grid;
  gap: 10px;
}

.andito-whatsapp-rail-heading {
  display: grid;
  gap: 2px;
  padding: 2px 0 0;
}

.andito-whatsapp-rail-heading .small-label,
.andito-whatsapp-summary-title .small-label {
  color: var(--muted);
}

.andito-whatsapp-scan-card {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.andito-whatsapp-scan-card-title strong,
.andito-whatsapp-rail-drawer summary strong {
  color: var(--andito-black);
  font-size: 14px;
  line-height: 1.2;
}

.andito-whatsapp-scan-stats.compact {
  padding: 0;
}

.andito-whatsapp-scan-stats.compact span {
  min-height: 28px;
  padding: 4px 9px;
}

.andito-whatsapp-rail-drawer {
  overflow: hidden;
}

.andito-whatsapp-rail-drawer summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 9px 12px;
  cursor: pointer;
  list-style: none;
}

.andito-whatsapp-rail-drawer summary::-webkit-details-marker {
  display: none;
}

.andito-whatsapp-rail-drawer summary::after {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 3px solid var(--muted);
  border-bottom: 3px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.andito-whatsapp-rail-drawer[open] summary::after {
  transform: rotate(225deg);
}

.andito-whatsapp-rail-content {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
}

.andito-whatsapp-key-rows {
  display: grid;
  gap: 8px;
}

.andito-whatsapp-key-rows div {
  display: grid;
  gap: 3px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.andito-whatsapp-key-rows span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.andito-whatsapp-key-rows strong {
  color: var(--andito-charcoal);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.andito-whatsapp-rail-list {
  display: grid;
  gap: 7px;
  max-height: 220px;
  overflow: auto;
}

.andito-whatsapp-rail-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: inherit;
  padding: 9px;
  text-align: left;
}

button.andito-whatsapp-rail-row {
  cursor: pointer;
}

button.andito-whatsapp-rail-row:hover,
.andito-whatsapp-rail-row.is-active {
  border-color: var(--andito-rust);
  background: #fffaf4;
}

.andito-whatsapp-rail-row strong {
  display: block;
  min-width: 0;
  color: var(--andito-black);
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.andito-whatsapp-rail-row .pill {
  max-width: 104px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.andito-whatsapp-response-panel {
  display: grid;
  gap: 10px;
  margin: 12px 16px 16px;
  border: 1px solid rgba(171, 66, 15, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(180deg, var(--andito-rust-soft), transparent),
    var(--panel);
  box-shadow:
    inset 4px 0 0 var(--andito-rust),
    0 12px 26px rgba(171, 66, 15, 0.08);
  padding: 12px;
}

.andito-whatsapp-response-heading,
.andito-whatsapp-response-title,
.andito-whatsapp-response-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.andito-whatsapp-response-heading {
  justify-content: space-between;
}

.andito-whatsapp-response-title,
.andito-whatsapp-response-actions {
  flex-wrap: wrap;
}

.andito-whatsapp-response-title .small-label {
  color: var(--andito-rust-dark);
}

.andito-whatsapp-response-panel textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(171, 66, 15, 0.24);
  border-radius: 8px;
  background: var(--panel);
  color: var(--andito-charcoal);
  padding: 10px 12px;
  font: inherit;
  line-height: 1.45;
  resize: vertical;
}

.andito-whatsapp-response-panel textarea[data-andito-whatsapp-response] {
  min-height: 128px;
}

.andito-whatsapp-regeneration-context {
  display: grid;
  gap: 6px;
}

.andito-whatsapp-regeneration-context label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.andito-whatsapp-regeneration-context textarea {
  min-height: 44px;
  border-color: rgba(49, 93, 122, 0.3);
  resize: none;
}

.andito-whatsapp-response-status {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.zoho-comms-source-panel .panel-header {
  align-items: flex-start;
}

.zoho-comms-source-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 0 14px 14px;
}

.zoho-comms-source-grid div {
  display: grid;
  min-width: 0;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.zoho-comms-source-grid span,
.zoho-comms-source-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.zoho-comms-source-grid strong,
.zoho-comms-source-note {
  min-width: 0;
  overflow-wrap: anywhere;
}

.zoho-comms-source-grid strong {
  color: var(--andito-charcoal);
  font-size: 13px;
  line-height: 1.3;
}

.zoho-comms-import-panel form {
  display: grid;
  gap: 12px;
}

.zoho-comms-import-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.45fr) minmax(0, 1fr);
  gap: 12px;
  padding: 0 14px;
}

.zoho-comms-import-grid .field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.zoho-comms-import-grid .field > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.zoho-comms-import-grid input,
.zoho-comms-import-grid textarea {
  width: 100%;
  min-width: 0;
}

.zoho-comms-import-payload textarea {
  min-height: 128px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
}

.zoho-comms-import-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px 14px;
}

.zoho-comms-import-status {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.zoho-comms-import-status.good {
  color: var(--green);
}

.zoho-comms-import-status.bad {
  color: var(--rust);
}

.zoho-comms-import-panel .form-message {
  margin: 0 14px 14px;
}

.zoho-comms-preview-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}

.zoho-comms-preview-card {
  display: grid;
  min-width: 0;
  gap: 8px;
  min-height: 150px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.zoho-comms-preview-card:hover {
  border-color: var(--andito-rust);
  background: #fffaf4;
}

.zoho-comms-preview-card strong,
.zoho-comms-preview-card span,
.zoho-comms-preview-card small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.zoho-comms-preview-card strong {
  color: var(--andito-black);
  font-size: 14px;
  line-height: 1.25;
}

.zoho-comms-preview-card span:not(.pill),
.zoho-comms-preview-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.zoho-comms-overlay-backdrop,
.zoho-comms-overlay-shell {
  display: none;
}

.zoho-comms-overlay-backdrop.is-open {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 72;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: rgba(31, 27, 24, 0.58);
}

.zoho-comms-overlay-shell.is-open {
  display: flex;
  position: fixed;
  top: 18px;
  bottom: 18px;
  left: 50%;
  z-index: 82;
  width: min(1420px, calc(100vw - 36px));
  min-height: 0;
  transform: translateX(-50%);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 28px 80px rgba(31, 27, 24, 0.34);
}

.zoho-comms-overlay-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px) auto;
  gap: 14px;
  align-items: start;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(232, 243, 233, 0.72), var(--panel));
}

.zoho-comms-overlay-title {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.zoho-comms-overlay-title .small-label,
.zoho-comms-agent-cue .small-label,
.zoho-comms-invoice-list .small-label {
  color: var(--andito-rust-dark);
}

.zoho-comms-overlay-title h2 {
  margin: 0;
  color: var(--andito-black);
  font-size: 24px;
  line-height: 1.15;
}

.zoho-comms-source-note {
  display: block;
}

.zoho-comms-filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.zoho-comms-control-group {
  display: grid;
  gap: 5px;
}

.zoho-comms-control-group .small-label {
  color: var(--muted);
  font-size: 10px;
}

.zoho-comms-filter-row .quiet-button {
  min-height: 32px;
  padding: 0 10px;
  gap: 6px;
  font-size: 12px;
}

.zoho-comms-sort-row .quiet-button {
  min-height: 28px;
  padding: 0 9px;
}

.zoho-comms-filter-row .quiet-button span {
  color: var(--muted);
}

.zoho-comms-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  width: 100%;
}

.zoho-comms-search-form input {
  width: 100%;
  min-height: 36px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 11px;
  background: var(--panel);
  color: var(--andito-charcoal);
  font: inherit;
}

.zoho-comms-overlay-body {
  display: grid;
  flex: 1;
  grid-template-columns: minmax(260px, 340px) minmax(360px, 1fr) minmax(280px, 360px);
  gap: 12px;
  min-height: 0;
  overflow: hidden;
  padding: 12px;
  background: var(--andito-cream);
}

.zoho-comms-thread-list,
.zoho-comms-conversation,
.zoho-comms-context {
  min-height: 0;
  overflow: auto;
}

.zoho-comms-thread-list {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 10px;
}

.zoho-comms-thread {
  display: grid;
  min-width: 0;
  gap: 7px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.zoho-comms-thread:hover,
.zoho-comms-thread.is-active {
  border-color: var(--andito-rust);
  background: #fffaf4;
}

.zoho-comms-thread.is-active {
  box-shadow: inset 4px 0 0 var(--andito-rust);
}

.zoho-comms-thread-top,
.zoho-comms-thread-foot {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.zoho-comms-thread-top strong,
.zoho-comms-thread-note,
.zoho-comms-thread-meta,
.zoho-comms-thread-foot span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.zoho-comms-thread-top strong {
  color: var(--andito-black);
  font-size: 14px;
  line-height: 1.25;
}

.zoho-comms-thread-meta,
.zoho-comms-thread-note,
.zoho-comms-thread-foot {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.zoho-comms-thread-note {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.zoho-comms-thread-invoices {
  display: grid;
  gap: 5px;
}

.zoho-comms-thread-invoice {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.zoho-comms-thread-invoice b {
  color: var(--andito-charcoal);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.zoho-comms-thread-foot strong {
  color: var(--andito-black);
}

.zoho-comms-conversation {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.zoho-comms-conversation-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.zoho-comms-conversation-header h3,
.zoho-comms-context h3 {
  margin: 0;
  color: var(--andito-black);
  font-size: 18px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.zoho-comms-conversation-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.zoho-comms-timeline {
  display: grid;
  align-content: start;
  gap: 18px;
  overflow: auto;
  padding: 14px;
}

.zoho-comms-event {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.zoho-comms-event-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #e5f7ef;
  color: #0f8f67;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0;
}

.zoho-comms-event.warn .zoho-comms-event-icon {
  color: #9a5f10;
  background: #fff0cf;
}

.zoho-comms-event-card {
  display: grid;
  min-width: 0;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.zoho-comms-event-card h4 {
  margin: 0;
  color: var(--andito-black);
  font-size: 17px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.zoho-comms-event-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.zoho-comms-event-foot {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.zoho-comms-message,
.zoho-comms-transaction {
  max-width: 76%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.zoho-comms-message-stack {
  display: grid;
  gap: 9px;
}

.andito-whatsapp-history-actions {
  display: flex;
  justify-content: center;
  padding-top: 4px;
}

.andito-whatsapp-history-more {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 999px;
  font-size: 22px;
  line-height: 1;
}

.zoho-comms-inbound-stack {
  display: grid;
  gap: 10px;
}

.zoho-comms-inbound-row {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid #9ed8ce;
  border-left: 4px solid #0f8f67;
  border-radius: 8px;
  background: #eefbf8;
}

.zoho-comms-inbound-row.is-recent,
.zoho-comms-message.inbound.is-recent {
  border-color: #26a269;
  border-left-color: #047857;
  background: #dcfce7;
  box-shadow: 0 0 0 1px rgba(4, 120, 87, 0.08);
}

.zoho-comms-message-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.zoho-comms-message-meta strong {
  color: var(--andito-charcoal);
  font-size: 12px;
}

.zoho-comms-message-date,
.zoho-comms-message-time {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid #cde7df;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  line-height: 1.2;
}

.zoho-comms-message-date {
  border-color: #92cdbd;
  color: #0f6f52;
}

.zoho-comms-recent-label,
.zoho-comms-attachment-pill {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid #8fd7bd;
  background: rgba(255, 255, 255, 0.72);
  color: #0f6f52;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.zoho-comms-attachment-pill {
  border-color: #a8c5df;
  color: #22577a;
}

.zoho-comms-message span,
.zoho-comms-transaction span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.zoho-comms-message .andito-whatsapp-message-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.zoho-comms-message .andito-whatsapp-message-meta-text {
  display: inline;
  min-width: 0;
  flex: 1 1 auto;
}

.zoho-comms-message .andito-whatsapp-delivery-status {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  min-width: 15px;
  margin-left: 2px;
  color: #7a7a73;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.zoho-comms-message .andito-whatsapp-delivery-tick,
.zoho-comms-message .andito-whatsapp-delivery-symbol {
  display: inline-block;
  color: inherit;
  line-height: 1;
  overflow-wrap: normal;
}

.zoho-comms-message .andito-whatsapp-delivery-tick + .andito-whatsapp-delivery-tick {
  margin-left: -5px;
}

.zoho-comms-message .andito-whatsapp-delivery-status.read {
  color: #2f9bd8;
}

.zoho-comms-message .andito-whatsapp-delivery-status.pending {
  color: #9a7a3a;
  font-size: 11px;
}

.zoho-comms-message .andito-whatsapp-delivery-status.failed {
  color: #b6432b;
}

.zoho-comms-message .zoho-comms-attachment-pill {
  display: inline-flex;
  margin-top: 8px;
  color: #22577a;
  font-size: 11px;
  line-height: 1.2;
}

.zoho-comms-message p {
  margin: 5px 0 0;
  color: var(--andito-charcoal);
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.zoho-comms-inbound-row p {
  margin: 0;
  color: var(--andito-charcoal);
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.zoho-comms-message.inbound {
  margin-right: auto;
  background: #eefbf8;
  border-color: #9ed8ce;
}

.zoho-comms-message.outbound {
  margin-left: auto;
  background: #fff7ea;
  border-color: #e4c56a;
}

.zoho-comms-message.system {
  max-width: 92%;
  margin: 0 auto;
  background: var(--panel);
}

.zoho-comms-message.system.warn {
  border-color: var(--amber);
}

.zoho-comms-transaction {
  display: flex;
  max-width: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--panel);
}

.zoho-comms-inline-invoice-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.zoho-comms-draft-stance {
  display: grid;
  gap: 8px;
  margin-top: 4px;
  padding: 12px;
  border: 1px solid #9ed8ce;
  border-radius: 8px;
  background: #f2fbf7;
}

.zoho-comms-draft-stance .small-label {
  color: #0f8f67;
  font-size: 12px;
}

.zoho-comms-draft-stance p {
  color: var(--andito-black);
  font-size: 15px;
}

.zoho-comms-transaction-main {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.zoho-comms-transaction-tags,
.zoho-comms-invoice-tags {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.zoho-comms-status-pill,
.zoho-comms-date-pill {
  min-height: 22px;
  padding: 0 7px;
  font-size: 11px;
  line-height: 1;
}

.zoho-comms-status-pill {
  text-transform: capitalize;
}

.zoho-comms-transaction.good {
  border-left: 4px solid var(--green);
}

.zoho-comms-transaction.warn {
  border-left: 4px solid var(--amber);
}

.zoho-comms-transaction.bad {
  border-left: 4px solid var(--red);
}

.zoho-comms-transaction.neutral {
  border-left: 4px solid var(--line-strong);
}

.zoho-comms-transaction strong {
  color: var(--andito-black);
  overflow-wrap: anywhere;
}

.zoho-comms-context {
  padding-bottom: 10px;
}

.zoho-comms-context-stack {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.zoho-comms-context .kv.compact-kv div {
  display: grid;
  grid-template-columns: minmax(58px, auto) minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
}

.zoho-comms-context .kv.compact-kv span,
.zoho-comms-context .kv.compact-kv strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.zoho-comms-agent-cue,
.zoho-comms-invoice-list {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.zoho-comms-draft-brief {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.zoho-comms-draft-brief-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.zoho-comms-draft-brief > strong {
  color: var(--andito-black);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

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

.zoho-comms-brief-grid div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.zoho-comms-brief-grid span,
.zoho-comms-draft-brief .small-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.zoho-comms-brief-grid b {
  display: block;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.zoho-comms-triage-box {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.zoho-comms-triage-box form,
.zoho-comms-triage-box .field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.zoho-comms-triage-box .field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.zoho-comms-triage-box select,
.zoho-comms-triage-box textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.zoho-comms-triage-box select {
  min-height: 36px;
  padding: 0 10px;
}

.zoho-comms-triage-box textarea {
  min-height: 78px;
}

.zoho-comms-triage-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.zoho-comms-triage-actions .row-subtitle {
  min-width: 0;
  overflow-wrap: anywhere;
}

.zoho-comms-agent-cue strong {
  color: var(--andito-black);
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.zoho-comms-invoice-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.zoho-comms-invoice-main {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.zoho-comms-invoice-row strong,
.zoho-comms-invoice-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.zoho-comms-invoice-row span {
  color: var(--muted);
  font-size: 12px;
}

.zoho-comms-context-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.whatsapp-comms-return {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
}

.whatsapp-comms-return div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.whatsapp-comms-return strong {
  color: var(--andito-charcoal);
  overflow-wrap: anywhere;
}

.whatsapp-comms-return p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.case-overlay-shell,
.matching-overlay-shell,
.client-overlay-shell,
.new-client-overlay-shell {
  display: none;
}

.case-overlay-shell.is-open,
.matching-overlay-shell.is-open,
.client-overlay-shell.is-open,
.new-client-overlay-shell.is-open {
  display: flex;
  position: fixed;
  top: 24px;
  bottom: 24px;
  left: 50%;
  z-index: 80;
  width: min(1240px, calc(100vw - 48px));
  transform: translateX(-50%);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 28px 80px rgba(31, 27, 24, 0.34);
}

.case-overlay-header,
.matching-overlay-header,
.client-overlay-header,
.new-client-overlay-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(248, 232, 223, 0.5), var(--panel));
}

.case-overlay-title,
.matching-overlay-title,
.client-overlay-title,
.new-client-overlay-title {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.case-overlay-title .small-label,
.matching-overlay-title .small-label,
.client-overlay-title .small-label,
.new-client-overlay-title .small-label {
  color: var(--andito-rust-dark);
}

.case-overlay-title h2,
.matching-overlay-title h2,
.client-overlay-title h2,
.new-client-overlay-title h2 {
  margin: 0;
  color: var(--andito-black);
  font-size: 24px;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.case-overlay-actions,
.matching-overlay-actions,
.client-overlay-actions,
.new-client-overlay-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.client-overlay-actions {
  max-width: min(720px, 52vw);
  flex-wrap: wrap;
}

.client-whatsapp-action.andito {
  border-color: rgba(50, 109, 71, 0.28);
  background: rgba(232, 243, 233, 0.9);
  color: #23613b;
}

.client-whatsapp-action.zoho {
  border-color: rgba(86, 52, 162, 0.24);
  background: var(--violet-soft);
  color: #5634a2;
}

.case-overlay-actions {
  flex-direction: column;
  align-items: flex-end;
  width: auto;
  gap: 6px;
}

.case-overlay-actions .status-button {
  width: auto;
  min-height: 32px;
  padding: 0 11px;
  font-size: 13px;
  line-height: 1.1;
  white-space: nowrap;
}

.case-overlay-header {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px) auto;
}

.case-decision-card {
  display: grid;
  min-width: 0;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: inset 4px 0 0 var(--blue);
}

.case-decision-card.warn {
  box-shadow: inset 4px 0 0 var(--amber);
}

.case-decision-card.bad {
  box-shadow: inset 4px 0 0 var(--red);
}

.case-decision-card.good {
  box-shadow: inset 4px 0 0 var(--green);
}

.case-decision-card.violet {
  box-shadow: inset 4px 0 0 var(--violet);
}

.case-decision-card strong {
  color: var(--andito-charcoal);
  font-size: 18px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.case-decision-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.case-overlay-body,
.matching-overlay-body,
.client-overlay-body,
.new-client-overlay-body {
  display: grid;
  gap: 16px;
  overflow: auto;
  padding: 18px;
  background: var(--andito-cream);
}

.new-client-overlay-shell.is-open {
  width: min(980px, calc(100vw - 48px));
}

.new-client-onboarding-form {
  display: grid;
  gap: 14px;
}

.new-client-mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--andito-charcoal);
  font-weight: 800;
}

.new-client-mode-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--andito-rust);
}

.new-client-auto-settings {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.new-client-onboarding-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.new-client-onboarding-grid label,
.new-client-message-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.new-client-onboarding-grid input,
.new-client-onboarding-grid select,
.new-client-message-field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--andito-charcoal);
  font: inherit;
  font-weight: 700;
}

.new-client-onboarding-grid input,
.new-client-onboarding-grid select {
  min-height: 42px;
  padding: 0 12px;
}

.new-client-message-field textarea {
  min-height: 112px;
  resize: vertical;
  padding: 12px;
  line-height: 1.4;
  text-transform: none;
}

.new-client-onboarding-error,
.new-client-onboarding-result {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 12px;
}

.new-client-onboarding-error {
  border-color: rgba(171, 61, 42, 0.3);
  background: rgba(255, 240, 238, 0.9);
  color: var(--red);
  font-weight: 800;
}

.new-client-operation-list,
.new-client-blocker-list {
  display: grid;
  gap: 8px;
}

.new-client-operation-row,
.new-client-blocker-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--andito-cream);
}

.new-client-operation-row div,
.new-client-blocker-row {
  min-width: 0;
}

.new-client-operation-row strong,
.new-client-blocker-row strong {
  display: block;
  color: var(--andito-charcoal);
}

.new-client-operation-row span:not(.pill),
.new-client-blocker-row span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.new-client-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.matching-overlay-shell.is-open {
  width: min(980px, calc(100vw - 48px));
}

.matching-overlay-body .manual-match-form {
  gap: 14px;
}

.matching-overlay-body .manual-match-grid {
  grid-template-columns: 1fr;
}

.case-overlay-snapshot {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.client-overlay-snapshot {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.case-snapshot-card,
.client-snapshot-card {
  display: grid;
  min-height: 112px;
  align-content: start;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: inset 4px 0 0 #d8cbc0;
}

.case-snapshot-card span,
.client-snapshot-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.case-snapshot-card strong,
.client-snapshot-card strong {
  color: var(--andito-charcoal);
  font-size: 17px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.case-snapshot-card p,
.client-snapshot-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.client-snapshot-card .meter {
  margin-top: 2px;
}

.case-snapshot-card.good,
.client-snapshot-card.good {
  box-shadow: inset 4px 0 0 var(--green);
}

.case-snapshot-card.bad,
.client-snapshot-card.bad {
  box-shadow: inset 4px 0 0 var(--red);
}

.case-snapshot-card.warn,
.client-snapshot-card.warn {
  box-shadow: inset 4px 0 0 var(--amber);
}

.case-snapshot-card.info,
.client-snapshot-card.info {
  box-shadow: inset 4px 0 0 var(--blue);
}

.case-snapshot-card.violet,
.client-snapshot-card.violet {
  box-shadow: inset 4px 0 0 var(--violet);
}

.case-overlay-workspace {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.react-legacy-fragment {
  display: contents;
}

.case-overlay-main {
  display: grid;
  min-width: 0;
  gap: 16px;
}

.case-issue-panel {
  position: sticky;
  top: 0;
  display: grid;
  min-width: 0;
  gap: 10px;
  max-height: calc(100vh - 180px);
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.case-issue-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.case-issue-panel-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.case-issue-panel h3 {
  margin: 3px 0 0;
  color: var(--andito-charcoal);
  font-size: 17px;
  line-height: 1.2;
}

.case-issue-list {
  display: grid;
  gap: 8px;
}

.case-issue-button {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--ink);
  text-align: left;
}

.case-issue-button.ownership-unclaimed {
  border-color: #d8b9a4;
  background: linear-gradient(90deg, rgba(248, 232, 223, 0.72), var(--panel-2));
}

.case-issue-button.ownership-owned {
  border-color: #b8d3be;
  background: linear-gradient(90deg, rgba(232, 243, 233, 0.68), var(--panel-2));
}

.case-issue-button.ownership-claimed-other {
  border-color: #d3cbc4;
  background: linear-gradient(90deg, rgba(241, 231, 221, 0.82), var(--panel-2));
}

.case-issue-button:hover,
.case-issue-button.active {
  border-color: var(--andito-rust);
  background: var(--panel);
  box-shadow: inset 4px 0 0 var(--andito-rust);
}

.case-issue-button strong {
  color: var(--andito-charcoal);
  font-size: 14px;
  line-height: 1.26;
  overflow-wrap: anywhere;
}

.case-issue-owner {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  min-height: 24px;
  align-items: center;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.case-issue-owner.owned {
  border-color: #b8d3be;
  background: var(--green-soft);
  color: var(--green);
}

.case-issue-owner.other {
  border-color: #d3cbc4;
  background: #eee7df;
  color: #5d554d;
}

.case-issue-owner.unclaimed {
  border-color: #d8b9a4;
  background: var(--andito-rust-soft);
  color: var(--andito-rust-dark);
}

.case-issue-owner.scheduled {
  border-color: #d8b9a4;
  background: #f4eadf;
  color: var(--andito-rust-dark);
}

.case-issue-button span:not(.pill),
.case-issue-button em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.case-issue-button em {
  color: var(--andito-rust-dark);
  font-weight: 650;
}

.closed-issue-summary {
  display: grid;
  min-width: 0;
  gap: 6px;
  padding: 10px;
  border: 1px solid #d8cfc6;
  border-radius: 8px;
  background: rgba(255, 252, 247, 0.72);
  color: var(--ink);
}

.closed-issue-summary-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.closed-issue-summary strong {
  color: var(--andito-charcoal);
  font-size: 14px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.closed-issue-summary span:not(.pill),
.closed-issue-summary em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.closed-issue-summary em {
  color: #6a625a;
  font-weight: 650;
}

.scheduled-issue-drawer {
  display: grid;
  gap: 8px;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid #eee4da;
}

.scheduled-issue-drawer > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  color: var(--andito-charcoal);
  font-weight: 900;
}

.scheduled-issue-drawer > summary::-webkit-details-marker {
  display: none;
}

.scheduled-issue-drawer > summary::after {
  content: "+";
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--andito-rust);
  font-weight: 900;
}

.scheduled-issue-drawer[open] > summary::after {
  content: "-";
}

.case-decision-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
  align-items: start;
}

.case-decision-column {
  display: grid;
  min-width: 0;
  gap: 14px;
}

.case-wire-section {
  display: grid;
  min-width: 0;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  scroll-margin-top: 18px;
}

.case-wire-section.is-guided-focus {
  border-color: var(--andito-rust);
  box-shadow: 0 0 0 3px rgba(171, 66, 15, 0.14);
}

.case-wire-section.ownership {
  padding: 0;
  overflow: hidden;
}

.case-wire-section.ownership .case-wire-heading {
  padding: 12px 12px 8px;
}

.case-ownership-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border-top: 1px solid #eee4da;
}

.case-ownership-card.unclaimed {
  background: linear-gradient(135deg, rgba(248, 232, 223, 0.92), rgba(255, 253, 249, 0.94));
}

.case-ownership-card.owned {
  background: linear-gradient(135deg, rgba(232, 243, 233, 0.92), rgba(255, 253, 249, 0.94));
}

.case-ownership-card.claimed-other {
  background: linear-gradient(135deg, rgba(241, 231, 221, 0.95), rgba(255, 253, 249, 0.94));
}

.case-ownership-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.case-ownership-main strong {
  display: block;
  color: var(--andito-charcoal);
  line-height: 1.25;
}

.case-ownership-main p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.case-ownership-badges,
.case-ownership-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.case-ownership-badges {
  justify-content: flex-start;
}

.case-ownership-actions {
  align-items: center;
  justify-content: flex-end;
}

.case-ownership-actions .status-button {
  min-height: 36px;
  padding: 8px 12px;
}

.case-ownership-actions .ownership-claim {
  border-color: var(--andito-rust);
  background: var(--andito-rust);
  color: white;
}

.case-ownership-actions .ownership-join {
  border-color: var(--green);
  color: var(--green);
}

.case-ownership-actions .ownership-sync {
  border-color: #6d5cae;
  color: #4e3f86;
}

.case-ownership-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.case-ownership-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.case-ownership-note.sync-warning {
  color: var(--andito-rust-dark);
}

.case-handover-form {
  display: grid;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(130, 48, 10, 0.22);
}

.case-handover-form[hidden] {
  display: none;
}

@media (max-width: 560px) {
  .case-ownership-main {
    grid-template-columns: 1fr;
  }

  .case-ownership-actions {
    justify-content: flex-start;
  }
}

.identity-badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--andito-charcoal);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-align: left;
  overflow-wrap: anywhere;
}

.identity-badge.owned {
  border-color: #b8d3be;
  background: var(--green-soft);
  color: var(--green);
}

.identity-badge.other,
.identity-badge.inherited {
  border-color: #d3cbc4;
  background: #eee7df;
  color: #5d554d;
}

.identity-badge.joined,
.identity-badge.joined-mine {
  border-color: #b8d3be;
  background: #f2faf4;
  color: var(--green);
}

.identity-badge.joined::before,
.identity-badge.joined-mine::before {
  content: "Joined: ";
  color: #6f7d70;
  font-weight: 800;
}

.identity-badge.unclaimed {
  border-color: #d8b9a4;
  background: var(--andito-rust-soft);
  color: var(--andito-rust-dark);
}

.case-outcome-details {
  gap: 0;
}

.case-outcome-details > summary {
  cursor: pointer;
  list-style: none;
}

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

.case-outcome-details:not([open]) > summary {
  padding-bottom: 0;
  border-bottom: 0;
}

.case-outcome-details > summary::after {
  content: "+";
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--andito-rust-dark);
  font-weight: 900;
}

.case-outcome-details[open] > summary::after {
  content: "-";
}

.case-outcome-details > .case-form {
  margin-top: 12px;
}

.case-outcome-badges {
  justify-content: flex-end;
  min-width: 0;
}

.case-outcome-badges .pill {
  max-width: min(220px, 42vw);
  overflow: hidden;
  text-overflow: ellipsis;
}

.case-wire-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee4da;
}

.case-wire-heading span:not(.pill) {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.case-wire-heading h3 {
  margin: 4px 0 0;
  color: var(--andito-charcoal);
  font-size: 18px;
  line-height: 1.2;
}

.case-wire-list {
  display: grid;
  gap: 0;
}

.case-wire-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.42fr) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
  padding: 9px 0;
  border-bottom: 1px solid #eee4da;
}

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

.case-wire-row span {
  color: var(--muted);
  font-size: 13px;
}

.case-wire-row strong {
  color: var(--andito-charcoal);
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.case-wire-row.credential-inline {
  grid-template-columns: minmax(90px, 0.34fr) minmax(0, 1fr) auto;
}

.credential-wire-list {
  margin-top: -4px;
  border-top: 1px solid #eee4da;
}

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

.case-wire-bullets li {
  padding: 9px 0;
  border-bottom: 1px solid #eee4da;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.42;
}

.case-wire-bullets li:last-child {
  border-bottom: 0;
}

.case-wire-section .case-form,
.case-wire-section .comment-list,
.case-wire-section .case-summary {
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.case-wire-section .case-form > .section-heading,
.case-wire-section .comment-list > .section-heading {
  display: none;
}

.case-wire-section .action-preset-grid,
.case-wire-section .action-type-preset-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.case-wire-section .match-case-action {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
}

.case-overlay-workspace > .case-wire-section.links {
  grid-column: 1 / -1;
}

.case-wire-section.links .case-wire-list {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 0;
}

.case-wire-section.links .case-wire-row {
  grid-template-columns: 1fr;
  gap: 4px;
  padding: 0 12px;
  border-right: 1px solid #eee4da;
  border-bottom: 0;
}

.case-wire-section.links .case-wire-row:first-child {
  padding-left: 0;
}

.case-wire-section.links .case-wire-row:last-child {
  padding-right: 0;
  border-right: 0;
}

.case-wire-section.links .match-case-action {
  margin-top: 12px;
}

.case-overlay-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.92fr) minmax(420px, 1.18fr);
  gap: 16px;
  align-items: start;
}

.case-overlay-column {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.case-overlay-section {
  display: grid;
  gap: 10px;
}

.case-overlay-work-column .action-preset-grid,
.case-overlay-work-column .action-type-preset-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.client-overlay-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(320px, 1fr) minmax(360px, 1.12fr);
  gap: 16px;
  align-items: start;
}

.client-overlay-column {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.client-overlay-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.client-zoho-transactions,
.client-global-comments {
  display: block;
}

.client-zoho-transactions > summary,
.client-global-comments > summary {
  cursor: pointer;
  list-style: none;
  margin: -2px 0 0;
}

.client-zoho-transactions > summary::-webkit-details-marker,
.client-global-comments > summary::-webkit-details-marker {
  display: none;
}

.client-zoho-transactions > summary::after,
.client-global-comments > summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--panel);
  color: var(--rust);
  font-weight: 800;
}

.client-zoho-transactions[open] > summary::after,
.client-global-comments[open] > summary::after {
  content: "-";
}

.account-global-comments-content {
  display: grid;
  gap: 12px;
  padding-top: 12px;
}

.account-global-comment-list {
  display: grid;
  gap: 8px;
}

.account-global-comment-row {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.account-global-comment-top {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.account-comment-form {
  display: grid;
  gap: 8px;
  padding-top: 4px;
}

.account-comment-form textarea {
  min-height: 86px;
}

.account-comment-form .status-button {
  width: 100%;
  justify-self: stretch;
}

.zoho-transaction-content {
  display: grid;
  gap: 14px;
  padding-top: 12px;
}

.zoho-transaction-group {
  display: grid;
  gap: 8px;
}

.zoho-transaction-group-heading,
.zoho-transaction-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.zoho-transaction-group-heading h4 {
  margin: 0;
  font-size: 14px;
}

.zoho-transaction-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.zoho-transaction-row {
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.zoho-transaction-row div,
.zoho-transaction-amount {
  display: grid;
  gap: 3px;
}

.zoho-transaction-row span {
  color: var(--muted);
  font-size: 13px;
}

.zoho-transaction-amount {
  justify-items: end;
  text-align: right;
  min-width: 110px;
}

.case-summary,
.comment-row,
.case-link-row,
.credential-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.case-panel-summary {
  gap: 12px;
}

.case-panel-details {
  display: block;
}

.case-panel-details > summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

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

.case-panel-details > summary::after {
  content: "+";
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--andito-rust);
  font-weight: 900;
}

.case-panel-details[open] > summary {
  margin-bottom: 10px;
}

.case-panel-details[open] > summary::after {
  content: "-";
}

.case-panel-issue-list {
  display: grid;
  gap: 8px;
}

.case-panel-issue,
.case-panel-action-latest {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.case-panel-issue strong,
.case-panel-action-latest strong {
  font-size: 15px;
}

.case-panel-issue span:not(.pill),
.case-panel-action-latest span:not(.pill) {
  color: var(--muted);
  font-size: 13px;
}

.closure-gate-form {
  border: 1px solid var(--andito-rust);
  background: #fff8f3;
}

.closure-check-list {
  display: grid;
  gap: 8px;
}

.closure-check-item {
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.closure-fields {
  gap: 10px;
  min-width: 0;
}

.action-log-form {
  border-left: 4px solid var(--teal);
  min-width: 0;
}

.case-action-items {
  display: grid;
  gap: 8px;
}

.case-action-items.pending {
  padding-top: 2px;
}

.case-action-drafts {
  display: grid;
  gap: 12px;
}

.case-action-draft {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  min-width: 0;
  overflow: hidden;
}

.case-action-draft-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.case-action-draft-heading strong {
  display: block;
  color: var(--andito-charcoal);
  line-height: 1.2;
}

.case-action-context {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.case-action-hint {
  margin: -2px 0 0;
}

.action-owner-editor .owner-picker-field {
  margin: 0;
}

.action-owner-editor .owner-picker-field > label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.case-action-item {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  min-width: 0;
}

.case-action-item.undone {
  border-left: 4px solid var(--andito-rust);
}

.case-action-item.done {
  border-left: 4px solid var(--green);
}

.case-action-item-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  min-width: 0;
}

.case-action-item strong {
  display: block;
  margin-top: 6px;
  color: var(--andito-charcoal);
  font-size: 14px;
  line-height: 1.3;
}

.case-action-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.case-action-item-controls,
.action-entry-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.case-action-item-detail,
.case-action-edit-form {
  padding-top: 8px;
  border-top: 1px solid #eee4da;
}

.case-action-draft .closure-fields {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.status-button.compact,
.primary-button.compact {
  min-height: 32px;
  padding-inline: 10px;
  font-size: 13px;
}

.manual-issue-form {
  border-left: 4px solid var(--violet);
  background: #fbf8ff;
}

.case-overlay-main > .manual-issue-form {
  box-shadow: 0 10px 28px rgba(91, 76, 125, 0.12);
}

.action-preset-grid,
.action-type-preset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.action-preset-grid .status-button,
.action-type-preset-grid .status-button {
  justify-content: center;
  min-height: 36px;
}

.action-form-actions .primary-button,
.action-form-actions .status-button {
  flex: 1 1 180px;
  justify-content: center;
}

.case-link-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin-top: 10px;
}

.match-case-action {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border-left: 4px solid var(--violet);
}

.match-case-action .mini-stack {
  margin-top: 8px;
}

.credential-row {
  display: grid;
  grid-template-columns: minmax(80px, 0.7fr) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.credential-row span {
  color: var(--muted);
  font-size: 13px;
}

.secret-value {
  overflow-wrap: anywhere;
}

.client-advanced-block {
  margin-top: 14px;
  border-top: 1px dashed var(--line);
}

.client-advanced-block summary {
  width: max-content;
  max-width: 100%;
  margin-top: 8px;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.client-advanced-block[open] {
  padding-top: 4px;
}

.client-advanced-body {
  display: grid;
  gap: 14px;
  margin-top: 10px;
}

.client-advanced-body form {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(250, 247, 243, 0.72);
}

.client-advanced-body input,
.client-advanced-body select {
  width: 100%;
}

.compact-heading h3 {
  font-size: 13px;
}

.client-case-block {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.client-case-groups {
  display: grid;
  gap: 8px;
}

.client-case-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(250, 247, 243, 0.66);
  overflow: hidden;
}

.client-case-group > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
}

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

.client-case-group > summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--andito-rust);
  font-weight: 900;
}

.client-case-group[open] > summary::after {
  content: "-";
}

.client-case-group summary span:first-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.client-case-group summary strong {
  color: var(--andito-charcoal);
  font-size: 14px;
  line-height: 1.2;
}

.client-case-group summary em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.3;
}

.client-case-group-body {
  display: grid;
  gap: 8px;
  padding: 0 10px 10px;
}

.client-case-row {
  margin-top: 0;
  background: var(--panel);
}

.client-case-row-top {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.client-redistribution-block {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(250, 247, 243, 0.72);
}

.notion-client-block {
  padding: 12px;
  border: 1px solid #d9a087;
  border-radius: 8px;
  background: var(--amber-soft);
}

.notion-client-block .case-form {
  background: var(--panel);
}

.compact-kv {
  gap: 6px;
}

.compact-kv .kv-row {
  padding-bottom: 7px;
  font-size: 13px;
}

.topology-client-form,
.downstream-client-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.topology-client-form input,
.topology-client-form select,
.downstream-client-form input {
  min-height: 38px;
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: var(--panel);
  color: var(--ink);
}

.downstream-client-list {
  display: grid;
  gap: 10px;
}

.downstream-client-list > summary {
  width: max-content;
  max-width: 100%;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.downstream-client-list[open] > summary {
  margin-bottom: 10px;
}

.downstream-client-row {
  align-items: center;
}

.limit-history-block {
  gap: 10px;
}

.limit-history-sessions {
  display: grid;
  gap: 10px;
}

.limit-history-row,
.limit-history-session {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  overflow: hidden;
}

.limit-history-row {
  padding: 12px;
}

.limit-history-session > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px;
  cursor: pointer;
  list-style: none;
}

.limit-history-session > summary::-webkit-details-marker {
  display: none;
}

.limit-history-session > summary::after {
  content: "Expand";
  grid-column: 1 / -1;
  width: max-content;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.limit-history-session[open] > summary::after {
  content: "Collapse";
}

.limit-session-summary {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.limit-session-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.limit-session-expanded {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
  border-top: 1px solid var(--line);
}

.limit-history-event {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.limit-event-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.limit-note-meta {
  grid-column: 1 / -1;
}

.limit-comment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.limit-comment-form input {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: var(--panel);
}

.case-form {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.comment-submit {
  width: 100%;
}

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

.form-message {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  font-weight: 700;
}

.form-message.bad {
  border-color: #e1b39f;
  background: #fff1eb;
  color: var(--rust);
}

.form-message.good {
  border-color: #b8d8c2;
  background: #eef9f0;
  color: var(--green);
}

textarea {
  min-height: 104px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--panel);
}

.comment-list {
  display: grid;
  gap: 10px;
}

.comment-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.comment-body {
  color: var(--ink);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.operator-form {
  grid-template-columns: minmax(220px, 1fr) auto;
}

.matching-layout {
  align-items: start;
}

.match-suggestion-list,
.match-table-list {
  display: grid;
  gap: 12px;
}

.match-expand-row {
  min-height: 44px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--andito-rust-dark);
  font-weight: 800;
}

.match-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(0, 1.6fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.match-row.partial {
  border-color: #d9a087;
  background: linear-gradient(90deg, rgba(248, 232, 223, 0.42), var(--panel-2));
}

.match-network {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.match-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  min-width: 0;
}

.match-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.match-card.strong {
  border-color: #9dd3b2;
  box-shadow: inset 4px 0 0 var(--green);
}

.match-card-status {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

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

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

.match-reasons span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eee3d8;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.manual-match-form {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  align-items: stretch;
}

.manual-match-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.manual-picker {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.manual-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.manual-picker-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.manual-picker-head label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.manual-picker-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.match-count-button {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--andito-rust-dark);
  white-space: nowrap;
}

.combined-match-picker {
  border-color: #d9a087;
  background: var(--amber-soft);
}

.force-match-option {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #d9a087;
  border-radius: 8px;
  background: var(--amber-soft);
}

.force-match-option.compact {
  grid-column: 1 / -1;
}

.force-match-option .check-field {
  min-height: 0;
  color: var(--andito-rust-dark);
  white-space: normal;
}

.force-match-option span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.manual-picker-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: var(--panel);
  color: var(--andito-rust-dark);
  font-size: 12px;
  font-weight: 850;
}

.manual-picker-summary {
  min-height: 34px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(255, 253, 249, 0.74);
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
}

.manual-picker.collapsed .manual-picker-list {
  display: none;
}

.manual-picker .search-box,
.manual-picker select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.manual-picker select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: var(--panel);
  color: var(--ink);
  overflow-x: hidden;
}

.manual-picker option {
  white-space: normal;
}

.match-source-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.match-source-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.match-source-tabs button.active {
  border-color: var(--andito-rust);
  background: var(--andito-rust);
  color: #fff;
}

.match-source-tabs span {
  opacity: 0.78;
}

.matched-repair-section {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.matched-repair-section.collapsed {
  box-shadow: none;
}

.matched-repair-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.matched-repair-body {
  display: grid;
  gap: 10px;
}

.match-table-row.repair {
  box-shadow: inset 4px 0 0 var(--green);
}

.manual-link-builder,
.match-source-empty {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(250, 247, 243, 0.74);
}

.manual-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.manual-link-picker {
  background: var(--panel);
}

.manual-link-picker select {
  min-height: 136px;
}

.match-source-empty {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.compact-source-empty {
  padding: 8px;
  font-size: 11px;
}

.match-sync-note {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #d9a087;
  border-radius: 8px;
  background: var(--amber-soft);
}

.match-sync-note strong {
  display: block;
  color: var(--andito-rust-dark);
  font-size: 13px;
}

.match-sync-note span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.match-table-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(180px, 1.2fr) minmax(130px, auto) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.match-table-row[hidden] {
  display: none !important;
}

.match-table-row > * {
  min-width: 0;
}

.match-table-row.stale {
  background: var(--amber-soft);
}

.match-table-row.partial {
  background: linear-gradient(90deg, rgba(248, 232, 223, 0.38), var(--panel));
  box-shadow: inset 4px 0 0 var(--andito-rust);
}

.compact-expand {
  min-height: 34px;
  font-size: 12px;
}

.compact-search {
  width: min(320px, 100%);
}

.other-service-list {
  display: grid;
  gap: 12px;
}

.other-service-row {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.other-service-row.collapsed {
  gap: 0;
  padding: 10px 12px;
}

.other-service-row.collapsed .other-service-summary {
  align-items: center;
}

.other-service-row.candidate {
  background: linear-gradient(90deg, rgba(248, 232, 223, 0.28), var(--panel));
}

.other-service-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.other-service-form {
  display: grid;
  gap: 10px;
}

.other-service-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.other-service-fields.manual {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.other-service-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.other-service-form input,
.other-service-form select,
.other-service-form textarea {
  min-height: 38px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--panel);
  color: var(--ink);
  text-transform: none;
}

.other-service-form textarea {
  resize: vertical;
}

.business-status .panel-header {
  align-items: flex-start;
}

.business-focus-list,
.business-gap-list {
  display: grid;
  gap: 10px;
}

.business-focus {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 8px;
  background: var(--panel-2);
}

.business-focus strong {
  color: var(--andito-charcoal);
  font-size: 20px;
}

.business-focus.good {
  border-left-color: var(--green);
}

.business-focus.warn {
  border-left-color: var(--andito-rust);
}

.business-focus.bad {
  border-left-color: var(--red);
}

.business-recovery-control .panel-body {
  display: grid;
  gap: 14px;
}

.business-recovery-metrics {
  align-items: stretch;
}

.business-recovery-lanes {
  display: grid;
  gap: 12px;
}

.business-recovery-cohort {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 8px;
  background: var(--panel-2);
}

.business-recovery-cohort:not([open]) {
  gap: 0;
}

.business-recovery-cohort.good {
  border-left-color: var(--green);
}

.business-recovery-cohort.warn {
  border-left-color: var(--andito-rust);
}

.business-recovery-cohort.bad {
  border-left-color: var(--red);
}

.business-recovery-cohort.violet {
  border-left-color: var(--violet);
}

.business-recovery-cohort.neutral,
.business-recovery-cohort.info {
  border-left-color: var(--blue);
}

.business-recovery-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 28px;
  gap: 12px;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.business-recovery-heading::-webkit-details-marker {
  display: none;
}

.business-recovery-heading:focus-visible {
  outline: 3px solid rgba(128, 50, 28, 0.22);
  outline-offset: 4px;
  border-radius: 8px;
}

.business-recovery-heading::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--andito-rust);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.business-recovery-cohort[open] > .business-recovery-heading::after {
  content: "-";
}

.business-recovery-heading h3 {
  margin: 0;
  color: var(--andito-charcoal);
  font-size: 16px;
}

.business-recovery-total {
  min-width: 104px;
  text-align: right;
}

.business-recovery-total strong,
.business-recovery-total span {
  display: block;
}

.business-recovery-total strong {
  color: var(--andito-charcoal);
  font-size: 18px;
}

.business-recovery-total span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.business-recovery-content {
  display: grid;
  gap: 10px;
}

.business-recovery-strategy {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--andito-charcoal);
  font-size: 13px;
  font-weight: 650;
}

.business-recovery-list {
  display: grid;
  gap: 8px;
}

.business-recovery-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.3fr) minmax(160px, 0.8fr) minmax(150px, 0.8fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.business-recovery-row > * {
  min-width: 0;
}

.business-recovery-row.bad {
  background: var(--red-soft);
}

.business-recovery-row.warn {
  background: var(--amber-soft);
}

.business-recovery-row.good {
  background: var(--green-soft);
}

.business-recovery-row.violet {
  background: var(--violet-soft);
}

.limit-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.limit-column {
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
}

.limit-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 16px;
  color: #ffffff;
  background: var(--andito-charcoal);
}

.limit-column-header h3 {
  font-size: 15px;
}

.limit-column-header span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 650;
}

.limit-column.warning .limit-column-header {
  background: var(--andito-rust);
}

.limit-column.unmatched .limit-column-header {
  background: #6a4b39;
}

.limit-column-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.limit-sort-control {
  display: flex;
  align-items: center;
  gap: 6px;
}

.limit-sort-control span {
  margin-top: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.limit-sort-control select {
  width: 164px;
  min-height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  padding: 0 8px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.limit-sort-control select option {
  color: var(--andito-charcoal);
  background: var(--panel);
}

.limit-toggle {
  min-height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  padding: 0 10px;
  font-weight: 800;
  white-space: nowrap;
}

.today-limit-panel .limit-toggle {
  border-color: var(--line);
  background: var(--panel);
  color: var(--andito-rust-dark);
}

.inline-toggle {
  border-color: var(--line);
  background: var(--panel);
  color: var(--andito-rust-dark);
}

.business-toggle {
  width: 100%;
  margin-top: 12px;
  border-color: var(--line);
  background: var(--panel-2);
  color: var(--andito-rust-dark);
}

.limit-list {
  display: grid;
}

.today-limit-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(170px, 1fr));
  gap: 10px;
}

.limit-section {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.today-limit-grid .limit-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.limit-reasons,
.limit-meter,
.limit-actions {
  margin-top: 10px;
}

.limit-session-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.limit-session-meta > div {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.68);
}

:root[data-theme="dark"] .limit-session-meta > div {
  border-color: rgba(240, 173, 133, 0.34);
  background: #251f1b;
  box-shadow: inset 0 0 0 1px rgba(255, 248, 239, 0.04);
}

.limit-session-meta span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

:root[data-theme="dark"] .limit-session-meta span {
  color: #f0ad85;
}

.limit-session-meta strong {
  display: block;
  margin-top: 3px;
  color: var(--andito-charcoal);
  font-size: 12px;
  overflow-wrap: anywhere;
}

:root[data-theme="dark"] .limit-session-meta strong {
  color: #fffaf4;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.empty-state.compact {
  min-height: 68px;
  padding: 14px;
}

.interface-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.interface-tile {
  min-height: 110px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 253, 249, 0.92), rgba(251, 245, 238, 0.92)),
    var(--panel-2);
}

.interface-tile.running {
  border-color: #abd8bd;
}

.interface-tile.down {
  border-color: #edbbb7;
}

.event-log-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.event-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.event-filter select {
  min-height: 38px;
  min-width: min(260px, 52vw);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: var(--panel);
  color: var(--ink);
  font-weight: 700;
  text-transform: none;
}

.network-map-toolbar {
  align-items: stretch;
}

.network-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 8px;
  min-width: min(520px, 100%);
}

.network-filter-grid select,
.network-form select,
.unmapped-client-row select,
.network-form input,
.network-form textarea,
.unmapped-client-row input {
  min-height: 38px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: var(--panel);
  color: var(--ink);
}

.network-form textarea {
  padding-top: 9px;
}

.network-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(330px, 0.65fr);
  gap: 14px;
  align-items: start;
}

.map-selection-panel {
  position: sticky;
  top: 22px;
  max-height: calc(100vh - 44px);
  overflow: auto;
}

.map-client-backdrop {
  display: none;
}

.map-client-close-button {
  display: inline-flex;
}

.map-client-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 14px;
}

.map-client-summary h3 {
  margin: 0 0 4px;
  font-size: 22px;
}

.map-client-actions {
  margin-top: 14px;
}

.map-client-more {
  margin-top: 16px;
}

.map-client-more > summary {
  width: max-content;
  max-width: 100%;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.map-client-more-body {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

.network-map-canvas {
  position: relative;
  min-height: min(64vh, 680px);
  background: #eadfd5;
}

.network-map-canvas.tileless,
.node-position-map.tileless {
  background-color: #f1e8df;
  background-image:
    linear-gradient(rgba(74, 62, 52, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 62, 52, 0.08) 1px, transparent 1px);
  background-size: 48px 48px;
}

.network-map-canvas.tileless .leaflet-container,
.node-position-map.tileless .leaflet-container {
  background: transparent;
}

.network-map-canvas.map-pick-active {
  cursor: crosshair;
  outline: 3px solid rgba(183, 71, 15, 0.32);
  outline-offset: -3px;
}

.network-map-canvas .leaflet-container,
.leaflet-container {
  font: inherit;
}

.map-attribution-note {
  padding: 8px 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 13px;
  height: 13px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--panel);
}

.legend-dot.infrastructure {
  border-color: #2e5f66;
  background: #2e5f66;
}

.legend-dot.antenna {
  border-color: #b7470f;
  background: #f6c7a3;
}

.legend-dot.client-node {
  border-color: #b7470f;
  background: #fff7ef;
}

.legend-dot.client {
  border-color: #706962;
  background: #706962;
}

.map-section-heading {
  margin: 18px 0 10px;
}

.map-pick-card {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.map-pick-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.map-pick-header h3 {
  margin: 0;
  font-size: 18px;
}

.map-pick-status {
  padding: 9px 10px;
  border-radius: 8px;
  background: rgba(232, 222, 212, 0.72);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.map-pick-status.active,
.quiet-button.active {
  border-color: var(--andito-rust);
  background: #f9e3d4;
  color: var(--andito-rust);
}

.compact-form {
  gap: 8px;
}

.map-node-pick-button {
  grid-column: 1 / -1;
  align-self: end;
  justify-self: start;
  min-height: 42px;
}

.node-map-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(30, 27, 25, 0.42);
}

.node-map-overlay.active {
  display: flex;
}

.node-map-sheet {
  width: min(980px, 100%);
  max-height: min(840px, 92vh);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 28px 90px rgba(35, 30, 25, 0.34);
}

.node-position-map {
  min-height: min(66vh, 620px);
  background: #eadfd5;
}

.node-map-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
}

.node-map-actions .map-pick-status {
  flex: 1;
}

body.node-map-picker-open {
  overflow: hidden;
}

.client-search-hint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.map-mini-list,
.network-node-list,
.unmapped-client-list {
  display: grid;
  gap: 10px;
}

.map-mini-row,
.network-node-row,
.unmapped-client-row {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.map-mini-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.map-mini-row > *,
.network-node-row > *,
.unmapped-client-row > * {
  min-width: 0;
}

.network-node-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.network-node-row.active {
  border-color: var(--andito-rust);
  box-shadow: inset 4px 0 0 var(--andito-rust);
}

.network-node-row.client-node-row {
  border-color: rgba(183, 71, 15, 0.42);
  background: #fff7ef;
}

.network-node-row > button {
  display: grid;
  gap: 3px;
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  text-align: left;
}

.network-node-row > button span {
  color: var(--muted);
  font-size: 13px;
}

.network-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.network-form .wide {
  grid-column: 1 / -1;
}

.network-form .primary-button {
  justify-self: start;
}

.unmapped-client-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  overflow: hidden;
}

.unmapped-client-row > div:first-child {
  flex: 1 1 220px;
}

.unmapped-client-row input,
.unmapped-client-row select {
  flex: 1 1 150px;
  max-width: 100%;
}

.unmapped-client-row .wide-input {
  flex: 2 1 260px;
  grid-column: auto;
}

.unmapped-client-row .primary-button {
  flex: 0 0 auto;
  min-width: 88px;
  max-width: 160px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

.form-grid.network-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.settings-auth-summary {
  margin-top: 14px;
}

.role-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.role-grid.compact {
  grid-template-columns: 1fr;
}

.role-card {
  border: 1px solid var(--line);
  background: var(--panel-2);
  border-radius: 8px;
  padding: 0;
}

.role-card summary {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.role-card summary::-webkit-details-marker {
  display: none;
}

.role-card summary::after {
  content: "+";
  color: var(--muted);
  font-weight: 900;
}

.role-card summary > span:first-child {
  flex: 1;
  min-width: 0;
}

.role-card[open] summary::after {
  content: "-";
}

.role-card p {
  margin: 0;
  padding: 0 12px 12px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.35;
}

.admin-users {
  display: grid;
  gap: 12px;
}

.admin-departments {
  display: grid;
  gap: 12px;
}

.admin-department-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.admin-department-form input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--panel);
}

.admin-department-list {
  display: grid;
  gap: 10px;
}

.admin-department-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel-2);
}

.admin-action-catalog {
  display: grid;
  gap: 14px;
}

.admin-issue-groups {
  display: grid;
  gap: 12px;
}

.admin-issue-group-row {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(260px, 1.1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.admin-issue-group-row p,
.admin-action-description,
.admin-action-comment {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.admin-action-comment {
  color: var(--andito-rust-dark);
}

.admin-action-catalog-toolbar {
  display: flex;
  justify-content: flex-end;
}

.admin-action-type-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 0.6fr);
  gap: 10px;
  align-items: end;
}

.admin-action-type-form input,
.admin-action-type-form select,
.admin-action-type-form textarea,
.admin-action-example-row input,
.admin-action-example-row select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: var(--panel);
}

.admin-action-type-form textarea {
  min-height: 72px;
  padding: 9px 10px;
  resize: vertical;
}

.admin-action-type-form .wide {
  grid-column: 1 / -1;
}

.admin-action-type-list,
.admin-action-example-list {
  display: grid;
  gap: 12px;
}

.admin-action-type-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1.2fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 14px;
}

.admin-action-overlay-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  align-items: center;
  justify-items: center;
  padding: 18px;
  background: rgba(34, 31, 29, 0.58);
}

.admin-action-overlay-shell {
  display: grid;
  gap: 12px;
  width: min(980px, 100%);
  max-height: min(860px, calc(100vh - 36px));
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.admin-action-overlay-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.admin-action-overlay-header h2 {
  margin: 2px 0 0;
  font-size: 24px;
}

.admin-action-overlay-body {
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: 18px;
  overflow: auto;
}

.admin-action-overlay-section {
  display: grid;
  gap: 12px;
}

.admin-action-type-form.overlay-form {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.admin-action-example-row {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(150px, 0.7fr) minmax(220px, auto) minmax(180px, auto);
  gap: 10px;
  align-items: end;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 10px;
}

.admin-action-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
}

.admin-issue-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.admin-inline-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.check-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.admin-user-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(150px, 0.7fr) minmax(170px, 0.8fr) auto;
  gap: 12px;
  align-items: end;
  border: 1px solid var(--line);
  background: var(--panel-2);
  border-radius: 8px;
  padding: 14px;
}

.admin-user-row label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.admin-user-row label span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.field input,
.field select {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: var(--panel);
}

.case-form input,
.case-form select,
.case-form textarea,
.field textarea {
  width: 100%;
  min-width: 0;
}

.owner-picker-field .row-subtitle {
  margin-top: 2px;
  font-size: 12px;
}

.owner-search-box {
  position: relative;
}

.owner-search-box input {
  width: 100%;
}

.owner-choice-list {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: none;
  max-height: 220px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.owner-choice-list.is-open {
  display: grid;
  gap: 4px;
}

.owner-choice {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.owner-choice:hover,
.owner-choice:focus {
  background: var(--soft);
  outline: none;
}

.owner-choice.is-filtered-out {
  display: none;
}

.owner-choice span {
  color: var(--muted);
  font-size: 12px;
}

.owner-choice-empty {
  display: none;
  padding: 10px;
  color: var(--muted);
  font-size: 13px;
}

.owner-choice-empty.is-open {
  display: block;
}

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

.detail-panel {
  position: sticky;
  top: 22px;
  align-self: start;
}

.kv {
  display: grid;
  gap: 10px;
}

.kv-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.kv-row span:first-child {
  color: var(--muted);
}

.footer-note {
  color: var(--muted);
  font-size: 13px;
}

.small-label {
  color: #f7e8da;
  font-size: 12px;
  font-weight: 650;
  text-transform: uppercase;
}

@media (max-width: 1180px) {
  .grid.cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .limit-board,
  .split,
  .followup-layout,
  .network-map-layout,
  .network-topology-grid {
    grid-template-columns: 1fr;
  }

  .unmapped-client-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .unmapped-client-row > div:first-child {
    grid-column: 1 / -1;
  }

  .today-limit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .daily-finance-tools {
    justify-content: flex-start;
  }

  .daily-finance-cash-form {
    grid-template-columns: minmax(150px, 0.6fr) minmax(220px, 1fr);
  }

  .daily-finance-cash-form .status-button {
    justify-self: flex-start;
  }

  .daily-finance-promise-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .daily-finance-promise-row .status-button {
    grid-column: 1 / -1;
    justify-self: flex-start;
  }

  .business-recovery-row {
    grid-template-columns: minmax(0, 1fr) minmax(150px, 0.7fr);
    align-items: start;
  }

  .business-recovery-row .row-actions {
    justify-content: flex-start;
  }

  .limit-column-tools,
  .limit-sort-control,
  .limit-sort-control select,
  .limit-toggle {
    width: 100%;
  }

  .limit-sort-control {
    justify-content: space-between;
  }

  .case-panel {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .case-overlay-snapshot {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .client-overlay-snapshot {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .case-overlay-workspace,
  .case-decision-grid,
  .case-overlay-grid,
  .client-overlay-grid {
    grid-template-columns: 1fr;
  }

  .case-wire-section.links .case-wire-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .case-wire-section.links .case-wire-row {
    padding: 0;
    border-right: 0;
    border-bottom: 1px solid #eee4da;
  }

  .case-issue-panel {
    position: static;
    max-height: none;
  }
}

@media (max-width: 1400px) {
  .client-card-list .client-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }

  .client-card-list .row-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 820px) {
  body.case-sheet-open,
  body.client-sheet-open,
  body.map-client-sheet-open {
    overflow: hidden;
  }

  .case-action-item-main {
    grid-template-columns: 1fr;
  }

  .case-action-item-controls,
  .action-entry-actions {
    justify-content: stretch;
  }

  .case-action-item-controls .status-button,
  .action-entry-actions .status-button {
    flex: 1 1 110px;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 25;
    height: auto;
    gap: 10px;
    padding: 10px 14px;
  }

  .brand {
    flex-direction: row;
    align-items: center;
    min-height: 0;
  }

  .brand-logo {
    width: 104px;
    max-width: 36vw;
  }

  .brand-name {
    font-size: 15px;
    line-height: 1.15;
  }

  .brand-subtitle {
    font-size: 11px;
  }

  .desktop-nav-list,
  .sidebar-footer {
    display: none;
  }

  .mobile-nav-menu {
    display: block;
  }

  .mobile-nav-menu summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid rgba(255, 248, 239, 0.22);
    border-radius: 8px;
    background: rgba(255, 248, 239, 0.1);
    color: #fff8ef;
    cursor: pointer;
    list-style: none;
  }

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

  .mobile-nav-menu summary::after {
    content: "";
    justify-self: end;
    width: 9px;
    height: 9px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 160ms ease;
  }

  .mobile-nav-menu[open] summary::after {
    transform: rotate(225deg);
  }

  .mobile-nav-menu summary span {
    color: #dccdc0;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .mobile-nav-menu summary strong {
    min-width: 0;
    overflow: hidden;
    color: #fff8ef;
    font-size: 15px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-top: 8px;
  }

  .mobile-account-card {
    margin-top: 8px;
  }

  .main {
    padding: 14px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .toolbar,
  .segmented {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }

  .daily-finance-tools,
  .daily-finance-date-field,
  .daily-finance-date-field input,
  .daily-finance-tools .status-button {
    width: 100%;
  }

  .daily-finance-section > .panel-header,
  .daily-finance-cash-form {
    display: grid;
    grid-template-columns: 1fr;
  }

  .daily-finance-section > .panel-header .status-button,
  .daily-finance-cash-form .status-button {
    width: 100%;
  }

  .daily-finance-promise-row {
    grid-template-columns: 1fr;
  }

  .daily-finance-details > summary {
    grid-template-columns: minmax(0, 1fr) 24px;
  }

  .daily-finance-details > summary strong {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .client-search-form,
  .client-search-input,
  .followup-search-form,
  .followup-search-input {
    width: 100%;
  }

  .business-recovery-row {
    grid-template-columns: 1fr;
  }

  .business-recovery-heading {
    grid-template-columns: minmax(0, 1fr) 28px;
  }

  .business-recovery-total {
    grid-column: 1 / -1;
    text-align: left;
  }

  .client-search-form .quiet-button,
  .followup-search-form .icon-button,
  .followup-search-form .quiet-button {
    flex: 1 1 140px;
  }

  .followup-search-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .segmented {
    overflow-x: auto;
    overscroll-behavior-x: contain;
  }

  .segmented button {
    flex: 0 0 auto;
  }

  .grid.cols-4,
  .grid.cols-3,
  .grid.cols-2,
  .today-limit-grid,
  .form-grid,
  .network-filter-grid,
  .admin-department-form,
  .admin-department-row,
  .admin-action-type-row,
  .admin-action-type-form,
  .admin-action-example-row,
  .admin-user-row,
  .unmapped-client-row,
  .map-mini-row,
  .network-node-row {
    grid-template-columns: 1fr;
  }

  .network-map-canvas {
    min-height: 420px;
  }

  .map-pick-header {
    flex-direction: column;
  }

  .node-map-overlay {
    align-items: end;
    padding: 10px;
  }

  .node-map-sheet {
    max-height: 92vh;
    border-radius: 10px 10px 0 0;
  }

  .node-position-map {
    min-height: 58vh;
  }

  .node-map-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .network-map-toolbar .search-box {
    width: 100%;
  }

  .unmapped-client-row {
    align-items: stretch;
  }

  .unmapped-client-row > div:first-child,
  .unmapped-client-row input,
  .unmapped-client-row select,
  .unmapped-client-row .wide-input,
  .unmapped-client-row .primary-button {
    flex-basis: 100%;
    width: 100%;
    max-width: none;
  }

  .activity-search-form {
    width: 100%;
    min-width: 0;
  }

  .activity-search-input {
    min-width: 0;
  }

  .client-row,
  .task-row,
  .router-row,
  .event-row,
  .activity-row,
  .team-case-row,
  .team-case-row.compact,
  .team-risk-row,
	  .case-link-row,
	  .match-case-action,
	  .credential-row,
  .match-row,
  .match-table-row,
  .other-service-fields,
  .match-sync-note,
  .match-source-empty,
	  .manual-link-grid,
	  .limit-history-session > summary,
	  .limit-comment-form,
	  .topology-client-form,
	  .downstream-client-form {
    grid-template-columns: 1fr;
  }

  .limit-session-badges {
    justify-content: flex-start;
  }

  .limit-event-meta {
    flex-direction: column;
    gap: 2px;
  }

  .matched-repair-head {
    grid-template-columns: 1fr;
  }

  .other-service-summary {
    flex-direction: column;
  }

  .manual-picker {
    padding: 10px;
  }

  .manual-picker select {
    font-size: 13px;
  }

  .matching-layout > .panel:nth-child(2) {
    order: -1;
  }

  .coverage-banner {
    flex-direction: column;
  }

  .coverage-detail {
    max-width: none;
    justify-content: flex-start;
  }

  .action-group {
    justify-content: flex-start;
  }

  .case-backdrop.is-open,
  .client-backdrop.is-open,
  .map-client-backdrop.is-open {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 30;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: rgba(31, 27, 24, 0.52);
  }

  .case-panel,
  .client-panel {
    display: none;
    position: fixed;
    inset: 10px;
    z-index: 40;
    max-height: calc(100dvh - 20px);
    overflow: auto;
    border-radius: 10px;
    box-shadow: 0 24px 64px rgba(31, 27, 24, 0.32);
  }

  .case-panel.is-open,
  .client-panel.is-open {
    display: block;
  }

  .case-overlay-shell.is-open,
  .matching-overlay-shell.is-open,
  .client-overlay-shell.is-open,
  .new-client-overlay-shell.is-open,
  .zoho-comms-overlay-shell.is-open {
    inset: 0;
    left: 0;
    width: 100%;
    transform: none;
    border: 0;
    border-radius: 0;
  }

  .case-overlay-header,
  .matching-overlay-header,
  .client-overlay-header,
  .new-client-overlay-header,
  .zoho-comms-overlay-header {
    position: sticky;
    top: 0;
    z-index: 1;
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .zoho-comms-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .whatsapp-comms-return {
    align-items: stretch;
    flex-direction: column;
  }

  .zoho-comms-source-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .zoho-comms-import-grid {
    grid-template-columns: 1fr;
  }

  .zoho-comms-import-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .zoho-comms-brief-grid {
    grid-template-columns: 1fr;
  }

  .zoho-comms-triage-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .zoho-comms-overlay-body {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .andito-whatsapp-workbench {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .andito-whatsapp-dashboard-context-body {
    grid-template-columns: 1fr;
  }

  .andito-whatsapp-connection-body {
    grid-template-columns: 1fr;
  }

  .andito-whatsapp-phone-form {
    grid-template-columns: 1fr;
  }

  .whatsapp-comms-tabs {
    width: 100%;
  }

  .whatsapp-comms-tab {
    min-width: min(180px, 58vw);
  }

  .zoho-comms-thread-list,
  .zoho-comms-conversation,
  .zoho-comms-context {
    max-height: none;
    overflow: visible;
  }

  .zoho-comms-search-form {
    grid-template-columns: 1fr;
  }

  .andito-whatsapp-search-row,
  .andito-whatsapp-search-actions {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .andito-whatsapp-search-actions {
    display: grid;
  }

  .zoho-comms-message,
  .zoho-comms-transaction {
    max-width: 100%;
  }

  .case-overlay-title h2,
  .matching-overlay-title h2,
  .client-overlay-title h2 {
    font-size: 20px;
  }

  .case-overlay-actions,
  .matching-overlay-actions,
  .client-overlay-actions {
    justify-content: flex-start;
  }

  .client-overlay-actions {
    max-width: none;
  }

  .case-overlay-body,
  .matching-overlay-body,
  .client-overlay-body,
  .new-client-overlay-body {
    padding: 12px;
  }

  .new-client-onboarding-grid {
    grid-template-columns: 1fr;
  }

  .new-client-form-actions,
  .new-client-form-actions .primary-button,
  .new-client-form-actions .quiet-button {
    width: 100%;
  }

  .case-overlay-snapshot,
  .client-overlay-snapshot {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .case-overlay-work-column .action-preset-grid,
  .case-overlay-work-column .action-type-preset-grid,
  .case-wire-section .action-preset-grid,
  .case-wire-section .action-type-preset-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .map-selection-panel.map-client-panel {
    display: none;
    position: fixed;
    inset: auto 10px 10px;
    top: 12vh;
    z-index: 40;
    max-height: 88dvh;
    overflow: auto;
    border-radius: 10px;
    box-shadow: 0 24px 64px rgba(31, 27, 24, 0.32);
  }

  .map-selection-panel.map-client-panel.is-open {
    display: block;
  }

  .case-panel .panel-header,
  .client-panel .panel-header,
  .map-selection-panel.map-client-panel .panel-header {
    position: sticky;
    top: 0;
    z-index: 1;
  }

  .case-close-button,
  .client-close-button,
  .map-client-close-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .map-client-summary {
    flex-direction: column;
  }
}

.readiness-check-list {
  display: grid;
  gap: 8px;
}

.readiness-check-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.readiness-check-row p {
  margin: 3px 0 0;
}

@media (max-width: 520px) {
  .codex-helper {
    right: auto;
    bottom: auto;
    left: auto;
  }

  .codex-helper-blob {
    margin-left: 0;
  }

  .codex-helper-panel {
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: auto;
    max-height: calc(100dvh - 20px);
  }

  .codex-context-list,
  .codex-helper-form {
    grid-template-columns: 1fr;
  }

  .codex-helper-form .primary-button {
    width: 100%;
  }

  .case-overlay-snapshot,
  .client-overlay-snapshot,
  .zoho-comms-preview-grid,
  .case-overlay-work-column .action-preset-grid,
  .case-overlay-work-column .action-type-preset-grid,
  .case-wire-section .action-preset-grid,
  .case-wire-section .action-type-preset-grid,
  .case-wire-section.links .case-wire-list {
    grid-template-columns: 1fr;
  }

  .case-snapshot-card,
  .client-snapshot-card {
    min-height: 0;
  }
}

:root[data-theme="dark"] .client-case-group,
:root[data-theme="dark"] .client-global-comments,
:root[data-theme="dark"] .account-global-comment-row,
:root[data-theme="dark"] .client-redistribution-block,
:root[data-theme="dark"] .client-advanced-body form,
:root[data-theme="dark"] .manual-link-builder,
:root[data-theme="dark"] .match-source-empty,
:root[data-theme="dark"] .manual-picker-summary,
:root[data-theme="dark"] .closed-issue-summary,
:root[data-theme="dark"] .closure-gate-form,
:root[data-theme="dark"] .manual-issue-form,
:root[data-theme="dark"] .network-node-row.client-node-row {
  border-color: #51443a;
  background: #211c18;
  color: var(--ink);
}

:root[data-theme="dark"] .client-case-group summary strong,
:root[data-theme="dark"] .client-redistribution-block h3,
:root[data-theme="dark"] .client-redistribution-block .field label,
:root[data-theme="dark"] .closed-issue-summary-top,
:root[data-theme="dark"] .manual-link-builder strong,
:root[data-theme="dark"] .match-source-empty strong {
  color: #fffaf4;
}

:root[data-theme="dark"] .client-case-group summary em,
:root[data-theme="dark"] .client-redistribution-block .row-subtitle,
:root[data-theme="dark"] .client-global-comments .comment-meta,
:root[data-theme="dark"] .client-advanced-body form .row-subtitle,
:root[data-theme="dark"] .manual-picker-summary,
:root[data-theme="dark"] .closed-issue-summary span:not(.pill),
:root[data-theme="dark"] .closed-issue-summary em,
:root[data-theme="dark"] .manual-link-builder span,
:root[data-theme="dark"] .match-source-empty span,
:root[data-theme="dark"] .network-node-row.client-node-row .row-subtitle {
  color: #d8c9bc;
}

:root[data-theme="dark"] .client-case-group > summary::after,
:root[data-theme="dark"] .client-zoho-transactions > summary::after,
:root[data-theme="dark"] .client-global-comments > summary::after,
:root[data-theme="dark"] .case-panel-details > summary::after {
  border: 1px solid #51443a;
  background: #151210;
  color: #f0ad85;
}

:root[data-theme="dark"] .form-message.bad {
  border-color: #7b4633;
  background: #321d16;
  color: #ffcfbc;
}

:root[data-theme="dark"] .form-message.good,
:root[data-theme="dark"] .zoho-comms-message.inbound,
:root[data-theme="dark"] .zoho-comms-inbound-row,
:root[data-theme="dark"] .zoho-comms-draft-stance {
  border-color: #315d45;
  background: #16271d;
  color: #c9f2d5;
}

:root[data-theme="dark"] .zoho-comms-inbound-row.is-recent,
:root[data-theme="dark"] .zoho-comms-message.inbound.is-recent {
  border-color: #3d8b61;
  border-left-color: #5ee08d;
  background: #183522;
}

:root[data-theme="dark"] .zoho-comms-recent-label,
:root[data-theme="dark"] .zoho-comms-attachment-pill {
  border-color: #47745e;
  background: #193425;
  color: #c8f6d6;
}

:root[data-theme="dark"] .zoho-comms-message.outbound {
  border-color: #6b5430;
  background: #2e2416;
  color: #ffe3ac;
}

:root[data-theme="dark"] .zoho-comms-message .andito-whatsapp-delivery-status {
  color: #b7ada0;
}

:root[data-theme="dark"] .zoho-comms-message .andito-whatsapp-delivery-status.read {
  color: #67c7ff;
}

:root[data-theme="dark"] .zoho-comms-message .andito-whatsapp-delivery-status.pending {
  color: #e0bb69;
}

:root[data-theme="dark"] .zoho-comms-message .andito-whatsapp-delivery-status.failed {
  color: #ff9c80;
}

:root[data-theme="dark"] .zoho-comms-preview-card:hover,
:root[data-theme="dark"] .zoho-comms-thread:hover,
:root[data-theme="dark"] .zoho-comms-thread.is-active {
  background: #271f19;
}

:root[data-theme="dark"] .match-reasons span,
:root[data-theme="dark"] .case-issue-owner.other,
:root[data-theme="dark"] .case-issue-owner.scheduled,
:root[data-theme="dark"] .identity-badge.other,
:root[data-theme="dark"] .identity-badge.inherited,
:root[data-theme="dark"] .identity-badge.joined,
:root[data-theme="dark"] .identity-badge.joined-mine {
  border-color: #51443a;
  background: #2a231e;
  color: #e7d8ca;
}

:root[data-theme="dark"] .pill.good {
  color: #d7f7df;
  background: #12351f;
}

:root[data-theme="dark"] .pill.warn,
:root[data-theme="dark"] .pill.info {
  color: #ffd9bd;
  background: #3b2115;
}

:root[data-theme="dark"] .pill.bad {
  color: #ffcfc2;
  background: #3a1a14;
}

:root[data-theme="dark"] .pill.violet {
  color: #e1ceff;
  background: #291d3a;
}

:root[data-theme="dark"] .pill.neutral {
  color: #f0e4d7;
  background: #332a23;
}

:root[data-theme="dark"] .account-baseline-badge.none {
  border-color: #51443a;
  background: #332a23;
  color: #f0e4d7;
}

:root[data-theme="dark"] .account-baseline-summary {
  border-color: #51443a;
  background: #211c18;
}

:root[data-theme="dark"] .account-baseline-summary strong {
  color: #fffaf4;
}

:root[data-theme="dark"] .task-row.ownership-unclaimed,
:root[data-theme="dark"] .attention-gap-row,
:root[data-theme="dark"] .match-row.partial {
  border-color: rgba(240, 173, 133, 0.46);
  background: linear-gradient(90deg, rgba(72, 37, 22, 0.82), var(--panel) 48%);
  box-shadow: inset 4px 0 0 var(--andito-rust), 0 4px 14px rgba(0, 0, 0, 0.18);
}

:root[data-theme="dark"] .task-row.ownership-owned {
  border-color: rgba(121, 201, 146, 0.42);
  background: linear-gradient(90deg, rgba(22, 50, 31, 0.82), var(--panel) 48%);
  box-shadow: inset 4px 0 0 var(--green), 0 4px 14px rgba(0, 0, 0, 0.18);
}

:root[data-theme="dark"] .task-row.ownership-claimed-other {
  border-color: #51443a;
  background: linear-gradient(90deg, rgba(48, 40, 34, 0.9), var(--panel) 48%);
  box-shadow: inset 4px 0 0 #8f7d6d, 0 4px 14px rgba(0, 0, 0, 0.18);
}

:root[data-theme="dark"] .task-row .row-title,
:root[data-theme="dark"] .attention-gap-row .row-title,
:root[data-theme="dark"] .team-case-row .row-title,
:root[data-theme="dark"] .team-risk-row .row-title {
  color: #fffaf4;
}

:root[data-theme="dark"] .task-row .row-subtitle,
:root[data-theme="dark"] .attention-gap-row .row-subtitle,
:root[data-theme="dark"] .team-case-row .row-subtitle,
:root[data-theme="dark"] .team-risk-row .row-subtitle {
  color: #d8c9bc;
}

:root[data-theme="dark"] .priority.Urgent,
:root[data-theme="dark"] .priority.High {
  color: #ff9d5f;
}

:root[data-theme="dark"] .priority.Medium {
  color: #a8d2eb;
}

:root[data-theme="dark"] .meter {
  background: #3d342d;
}

:root[data-theme="dark"] .status-button[data-status="Resolved"] {
  border-color: #315d45;
  background: #16271d;
  color: #d7f7df;
}

:root[data-theme="dark"] .status-button[data-status="New"],
:root[data-theme="dark"] .status-button[data-status="No answer"] {
  border-color: rgba(240, 173, 133, 0.46);
  background: #2f2018;
  color: #ffd9bd;
}

:root[data-theme="dark"] .status-button[data-status="Ignored"] {
  border-color: #51443a;
  background: #2a2521;
  color: #e7d8ca;
}

:root[data-theme="dark"] .case-overlay-header,
:root[data-theme="dark"] .matching-overlay-header,
:root[data-theme="dark"] .client-overlay-header {
  background: linear-gradient(90deg, rgba(72, 37, 22, 0.78), var(--panel));
}

:root[data-theme="dark"] .zoho-comms-overlay-header {
  background: linear-gradient(90deg, rgba(22, 50, 31, 0.78), var(--panel));
}

:root[data-theme="dark"] .notion-client-block,
:root[data-theme="dark"] .combined-match-picker,
:root[data-theme="dark"] .force-match-option,
:root[data-theme="dark"] .match-sync-note {
  border-color: rgba(240, 173, 133, 0.46);
  background: #2f2018;
  color: var(--ink);
}

:root[data-theme="dark"] .force-match-option .check-field,
:root[data-theme="dark"] .match-count-button,
:root[data-theme="dark"] .match-sync-note strong {
  color: #ffd9bd;
}

:root[data-theme="dark"] .match-sync-note span {
  color: #d8c9bc;
}

:root[data-theme="dark"] .case-issue-button.ownership-unclaimed,
:root[data-theme="dark"] .case-ownership-card.unclaimed {
  border-color: rgba(240, 173, 133, 0.46);
  background: linear-gradient(90deg, rgba(72, 37, 22, 0.82), var(--panel-2) 52%);
}

:root[data-theme="dark"] .case-issue-button.ownership-owned,
:root[data-theme="dark"] .case-ownership-card.owned {
  border-color: rgba(121, 201, 146, 0.42);
  background: linear-gradient(90deg, rgba(22, 50, 31, 0.82), var(--panel-2) 52%);
}

:root[data-theme="dark"] .case-issue-button.ownership-claimed-other,
:root[data-theme="dark"] .case-ownership-card.claimed-other {
  border-color: #51443a;
  background: linear-gradient(90deg, rgba(48, 40, 34, 0.9), var(--panel-2) 52%);
}

:root[data-theme="dark"] .case-issue-button strong {
  color: #fffaf4;
}

:root[data-theme="dark"] .case-issue-button span:not(.pill),
:root[data-theme="dark"] .case-issue-button em {
  color: #d8c9bc;
}

:root[data-theme="dark"] .case-issue-owner.owned,
:root[data-theme="dark"] .identity-badge.owned,
:root[data-theme="dark"] .identity-badge.joined,
:root[data-theme="dark"] .identity-badge.joined-mine {
  border-color: #315d45;
  background: #16271d;
  color: #d7f7df;
}

:root[data-theme="dark"] .case-issue-owner.unclaimed,
:root[data-theme="dark"] .identity-badge.unclaimed,
:root[data-theme="dark"] .case-issue-owner.scheduled {
  border-color: rgba(240, 173, 133, 0.46);
  background: #2f2018;
  color: #ffd9bd;
}

:root[data-theme="dark"] .identity-badge.joined::before,
:root[data-theme="dark"] .identity-badge.joined-mine::before {
  color: #9ecfab;
}

:root[data-theme="dark"] .match-table-row.stale {
  background: #2f2018;
}

:root[data-theme="dark"] .match-table-row.partial,
:root[data-theme="dark"] .other-service-row.candidate {
  background: linear-gradient(90deg, rgba(72, 37, 22, 0.78), var(--panel));
}

:root[data-theme="dark"] .business-recovery-row.bad {
  background: #321d16;
}

:root[data-theme="dark"] .business-recovery-row.warn {
  background: #2f2018;
}

:root[data-theme="dark"] .business-recovery-row.good {
  background: #16271d;
}

:root[data-theme="dark"] .business-recovery-row.violet {
  background: #291d3a;
}

.continuity-workflow-card {
  padding: 0;
  overflow: hidden;
}

.continuity-workflow-card > .section-heading {
  padding: 16px 18px;
}

.continuity-workflow-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel-2) 78%, transparent);
}

.continuity-workflow-intro p {
  margin: 0;
  color: var(--ink);
  font-weight: 650;
}

.continuity-workflow-intro span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.continuity-control-grid {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.continuity-control {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-2);
  box-shadow: 0 8px 24px rgba(23, 31, 42, 0.04);
}

.continuity-control-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.continuity-control-heading h4 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 15px;
}

.continuity-control-detail {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.continuity-control-readback {
  display: grid;
  gap: 7px;
  margin: 0;
}

.continuity-control-readback > div {
  display: grid;
  grid-template-columns: minmax(104px, 0.42fr) minmax(0, 1fr);
  gap: 10px;
  padding-top: 7px;
  border-top: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
}

.continuity-control-readback dt,
.continuity-control-readback dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
}

.continuity-control-readback dt {
  color: var(--muted);
}

.continuity-control-readback dd {
  color: var(--ink);
  font-weight: 600;
}

.continuity-control-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.continuity-action-drawer {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.continuity-action-drawer > summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 13px;
  font-weight: 750;
}

.continuity-action-drawer form {
  display: grid;
  gap: 10px;
  padding-top: 12px;
}

.continuity-action-drawer label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.continuity-action-drawer input,
.continuity-action-drawer textarea {
  width: 100%;
  box-sizing: border-box;
}

.continuity-action-drawer textarea {
  min-height: 76px;
  resize: vertical;
}

.continuity-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.continuity-action-drawer .continuity-confirm {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--ink);
  font-weight: 600;
}

.continuity-confirm input {
  width: auto;
  margin-top: 2px;
}

.continuity-fixed-message,
.continuity-unknown-outcome {
  display: grid;
  gap: 6px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.continuity-fixed-message p,
.continuity-unknown-outcome span {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.continuity-fixed-message span {
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.continuity-unknown-outcome {
  border-color: color-mix(in srgb, #d0873c 48%, var(--line));
}

.maintenance-lane-drawer > p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .continuity-workflow-intro {
    display: grid;
  }

  .continuity-workflow-intro span {
    text-align: left;
  }

  .continuity-control-readback > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

:root[data-theme="dark"] .continuity-control,
:root[data-theme="dark"] .continuity-fixed-message,
:root[data-theme="dark"] .continuity-unknown-outcome {
  box-shadow: none;
}
