:root {
  --ink: #18222c;
  --muted: #687581;
  --line: #e5eaee;
  --surface: #fff;
  --canvas: #f5f7f8;
  --navy: #132d3a;
  --teal: #137d7a;
  --teal-deep: #0e625f;
  --amber: #e7a13e;
  --red: #bd513f;
  --green: #22866a;
  --shadow: 0 10px 26px rgba(16, 39, 52, .07);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 244px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 25px 16px 18px; background: var(--navy); color: #f5fafb; }
.brand-lockup { display: flex; align-items: center; gap: 11px; padding: 0 9px 29px; }
.brand-lockup strong { display: block; font-size: 13px; font-weight: 730; letter-spacing: -.01em; }
.brand-lockup span { display: block; margin-top: 4px; color: #a8bdc5; font-size: 11px; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: #f2b34c; color: #27343a; font-size: 11px; font-weight: 850; letter-spacing: -.06em; }
.sidebar nav { display: grid; gap: 7px; }
.nav-item { width: 100%; min-height: 44px; display: flex; align-items: center; gap: 11px; border: 0; border-radius: 9px; padding: 9px 11px; color: #d7e3e6; background: transparent; text-align: left; font-size: 13px; font-weight: 580; }
.nav-item:hover, .nav-item.selected { color: #fff; background: rgba(255,255,255,.1); }
.nav-item small { display: block; margin-left: auto; color: #8ca8b1; font-size: 10px; font-weight: 500; }
.nav-divider { height: 1px; margin: 9px 7px 5px; background: rgba(255,255,255,.14); }
.nav-panel-view { min-height: 38px; padding-left: 18px; color: #b8cbd0; font-size: 12px; }
.nav-panel-view.selected { color: #fff; background: rgba(255,255,255,.13); box-shadow: inset 2px 0 #e7a13e; }
.nav-icon { width: 17px; text-align: center; font-size: 17px; }
.agent-dot, .agent-mark { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: #50c5b2; }
.agent-dot.luna, .agent-mark.luna { background: #f0b552; }
.sidebar-foot { margin-top: auto; }
.system-state { display: flex; align-items: center; gap: 8px; padding: 12px 10px 18px; color: #bdcdd1; font-size: 11px; }
.state-dot { width: 8px; height: 8px; border-radius: 50%; background: #58c59c; box-shadow: 0 0 0 3px rgba(88,197,156,.14); }
.state-dot.state-bad { background: #ee816f; box-shadow: 0 0 0 3px rgba(238,129,111,.16); }
.user-row { display: flex; align-items: center; gap: 9px; padding: 13px 6px 0; border-top: 1px solid rgba(255,255,255,.14); }
.avatar { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; background: #315362; color: #fff; font-size: 12px; font-weight: 700; }
.user-meta { min-width: 0; flex: 1; }
.user-meta strong, .user-meta span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta strong { color: #eef4f5; font-size: 10px; font-weight: 650; }
.user-meta span { margin-top: 3px; color: #9db4bd; font-size: 10px; }
.icon-button { width: 33px; height: 33px; display: grid; place-items: center; padding: 0; border: 1px solid rgba(255,255,255,.15); border-radius: 8px; background: transparent; color: #deeaed; font-size: 18px; }
.icon-button:hover { background: rgba(255,255,255,.08); }
.workspace { min-width: 0; padding: 0 35px 24px; overflow: hidden; }
.topbar { min-height: 67px; display: flex; justify-content: space-between; align-items: center; gap: 20px; border-bottom: 1px solid var(--line); }
.breadcrumb { display: flex; align-items: center; gap: 10px; color: #83909b; font-size: 12px; }
.breadcrumb strong { color: #35434c; font-weight: 650; }
.crumb-sep { color: #bec7cd; }
.top-controls { display: flex; align-items: center; gap: 15px; }
.mode-select { display: grid; gap: 2px; color: #85919b; font-size: 9px; }
.mode-select select { border: 0; outline: 0; color: #34434c; background: transparent; font-size: 12px; font-weight: 680; }
.button { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 8px; padding: 0 13px; font-size: 11px; font-weight: 670; transition: background .15s, border-color .15s, transform .15s; }
.button:focus-visible, .nav-item:focus-visible, .icon-button:focus-visible, .lead-card:focus-visible { outline: 3px solid rgba(19,125,122,.34); outline-offset: 2px; }
.button:active { transform: translateY(1px); }
.button-primary { color: white; background: var(--teal); }
.button-primary:hover { background: var(--teal-deep); }
.button-pause { color: #80432c; border-color: #f0dfca; background: #fff9f0; }
.button-pause:hover { border-color: #eac38e; background: #fff2dc; }
.button-pause.is-paused { color: white; border-color: #a94c40; background: #b84f42; }
.button-outline { color: #3b535e; border-color: #d8e1e5; background: white; }
.button-outline:hover, .button-quiet:hover { border-color: #a9c8c5; background: #f4fbfa; }
.button-quiet { color: #50616d; border-color: transparent; background: transparent; }
.button-small { min-height: 30px; color: #3e5964; border-color: #d7e1e5; background: white; }
.button-full { width: 100%; min-height: 43px; margin-top: 18px; }
.api-error { margin: 16px 0 0; display: flex; align-items: center; gap: 13px; border: 1px solid #efc8bf; border-radius: 10px; padding: 12px 14px; color: #762f27; background: #fff7f4; font-size: 11px; }
.api-error strong { white-space: nowrap; }
.api-error span { flex: 1; color: #86534b; }
.page-heading { min-height: 119px; display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 18px 0 19px; }
.page-heading h1 { margin: 4px 0 5px; color: #1b3039; font-size: 26px; letter-spacing: -.04em; line-height: 1.15; }
.eyebrow { margin: 0; color: #16827d; font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.muted { margin: 0; color: #75838d; font-size: 12px; line-height: 1.45; }
.heading-actions { display: flex; align-items: center; gap: 7px; }
.overview-strip { display: grid; grid-template-columns: 1.1fr 1fr 1fr 1fr; gap: 12px; margin-bottom: 15px; }
.summary-card { min-height: 108px; border: 1px solid var(--line); border-radius: 11px; padding: 14px 15px; background: white; box-shadow: 0 2px 8px rgba(30,50,65,.02); }
.pending-shortcut { width: 100%; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.pending-shortcut:hover { border-color: #75bcb3; box-shadow: 0 6px 16px rgba(25,100,94,.10); }
.summary-card.summary-primary { border-color: #b8ded9; background: #f2fbf9; }
.summary-top { display: flex; justify-content: space-between; align-items: center; color: #65747d; font-size: 11px; font-weight: 600; }
.summary-icon { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; color: #a25b32; background: #f8e9d8; font-size: 12px; font-weight: 800; }
.summary-icon.icon-blue { color: #397894; background: #e4f1f6; }
.summary-icon.icon-green { color: #368065; background: #e3f3ec; }
.summary-icon.icon-violet { color: #6d5c9c; background: #eeeafd; }
.summary-card > strong { display: block; margin-top: 7px; color: #1d353e; font-size: 25px; letter-spacing: -.05em; }
.summary-detail { display: block; margin-top: 2px; color: #8a969d; font-size: 10px; }
.control-banner { display: flex; align-items: center; gap: 12px; min-height: 57px; margin-bottom: 19px; border: 1px solid #e6e4d9; border-radius: 10px; padding: 10px 13px; background: #fbfaf5; }
.control-banner-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: #856328; background: #f4e9cb; font-size: 13px; }
.control-banner div:nth-child(2) { flex: 1; }
.control-banner strong { display: block; color: #39464a; font-size: 11px; }
.control-banner p { margin: 3px 0 0; color: #7e8989; font-size: 10px; }
.status-pill { border: 1px solid #c6e2d8; border-radius: 99px; padding: 5px 9px; color: #287354; background: #edf8f3; font-size: 9px; font-weight: 700; white-space: nowrap; }
.status-pill.status-paused { border-color: #ecc8bc; color: #9b3c31; background: #fff2ed; }
.board-tools { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.segmented { display: flex; align-items: center; gap: 3px; border: 1px solid var(--line); border-radius: 9px; padding: 3px; background: #fff; }
.segmented button { min-height: 29px; border: 0; border-radius: 6px; padding: 0 10px; color: #687780; background: transparent; font-size: 10px; font-weight: 650; }
.segmented button.active, .segmented button.selected { color: #136e6b; background: #e8f5f2; }
.search-box { min-width: 180px; max-width: 370px; flex: 1; display: flex; align-items: center; gap: 8px; height: 36px; border: 1px solid #e0e6e9; border-radius: 8px; padding: 0 10px; background: white; color: #9daab0; }
.search-box span { font-size: 19px; line-height: 1; }
.search-box input { width: 100%; border: 0; outline: 0; color: #33454d; background: transparent; font-size: 10px; }
.search-box input::placeholder { color: #9aa5aa; }
.filter-select { display: flex; align-items: center; gap: 7px; height: 36px; border: 1px solid #e0e6e9; border-radius: 8px; padding: 0 9px; background: white; color: #88949a; font-size: 9px; }
.filter-select select { max-width: 140px; border: 0; outline: 0; color: #495a62; background: transparent; font-size: 10px; font-weight: 650; }
.board { display: grid; gap: 20px; }
.agent-board { min-width: 0; border: 1px solid #e6ecef; border-radius: 12px; background: #eff3f5; overflow: hidden; }
.agent-board-heading { display: flex; justify-content: space-between; align-items: center; min-height: 48px; padding: 0 14px; border-bottom: 1px solid #dfe7ea; background: #fff; }
.agent-board-heading > div { display: flex; align-items: center; gap: 8px; }
.agent-board-heading h2 { margin: 0; color: #283b44; font-size: 13px; }
.agent-subtitle { color: #8c969c; font-size: 10px; }
.board-total { color: #849199; font-size: 10px; }
.agent-board .agent-mark { width: 8px; height: 8px; }
.kanban-columns { display: grid; grid-auto-columns: minmax(165px, 1fr); grid-auto-flow: column; gap: 9px; padding: 10px; overflow-x: auto; }
.kanban-column { min-width: 165px; }
.column-heading { display: flex; justify-content: space-between; align-items: center; height: 31px; margin-bottom: 7px; padding: 0 3px; }
.column-heading h3 { margin: 0; color: #62727b; font-size: 10px; font-weight: 700; }
.column-heading span { display: grid; min-width: 19px; height: 19px; place-items: center; border-radius: 6px; color: #6c7c83; background: #e1e8eb; font-size: 9px; }
.column-cards { min-height: 99px; display: grid; align-content: start; gap: 7px; }
.lead-card { width: 100%; min-width: 0; display: block; border: 1px solid #e2e9ec; border-radius: 9px; padding: 10px; color: inherit; background: white; text-align: left; box-shadow: 0 2px 5px rgba(32,51,62,.025); }
.lead-card:hover { border-color: #a8cdc9; box-shadow: 0 7px 16px rgba(23,78,83,.08); transform: translateY(-1px); }
.lead-card-pending { border-left: 3px solid var(--amber); }
.lead-card-top { display: flex; justify-content: space-between; align-items: center; gap: 5px; }
.agent-tag { display: inline-flex; align-items: center; border-radius: 5px; padding: 3px 6px; color: #176b62; background: #e6f4f0; font-size: 8px; font-weight: 750; }
.agent-tag.luna { color: #886022; background: #fcf1da; }
.lead-age { overflow: hidden; color: #9aa5aa; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.lead-company { display: block; margin-top: 8px; overflow: hidden; color: #30424b; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.lead-phone { display: block; margin-top: 2px; color: #96a0a5; font-size: 9px; }
.lead-preview { display: -webkit-box; min-height: 28px; margin: 8px 0; overflow: hidden; color: #687880; font-size: 9px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.lead-card-bottom { display: flex; justify-content: space-between; align-items: center; gap: 5px; border-top: 1px solid #eef1f3; padding-top: 7px; color: #97a1a5; font-size: 9px; }
.control-label { overflow: hidden; color: #64757c; text-overflow: ellipsis; white-space: nowrap; }
.control-label.control-human { color: #9d5b31; }
.empty-column { min-height: 65px; display: grid; place-items: center; border: 1px dashed #d7e0e4; border-radius: 8px; color: #9ba7ab; font-size: 9px; }
.empty-board, .board-loading { display: grid; min-height: 140px; place-items: center; border: 1px dashed #d7e0e4; border-radius: 10px; color: #8b989d; background: #f9fbfc; font-size: 12px; }
.workspace-footer { display: flex; justify-content: space-between; gap: 12px; padding: 18px 2px 0; color: #96a2a7; font-size: 9px; }
.module-view { min-width: 0; margin-top: 4px; }
.module-root { min-width: 0; }
.module-root[aria-busy="true"] { min-height: 160px; display: grid; place-items: center; color: #75838d; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 20% 10%,#d9efea,transparent 33%),#eef3f5; }
.login-card { width: min(100%,390px); border: 1px solid #e4ebed; border-radius: 16px; padding: 31px; background: white; box-shadow: var(--shadow); }
.login-card .brand-mark { margin-bottom: 21px; }
.login-card h1 { margin: 7px 0 8px; color: #203740; font-size: 25px; letter-spacing: -.04em; }
.login-card form { display: grid; margin-top: 25px; }
.login-card label, .reply-form label { margin: 10px 0 6px; color: #475962; font-size: 11px; font-weight: 660; }
.login-card input, .reply-form textarea { width: 100%; border: 1px solid #dce4e7; border-radius: 8px; padding: 11px; color: #30424b; background: white; outline: none; font-size: 12px; }
.login-card input:focus, .reply-form textarea:focus { border-color: #70b6ae; box-shadow: 0 0 0 3px rgba(19,125,122,.1); }
.form-error { min-height: 16px; margin: 10px 0 0; color: #a43932; font-size: 11px; }
.detail-dialog { width: min(780px,calc(100vw - 30px)); max-width: none; max-height: min(90vh,850px); border: 1px solid #dce5e8; border-radius: 14px; padding: 0; color: var(--ink); background: white; box-shadow: 0 24px 80px rgba(12,32,43,.25); }
.detail-dialog::backdrop { background: rgba(16,37,49,.38); backdrop-filter: blur(2px); }
.detail-panel { display: flex; flex-direction: column; max-height: min(90vh,850px); }
.detail-header { display: flex; justify-content: space-between; align-items: start; padding: 19px 21px 14px; border-bottom: 1px solid var(--line); }
.detail-header h2 { margin: 5px 0 0; color: #203740; font-size: 20px; }
.detail-error { margin: 10px 16px 0; border: 1px solid #e9bdb4; border-radius: 8px; padding: 9px 11px; color: #81372f; background: #fff5f1; font-size: 10px; }
.close-button { border-color: #e0e7e9; color: #667780; font-size: 21px; }
.detail-meta { display: grid; grid-template-columns: repeat(3,1fr); gap: 11px; padding: 15px 21px; border-bottom: 1px solid var(--line); background: #fbfcfc; }
.detail-meta div span, .detail-meta div strong { display: block; }
.detail-meta div span { margin-bottom: 4px; color: #89969b; font-size: 9px; }
.detail-meta div strong { overflow: hidden; color: #40545c; font-size: 10px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.detail-actions { display: flex; gap: 7px; padding: 12px 21px; border-bottom: 1px solid var(--line); }
.detail-actions { flex-wrap: wrap; align-items: center; }
.detail-transfer { display: flex; flex: 1 1 100%; align-items: end; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.detail-transfer label { display: grid; flex: 1; gap: 4px; color: #77858c; font-size: 9px; }
.detail-transfer select { min-width: 0; min-height: 34px; border: 1px solid #dce4e7; border-radius: 7px; padding: 0 8px; color: #344952; background: #fff; font-size: 10px; }
.detail-transfer button:disabled { cursor: not-allowed; opacity: .55; }
.conversation { min-height: 180px; flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 9px; padding: 16px 21px; background: #f7f9fa; }
.message { max-width: 82%; border: 1px solid #e2e9eb; border-radius: 10px 10px 10px 3px; padding: 9px 11px; background: white; }
.message-outbound { align-self: flex-end; border-color: #cbe3dd; border-radius: 10px 10px 3px 10px; background: #eff9f6; }
.message span { color: #92a0a5; font-size: 8px; text-transform: capitalize; }
.message-receipt { margin-left: 5px; color: #48806e; font-size: 8px; font-weight: 650; text-transform: none; }
.message p { margin: 5px 0 0; color: #455960; font-size: 11px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.empty-conversation { margin: auto; color: #92a0a5; font-size: 11px; }
.detail-notes { display: grid; gap: 10px; border-top: 1px solid var(--line); padding: 13px 21px; background: #fbfcfc; }
.detail-panel-subhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.detail-panel-subhead h3 { margin: 0; color: #40535a; font-size: 11px; }
.detail-panel-subhead span, .detail-note small, .detail-note-empty { color: #8b989d; font-size: 9px; }
.detail-note-list { display: grid; gap: 6px; max-height: 110px; overflow: auto; }
.detail-note { border-left: 2px solid #8bb9ae; padding: 5px 9px; background: #f3f8f6; }
.detail-note p { margin: 0 0 4px; color: #53636a; font-size: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-note-empty { margin: 0; }
.detail-note-form { display: grid; grid-template-columns: 1fr auto; gap: 6px 9px; align-items: end; }
.detail-note-form label { grid-column: 1 / -1; color: #687981; font-size: 9px; font-weight: 650; }
.detail-note-form textarea { width: 100%; min-height: 55px; resize: vertical; border: 1px solid #dce4e7; border-radius: 7px; padding: 8px; color: #30424b; background: #fff; font-size: 10px; }
.detail-feedback { border-top: 1px solid #cbe3dc; padding: 8px 21px; color: #267054; background: #eff9f6; font-size: 10px; }
.detail-appointments { border-top: 1px solid var(--line); padding: 12px 21px; }
.detail-appointments { display: grid; gap: 9px; background: #fbfcfc; }
.appointment-record { display: grid; grid-template-columns: max-content 1fr; gap: 4px 10px; border-left: 2px solid #81b6a8; padding: 7px 9px; background: #f2f8f5; color: #4c6168; font-size: 10px; }
.appointment-record strong { color: #286650; }
.appointment-record small { grid-column: 1 / -1; color: #95614b; }
.appointment-form { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 7px 9px; border-top: 1px solid var(--line); padding-top: 10px; }
.appointment-form p, .appointment-form small, .appointment-form button { grid-column: 1 / -1; }
.appointment-form p, .appointment-form small, .appointment-hint { margin: 0; color: #76868c; font-size: 9px; line-height: 1.45; }
.appointment-form label { display: block; color: #687981; font-size: 9px; font-weight: 650; }
.appointment-form input, .appointment-form select { width: 100%; min-height: 34px; border: 1px solid #dce4e7; border-radius: 7px; padding: 0 8px; color: #344952; background: white; font-size: 10px; }
.appointment-form input:focus, .appointment-form select:focus { outline: 2px solid rgba(19,125,122,.16); border-color: #70b6ae; }
.appointment-form button:disabled { cursor: not-allowed; opacity: .55; }
.appointment-hint { color: #8b5c43; }
.reply-form { padding: 11px 21px 17px; }
.reply-form { border-top: 1px solid var(--line); color: #43575f; background: #f5faf9; font-size: 11px; }
.reply-form p { margin: 5px 0 0; color: #847963; font-size: 10px; line-height: 1.45; }
.reply-form label { display: block; margin-top: 0; }
.reply-form textarea { resize: vertical; }
.reply-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; color: #94a0a5; font-size: 9px; }
.toast { position: fixed; right: 20px; bottom: 18px; z-index: 5; max-width: min(400px,calc(100vw - 40px)); padding: 11px 14px; border-radius: 9px; color: white; background: #234953; box-shadow: var(--shadow); font-size: 11px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .16s, transform .16s; }
.toast.visible { opacity: 1; transform: translateY(0); }
.toast.toast-error { background: #a43d32; }
@media (max-width: 1100px) {
  .workspace { padding-right: 22px; padding-left: 22px; }
  .overview-strip { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 720px) {
  .app-shell { min-width: 0; grid-template-columns: minmax(0,1fr); }
  .sidebar { position: sticky; z-index: 3; top: 0; width: 100%; min-width: 0; height: auto; flex-direction: row; align-items: center; gap: 8px; padding: 9px 10px; }
  .brand-lockup { flex: 1; padding: 0; }
  .brand-lockup .brand-mark { width: 30px; height: 30px; }
  .brand-lockup strong { font-size: 11px; }
  .brand-lockup span, .sidebar-foot, .sidebar nav .nav-item small { display: none; }
  .sidebar nav { display: flex; min-width: 0; gap: 3px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
  .sidebar nav::-webkit-scrollbar { display: none; }
  .sidebar nav .nav-item { flex: 0 0 auto; }
  .sidebar nav .nav-divider { display: none; }
  .nav-item { width: auto; min-width: 55px; min-height: 35px; justify-content: center; gap: 6px; padding: 0 7px; font-size: 10px; white-space: nowrap; }
  .sidebar nav .agent-dot { width: 10px; height: 10px; }
  .workspace { min-width: 0; padding: 0 13px 20px; }
  .topbar { min-width: 0; min-height: 55px; flex-wrap: wrap; align-items: center; gap: 7px; padding: 8px 0; }
  .breadcrumb { min-width: 0; max-width: 100%; font-size: 10px; }
  .top-controls { width: 100%; min-width: 0; justify-content: space-between; gap: 8px; }
  .mode-select { min-width: 0; }
  .mode-select select { width: min(45vw,170px); max-width: 100%; font-size: 10px; }
  .button-pause { min-height: 32px; padding: 0 9px; font-size: 9px; white-space: nowrap; }
  .page-heading { min-height: 104px; align-items: end; padding: 17px 0 15px; }
  .page-heading h1 { font-size: 23px; }
  .muted { max-width: 340px; font-size: 10px; }
  .heading-actions .button { min-height: 31px; padding: 0 8px; font-size: 9px; }
  .overview-strip { gap: 8px; }
  .summary-card { min-height: 91px; padding: 10px; }
  .summary-card > strong { font-size: 21px; }
  .summary-top { font-size: 9px; }
  .summary-detail { font-size: 8px; }
  .control-banner { min-height: 55px; gap: 8px; padding: 8px; }
  .control-banner p { max-width: 220px; line-height: 1.35; }
  .status-pill { padding: 4px 6px; font-size: 8px; }
  .board-tools { flex-wrap: wrap; gap: 8px; margin-bottom: 13px; }
  .segmented { order: 1; }
  .search-box { order: 3; flex-basis: calc(100% - 120px); }
  .filter-select { order: 4; flex: 1; }
  .agent-board-heading { min-height: 43px; padding: 0 10px; }
  .agent-subtitle { max-width: 145px; overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
  .kanban-columns { grid-auto-columns: minmax(176px, 70vw); padding: 8px; }
  .lead-card { min-height: 128px; }
  .workspace-footer { flex-direction: column; font-size: 8px; }
  .module-view { margin-top: 0; }
  .detail-dialog { width: calc(100vw - 14px); max-height: calc(100vh - 18px); border-radius: 12px; }
  .detail-panel { max-height: calc(100vh - 18px); }
  .detail-meta { grid-template-columns: repeat(2,1fr); gap: 10px; padding: 12px; }
  .detail-header, .detail-actions, .conversation, .reply-form { padding-right: 12px; padding-left: 12px; }
  .detail-notes, .detail-feedback, .detail-appointments { padding-right: 12px; padding-left: 12px; }
  .detail-note-form { grid-template-columns: 1fr; }
  .detail-note-form label { grid-column: auto; }
  .detail-transfer { align-items: stretch; flex-direction: column; }
  .detail-error { margin-right: 10px; margin-left: 10px; }
  .detail-actions { flex-wrap: wrap; }
  .detail-actions .button { flex: 1 1 30%; padding: 0 7px; font-size: 9px; }
  .message { max-width: 94%; }
  .api-error { align-items: start; flex-wrap: wrap; }
  .api-error span { flex-basis: 100%; order: 3; }
}

.mode-select select:focus-visible, .filter-select select:focus-visible,
.search-box:focus-within, .segmented button:focus-visible,
.pending-shortcut:focus-visible { outline: 3px solid rgba(19,125,122,.34); outline-offset: 2px; }
