:root {
  --ink: #17202a; --muted: #687584; --line: #e2e7ec; --canvas: #f4f6f8;
  --surface: #fff; --nav: #101820; --nav-muted: #9ba7b3; --accent: #0b6b62;
  --accent-soft: #e7f4f1; --danger: #b42318; --danger-soft: #fff0ee;
  --warning: #9a6700; --warning-soft: #fff7dc; --blue: #2457a6;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink); background: var(--canvas); font-size: 14px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 0; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
input, select, textarea {
  width: 100%; border: 1px solid #ccd4dc; border-radius: 6px; background: #fff;
  color: var(--ink); padding: 9px 10px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: #5e9b94; box-shadow: 0 0 0 3px rgba(11,107,98,.09); }
textarea { min-height: 88px; resize: vertical; }
label { display: grid; gap: 6px; color: #384554; font-size: 13px; font-weight: 600; }
.primary, .secondary, .danger-button, .quiet-button {
  border-radius: 6px; padding: 9px 13px; font-weight: 650; border: 1px solid transparent;
}
.primary { background: var(--accent); color: #fff; }
.secondary { background: #fff; color: #344250; border-color: #cbd3db; }
.danger-button { background: var(--danger); color: #fff; }
.quiet-button { background: #eef2f5; color: #344250; }
.wide { width: 100%; padding: 11px; }
.eyebrow { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .13em; margin: 0 0 8px; }
.brand-mark {
  position: relative; width: 28px; height: 28px; display: block; flex: 0 0 auto;
  transform: rotate(45deg); color: #7ee0d2; border: 1px solid rgba(126,224,210,.42);
}
.brand-mark i {
  position: absolute; top: 50%; width: 3px; height: 12px;
  transform: translateY(-50%); background: currentColor;
}
.brand-mark i:nth-child(1) { left: 6px; }
.brand-mark i:nth-child(2) { left: 12px; height: 18px; }
.brand-mark i:nth-child(3) { right: 6px; }
.login-shell { min-height: 100vh; display: grid; place-items: center; background: #edf1f3; position: relative; }
.login-shell:before {
  content: ""; position: absolute; inset: 0 50% 0 0;
  background: linear-gradient(145deg, #111b23 0%, #142b2a 100%);
}
.login-brand { position: absolute; top: 30px; left: 38px; z-index: 1; display: flex; gap: 11px; color: #fff; align-items: center; }
.login-brand strong, .login-brand small { display: block; }
.login-brand strong { font-size: 17px; letter-spacing: -.03em; }
.login-brand small { color: #7ee0d2; font-size: 9px; margin-top: 5px; letter-spacing: .01em; }
.login-panel {
  position: relative; z-index: 1; width: 420px; margin-left: 390px; padding: 38px;
  background: #fff; border: 1px solid #dae1e5; border-radius: 12px; box-shadow: 0 24px 70px rgba(20,32,42,.12);
}
.login-panel h1 { font-size: 28px; letter-spacing: -.03em; margin: 0; }
.login-panel > p { color: var(--muted); margin: 8px 0 28px; }
.login-panel label { margin: 16px 0; }
.form-error { color: var(--danger); min-height: 20px; margin-top: 12px; font-size: 13px; }
.login-foot { position: absolute; bottom: 22px; right: 38px; color: #82909d; font-size: 12px; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 224px 1fr; }
.sidebar { background: var(--nav); color: #fff; display: flex; flex-direction: column; min-height: 100vh; }
.brand { height: 72px; padding: 0 21px; display: flex; align-items: center; gap: 11px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; }
.brand small { color: #7cc4bb; font-size: 7.5px; margin-top: 4px; white-space: nowrap; }
.main-nav { padding: 18px 11px; display: grid; gap: 4px; }
.main-nav button {
  display: grid; grid-template-columns: 23px 1fr auto; align-items: center; text-align: left;
  padding: 10px 11px; border: 0; border-radius: 6px; background: transparent; color: var(--nav-muted);
}
.main-nav button span { font-size: 17px; color: #83919b; }
.main-nav button i { font-style: normal; font-size: 10px; background: #29343d; color: #ccd4d9; border-radius: 10px; padding: 2px 6px; }
.main-nav button:hover, .main-nav button.active { background: #1c2932; color: #fff; }
.main-nav button.active { box-shadow: inset 3px 0 var(--accent); }
.main-nav button.active span { color: #7cc4bb; }
.nav-section { margin: 17px 11px 5px; color: #667681; font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.sidebar-foot { margin-top: auto; padding: 20px 22px; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-foot small { display: block; color: #667681; margin-top: 9px; font-size: 10px; }
.environment { display: flex; align-items: center; gap: 8px; color: #b9c4cb; font-size: 12px; }
.environment b, .health-pill b { width: 7px; height: 7px; border-radius: 50%; background: #39a875; }
.main-stage { min-width: 0; }
.topbar {
  min-height: 72px; background: #fff; border-bottom: 1px solid var(--line); padding: 12px 25px;
  display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 10;
}
.topbar p { margin: 0 0 3px; color: #8a96a2; font-size: 11px; }
.topbar h1 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.icon-button, .text-button { background: transparent; border: 0; color: #596876; }
.icon-button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 6px; font-size: 18px; }
.text-button { padding: 6px; font-size: 12px; }
.health-pill { display: flex; gap: 7px; align-items: center; color: #53606d; font-size: 11px; padding: 6px 9px; background: #f5f8f7; border: 0; border-radius: 20px; }
.health-pill.degraded b { background: #d59224; }
.kill-banner { color: var(--danger); background: var(--danger-soft); border: 1px solid #f0c3bd; border-radius: 5px; padding: 6px 9px; font-weight: 700; font-size: 11px; }
.account { border-left: 1px solid var(--line); padding-left: 13px; display: flex; align-items: center; gap: 8px; }
.account > span { width: 29px; height: 29px; border-radius: 50%; display: grid; place-items: center; background: #dcece9; color: var(--accent); font-weight: 800; font-size: 10px; }
.account strong, .account small { display: block; }
.account strong { font-size: 12px; }
.account small { color: #8995a0; font-size: 10px; margin-top: 1px; }
.page-content { padding: 22px 25px 38px; }
.loading-state, .empty-state { min-height: 330px; display: grid; place-items: center; align-content: center; gap: 12px; color: var(--muted); }
.loading-state span { width: 22px; height: 22px; border: 2px solid #d1dadf; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.section-head { display: flex; align-items: end; justify-content: space-between; margin-bottom: 13px; }
.section-head h2 { font-size: 15px; margin: 0; }
.section-head p { color: var(--muted); margin: 4px 0 0; font-size: 12px; }
.metric-grid { display: grid; grid-template-columns: repeat(5, minmax(150px,1fr)); gap: 11px; margin-bottom: 20px; }
.metric-card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 15px; min-height: 99px; }
.metric-card > span { color: #788591; font-size: 11px; }
.metric-card strong { display: block; font: 700 27px/1.1 ui-monospace, SFMono-Regular, Menlo, monospace; margin: 12px 0 4px; }
.metric-card small { display: block; color: #929da6; font-size: 10px; margin-top: 4px; line-height: 1.45; }
.overview-four { grid-template-columns: repeat(4,minmax(190px,1fr)); }
.metric-card.actionable, .metric-card[data-result] { cursor: pointer; }
.metric-card.actionable:hover, .metric-card[data-result]:hover { border-color: #8abdb7; box-shadow: 0 5px 20px rgba(19,61,57,.07); }
.priority-card { border-left: 4px solid var(--accent); }
.metric-empty { font-size: 13px !important; font-family: inherit !important; margin-top: 13px !important; }
.priority-work { margin-bottom: 14px; }
.overview-columns { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(300px,.65fr); gap: 14px; }
.overview-columns.balanced { grid-template-columns: repeat(2,minmax(0,1fr)); }
.currency-results { display: grid; }
.currency-result { display: grid; grid-template-columns: 70px 1fr; gap: 4px 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.currency-result:last-child { border-bottom: 0; }
.currency-result strong { grid-row: span 2; align-self: center; color: var(--accent); }
.currency-result span { color: var(--muted); font-size: 11px; }
.metric-money-list { margin-top: 9px; display: grid; gap: 3px; }
.metric-money-list .currency-result { display: flex; justify-content: space-between; gap: 8px; padding: 0; border: 0; }
.metric-money-list .currency-result strong { margin: 0; font: 700 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); }
.metric-money-list .currency-result span { font-size: 10px; }
.content-grid { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.panel-head { min-height: 54px; padding: 13px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.panel-head h2, .panel-head h3 { margin: 0; font-size: 14px; }
.panel-head small { color: var(--muted); }
.panel-body { padding: 14px 16px; }
.filter-bar { display: grid; grid-template-columns: minmax(220px,1.3fr) repeat(4,minmax(130px,.7fr)) auto; gap: 9px; margin-bottom: 14px; }
.filter-bar.compact { grid-template-columns: repeat(4,minmax(130px,1fr)) auto; }
.filter-bar input, .filter-bar select { height: 38px; }
.advanced-filters { grid-column: 1 / -1; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fafbfc; }
.advanced-filters summary { color: #63727e; cursor: pointer; font-size: 11px; font-weight: 700; }
.advanced-filters > div { display: grid; grid-template-columns: repeat(4,minmax(130px,1fr)); gap: 9px; margin-top: 9px; }
.case-table, .data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.case-table th, .case-table td, .data-table th, .data-table td { border-bottom: 1px solid #edf0f2; padding: 11px 10px; text-align: left; vertical-align: middle; }
.case-table th, .data-table th { color: #7b8793; background: #fafbfc; font-size: 10px; letter-spacing: .03em; white-space: nowrap; }
.case-table tr:last-child td, .data-table tr:last-child td { border-bottom: 0; }
.case-table tbody tr:hover, .data-table tbody tr:hover { background: #f7faf9; }
.case-item { cursor: pointer; }
.case-table th:nth-child(1) { width: 18%; }
.case-table th:nth-child(2) { width: 23%; }
.case-table th:nth-child(3) { width: 18%; }
.case-table th:nth-child(4) { width: 29%; }
.case-table th:nth-child(5) { width: 12%; }
.case-id { color: var(--blue); font-weight: 700; }
.case-list-identifiers { display: grid; gap: 4px; margin-top: 8px; color: #5f6f7b; font-size: 10px; }
.case-list-identifiers > span { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.case-list-identifiers b { color: #2e3e49; font-weight: 700; }
.loan-number-list { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.loan-number-list code { padding: 2px 5px; border-radius: 4px; color: #315e73; background: #edf4f6; font: 650 10px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; }
.loan-number-list small { color: var(--muted); font-size: 9px; }
.identifier-missing { color: #a56c13; font-size: 10px; }
.dpd-line { display: block; margin-top: 7px; color: #8a5d15; font-size: 10px; }
.dpd-line b { font-size: 13px; }
.subtext { display: block; color: #8995a0; font-size: 10px; margin-top: 3px; }
.money { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; }
.badge { display: inline-flex; align-items: center; padding: 3px 7px; border-radius: 12px; background: #edf1f3; color: #53616d; font-size: 10px; font-weight: 700; white-space: nowrap; }
.badge.green { color: #09675d; background: #e5f4f0; }
.badge.red { color: #a22c21; background: #fdecea; }
.badge.amber { color: #856015; background: #fff3cf; }
.badge.blue { color: #315e9d; background: #eaf0f9; }
.severity { font: 800 10px/1 ui-monospace,monospace; border-radius: 4px; padding: 4px 6px; }
.severity.P0, .severity.P1 { color: var(--danger); background: var(--danger-soft); }
.severity.P2 { color: var(--warning); background: var(--warning-soft); }
.severity.P3 { color: #4f6070; background: #edf1f3; }
.work-list { display: grid; }
.work-item { padding: 13px 16px; border-bottom: 1px solid #edf0f2; display: grid; grid-template-columns: auto 1fr auto; gap: 11px; align-items: start; }
.work-item:last-child { border-bottom: 0; }
.work-item strong { font-size: 12px; }
.work-item p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.work-item time { color: #87939e; font-size: 10px; }
.work-action { min-width: 180px; display: grid; justify-items: end; gap: 9px; }
.work-action time.overdue { color: var(--danger); font-weight: 700; }
.policy-card { padding: 14px; background: #f7f9fa; border: 1px solid #e7ebee; border-radius: 6px; margin-bottom: 10px; }
.policy-card strong { font-size: 12px; }
.policy-card p { color: var(--muted); font-size: 11px; line-height: 1.6; margin: 6px 0 0; }
.case-header { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 17px 19px; margin-bottom: 13px; }
.case-heading { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.case-heading h2 { margin: 0; font-size: 19px; }
.case-heading p { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.case-identifiers { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 13px; }
.case-identifiers > span { display: grid; gap: 5px; color: #7d8a95; font-size: 10px; }
.case-identifiers > span > strong { color: #293a45; font-size: 12px; }
.case-business-more { margin-top: 10px; color: #5b6e7a; font-size: 10px; }
.case-business-more > summary { cursor: pointer; color: #526b79; font-weight: 700; }
.case-business-more[open] { padding: 9px 11px; border: 1px solid var(--line); border-radius: 6px; background: #fafcfc; }
.case-business-more .data-lineage { margin-top: 7px; }
.data-lineage { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 8px; color: var(--muted); font-size: 11px; }
.data-lineage strong { color: var(--text); font-weight: 600; }
.data-lineage .technical-details { flex-basis: 100%; }
.case-actions { display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; }
.case-more-actions { position: relative; }
.case-more-actions > summary {
  list-style: none; border: 1px solid #cbd3db; border-radius: 6px; padding: 9px 13px;
  background: #fff; color: #344250; font-weight: 650; cursor: pointer;
}
.case-more-actions > summary::-webkit-details-marker { display: none; }
.case-more-menu {
  position: absolute; z-index: 8; right: 0; top: calc(100% + 6px); width: 220px;
  display: grid; gap: 5px; padding: 8px; background: #fff; border: 1px solid var(--line);
  border-radius: 7px; box-shadow: 0 12px 30px rgba(18,33,42,.14);
}
.case-more-menu button { width: 100%; text-align: left; }
.summary-strip { display: grid; grid-template-columns: repeat(6,1fr); border-top: 1px solid var(--line); margin-top: 15px; padding-top: 14px; }
.summary-strip.compact-business { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.summary-strip div { padding: 0 12px; border-right: 1px solid var(--line); }
.summary-strip div:first-child { padding-left: 0; }.summary-strip div:last-child { border: 0; }
.summary-strip span { display: block; color: #85919c; font-size: 10px; }
.summary-strip strong { display: block; margin-top: 5px; font-size: 12px; }
.summary-strip small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.summary-strip .next-action-summary { grid-column: span 2; }
.case-business-alert { display: flex; gap: 10px; align-items: center; margin-top: 13px; padding: 9px 11px; border-left: 3px solid #d49422; border-radius: 5px; color: #75531a; background: #fff9e9; font-size: 10px; }
.case-business-alert strong { white-space: nowrap; }
.next-action-card {
  margin-top: 14px; padding: 13px 15px; border: 1px solid #dce8e5;
  border-left: 4px solid var(--accent); border-radius: 7px; background: #f7fbfa;
}
.next-action-card > span { display: block; color: #75838d; font-size: 10px; margin-bottom: 5px; }
.next-action-card strong { font-size: 13px; }
.next-action-card p { margin: 5px 0 0; color: #4e5d69; font-size: 11px; }
.next-action-card small { display: block; margin-top: 7px; color: var(--muted); font-size: 10px; }
.case-task-card {
  display: grid; grid-template-columns: auto minmax(220px,1.1fr) minmax(180px,.8fr) minmax(220px,1fr) auto;
  gap: 15px; align-items: center; margin: 0 0 13px; padding: 15px 17px;
  background: #fffaf0; border: 1px solid #ead8a9; border-left: 4px solid #d49a22; border-radius: 8px;
}
.case-task-icon {
  width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%;
  color: #fff; background: #c58a13; font-weight: 900;
}
.case-task-card span { display: block; color: #87651e; font-size: 10px; font-weight: 700; }
.case-task-card strong { display: block; margin-top: 4px; color: #2d3943; font-size: 12px; }
.case-task-card p, .case-task-card small { display: block; margin: 4px 0 0; color: #6f6552; font-size: 10px; line-height: 1.45; }
.case-task-scope, .case-task-next { padding-left: 14px; border-left: 1px solid #eadfca; }
.next-step-summary { border-left: 3px solid #aeb8bf; padding-left: 8px; }
.next-step-summary strong, .next-step-summary span, .next-step-summary small { display: block; }
.next-step-summary strong { font-size: 11px; }
.next-step-summary span { margin-top: 4px; color: #50606d; font-size: 10px; }
.next-step-summary small { margin-top: 5px; color: #7c8993; line-height: 1.45; }
.next-step-summary.success { border-left-color: var(--accent); }
.next-step-summary.warning { border-left-color: var(--warning); }
.next-step-summary.danger { border-left-color: var(--danger); }
.next-step-summary.progress { border-left-color: var(--blue); }
.next-step-detail > strong { display: block; }
.next-step-detail.danger > strong { color: var(--danger); }
.next-step-detail.warning > strong { color: #856015; }
.next-step-detail.success > strong { color: var(--accent); }
.operation-feedback { margin: 0 0 13px; padding: 12px 15px; border: 1px solid #d7e1e5; border-left: 4px solid var(--blue); border-radius: 7px; background: #f7fafc; }
.operation-feedback strong, .operation-feedback small { display: block; }
.operation-feedback p { margin: 5px 0; color: #53626e; font-size: 11px; }
.operation-feedback small { color: #70808b; font-size: 10px; }
.operation-feedback.success { border-left-color: var(--accent); background: #f4faf8; }
.operation-feedback.error { border-left-color: var(--danger); background: #fff7f6; }
.operation-feedback.progress { border-left-color: var(--blue); background: #f5f8fc; }
.technical-details { margin-top: 7px; font-size: 10px; color: var(--blue); }
.technical-details summary { cursor: pointer; }
.technical-details code { display: block; margin-top: 5px; padding: 7px; color: #52616e; background: #eef2f4; white-space: pre-wrap; word-break: break-all; }
.tab-nav { display: flex; gap: 0; border-bottom: 1px solid var(--line); background: #fff; padding: 0 13px; }
.tab-nav button { border: 0; border-bottom: 2px solid transparent; background: transparent; padding: 12px 11px; color: #65727f; font-size: 11px; }
.tab-nav button.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 700; }
.channel-subnav { display: flex; gap: 6px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: #fafcfc; }
.channel-subnav button { border: 1px solid #d4dde1; border-radius: 16px; padding: 6px 10px; color: #52616d; background: #fff; font-size: 11px; }
.channel-subnav button.active { color: #fff; border-color: var(--accent); background: var(--accent); }
.channel-subnav button span { margin-left: 4px; opacity: .8; font-size: 9px; }
.channel-summary-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: #f5f8f8; }
.channel-summary-card { display: grid; align-content: space-between; min-height: 110px; overflow: hidden; text-align: left; border: 1px solid #dce4e7; border-radius: 8px; background: #fff; }
.channel-summary-card:hover { border-color: #99bdb7; box-shadow: 0 4px 14px rgba(27,55,63,.07); }
.channel-summary-card.active { border-color: #69ac9f; box-shadow: inset 0 0 0 1px #69ac9f; }
.channel-summary-card.available { background: #f7fcfa; }
.channel-summary-card.stopped { border-color: #edd3cf; background: #fff8f7; }
.channel-summary-card.unavailable { background: #fafbfb; }
.channel-summary-main { display: grid; gap: 5px; width: 100%; padding: 11px 12px 8px; text-align: left; border: 0; background: transparent; }
.channel-summary-main:hover { background: rgba(9,105,94,.035); }
.channel-summary-title { display: flex; justify-content: space-between; gap: 8px; align-items: center; color: var(--muted); font-size: 10px; }
.channel-summary-title b { padding: 2px 6px; border-radius: 10px; color: #65747f; background: #edf1f3; font-size: 8px; }
.channel-summary-card.available .channel-summary-title b { color: #087064; background: #e2f4ef; }
.channel-summary-card.stopped .channel-summary-title b { color: #a13a30; background: #fbe8e5; }
.channel-summary-main strong { color: #263740; font-size: 13px; }
.channel-summary-main small { color: #71808b; font-size: 9px; line-height: 1.45; }
.channel-control-button { margin: 0 11px 10px; padding: 6px 9px; text-align: center; border-radius: 5px; background: #fff; font-size: 9px; font-weight: 700; }
.channel-control-button.danger { color: #a13a30; border: 1px solid #dda8a2; }
.channel-control-button.danger:hover { color: #fff; border-color: #aa352a; background: #aa352a; }
.channel-control-button.restore { color: #087064; border: 1px solid #79b9ad; }
.channel-control-button.restore:hover { color: #fff; border-color: #087064; background: #087064; }
.communication-contacts { padding: 15px 16px; border-bottom: 1px solid var(--line); background: #fff; }
.communication-contacts > div:first-child > strong { color: #263740; font-size: 13px; }
.communication-contacts > div:first-child > p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.communication-contact-head { display: flex; justify-content: space-between; gap: 18px; align-items: start; }
.communication-contact-head > div:last-child { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px 14px; color: #647581; font-size: 10px; }
.contact-selector { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.contact-selector button { display: grid; gap: 2px; min-width: 105px; padding: 7px 10px; text-align: left; color: #52616c; border: 1px solid #d7e0e3; border-radius: 7px; background: #fff; font-size: 10px; }
.contact-selector button:hover { border-color: #9dbdb8; }
.contact-selector button.active { color: #075f55; border-color: #72b8aa; background: #edf8f5; box-shadow: inset 0 0 0 1px #72b8aa; }
.contact-selector button span { margin-left: 4px; color: #82909a; font-size: 9px; }
.contact-selector button small { color: #89959e; font-size: 8px; }
.contact-next-action { margin: 10px 0 0; color: #52626e; font-size: 10px; }
.contact-action-feedback { display: flex; gap: 9px; align-items: baseline; margin-top: 11px; padding: 9px 11px; border-left: 3px solid var(--blue); border-radius: 5px; background: #f4f8fc; font-size: 10px; }
.contact-action-feedback.success { border-left-color: var(--accent); background: #f1faf7; }
.contact-action-feedback.danger { border-left-color: var(--danger); background: #fff5f4; }
.contact-action-feedback span { color: #65747f; }
.communication-borrower-contact-form { margin-top: 10px; }
.records { padding: 0; }
.timeline-toolbar { min-height: 56px; padding: 10px 16px; display: flex; gap: 8px; align-items: center; border-bottom: 1px solid var(--line); background: #fafcfc; }
.timeline-toolbar select { width: 150px; height: 34px; padding: 6px 8px; font-size: 11px; }
.timeline-toolbar span { margin-left: auto; color: var(--muted); font-size: 11px; }
#timeline-list { padding: 16px 22px 22px; }
.timeline-item { display: grid; grid-template-columns: 24px minmax(0, 1fr); min-height: 78px; }
.timeline-rail { position: relative; display: flex; justify-content: center; }
.timeline-rail:after { content: ""; position: absolute; top: 19px; bottom: -1px; border-left: 1px solid #dbe3e7; }
.timeline-item:last-child .timeline-rail:after { display: none; }
.timeline-rail i { position: relative; z-index: 1; width: 10px; height: 10px; margin-top: 10px; border-radius: 50%; background: #708090; box-shadow: 0 0 0 4px #fff; }
.timeline-item.dialogue .timeline-rail i { background: var(--blue); }
.timeline-item.ai_action .timeline-rail i { background: var(--accent); }
.timeline-item.business .timeline-rail i { background: #bd841d; }
.timeline-card { margin: 0 0 12px; border: 1px solid #e2e8eb; border-radius: 7px; padding: 11px 13px; background: #fff; }
.timeline-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.timeline-time { color: #64727e; font-size: 10px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.timeline-channel { margin-left: 8px; color: #364654; font-weight: 750; font-size: 10px; }
.timeline-card h4 { margin: 8px 0 0; font-size: 12px; }
.timeline-card p { margin: 6px 0 0; line-height: 1.55; }
.timeline-item.failure .timeline-card { border-left: 4px solid var(--danger); background: #fffafa; }
.timeline-item.attention .timeline-card, .timeline-item.unconnected .timeline-card { border-left: 4px solid #d49422; background: #fffdf7; }
.timeline-item.progress .timeline-card { border-left: 4px solid var(--accent); }
.timeline-actor { color: #73808c; font-size: 10px; }
.timeline-summary { color: #3d4c59; font-size: 11px; }
.timeline-business { color: #536c69; font-size: 11px; border-left: 2px solid #a7d3cd; padding-left: 8px; }
.timeline-text { margin-top: 10px; border: 1px solid #e5eaed; border-radius: 5px; overflow: hidden; }
.timeline-text span { display: block; padding: 5px 8px; color: #70808c; background: #f7f9fa; border-bottom: 1px solid #e5eaed; font-size: 10px; font-weight: 700; }
.timeline-text p { margin: 0; padding: 8px; color: #263640; white-space: pre-wrap; word-break: break-word; font-size: 12px; }
.timeline-text.translation span { color: #09675d; background: #eef8f5; }
.translation-pending { margin-top: 8px; color: #9a6700; font-size: 10px; }
.failure-summary { margin-top: 10px; padding: 9px 11px; border-radius: 6px; color: #74362f; background: #fff0ee; }
.failure-summary strong, .failure-summary small { display: block; }
.failure-summary p { margin: 4px 0; color: #74362f; }
.failure-summary small { color: #8f5b53; font-size: 9px; line-height: 1.45; }
.activity-priority-layout { display: grid; gap: 13px; padding: 14px 16px 20px !important; background: #f7f9fa; }
.activity-section, .activity-history { overflow: hidden; border: 1px solid #dfe6e9; border-radius: 8px; background: #fff; }
.activity-section.success { border-top: 3px solid var(--accent); }
.activity-section.warning { border-top: 3px solid #d49422; }
.activity-section-head { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.activity-section-head h3 { margin: 0; font-size: 13px; }
.activity-section-head p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.activity-section-head > span { color: var(--muted); font-size: 10px; white-space: nowrap; }
.activity-section-list { padding: 13px 15px 3px; }
.activity-history > summary { cursor: pointer; padding: 13px 16px; color: #52636f; font-weight: 700; font-size: 11px; }
.activity-history > summary small { display: block; margin-top: 4px; color: #7a8791; font-size: 9px; font-weight: 400; }
.attention-history { border-top: 3px solid #d49422; }
.activity-history[open] > summary { border-bottom: 1px solid var(--line); }
.activity-history > .timeline-item { margin: 12px 15px 0; }
.conversation-note { padding: 10px 16px; color: #71808c; border-bottom: 1px solid var(--line); background: #fafcfc; font-size: 11px; }
.chat-thread-head { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 13px 18px; border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0; background: #fff; }
.chat-thread-head strong, .chat-thread-head small { display: block; }
.chat-thread-head strong { font-size: 12px; }
.chat-thread-head small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.chat-thread-head > span { color: #60717c; font-size: 10px; white-space: nowrap; }
.chat-thread { display: grid; gap: 14px; padding: 22px clamp(16px, 3vw, 38px); border: 1px solid var(--line); border-radius: 0 0 8px 8px; background: #f5f7f8; min-height: 280px; }
.chat-bubble { width: min(76%, 720px); border: 1px solid #dfe7ea; border-radius: 14px; padding: 12px 14px; background: #fff; box-shadow: 0 2px 8px rgba(20,30,40,.05); }
.chat-bubble.collector { justify-self: end; border-color: #a9dfc8; border-bottom-right-radius: 4px; background: #e8f7ef; }
.chat-bubble.borrower { justify-self: start; border-bottom-left-radius: 4px; background: #fff; }
.chat-bubble.emergency-contact { justify-self: start; border-color: #e5c98e; border-bottom-left-radius: 4px; background: #fff9ed; }
.chat-bubble.human { justify-self: end; border-color: #c9b5e3; border-bottom-right-radius: 4px; background: #f7f1ff; }
.chat-bubble.chat-failure { border-color: #e1a9a5; background: #fff7f6; }
.chat-bubble.chat-pending { border-style: dashed; border-color: #d8bd7f; }
.contact-scope-note, .policy-note { margin-top: 8px; padding: 6px 8px; border-radius: 4px; color: #785816; background: #fff7dc; font-size: 10px; }
.chat-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; color: #667682; font-size: 10px; }
.chat-meta strong { color: #425260; font-size: 11px; }
.chat-copy { margin-top: 8px; }
.chat-original, .chat-translation { margin-top: 9px; }
.chat-original span, .chat-translation span { color: #75838d; font-size: 10px; font-weight: 700; }
.chat-translation span { color: #09675d; }
.chat-original p, .chat-translation p { margin: 4px 0 0; color: #25343f; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.chat-translation p { color: #173f3a; font-size: 12px; }
.chat-original { padding-top: 8px; border-top: 1px solid rgba(93,112,123,.14); }
.chat-original p { color: #667680; font-size: 11px; }
.chat-missing-copy { margin: 9px 0 0; color: #8a5f58; font-size: 10px; }
.chat-status-row { display: flex; justify-content: flex-end; gap: 10px; align-items: center; margin-top: 10px; }
.chat-status { color: #58717a; font-size: 10px; font-weight: 700; }
.chat-status.progress { color: #087267; }
.chat-status.failure, .chat-status.unconnected, .chat-status.attention { color: #a7352c; }
.chat-status.pending { color: #9a6a16; }
.chat-detail-link, .chat-translate-button { padding: 0; border: 0; color: #536f80; background: transparent; font-size: 10px; text-decoration: underline; }
.chat-translate-button { margin-top: 6px; color: var(--blue); }
.chat-exception { margin-top: 10px; padding: 9px 10px; border-left: 3px solid var(--danger); border-radius: 4px; background: #fff0ee; }
.chat-exception strong, .chat-exception small { display: block; }
.chat-exception strong { color: #9b3028; font-size: 10px; }
.chat-exception p { margin: 5px 0; color: #763b36; font-size: 11px; line-height: 1.45; }
.chat-exception small { margin-top: 3px; color: #6f5552; font-size: 9px; line-height: 1.45; }
.chat-receipts { margin-top: 9px; border-top: 1px solid rgba(93,112,123,.14); padding-top: 8px; }
.chat-receipts > summary { color: #647681; cursor: pointer; font-size: 9px; }
.chat-receipts .receipt-lifecycle { margin-top: 8px; }
.text-channel-intro { margin-bottom: 12px; padding: 13px 16px; border: 1px solid #dfe6e9; border-left: 4px solid #4d8190; border-radius: 8px; background: #f8fbfc; }
.text-channel-intro strong { display: block; color: #2b414c; font-size: 12px; }
.text-channel-intro p { margin: 5px 0 0; color: #60717c; font-size: 10px; line-height: 1.5; }
.text-channel-overview { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; margin-bottom: 12px; }
.text-channel-overview > div { padding: 11px 13px; border: 1px solid #e0e7ea; border-radius: 8px; background: #fff; }
.text-channel-overview span, .text-channel-overview strong { display: block; }
.text-channel-overview span { color: var(--muted); font-size: 9px; }
.text-channel-overview strong { margin-top: 5px; color: #263640; font-size: 12px; }
.text-channel-thread { min-height: 220px; }
.text-channel-bubble { width: min(80%, 780px); }
.text-channel-original { margin-top: 8px; }
.text-channel-original > summary { color: #586f7b; cursor: pointer; font-size: 9px; text-decoration: underline; }
.email-subject { margin: 9px 0; padding: 7px 9px; border-radius: 5px; background: rgba(255,255,255,.68); }
.email-subject span, .email-subject strong { display: block; }
.email-subject span { color: var(--muted); font-size: 8px; }
.email-subject strong { margin-top: 3px; color: #334852; font-size: 10px; }
.customer-receipt { margin-top: 10px; padding: 7px 9px; border-radius: 5px; background: rgba(86,111,124,.08); }
.customer-receipt span, .customer-receipt strong { display: block; }
.customer-receipt span { color: var(--muted); font-size: 8px; }
.customer-receipt strong { margin-top: 3px; color: #536772; font-size: 9px; }
.customer-receipt.yes { background: rgba(11,123,109,.09); }
.customer-receipt.yes strong { color: #087267; }
.customer-receipt.no { background: rgba(176,57,47,.08); }
.customer-receipt.no strong { color: #9b3028; }
.unsent-channel-history { margin-top: 12px; overflow: hidden; border: 1px solid #e1e6e9; border-radius: 8px; background: #fff; }
.unsent-channel-history > summary { padding: 12px 15px; color: #4d5e68; cursor: pointer; font-size: 10px; font-weight: 700; }
.unsent-channel-history > summary small { margin-left: 8px; color: var(--muted); font-size: 9px; font-weight: 400; }
.unsent-channel-history > div { border-top: 1px solid var(--line); }
.unsent-channel-record { padding: 11px 14px; border-bottom: 1px solid #edf1f3; }
.unsent-channel-record:last-child { border-bottom: 0; }
.unsent-channel-record > div { display: flex; justify-content: space-between; gap: 12px; }
.unsent-channel-record strong { color: #735f3f; font-size: 10px; }
.unsent-channel-record time, .unsent-channel-record small { color: var(--muted); font-size: 9px; }
.unsent-channel-record p { margin: 5px 0; color: #53636d; font-size: 10px; }
.unsent-channel-record small { display: block; margin-top: 4px; }
.unsent-channel-record button { margin-top: 7px; }
.voice-communication-intro { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 14px 18px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.voice-communication-intro strong { font-size: 13px; }
.voice-communication-intro p { margin: 0; color: var(--muted); font-size: 10px; }
.voice-pending-section, .voice-results-section { display: grid; gap: 10px; margin-top: 14px; }
.voice-pending-section h3, .voice-results-section h3 { margin: 0; color: #586975; font-size: 11px; }
.voice-state-card { display: flex; justify-content: space-between; gap: 18px; padding: 12px 14px; border: 1px dashed #d8bd7f; border-radius: 8px; background: #fffbf1; }
.voice-state-card div > span, .voice-state-card div > strong { display: block; }
.voice-state-card div > span { color: var(--muted); font-size: 9px; }
.voice-state-card div > strong { margin-top: 3px; color: #8b6219; font-size: 12px; }
.voice-state-card p, .voice-state-card small { margin: 5px 0 0; color: #6e6553; font-size: 10px; }
.voice-state-card.failure { border-style: solid; border-color: #e1a9a5; background: #fff7f6; }
.voice-state-card.failure div > strong { color: var(--danger); }
.voice-conversation-card { padding: 15px 16px; border: 1px solid #dfe7ea; border-left: 4px solid #7595a7; border-radius: 10px; background: #fff; box-shadow: 0 2px 9px rgba(20,30,40,.04); }
.voice-conversation-card.connected { border-left-color: var(--accent); }
.voice-conversation-card.voicemail { border-left-color: #d39426; background: #fffdf7; }
.voice-conversation-card.failure { border-left-color: var(--danger); background: #fff9f8; }
.voice-conversation-card.unconnected { border-left-color: #c28726; background: #fffdf8; }
.voice-conversation-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.voice-conversation-head span, .voice-conversation-head strong { display: block; }
.voice-conversation-head span { color: var(--muted); font-size: 9px; }
.voice-conversation-head strong { margin-top: 3px; color: #263640; font-size: 14px; }
.voice-conversation-head time { color: #73818a; font-size: 10px; white-space: nowrap; }
.voice-conversation-facts { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.voice-conversation-facts span { padding: 4px 7px; border-radius: 999px; color: #52646f; background: #eef3f5; font-size: 9px; }
.voice-result-note { margin: 10px 0 0; color: #795c20; font-size: 10px; }
.voice-attempt-result { margin-top: 11px; padding: 10px 12px; border-radius: 6px; background: rgba(150,91,25,.07); }
.voice-attempt-card.failure .voice-attempt-result { background: rgba(175,52,43,.07); }
.voice-attempt-result strong, .voice-attempt-result small { display: block; }
.voice-attempt-result strong { color: #6f5b3a; font-size: 9px; }
.voice-attempt-card.failure .voice-attempt-result strong { color: #9b3028; }
.voice-attempt-result p { margin: 5px 0; color: #4f5d65; font-size: 11px; line-height: 1.5; }
.voice-attempt-result small { color: #66747c; font-size: 9px; line-height: 1.45; }
.voice-attempt-no-media { margin-top: 10px; padding-top: 9px; border-top: 1px solid rgba(91,108,119,.13); color: var(--muted); font-size: 9px; }
.voice-recording-row { display: grid; grid-template-columns: minmax(220px,1fr) auto; align-items: center; gap: 10px; margin-top: 12px; }
.voice-inline-transcript { margin-top: 14px; }
.voice-inline-transcript[hidden] { display: none; }
.voice-chat-thread { min-height: 0; border-radius: 8px; }
.voice-turn-bubble { width: min(82%, 680px); }
.voice-turn-bubble.collector { justify-self: end; }
.voice-turn-bubble.borrower { justify-self: start; }
.record { padding: 14px 16px; border-bottom: 1px solid #edf0f2; }
.record:last-child { border-bottom: 0; }
.record-head { display: flex; justify-content: space-between; gap: 12px; }
.record h4 { margin: 0; font-size: 12px; }
.record time { color: #8b97a1; font-size: 10px; }
.record p { color: #5e6c79; line-height: 1.5; margin: 7px 0; font-size: 11px; }
.record details summary { color: var(--blue); font-size: 10px; cursor: pointer; }
.record pre { white-space: pre-wrap; word-break: break-word; background: #f6f8f9; padding: 10px; color: #53616d; font-size: 10px; }
.record-actions { display: flex; gap: 6px; margin-top: 8px; }
.record-actions button { padding: 5px 8px; font-size: 10px; }
.voice-transcript { display: grid; gap: 8px; margin-top: 12px; }
.voice-audio { display: grid; grid-template-columns: minmax(240px, 1fr) auto; align-items: center; gap: 8px 12px; margin-top: 12px; }
.voice-player { width: 100%; min-width: 0; height: 40px; }
.voice-download { white-space: nowrap; text-decoration: none; }
.voice-audio-status { grid-column: 1 / -1; color: var(--muted); }
.voice-audio-unavailable { margin-top: 12px; color: var(--muted); }
@media (max-width: 680px) {
  .chat-thread-head { align-items: flex-start; }
  .chat-thread-head small { max-width: 250px; }
  .chat-thread { padding: 15px 11px; }
  .chat-bubble { width: min(90%, 720px); padding: 11px 12px; }
  .text-channel-overview { grid-template-columns: 1fr 1fr; }
  .text-channel-bubble { width: 94%; }
  .unsent-channel-history > summary small { display: block; margin: 4px 0 0; }
  .chat-meta { align-items: flex-start; display: grid; gap: 4px; }
  .chat-status-row { align-items: flex-end; flex-direction: column; gap: 5px; }
  .voice-communication-intro, .voice-state-card, .voice-conversation-head { align-items: flex-start; flex-direction: column; gap: 7px; }
  .voice-recording-row { grid-template-columns: 1fr; }
  .voice-turn-bubble { width: 92%; }
  .voice-audio { grid-template-columns: 1fr; }
  .voice-download { justify-self: start; }
}
.voice-turn { max-width: 78%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 6px; background: #f7f9fa; }
.voice-turn.agent { justify-self: start; border-left: 3px solid var(--accent); }
.voice-turn.borrower { justify-self: end; border-right: 3px solid var(--blue); background: #f3f7fb; }
.voice-turn strong { font-size: 10px; color: #65727f; }
.voice-turn p { margin: 4px 0 0; color: #26333d; }
.voice-turn .voice-translation { color: #09675d; font-size: 11px; }
.loading-inline { color: var(--muted); padding: 12px 0; font-size: 11px; }
.communication-drawer-backdrop { position: fixed; inset: 0; z-index: 49; background: rgba(13,24,31,.34); }
.communication-drawer { position: fixed; z-index: 50; top: 0; right: 0; width: min(680px,96vw); height: 100vh; overflow-y: auto; background: #f5f7f8; border-left: 1px solid #d7dfe4; box-shadow: -18px 0 55px rgba(18,31,40,.22); }
.communication-drawer-body { display: grid; gap: 11px; padding: 15px; }
.communication-drawer-body > section, .communication-drawer-body > div > section { padding: 15px 16px; border: 1px solid #dfe5e9; border-radius: 8px; background: #fff; }
.communication-drawer-body h4 { margin: 0 0 8px; font-size: 12px; }
.communication-drawer-body p { color: #4f606c; line-height: 1.6; font-size: 11px; white-space: pre-wrap; word-break: break-word; }
.communication-result > strong { color: var(--accent); font-size: 16px; }
.drawer-failure { border-left: 4px solid var(--danger) !important; background: #fff8f7 !important; }
.translation-missing { border-left: 4px solid #d49422 !important; background: #fffdf7 !important; }
.translated-copy { color: #155f57 !important; font-size: 13px !important; }
.original-copy { padding: 10px; border-radius: 5px; background: #f6f8f9; }
.receipt-lifecycle { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.receipt-lifecycle li { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid #edf1f3; }
.receipt-lifecycle li:last-child { border-bottom: 0; }
.receipt-lifecycle strong { color: #43545f; font-size: 10px; }
.receipt-lifecycle time { color: var(--muted); font-size: 9px; }
.inline-form { display: grid; grid-template-columns: 140px 1fr auto; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #f7faf9; }
.split-form { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.split-records { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
.split-records > div { border-right: 1px solid var(--line); }
.split-records > div:last-child { border-right: 0; }
.split-records h3 { margin: 0; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 12px; }
.payment-records-column > .record-head { align-items: center; padding-right: 16px; border-bottom: 1px solid var(--line); }
.payment-records-column > .record-head h3 { border-bottom: 0; }
.manual-payment-form { margin: 14px 16px; background: #f8fbfa; }
.manual-payment-form[hidden] { display: none; }
.manual-payment-form .manual-settle-row { padding: 11px 0; }
.manual-payment-form .warning-box { margin: 12px 0; }
.warning-text { color: #9a4e13 !important; }
.compact-list { display: grid; }
.compact-item { padding: 11px 14px; border-bottom: 1px solid var(--line); }
.compact-item:last-child { border-bottom: 0; }
.compact-item strong, .compact-item span, .compact-item small { display: block; }
.compact-item span { margin-top: 4px; color: #52616e; font-size: 11px; }
.compact-item small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.compact-item > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.compact-item > div + div { margin-top: 4px; }
.admin-subnav {
  display: flex; gap: 5px; margin-bottom: 14px; padding: 5px;
  background: #e9eef0; border-radius: 8px; width: fit-content;
}
.admin-subnav button {
  border: 0; border-radius: 5px; padding: 8px 12px; color: #5a6874; background: transparent; font-size: 11px;
}
.admin-subnav button.active { color: #fff; background: var(--accent); font-weight: 700; }
.system-health-summary { margin-bottom: 14px; }
.health-summary-grid { display: grid; grid-template-columns: 180px minmax(280px,1fr) 150px 150px; }
.health-summary-grid > div { padding: 13px 16px; border-right: 1px solid var(--line); }
.health-summary-grid > div:last-child { border-right: 0; }
.health-summary-grid span { display: block; color: var(--muted); font-size: 10px; }
.health-summary-grid strong { display: block; margin-top: 5px; font-size: 12px; }
.system-health-summary > .technical-details { padding: 0 16px 13px; }
.audit-detail p { margin: 5px 0; color: #586773; font-size: 10px; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 18px; }
.form-card h3 { margin: 0 0 5px; font-size: 14px; }
.form-card > p { color: var(--muted); font-size: 11px; margin: 0 0 17px; }
.form-card label { margin: 12px 0; }
.form-card fieldset {
  margin: 14px 0; padding: 8px 12px; border: 1px solid var(--line);
  border-radius: 7px; background: #fafbfc;
}
.form-card fieldset legend { padding: 0 5px; color: #384554; font-size: 12px; font-weight: 750; }
.form-card .checkbox-row {
  display: grid; grid-template-columns: 18px minmax(0,1fr); align-items: start;
  gap: 10px; margin: 0; padding: 11px 7px; border-bottom: 1px solid #e9edf0;
}
.form-card .checkbox-row:last-child { border-bottom: 0; }
.form-card .checkbox-row input { width: 16px; height: 16px; margin: 2px 0 0; }
.form-card .checkbox-row span, .form-card .checkbox-row small { display: block; }
.form-card .checkbox-row small { margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 500; }
.form-card .form-grid {
  display: grid; grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 0 12px; padding: 0 13px 13px; border-top: 1px solid var(--line);
}
.field-label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.field-label-row a { color: var(--accent); font-size: 11px; font-weight: 700; text-decoration: none; }
.field-label-row a:hover { text-decoration: underline; }
.form-card .primary { margin-top: 5px; }
.source-sync-panel { margin-bottom: 14px; overflow: hidden; }
.source-sync-panel .panel-head { align-items: center; }
.source-sync-panel .panel-head h3 { margin: 2px 0 4px; }
.source-metrics { margin: 0 16px 14px; }
.source-sync-panel .warning-box { margin: 0 16px 14px; }
.onboarding-hero {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 22px 24px; margin-bottom: 12px; border: 1px solid #d8e6e3;
  border-radius: 9px; background: linear-gradient(120deg,#fff 0%,#f0f8f6 100%);
}
.onboarding-hero h2 { margin: 0; font-size: 20px; }
.onboarding-hero p:not(.eyebrow) { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.next-step-callout {
  min-width: 300px; padding: 13px 15px; border-left: 4px solid var(--accent);
  border-radius: 6px; background: #fff; box-shadow: 0 4px 18px rgba(16,60,54,.06);
}
.next-step-callout span, .next-step-callout strong { display: block; }
.next-step-callout span { color: #73818c; font-size: 10px; margin-bottom: 5px; }
.next-step-callout strong { font-size: 13px; }
.setup-progress {
  display: grid; grid-template-columns: repeat(5,1fr); gap: 0; padding: 14px 18px;
  margin-bottom: 14px; background: #fff; border: 1px solid var(--line); border-radius: 8px;
}
.setup-progress > div { display: flex; align-items: center; gap: 8px; color: #7a8791; position: relative; }
.setup-progress > div:not(:last-child):after {
  content: ""; position: absolute; height: 1px; background: #dce3e7;
  left: 32px; right: 8px; top: 13px;
}
.setup-progress b {
  width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid #cfd8dd; background: #fff; z-index: 1; font-size: 11px;
}
.setup-progress span { font-size: 11px; font-weight: 650; z-index: 1; background: #fff; padding-right: 8px; }
.setup-progress .done { color: var(--accent); }
.setup-progress .done b { color: #fff; border-color: var(--accent); background: var(--accent); }
.setup-progress .current { color: var(--ink); }
.setup-progress .current b { color: var(--accent); border: 2px solid var(--accent); background: var(--accent-soft); }
.setup-flow { display: grid; gap: 12px; }
.setup-step {
  display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 13px;
  padding: 18px 20px; background: #fff; border: 1px solid var(--line); border-radius: 8px;
}
.setup-step.current { border-color: #83b9b2; box-shadow: 0 5px 20px rgba(19,61,57,.07); }
.setup-step.done { background: #fbfdfc; }
.step-marker {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  color: #667581; border: 1px solid #ccd6db; background: #f7f9fa; font-weight: 800;
}
.setup-step.done .step-marker { color: #fff; border-color: var(--accent); background: var(--accent); }
.setup-step.current .step-marker { color: var(--accent); border: 2px solid var(--accent); background: var(--accent-soft); }
.step-heading { display: flex; justify-content: space-between; align-items: start; gap: 15px; }
.step-heading span:not(.badge) { color: #87939c; font-size: 10px; }
.step-heading h3 { margin: 3px 0 0; font-size: 15px; }
.step-description { color: #5e6d78; line-height: 1.6; font-size: 12px; margin: 10px 0 14px; }
.status-summary {
  display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); margin-bottom: 13px;
  border: 1px solid #dce5e8; border-radius: 7px; background: #f8fafb;
}
.status-summary > div { padding: 11px 13px; border-right: 1px solid #e1e7ea; }
.status-summary > div:last-child { border-right: 0; }
.status-summary span, .status-summary strong { display: block; }
.status-summary span { color: #82909a; font-size: 10px; margin-bottom: 5px; }
.status-summary strong { font-size: 11px; }
.status-summary.success { background: #f2faf7; border-color: #cfe6df; }
.guided-details { border: 1px solid #e1e7ea; border-radius: 7px; overflow: hidden; }
.guided-details summary { padding: 11px 13px; cursor: pointer; font-weight: 700; font-size: 12px; }
.guided-form { border-top: 1px solid var(--line); border-bottom: 0; grid-template-columns: 150px minmax(260px,1fr) auto auto; }
.guided-details > .field-help { padding: 0 13px 11px; margin: 0; }
.guided-policy-form { max-width: 900px; background: #fbfcfc; }
.guided-policy-form > label { margin: 0 0 14px; }
.guided-policy-form #personalized-link-fields { display: grid; gap: 12px; }
.field-help { color: #788691; font-size: 10px; line-height: 1.55; font-weight: 400; }
.choice-help { padding: 12px 13px; margin: 10px 0; border: 1px solid #dce5e8; border-radius: 6px; background: #f6f9fa; }
.choice-help strong, .choice-help p { display: block; }
.choice-help p { margin: 5px 0 9px; color: var(--muted); font-size: 11px; }
.guided-action-row { display: flex; align-items: center; gap: 12px; }
.guided-action-row span { color: var(--muted); font-size: 11px; }
.compact-panel { margin-top: 8px; }
.readiness-list { display: grid; gap: 8px; margin: 0 0 13px; }
.readiness-list > div { display: flex; align-items: center; gap: 8px; color: #4d5d69; font-size: 11px; }
.action-feedback {
  display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 12px 14px;
  margin-bottom: 12px; border: 1px solid #d9e3e6; border-radius: 7px; background: #f7f9fa;
}
.action-feedback.success { border-color: #bcded5; background: #edf8f5; }
.action-feedback.error { border-color: #efc4be; background: var(--danger-soft); }
.action-feedback.progress { border-color: #cbd9e8; background: #f1f6fb; }
.action-feedback-icon {
  width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%;
  color: #fff; background: #738391; font-weight: 900;
}
.action-feedback.success .action-feedback-icon { background: var(--accent); }
.action-feedback.error .action-feedback-icon { background: var(--danger); }
.action-feedback strong, .action-feedback p, .action-feedback small, .action-feedback time { display: block; }
.action-feedback p { margin: 4px 0; color: #53626e; font-size: 11px; }
.action-feedback small { color: #315e58; font-weight: 700; }
.action-feedback time { margin-top: 4px; color: #86929b; font-size: 9px; }
.error-box {
  color: #852a21; background: var(--danger-soft); border-left: 3px solid var(--danger);
  padding: 10px 12px; margin: 10px 0 13px; font-size: 11px; line-height: 1.55;
}
.error-box span { color: #8b514c; }
.control-row { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.control-row:last-child { border-bottom: 0; }
.control-row h4 { margin: 0; font-size: 12px; }
.control-row p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.switch { width: 40px; height: 22px; border-radius: 14px; border: 0; background: #bcc6ce; position: relative; }
.switch:after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: #fff; left: 3px; top: 3px; transition: .15s; }
.switch.on { background: var(--accent); }.switch.on:after { left: 21px; }
.warning-box { color: #785816; background: var(--warning-soft); border-left: 3px solid #d8a12b; padding: 9px 11px; font-size: 11px; margin-bottom: 14px; }
.info-box { color: #315f59; background: #edf7f5; border-left: 3px solid var(--primary); padding: 9px 11px; font-size: 11px; margin-bottom: 14px; }
.info-box p, .error-box p, .warning-box p { margin: 4px 0 0; }
.task-table th:nth-child(1) { width: 20%; }
.task-table th:nth-child(2) { width: 21%; }
.task-table th:nth-child(3) { width: 24%; }
.task-table th:nth-child(4) { width: 19%; }
.task-table th:nth-child(5) { width: 16%; }
.task-row { cursor: pointer; }
.task-step-preview { margin: 0; padding-left: 17px; color: #4d5c68; font-size: 10px; line-height: 1.55; }
.task-step-preview li + li { margin-top: 3px; }
.warning-text { color: #956412 !important; }
.task-workbench-backdrop {
  position: fixed; inset: 0; z-index: 39; background: rgba(13,24,31,.34);
}
.task-workbench {
  position: fixed; z-index: 40; top: 0; right: 0; width: min(500px, 92vw); height: 100vh;
  overflow-y: auto; background: #f5f7f8; border-left: 1px solid #d7dfe4;
  box-shadow: -18px 0 55px rgba(18,31,40,.2);
}
.task-workbench-head {
  position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: flex-start;
  padding: 20px 22px; color: #fff; background: #15242c; border-bottom: 1px solid #263740;
}
.task-workbench-head h3 { display: inline; margin: 0 0 0 8px; font-size: 18px; }
.task-workbench-head p { margin: 8px 0 0; color: #b9c7ce; font-size: 11px; }
.task-workbench-head .icon-button { color: #fff; border-color: #52616a; }
.task-workbench-body { display: grid; gap: 10px; padding: 14px; }
.task-workbench-body > section {
  padding: 15px 16px; background: #fff; border: 1px solid #dfe5e9; border-radius: 8px;
}
.task-workbench-body h4 { margin: 0 0 8px; font-size: 12px; }
.task-workbench-body p { margin: 5px 0; color: #53626e; font-size: 11px; line-height: 1.55; }
.task-workbench-body ol { margin: 0; padding-left: 18px; color: #465560; font-size: 11px; line-height: 1.6; }
.task-workbench-body ol li + li { margin-top: 5px; }
.task-workbench-status { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; }
.task-workbench-status div { min-width: 0; }
.task-workbench-status span, .task-workbench-status strong { display: block; }
.task-workbench-status span { color: #84909a; font-size: 9px; }
.task-workbench-status strong { margin-top: 4px; font-size: 10px; overflow-wrap: anywhere; }
.task-action-box { display: grid; gap: 12px; }
.task-action-box p { margin: 0; }
.task-action-box .record-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.task-action-box textarea { min-height: 100px; }
.narrow-form { max-width: 720px; }
.automatic-config {
  display: grid; gap: 7px; margin: 14px 0; padding: 13px 14px;
  color: #566571; background: #f6f8f9; border: 1px solid var(--line); border-radius: 7px;
}
.automatic-config strong { color: var(--ink); }
.automatic-config span { font-size: 11px; }
.config-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 22px;
  margin-bottom: 12px; padding: 20px 22px; background: #edf8f5;
  border: 1px solid #cfe6df; border-left: 4px solid var(--accent); border-radius: 8px;
}
.config-hero.attention { background: #fff8e7; border-color: #ead7a6; border-left-color: #d59224; }
.config-hero h2 { margin: 0; font-size: 21px; }
.config-hero p:not(.eyebrow) { margin: 7px 0 0; color: #586873; font-size: 12px; line-height: 1.55; }
.config-metric-grid {
  display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 11px; margin-bottom: 13px;
}
.config-metric-grid article {
  padding: 15px 16px; min-height: 104px; background: #fff; border: 1px solid var(--line); border-radius: 8px;
}
.config-metric-grid span, .config-metric-grid strong, .config-metric-grid small { display: block; }
.config-metric-grid span { color: #7a8791; font-size: 10px; }
.config-metric-grid strong { margin: 11px 0 6px; font-size: 20px; }
.config-metric-grid small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.config-layout { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(310px,.7fr); gap: 13px; margin-bottom: 13px; }
.config-check-list { display: grid; }
.config-check-list article {
  display: grid; grid-template-columns: 72px minmax(0,1fr) auto; gap: 14px; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.config-check-list article:last-child { border-bottom: 0; }
.config-check-list p { margin: 4px 0; color: #41505c; font-size: 11px; }
.config-check-list small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.config-next-actions { display: grid; gap: 0; }
.config-next-actions article, .config-all-ready { padding: 15px 16px; border-bottom: 1px solid var(--line); }
.config-next-actions article:last-child { border-bottom: 0; }
.config-next-actions p, .config-all-ready p { margin: 6px 0 10px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.config-scope-note { margin-top: 13px; }
.template-filter-bar { grid-template-columns: minmax(260px,1.4fr) repeat(3,minmax(150px,.7fr)) auto; }
.template-family-table th:nth-child(1) { width: 31%; }
.template-family-table th:nth-child(2) { width: 13%; }
.template-family-table th:nth-child(3) { width: 14%; }
.template-family-table th:nth-child(4) { width: 14%; }
.template-family-table th:nth-child(5) { width: 16%; }
.template-family-table th:nth-child(6) { width: 12%; }
.template-version-list .template-version-head > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.template-version-list section > p { padding-top: 8px; border-top: 1px solid #edf0f2; }
.template-version-list code { overflow-wrap: anywhere; }
.policy-version-table th:nth-child(1) { width: 28%; }
.policy-version-table th:nth-child(2) { width: 10%; }
.policy-version-table th:nth-child(3) { width: 19%; }
.policy-version-table th:nth-child(4) { width: 23%; }
.policy-version-table th:nth-child(5) { width: 20%; }
.policy-version-table details { min-width: 180px; }
.config-drawer .system-drawer-body > section { margin: 0; }
.system-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 22px;
  margin-bottom: 12px; padding: 20px 22px; background: #edf8f5;
  border: 1px solid #cfe6df; border-left: 4px solid var(--accent); border-radius: 8px;
}
.system-hero.attention { background: #fff8e7; border-color: #ead7a6; border-left-color: #d59224; }
.system-hero h2 { margin: 0; font-size: 21px; }
.system-hero p:not(.eyebrow) { margin: 7px 0 0; color: #586873; font-size: 12px; line-height: 1.55; }
.system-metric-grid {
  display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 11px; margin-bottom: 13px;
}
.system-metric-grid article {
  padding: 15px 16px; min-height: 104px; background: #fff; border: 1px solid var(--line); border-radius: 8px;
}
.system-metric-grid span, .system-metric-grid strong, .system-metric-grid small { display: block; }
.system-metric-grid span { color: #7a8791; font-size: 10px; }
.system-metric-grid strong { margin: 11px 0 6px; font-size: 21px; }
.system-metric-grid small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.system-layout { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(300px,.7fr); gap: 13px; margin-bottom: 13px; }
.runtime-list { display: grid; }
.runtime-list article {
  display: grid; grid-template-columns: minmax(0,1fr) 210px; gap: 20px; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.runtime-list article:last-child { border-bottom: 0; }
.runtime-list strong, .runtime-list p, .runtime-state small { display: block; }
.runtime-list p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.runtime-state { text-align: right; }
.runtime-state small { margin-top: 5px; color: #788691; font-size: 9px; }
.runtime-empty { padding: 18px 16px; }
.runtime-empty p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.admin-next-actions { display: grid; gap: 10px; padding: 17px; }
.admin-next-actions p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.admin-next-actions button { justify-self: start; }
.automatic-status { margin-bottom: 13px; }
.automatic-status-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
.automatic-status-grid > div { padding: 14px 16px; border-right: 1px solid var(--line); }
.automatic-status-grid > div:last-child { border-right: 0; }
.automatic-status-grid span, .automatic-status-grid strong, .automatic-status-grid small { display: block; }
.automatic-status-grid span { color: #7a8791; font-size: 10px; }
.automatic-status-grid strong { margin: 6px 0 4px; font-size: 12px; }
.automatic-status-grid small { color: var(--muted); font-size: 10px; }
.automatic-status > .technical-details { padding: 0 16px 14px; }
.exception-list { display: grid; }
.exception-item {
  display: grid; grid-template-columns: 60px minmax(0,1fr) 220px; gap: 14px; align-items: center;
  padding: 15px 16px; border-bottom: 1px solid var(--line);
}
.exception-item:last-child { border-bottom: 0; }
.exception-item p { margin: 5px 0; color: #53626e; font-size: 11px; }
.exception-item small { color: var(--muted); font-size: 10px; }
.exception-action { display: grid; justify-items: end; gap: 8px; }
.exception-action span { color: #6e7d88; font-size: 10px; text-align: right; }
.exception-action button { font-size: 10px; }
.control-panel { display: grid; }
.control-item {
  display: grid; grid-template-columns: minmax(0,1fr) 280px; gap: 24px; align-items: center;
  padding: 17px 18px; border-bottom: 1px solid var(--line);
}
.control-item:last-child { border-bottom: 0; }
.control-item.critical { background: #fff9f8; border-left: 4px solid var(--danger); }
.control-item h3 { margin: 4px 0 5px; font-size: 14px; }
.control-item p { margin: 0; color: var(--muted); font-size: 11px; }
.control-item > div:last-child { display: grid; justify-items: end; gap: 9px; }
.control-item > div:last-child strong { font-size: 11px; }
.control-scope { color: #89959e; font-size: 9px; text-transform: uppercase; letter-spacing: .04em; }
.voice-profile-list { display: grid; }
.voice-profile-list article {
  display: grid; grid-template-columns: minmax(240px,1fr) minmax(230px,1fr) minmax(170px,.7fr) auto;
  gap: 18px; align-items: center; padding: 15px 16px; border-bottom: 1px solid var(--line);
}
.voice-profile-list article:last-child { border-bottom: 0; }
.voice-profile-list p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.voice-profile-list span, .voice-profile-list small { display: block; }
.voice-profile-list small { margin-top: 5px; color: var(--muted); font-size: 9px; }
.voice-defaults { margin-top: 13px; }
.voice-defaults > div:last-child { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
.voice-defaults > div:last-child span { padding: 13px 16px; color: #586772; font-size: 10px; border-right: 1px solid var(--line); }
.voice-defaults > div:last-child span:last-child { border-right: 0; }
.system-drawer-backdrop { position: fixed; inset: 0; z-index: 39; background: rgba(13,24,31,.34); }
.system-drawer {
  position: fixed; z-index: 40; top: 0; right: 0; width: min(540px, 94vw); height: 100vh;
  overflow-y: auto; background: #f5f7f8; border-left: 1px solid #d7dfe4;
  box-shadow: -18px 0 55px rgba(18,31,40,.2);
}
.system-drawer-head {
  position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: flex-start;
  padding: 20px 22px; color: #fff; background: #15242c; border-bottom: 1px solid #263740;
}
.system-drawer-head h3 { margin: 0; font-size: 18px; }
.system-drawer-head p:not(.eyebrow) { margin: 7px 0 0; color: #bdc8cd; font-size: 10px; }
.system-drawer-head .icon-button { color: #fff; border-color: #52616a; }
.system-drawer-body { display: grid; gap: 10px; padding: 14px; }
.system-drawer-body > section { padding: 15px 16px; background: #fff; border: 1px solid #dfe5e9; border-radius: 8px; }
.system-drawer-body h4 { margin: 0 0 9px; font-size: 12px; }
.system-drawer-body p, .system-drawer-body li { color: #53626e; font-size: 11px; line-height: 1.55; }
.system-drawer-body ol { margin: 0; padding-left: 18px; }
.system-drawer-body label { margin: 12px 0; }
.system-drawer-body label small { color: var(--muted); font-size: 9px; font-weight: 400; }
.enable-choice { display: grid !important; grid-template-columns: 22px minmax(0,1fr); align-items: start; }
.enable-choice input { width: 17px; height: 17px; margin-top: 2px; }
.enable-choice strong, .enable-choice small { display: block; }
.enable-choice small { margin-top: 5px; }
.drawer-action p { margin: 8px 0 0; }
.modal { border: 0; border-radius: 10px; padding: 0; width: min(510px, calc(100vw - 40px)); box-shadow: 0 25px 80px rgba(9,19,27,.3); }
.modal::backdrop { background: rgba(11,20,28,.48); }
.modal form { padding: 20px; }
.modal-head { display: flex; justify-content: space-between; align-items: start; margin-bottom: 12px; }
.modal h3 { margin: 0; font-size: 18px; }
.modal label { margin: 13px 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); padding-top: 15px; margin-top: 17px; }
.toast-stack { position: fixed; right: 22px; bottom: 20px; z-index: 100; display: grid; gap: 8px; }
.toast { width: 310px; background: #17232c; color: #fff; border-radius: 7px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.2); font-size: 12px; }
.toast.error { background: #8d261e; }
.empty-inline { color: #88949e; padding: 28px; text-align: center; font-size: 12px; }
@media (max-width: 1260px) {
  .metric-grid { grid-template-columns: repeat(3,1fr); }
  .filter-bar { grid-template-columns: repeat(3,1fr); }
  .summary-strip { grid-template-columns: repeat(3,1fr); row-gap: 14px; }
  .summary-strip.compact-business { grid-template-columns: repeat(3,1fr); }
  .timeline-toolbar { flex-wrap: wrap; }
  .overview-columns.balanced { grid-template-columns: 1fr; }
  .work-item { grid-template-columns: auto 1fr; }
  .work-action { grid-column: 2; justify-items: start; }
  .case-task-card { grid-template-columns: auto 1fr 1fr; }
  .case-task-next { border-left: 0; padding-left: 43px; }
  .case-task-card > button { grid-column: 3; justify-self: end; }
}
.excel-first-hero { margin-bottom: 16px; }
.excel-intake-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
  gap: 16px;
  margin: 16px 0;
}
.excel-intake-form, .intake-explanation { margin: 0; }
.template-download-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
}
.template-download-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}
.button-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  white-space: nowrap;
}
.operator-checklist { margin: 0; padding: 8px 24px 8px 42px; }
.operator-checklist li { padding: 8px 0; }
.operator-checklist li strong, .operator-checklist li span { display: block; }
.operator-checklist li span {
  color: var(--muted);
  margin-top: 3px;
  font-size: 11px;
}
.batch-latest-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}
.batch-latest-summary > div { padding: 14px 16px; background: #fff; }
.batch-latest-summary span, .batch-latest-summary strong { display: block; }
.batch-latest-summary span {
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 4px;
}
@media (max-width: 1050px) {
  .excel-intake-layout { grid-template-columns: 1fr; }
  .batch-latest-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  button, .button-link { min-height: 42px; }
  input, select, textarea { font-size: 16px; }

  .login-shell {
    display: flex;
    min-height: 100dvh;
    align-items: center;
    justify-content: center;
    padding: 92px 16px 48px;
    background: linear-gradient(180deg, #111b23 0 190px, #edf1f3 190px);
  }
  .login-shell::before { display: none; }
  .login-brand { top: 26px; left: 22px; }
  .login-panel {
    width: min(100%, 420px);
    margin: 0;
    padding: 28px 22px;
    border-radius: 10px;
  }
  .login-panel h1 { font-size: 25px; }
  .login-panel > p { margin-bottom: 22px; line-height: 1.6; }
  .login-foot {
    position: absolute;
    right: 0;
    bottom: 17px;
    width: 100%;
    text-align: center;
  }

  .app-shell { display: block; min-height: 100dvh; }
  .sidebar { min-height: 0; }
  .sidebar .brand {
    height: 58px;
    padding: 0 16px;
  }
  .main-nav {
    display: flex;
    gap: 6px;
    padding: 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .main-nav::-webkit-scrollbar { display: none; }
  .main-nav button {
    display: flex;
    flex: 0 0 auto;
    gap: 7px;
    min-height: 40px;
    padding: 8px 11px;
    white-space: nowrap;
  }
  .main-nav button i { margin-left: 3px; }
  .nav-section, .sidebar-foot { display: none; }

  .topbar {
    min-height: 62px;
    padding: 10px 12px;
    gap: 8px;
  }
  .topbar p { display: none; }
  .topbar h1 { font-size: 17px; }
  .top-actions { gap: 5px; }
  .health-pill span, .account div { display: none; }
  #logout {
    min-height: 36px;
    padding: 7px 8px;
  }
  .account {
    border-left: 0;
    padding-left: 0;
  }
  .kill-banner {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 60;
    text-align: center;
  }
  .page-content { padding: 12px 12px 28px; }

  .metric-grid,
  .overview-four,
  .summary-strip,
  .batch-latest-summary,
  .task-workbench-status,
  .automatic-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metric-card { min-height: 92px; padding: 13px; }
  .metric-card strong { font-size: 22px; }

  .overview-columns,
  .overview-columns.balanced,
  .content-grid,
  .filter-bar,
  .filter-bar.compact,
  .advanced-filters > div,
  .inline-form,
  .split-form,
  .split-records,
  .health-summary-grid,
  .config-layout,
  .system-layout,
  .excel-intake-layout,
  .guided-form,
  .guided-policy-form,
  .source-readiness-grid,
  .voice-profile-item,
  .voice-defaults > div:last-child,
  .exception-item,
  .control-item {
    grid-template-columns: minmax(0, 1fr);
  }
  .channel-summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .communication-contact-head { display: grid; }
  .communication-contact-head > div:last-child { justify-content: flex-start; }

  .section-head,
  .panel-head,
  .case-heading,
  .template-download-card {
    align-items: stretch;
    display: grid;
    gap: 10px;
  }
  .case-actions, .panel-head > div:last-child {
    justify-content: flex-start;
  }
  .case-actions > *,
  .modal-actions > * { flex: 1 1 auto; }

  .panel { overflow-x: auto; }
  .case-table,
  .data-table,
  .task-table,
  .policy-version-table { min-width: 700px; }

  .work-item {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 12px;
  }
  .work-action {
    grid-column: 2;
    min-width: 0;
    justify-items: stretch;
  }
  .case-task-card { grid-template-columns: minmax(0, 1fr); }
  .case-task-card > *,
  .case-task-next,
  .case-task-scope {
    grid-column: auto !important;
    padding-left: 0;
    border-left: 0;
  }
  .summary-strip div {
    padding: 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .summary-strip .next-action-summary { grid-column: span 2; }

  .tab-nav {
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
  }
  .tab-nav::-webkit-scrollbar { display: none; }
  .timeline-item { grid-template-columns: 20px minmax(0, 1fr); }
  .voice-turn { max-width: 92%; }
  .communication-drawer { width: 100vw; }

  .task-workbench,
  .system-drawer {
    width: 100vw;
    max-width: 100vw;
  }
  .task-workbench-status { gap: 6px; }
  .task-workbench-body,
  .system-drawer-body { padding: 12px; }

  .modal {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    overflow-y: auto;
  }
  .modal form { padding: 16px; }
  .modal-actions { flex-wrap: wrap; }
  .toast-stack { right: 10px; left: 10px; bottom: 10px; }
  .toast { width: 100%; }
}
.borrower-profile-panel .panel-head { align-items: flex-start; }
.profile-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.profile-field { min-height: 72px; padding: 12px; border: 1px solid var(--line, #e4e7ec); border-radius: 8px; background: var(--surface-muted, #f8fafc); }
.profile-field span, .profile-edit-form label span { display: block; color: var(--muted, #667085); font-size: 12px; margin-bottom: 6px; }
.profile-field strong { overflow-wrap: anywhere; }
.profile-edit-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line, #e4e7ec); }
.profile-edit-form input { width: 100%; }
.profile-edit-form .profile-reason { grid-column: span 2; }
.profile-edit-form small { align-self: center; }
@media (max-width: 1100px) { .profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .profile-edit-form { grid-template-columns: 1fr 1fr; } }

.tenant-context-bar {
  align-items: center;
  background: #eef8f5;
  border: 1px solid #cbe9df;
  border-radius: 12px;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 12px 16px;
}
.tenant-context-bar label { align-items: center; display: flex; font-weight: 700; gap: 10px; }
.tenant-context-bar select { min-width: 240px; }
.tenant-context-bar span { color: var(--muted); font-size: 13px; }
.account-first-login { margin: 40px auto; max-width: 620px; }
.compact-form { margin-top: 16px; }
.merchant-config-layout { display: grid; gap: 16px; margin: 0 auto; max-width: 1440px; }
.merchant-channel-panel { min-height: 360px; overflow: visible; }
.merchant-channel-head { min-height: 70px; padding: 15px 20px; }
.merchant-channel-head .eyebrow { margin-bottom: 4px; }
.merchant-channel-head .badge { justify-self: end; }
.merchant-channel-body { padding: 16px 20px 18px; }
.channel-impact-note {
  align-items: start; background: #f4f8f7; border: 1px solid #dce9e6; border-radius: 8px;
  display: grid; gap: 4px; grid-template-columns: 180px minmax(0,1fr); margin-bottom: 14px; padding: 11px 13px;
}
.channel-impact-note strong { color: #244f49; font-size: 11px; }
.channel-impact-note p { color: #607079; font-size: 11px; line-height: 1.55; margin: 0; }
.channel-mode-row { align-items: center; display: flex; justify-content: space-between; gap: 18px; margin-bottom: 13px; }
.channel-mode-row > div:first-child strong, .channel-mode-row > div:first-child small { display: block; }
.channel-mode-row > div:first-child strong { font-size: 12px; }
.channel-mode-row > div:first-child small { color: var(--muted); font-size: 10px; margin-top: 4px; }
.channel-mode-selector { background: #edf2f3; border-radius: 7px; display: grid; grid-template-columns: repeat(2,minmax(145px,1fr)); padding: 3px; }
.channel-mode-selector button { background: transparent; border: 0; border-radius: 5px; color: #64727d; font-size: 11px; font-weight: 700; padding: 8px 13px; }
.channel-mode-selector button.active { background: #fff; box-shadow: 0 1px 5px rgba(19,36,46,.12); color: var(--accent); }
.merchant-channel-list { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.merchant-channel-row {
  align-items: center; display: grid; gap: 18px;
  grid-template-columns: minmax(185px,.8fr) minmax(310px,1.55fr) minmax(180px,.65fr) 116px;
  min-height: 84px; padding: 12px 15px;
}
.merchant-channel-row + .merchant-channel-row { border-top: 1px solid #e8edef; }
.merchant-channel-row:hover { background: #fbfdfc; }
.channel-name { align-items: center; display: flex; gap: 11px; min-width: 0; }
.channel-name > div { align-items: flex-start; display: grid; gap: 5px; }
.channel-name strong { font-size: 13px; }
.channel-icon {
  background: #e8f4f1; border: 1px solid #cee5df; border-radius: 50%; color: var(--accent);
  display: grid; flex: 0 0 34px; font-size: 12px; font-weight: 850; height: 34px; place-items: center; width: 34px;
}
.channel-description { color: #5d6b76; font-size: 11px; line-height: 1.55; margin: 0; }
.channel-usage { display: grid; gap: 5px; }
.channel-usage strong { font-size: 11px; }
.channel-usage small { color: var(--muted); font-size: 10px; }
.channel-toggle { align-items: center; cursor: pointer; display: grid; gap: 7px; grid-template-columns: 42px auto; justify-self: end; }
.channel-toggle input { height: 1px; opacity: 0; position: absolute; width: 1px; }
.channel-toggle span { background: #b9c4cb; border-radius: 14px; height: 23px; position: relative; transition: .15s; width: 42px; }
.channel-toggle span:after { background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.2); content: ''; height: 17px; left: 3px; position: absolute; top: 3px; transition: .15s; width: 17px; }
.channel-toggle input:checked + span { background: var(--accent); }
.channel-toggle input:checked + span:after { left: 22px; }
.channel-toggle input:disabled + span { cursor: not-allowed; opacity: .62; }
.channel-toggle em { color: #697781; font-size: 10px; font-style: normal; }
.channel-save-feedback { border: 1px solid #dce5e8; border-radius: 7px; margin-top: 13px; padding: 11px 13px; }
.channel-save-feedback:empty { display: none; }
.channel-save-feedback.success { background: #edf8f5; border-color: #bcded5; }
.channel-save-feedback.error { background: var(--danger-soft); border-color: #efc4be; }
.channel-save-feedback.pending { background: #f1f6fb; border-color: #cbd9e8; }
.channel-save-feedback strong, .channel-save-feedback p, .channel-save-feedback small { display: block; }
.channel-save-feedback strong { font-size: 11px; }
.channel-save-feedback p { color: #53626e; font-size: 11px; margin: 4px 0; }
.channel-save-feedback small { color: #73818c; font-size: 10px; }
.channel-save-bar {
  align-items: center; background: #fff; border-top: 1px solid var(--line); bottom: 0; display: flex;
  justify-content: space-between; padding: 12px 20px; position: sticky; z-index: 2;
}
.channel-save-bar[hidden] { display: none; }
.channel-save-bar > div { align-items: center; display: flex; gap: 9px; }
.channel-save-bar strong { font-size: 11px; }
.channel-save-bar small { color: var(--muted); font-size: 10px; }
.merchant-config-secondary { display: grid; gap: 16px; grid-template-columns: minmax(0,1.45fr) minmax(320px,.8fr); }
.merchant-config-form .panel-body { display: grid; gap: 13px; }
.merchant-config-form .form-grid { margin: 0; }
.merchant-config-readonly-stack { display: grid; gap: 12px; }
.readonly-config .panel-body p { color: #5e6d78; font-size: 11px; line-height: 1.55; margin: 0; }
.readonly-config .panel-body p + p { border-top: 1px solid var(--line); margin-top: 9px; padding-top: 9px; }
.merchant-channel-dialog .warning-box ul { line-height: 1.6; margin: 8px 0; padding-left: 18px; }
.readonly-config { background: #f8fafc; }
@media (max-width: 1050px) {
  .merchant-channel-row { grid-template-columns: minmax(170px,.8fr) minmax(250px,1.4fr) 150px 104px; gap: 12px; }
  .merchant-config-secondary { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 760px) {
  .tenant-context-bar, .tenant-context-bar label { align-items: stretch; flex-direction: column; }
  .tenant-context-bar select { min-width: 0; width: 100%; }
  .onboarding-hero { align-items: stretch; display: grid; gap: 14px; }
  .onboarding-hero > button { width: 100%; }
  .merchant-channel-panel { min-height: 0; overflow: hidden; }
  .merchant-channel-head, .merchant-channel-body { padding-left: 14px; padding-right: 14px; }
  .merchant-channel-head .badge { justify-self: start; }
  .channel-impact-note { grid-template-columns: minmax(0,1fr); }
  .channel-mode-row { align-items: stretch; display: grid; }
  .channel-mode-selector { grid-template-columns: minmax(0,1fr); }
  .merchant-channel-row { gap: 9px; grid-template-columns: minmax(0,1fr) auto; min-height: 0; padding: 14px; }
  .channel-name { grid-column: 1; grid-row: 1; }
  .channel-toggle { grid-column: 2; grid-row: 1; }
  .channel-description, .channel-usage { grid-column: 1 / -1; }
  .channel-usage { display: flex; flex-wrap: wrap; gap: 6px 15px; }
  .channel-save-bar { align-items: stretch; display: grid; gap: 10px; padding: 12px 14px; }
  .channel-save-bar > div { justify-content: space-between; }
  .channel-save-bar > div:first-child { align-items: flex-start; display: grid; }
  .merchant-config-secondary { grid-template-columns: minmax(0,1fr); }
}
