/* ============================================================================
   DentalNexa workspace usability pass (2026-11-12)
   ----------------------------------------------------------------------------
   Loaded last. Everything here is scoped under .app-shell (the signed-in practice workspace) so it never reaches the public site
   or Super Admin. Covers: sidebar groups (fit a 1366x768 laptop without scrolling), header patient search, Schedule open times,
   the patient record's action bar, and the AI receptionist & reminders tabs.
   Muted text uses #5f6f86 (5.1:1 on white), as elsewhere in the workspace.
   ============================================================================ */

/* ---- sidebar ----------------------------------------------------------------- */
/* 228px (was 214): room for "Communications" beside its unread badge without cutting the label. */
:root{--dn-sidebar-w:228px}
/* 15 entries + 2 section labels in ~560px: 34px rows, 2px gaps. Labels wrap instead of being cut off ("Patient Remind…"). */
.app-shell .app-sidebar nav{gap:2px!important}
.app-shell .app-sidebar nav a.nav-toplevel{min-height:34px!important;padding:7px 11px!important;font-size:13.5px!important}
.app-shell .app-sidebar nav a.nav-toplevel .nav-text{white-space:normal;overflow:visible;text-overflow:clip;line-height:1.2;flex:1 1 auto;min-width:0}
.app-shell .app-sidebar .nav-section{margin:12px 11px 4px;font-size:10.5px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#5f6f86}
.app-shell .app-sidebar .nav-section:first-of-type{margin-top:10px}
.app-shell .app-sidebar a.nav-toplevel:focus-visible{outline:2px solid #2465e9;outline-offset:2px}

/* Unread badge on Communications. */
.app-shell .nav-badge{margin-left:auto;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:#d92d20;color:#fff;
  font-size:11px;font-weight:800;line-height:20px;text-align:center;box-sizing:border-box;flex:0 0 auto}
.app-shell .app-sidebar nav a.nav-toplevel.active .nav-badge{background:#fff;color:#b42318}

/* In the icon rail the section labels become thin dividers and the badge becomes a dot on the icon. */
@media (min-width:1280px){
  .app-shell.nav-collapsed .app-sidebar .nav-section{font-size:0;height:1px;margin:8px 6px;background:#e4e9f2}
  .app-shell.nav-collapsed .nav-badge{position:absolute;margin:0;transform:translate(14px,-10px);min-width:16px;height:16px;line-height:16px;font-size:9px;padding:0 4px}
}
@media (min-width:769px) and (max-width:1279.98px){
  .app-shell:not(.nav-open) .app-sidebar .nav-section{font-size:0;height:1px;margin:8px 6px;background:#e4e9f2}
  .app-shell:not(.nav-open) .nav-badge{position:absolute;margin:0;transform:translate(14px,-10px);min-width:16px;height:16px;line-height:16px;font-size:9px;padding:0 4px}
}
.app-shell .app-sidebar nav a.nav-toplevel{position:relative}

/* ---- header ------------------------------------------------------------------ */
.app-shell .global-search{position:relative}
.app-shell .global-search:focus-within{border-color:#2465e9!important;box-shadow:0 0 0 3px rgba(36,101,233,.15)}
.app-shell .gs-results{position:absolute;left:0;right:0;top:calc(100% + 6px);z-index:90;background:#fff;border:1px solid #d5dded;
  border-radius:12px;box-shadow:0 14px 34px rgba(16,40,80,.16);padding:6px;display:grid;gap:2px;max-height:min(70vh,420px);overflow:auto}
.app-shell .gs-row{display:grid;gap:2px;padding:9px 10px;border-radius:8px;text-decoration:none;color:#142849}
.app-shell .gs-row strong{font-size:13.5px}
.app-shell .gs-row small{font-size:12px;color:#5f6f86}
.app-shell .gs-row:hover,.app-shell .gs-row.is-active{background:#eef3ff}
.app-shell .gs-row:focus-visible{outline:2px solid #2465e9;outline-offset:-2px}
.app-shell .gs-note{margin:6px 10px;font-size:13px;color:#42536e}
.app-shell .gs-more{display:block;padding:8px 10px;font-size:12.5px;font-weight:700;color:#1e4fc4;text-decoration:none;border-top:1px solid #eef1f6;margin-top:4px}
.app-shell button.top-copilot{cursor:pointer;font:inherit;font-size:12px;font-weight:800}
.app-shell button.top-copilot:focus-visible{outline:2px solid #2465e9;outline-offset:2px}
/* On laptops and desktops the header button is the Copilot's entry point; the floating launcher only shows as the close (×) while open.
   Under 769px the header button is hidden, so the floating launcher stays. */
@media (min-width:769px){
  .copilot-dock:not(.open) .copilot-dock-button{display:none}
}

/* ---- Schedule --------------------------------------------------------------- */
.app-shell .cal-filters{position:relative}
.app-shell .cal-filters>summary{list-style:none;cursor:pointer;padding:8px 14px;border:1px solid #d5dded;border-radius:9px;background:#fff;
  font-size:13px;font-weight:700;color:#24385a}
.app-shell .cal-filters>summary::-webkit-details-marker{display:none}
.app-shell .cal-filters>summary::after{content:" ▾";color:#5f6f86}
.app-shell .cal-filters[open]>summary{border-color:#2465e9;color:#1e4fc4}
.app-shell .cal-filters>summary:focus-visible{outline:2px solid #2465e9;outline-offset:2px}
.app-shell .cal-filters-body{position:absolute;right:0;top:calc(100% + 6px);z-index:30;display:grid;gap:12px;min-width:240px;padding:14px;
  background:#fff;border:1px solid #d5dded;border-radius:12px;box-shadow:0 14px 34px rgba(16,40,80,.14)}

.app-shell .cal-empty-state{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 16px;margin:0 0 12px;
  padding:12px 16px;border:1px dashed #b9c6dc;border-radius:12px;background:#f8fbff}
.app-shell .cal-empty-state p{margin:0;color:#334866}

.app-shell .cal-day-link{all:unset;cursor:pointer;font:inherit;font-weight:750;color:#142849;border-radius:4px}
.app-shell .cal-day-link:hover{color:#1e4fc4;text-decoration:underline}
.app-shell .cal-day-link:focus-visible{outline:2px solid #2465e9;outline-offset:2px}
.app-shell .cal-closed{margin:4px 0 0;font-size:12px;font-weight:700;color:#5f6f86}
.app-shell .cal-col.is-closed{background:#f7f9fd}

.app-shell .cal-slots{list-style:none;margin:6px 0 0;padding:0;display:grid;gap:4px}
.app-shell .cal-slot{display:grid;gap:4px;min-height:30px}
.app-shell .cal-grid.is-day .cal-slot{grid-template-columns:76px 1fr;align-items:start;column-gap:12px;border-top:1px solid #eef1f6;padding-top:4px}
.app-shell .cal-grid.is-day .cal-slot>:not(.cal-slot-time){grid-column:2}
.app-shell .cal-slot-time{font-size:12px;color:#5f6f86;font-variant-numeric:tabular-nums;padding-top:6px}
.app-shell .cal-slot.is-unavailable{min-height:0}
.app-shell .cal-grid.is-week .cal-slot.is-unavailable{min-height:30px}
.app-shell .cal-slot-book{width:100%;min-height:30px;padding:5px 8px;border:1px dashed transparent;border-radius:8px;background:transparent;
  color:#5f6f86;font:inherit;font-size:12px;font-weight:600;text-align:left;cursor:pointer}
.app-shell .cal-slot-book:hover{border-color:#9db3e6;background:#f2f6ff;color:#1e4fc4}
.app-shell .cal-slot-book:focus-visible{outline:2px solid #2465e9;outline-offset:1px;color:#1e4fc4;border-color:#9db3e6;background:#f2f6ff}
.app-shell .cal-slot-book:disabled{cursor:not-allowed;opacity:.55}
.app-shell .cal-grid.is-day .cal-slot-book{color:#5f6f86}

.app-shell .cal-confirm{margin-top:10px;padding:12px 14px;border:1px solid #f4c7c3;border-radius:12px;background:#fff6f5;width:100%;box-sizing:border-box}
.app-shell .cal-confirm h4{margin:0 0 4px;font-size:14px;color:#7a1d14}
.app-shell .cal-confirm p{margin:0 0 10px;font-size:13px;color:#42536e}
.app-shell .cal-confirm-actions{display:flex;flex-wrap:wrap;gap:8px}
.app-shell .danger-action{color:#b42318!important;border-color:#f4c7c3!important}
.app-shell .cal-confirm .danger-action{background:#b42318!important;color:#fff!important;border:1px solid #b42318!important;border-radius:10px;padding:8px 14px;font-weight:700;cursor:pointer}

/* ---- patient record ----------------------------------------------------------- */
.app-shell .record-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 14px;padding:10px 12px;background:#fff;
  border:1px solid #e4e9f2;border-radius:12px}
.app-shell .record-actions .secondary-action:disabled{opacity:.55;cursor:not-allowed}
.app-shell .record-actions-note{flex-basis:100%;font-size:12px;color:#5f6f86}

/* ---- Communications -------------------------------------------------------- */
.app-shell .cx-quiet-link{align-self:center;font-size:12.5px;font-weight:600;color:#1e4fc4}
.app-shell .cx-patient-link{color:inherit;text-decoration:none}
.app-shell .cx-patient-link:hover,.app-shell .cx-patient-link:focus-visible{text-decoration:underline;color:#1e4fc4}

/* ---- AI receptionist & reminders tabs -------------------------------------- */
.app-shell .ai-hub-tabs{display:flex;flex-wrap:wrap;gap:4px;margin:0 0 16px;padding:4px;background:#eef2f9;border-radius:12px;width:max-content;max-width:100%;box-sizing:border-box}
.app-shell .ai-hub-tabs a{padding:7px 13px;border-radius:9px;font-size:13px;font-weight:700;color:#334866;text-decoration:none}
.app-shell .ai-hub-tabs a:hover{background:#fff;color:#1e4fc4}
.app-shell .ai-hub-tabs a.is-current{background:#fff;color:#142849;box-shadow:0 1px 3px rgba(16,40,80,.12)}
.app-shell .ai-hub-tabs a:focus-visible{outline:2px solid #2465e9;outline-offset:1px}
@media (max-width:768px){.app-shell .ai-hub-tabs{width:100%;overflow-x:auto;flex-wrap:nowrap}.app-shell .ai-hub-tabs a{white-space:nowrap}}

/* ---- AI Receptionist home (/app/ivoice) -------------------------------------- */
/* One card: status, the next step in plain words, one button. Sized so the button sits above the fold on a 1366x650 laptop. */
.app-shell .rcp-home-heading{margin-bottom:12px}
.app-shell .rcp-home-card{background:#fff;border:1px solid #d5dded;border-radius:14px;padding:20px 22px;margin:0 0 16px;box-shadow:0 1px 3px rgba(16,40,80,.06);max-width:860px}
.app-shell .rcp-home-card h2{margin:6px 0 6px;font-size:20px;line-height:1.25;color:#142849}
.app-shell .rcp-home-status{margin:0;display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.app-shell .rcp-home-pill{display:inline-block;padding:3px 10px;border-radius:999px;font-size:12px;font-weight:800;letter-spacing:.02em;background:#eef2f9;color:#334866}
.app-shell .rcp-home-pill.is-setup{background:#eef3ff;color:#1e4fc4}
.app-shell .rcp-home-pill.is-progress{background:#fff6e5;color:#8a4b00}
.app-shell .rcp-home-pill.is-attention{background:#fff1f0;color:#b42318}
.app-shell .rcp-home-pill.is-on{background:#e8f7ee;color:#11633a}
.app-shell .rcp-home-detail{margin:0 0 14px;color:#334866;font-size:14.5px;max-width:64ch}
.app-shell .rcp-home-muted{color:#5f6f86;font-size:13px;margin:0}
.app-shell .rcp-home-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.app-shell .rcp-home-primary{font-size:15px;padding:10px 18px}
.app-shell .rcp-home-primary:focus-visible{outline:2px solid #2465e9;outline-offset:2px}
.app-shell .rcp-home-note{margin:0;color:#42536e;font-size:13.5px}
.app-shell .rcp-home-steps{list-style:none;margin:18px 0 0;padding:14px 0 0;border-top:1px solid #eef1f6;display:grid;gap:10px}
.app-shell .rcp-home-steps li{display:grid;grid-template-columns:28px 1fr;gap:10px;align-items:start}
.app-shell .rcp-home-steps li>div{display:grid;gap:2px}
.app-shell .rcp-home-steps a{color:#24385a;text-decoration:none}
.app-shell .rcp-home-steps a:hover,.app-shell .rcp-home-steps a:focus-visible{text-decoration:underline;color:#1e4fc4}
.app-shell .rcp-home-steps small{color:#5f6f86;font-size:12.5px}
.app-shell .rcp-home-dot{width:26px;height:26px;border-radius:50%;display:grid;place-items:center;font-size:12px;font-weight:800;border:1.5px solid #c3cfe3;color:#5f6f86;background:#fff}
.app-shell .rcp-home-steps li.is-done .rcp-home-dot{background:#e8f7ee;border-color:#9fd8b6;color:#11633a}
.app-shell .rcp-home-steps li.is-current .rcp-home-dot{background:#2465e9;border-color:#2465e9;color:#fff}
.app-shell .rcp-home-steps li.is-current strong{color:#142849}
.app-shell .rcp-home-live{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:14px 24px}
.app-shell .rcp-home-number{font-size:28px!important;letter-spacing:.01em;font-variant-numeric:tabular-nums;margin:6px 0 4px!important}
.app-shell .rcp-home-test{margin-top:16px;padding-top:16px;border-top:1px solid #eef1f6}
.app-shell .rcp-home-views{display:flex;flex-wrap:wrap;gap:4px;margin:0 0 14px;border-bottom:1px solid #e4e9f2}
.app-shell .rcp-home-views a{padding:8px 14px;font-size:13.5px;font-weight:700;color:#42536e;text-decoration:none;border-bottom:2px solid transparent;margin-bottom:-1px}
.app-shell .rcp-home-views a.is-current{color:#142849;border-bottom-color:#2465e9}
.app-shell .rcp-home-views a:hover{color:#1e4fc4}
.app-shell .rcp-home-views a:focus-visible{outline:2px solid #2465e9;outline-offset:1px}
.app-shell .ivoice-calls a{color:inherit;text-decoration:none}
.app-shell .ivoice-calls a:hover strong,.app-shell .ivoice-calls a:focus-visible strong{text-decoration:underline;color:#1e4fc4}
@media (max-width:640px){.app-shell .rcp-home-card{padding:16px}.app-shell .rcp-home-primary{width:100%;text-align:center}}
.app-shell a.rcp-home-primary,.app-shell a.rcp-home-primary:hover{text-decoration:none}

/* ---- Settings: five sections (2026-11-12) ------------------------------------- */
/* Short side panel (sections only); the selected section's options are tabs above the form. Under 900px the panel becomes a
   labeled select. */
.app-shell .set-layout{display:grid;grid-template-columns:232px minmax(0,1fr);gap:20px;align-items:start}
.app-shell .set-picker{display:none}
.app-shell .set-nav{position:sticky;top:76px;display:grid;gap:4px;padding:8px;background:#fff;border:1px solid #e4e9f2;border-radius:14px}
.app-shell .set-nav-row{display:flex;align-items:center;gap:12px;min-height:46px;padding:0 12px;border-radius:10px;color:#24385a;
  text-decoration:none;font-weight:650;box-sizing:border-box;width:100%}
.app-shell .set-nav-label{font-size:15px;line-height:1.25;flex:1 1 auto}
.app-shell .set-nav-icon{display:grid;place-items:center;width:22px;height:22px;color:#5f6f86;flex:0 0 auto}
.app-shell .set-nav-icon svg{width:20px;height:20px}
.app-shell .set-nav-out{color:#5f6f86;font-size:13px}
.app-shell .set-nav-row:hover{background:#f2f6ff;color:#1e4fc4}
.app-shell .set-nav-row:hover .set-nav-icon{color:#1e4fc4}
.app-shell .set-nav-row:focus-visible{outline:3px solid #2465e9;outline-offset:1px}
.app-shell .set-nav-row.is-current{background:#e8efff;color:#123a9c;box-shadow:inset 3px 0 0 #2465e9}
.app-shell .set-nav-row.is-current .set-nav-icon{color:#1e4fc4}
.app-shell .set-content{min-width:0}
.app-shell .set-subnav{display:flex;flex-wrap:wrap;gap:4px;margin:0 0 14px;border-bottom:1px solid #e4e9f2}
.app-shell .set-subnav a{padding:10px 14px;font-size:14.5px;font-weight:700;color:#42536e;text-decoration:none;border-bottom:3px solid transparent;margin-bottom:-1px}
.app-shell .set-subnav a:hover{color:#1e4fc4}
.app-shell .set-subnav a.is-current{color:#142849;border-bottom-color:#2465e9}
.app-shell .set-subnav a:focus-visible{outline:3px solid #2465e9;outline-offset:-3px;border-radius:6px}
.app-shell .set-pointer{margin:0 0 14px;padding:10px 14px;border:1px solid #d5dded;border-radius:10px;background:#f8fbff;font-size:13.5px;color:#334866}
.app-shell .set-claims{margin:6px 0 12px;border:1px solid #e4e9f2;border-radius:12px;background:#fbfcfe}
.app-shell .set-claims>summary{cursor:pointer;padding:12px 14px;font-weight:750;color:#24385a;list-style-position:inside}
.app-shell .set-claims>summary:focus-visible{outline:3px solid #2465e9;outline-offset:2px;border-radius:10px}
.app-shell .set-claims[open]>summary{border-bottom:1px solid #e4e9f2}
.app-shell .set-claims>.form-grid{padding:14px}
@media (max-width:900px){
  .app-shell .set-layout{grid-template-columns:1fr;gap:12px}
  .app-shell .set-nav{display:none}
  .app-shell .set-picker{display:grid;gap:6px}
  .app-shell .set-picker label{font-size:13px;font-weight:750;color:#24385a}
  .app-shell .set-picker select{min-height:46px;font-size:16px;padding:0 12px;border:1px solid #c3cfe3;border-radius:10px;background:#fff}
  .app-shell .set-subnav{overflow-x:auto;flex-wrap:nowrap}
  .app-shell .set-subnav a{white-space:nowrap}
}
/* Read-only settings (staff who can view but not change them) look read-only. */
.app-shell .set-content input:disabled,.app-shell .set-content textarea:disabled,.app-shell .set-content select:disabled{background:#f4f6fa!important;color:#42536e!important;border-color:#e1e7f0!important;cursor:not-allowed}

/* ---- AI & Automation (/app/ai-agents, 2026-11-12) ---------------------------- */
.app-shell .aiw-list{list-style:none;margin:0;padding:0;display:grid;gap:12px;max-width:1040px}
.app-shell .aiw-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px 24px;align-items:start;padding:18px 20px;background:#fff;
  border:1px solid #e4e9f2;border-radius:14px}
.app-shell .aiw-row[data-status=attention],.app-shell .aiw-row[data-status=setup]{border-left:4px solid #f0b54a}
.app-shell .aiw-row[data-status=on]{border-left:4px solid #3fae6f}
.app-shell .aiw-body h2{margin:0 0 4px;font-size:17px;color:#142849}
.app-shell .aiw-desc{margin:0 0 8px;color:#42536e;font-size:14px;max-width:70ch}
.app-shell .aiw-line{margin:0;display:flex;flex-wrap:wrap;align-items:center;gap:8px;font-size:13.5px;color:#334866}
.app-shell .aiw-reason{margin:8px 0 0;font-size:13.5px;color:#7a3d00;max-width:60ch}
.app-shell .aiw-actions{display:flex;flex-direction:column;align-items:flex-end;gap:8px;min-width:180px}
.app-shell .aiw-actions .aiw-reason{text-align:right;margin:0;max-width:34ch}
.app-shell .aiw-main{min-height:40px;display:inline-flex;align-items:center;justify-content:center;text-decoration:none}
.app-shell .aiw-main:focus-visible,.app-shell .aiw-test:focus-visible,.app-shell .aiw-link:focus-visible{outline:3px solid #2465e9;outline-offset:2px}
.app-shell .aiw-controls{list-style:none;margin:12px 0 0;padding:0;border-top:1px solid #eef1f6;display:grid}
.app-shell .aiw-control{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px 16px;padding:10px 0;border-bottom:1px solid #eef1f6}
.app-shell .aiw-control:last-child{border-bottom:0}
.app-shell .aiw-control h3{margin:0 0 3px;font-size:14.5px;color:#24385a}
.app-shell .aiw-control p{margin:0;display:flex;flex-wrap:wrap;gap:8px;align-items:center;font-size:13px;color:#42536e}
.app-shell .aiw-control-actions{display:flex;align-items:center;gap:14px}
.app-shell .aiw-switch input:focus-visible+span{outline:3px solid #2465e9;outline-offset:2px}
.app-shell .aiw-attention{align-self:center;display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;background:#fff1f0;
  color:#b42318;font-weight:800;font-size:13px;text-decoration:none;border:1px solid #f4c7c3}
.app-shell .aiw-attention:focus-visible{outline:3px solid #2465e9;outline-offset:2px}
.app-shell .aiw-foot{margin:18px 0 0;display:flex;flex-wrap:wrap;gap:8px;font-size:13.5px;color:#5f6f86}
.app-shell .aiw-back{margin:0 0 6px;font-size:13.5px}
@media (max-width:760px){.app-shell .aiw-row{grid-template-columns:1fr}.app-shell .aiw-actions{align-items:stretch;min-width:0}.app-shell .aiw-actions .aiw-reason{text-align:left}}
.app-shell .aiw-control{flex-wrap:nowrap}
.app-shell .aiw-control-main{flex:1 1 auto;min-width:0}
.app-shell .aiw-control-actions{flex:0 0 auto}
@media (max-width:760px){.app-shell .aiw-control{flex-wrap:wrap}}

/* ---- Plan & billing: self-service upgrades (2026-11-12) ------------------------ */
.app-shell .sub-upgrade{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px 20px;margin:0 0 14px;padding:14px 16px;
  border-radius:12px;border:1px solid #d5dded;background:#f8fbff}
.app-shell .sub-upgrade>div:first-of-type{display:grid;gap:3px;flex:1 1 320px}
.app-shell .sub-upgrade small{color:#42536e;font-size:13.5px}
.app-shell .sub-upgrade.is-pending{border-color:#bcd0f7;background:#f2f6ff}
.app-shell .sub-upgrade.is-done{border-color:#9fd8b6;background:#effaf3}
.app-shell .sub-upgrade.is-problem{border-color:#f4c7c3;background:#fff6f5}
.app-shell .sub-upgrade-actions{display:flex;gap:10px;flex-wrap:wrap}
.app-shell .sub-quote{display:grid;gap:0;margin:0 0 14px;border:1px solid #e4e9f2;border-radius:12px;overflow:hidden}
.app-shell .sub-quote>div{display:flex;justify-content:space-between;gap:16px;padding:10px 14px;border-bottom:1px solid #eef1f6}
.app-shell .sub-quote>div:last-child{border-bottom:0}
.app-shell .sub-quote dt{color:#42536e;font-size:13.5px}
.app-shell .sub-quote dd{margin:0;font-weight:800;color:#142849;text-align:right}
.app-shell .sub-quote dd small{display:block;font-weight:500;color:#5f6f86;font-size:12px}
.app-shell .sub-quote>div:first-child{background:#f8fbff}
.app-shell .sub-quote>div:first-child dd{font-size:18px}

/* Patients: Active | Archived filter, Actions column, archive dialog (2026-11-13) */
.app-shell .pt-filter{display:flex;gap:6px;margin:0 0 12px}
.app-shell .pt-filter-chip{display:inline-flex;align-items:center;min-height:34px;padding:0 14px;border:1px solid #d6dde8;border-radius:999px;color:#344054;font-weight:600;font-size:14px;text-decoration:none;background:#fff}
.app-shell .pt-filter-chip:hover{border-color:#9fb0c8}
.app-shell .pt-filter-chip.active{background:#eef3ff;border-color:#3157f6;color:#1d3fcf}
.app-shell .pt-filter-chip:focus-visible,.app-shell .pt-action:focus-visible{outline:3px solid #9cb3ff;outline-offset:2px}
.app-shell .data-table th.pt-actions-col{text-align:right;white-space:nowrap}
.app-shell .data-table td.pt-actions{text-align:right;white-space:nowrap}
.app-shell .pt-action{display:inline-flex;align-items:center;justify-content:center;min-height:32px;min-width:64px;padding:0 12px;margin-left:6px;border:1px solid #d0d7e2;border-radius:8px;background:#fff;color:#1f2a44;font-size:14px;font-weight:600;text-decoration:none;cursor:pointer;line-height:1}
.app-shell .pt-action:hover{background:#f5f7fb;border-color:#9fb0c8}
.app-shell .pt-action.pt-delete{color:#b42318;border-color:#f4c7c3}
.app-shell .pt-action.pt-delete:hover{background:#fef3f2}
.app-shell .pt-action.pt-restore{color:#1d3fcf;border-color:#b9c8ff}
.app-shell .pt-action:disabled{opacity:.6;cursor:default}
.app-shell .pt-archive-card{max-width:560px}
.app-shell .pt-kept-title{margin:12px 0 4px;font-weight:600;color:#344054}
.app-shell .pt-kept{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px 16px;margin:0 0 12px;padding-left:18px;color:#5f6f86}
.app-shell .pt-upcoming ul{margin:6px 0 8px;padding-left:18px}
.app-shell .pt-upcoming li{margin:2px 0}
.app-shell .pt-upcoming li a{margin-left:6px}
.app-shell .pt-upcoming small{display:block;margin-top:4px}
@media (max-width:640px){
  .app-shell .data-table td.pt-actions{white-space:normal}
  .app-shell .pt-action{margin:2px 0 2px 4px}
  .app-shell .pt-kept{grid-template-columns:1fr}
}
.app-shell .pt-archive-card .pt-archive-btn{background:#b42318;border:1px solid #b42318;color:#fff;font-weight:700;padding:10px 16px;border-radius:9px;cursor:pointer}
.app-shell .pt-archive-card .pt-archive-btn:hover:not(:disabled){background:#912018;border-color:#912018}
.app-shell .pt-archive-card .pt-archive-btn:disabled{background:#e8a29b;border-color:#e8a29b;cursor:default}
.app-shell .pt-archive-card .pt-archive-btn:focus-visible{outline:3px solid #f4c7c3;outline-offset:2px}
@media (max-width:640px){
  /* phones: name + actions only, so Edit and Delete are always on screen (the record has the rest) */
  .app-shell .data-table .pt-hide-sm{display:none}
  .app-shell .data-table:has(.pt-actions){min-width:0;width:100%}
}

/* Communications → Missed-call texting (2026-11-13) */
.mct-preview{background:#f5f8ff;border:1px solid #dbe4ff;border-radius:12px;padding:10px 12px}
.mct-preview small{display:block;color:#5f6f86;font-weight:600;margin-bottom:4px}
.mct-preview p{margin:0}
.mct-rules{margin:0;padding-left:18px;color:#344054;display:grid;gap:4px}
.mct-toggle{font-weight:600}

/* Schedule → Fill this opening; Request insurance card (2026-11-13) */
.app-shell .cal-openings{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 12px;padding:10px 12px;background:#f5f8ff;border:1px solid #dbe4ff;border-radius:12px}
.app-shell .cal-opening-chip{border:1px solid #b9c8ff;background:#fff;color:#1d3fcf;border-radius:999px;padding:5px 12px;font-size:13px;font-weight:600;cursor:pointer}
.app-shell .cal-opening-chip.is-filled,.app-shell .cal-opening-chip.is-filledbyoffice{color:#0d6b4a;border-color:#a8e0c6}
.app-shell .appt-wants-earlier{display:inline-flex;align-items:center;gap:6px;font-size:14px}
.app-shell .fo-card,.app-shell .crq-card{width:min(600px,94vw)}
.app-shell .fo-slot{font-size:15px;color:#10213f}
.app-shell .fo-h{font-size:14px;margin:6px 0 0;color:#344054}
.app-shell .fo-list,.app-shell .fo-offers{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.app-shell .fo-list li{border:1px solid #e4e9f2;border-radius:10px;padding:8px 10px}
.app-shell .fo-list small{display:block;margin-top:2px}
.app-shell .fo-tag{color:#1d3fcf}
.app-shell .fo-why{color:#a3271d}
.app-shell .crq-pending{display:flex;flex-wrap:wrap;gap:6px 14px;align-items:center}
.app-shell .crq-pending-list{display:flex;flex-wrap:wrap;gap:6px 12px}
/* .alert-info was used (Schedule booking outlook, card review, openings) but never defined */
.app-shell .alert-info{background:#eef4ff;color:#1e3a8a;border:1px solid #c7d7fe;border-radius:12px;padding:12px 14px}

/* Plan & billing: scheduled lower-priced plan (2026-11-13) */
.app-shell .sub-upgrade.is-scheduled{background:#f5f8ff;border-color:#c7d7fe}
.app-shell .sub-change-summary{font-size:15px;color:#10213f;margin:0 0 6px}
.app-shell .sub-change-h{font-size:14px;margin:10px 0 4px;color:#344054}
.app-shell .sub-number{border:1px solid #f3dfae;background:#fffbf0;border-radius:12px;padding:10px 14px;margin:10px 0;display:grid;gap:8px}
.app-shell .sub-number legend{font-weight:700;padding:0 4px}
.app-shell .sub-number p{margin:0}
.app-shell .sub-number .check{align-items:flex-start}
.app-shell .sub-number-agree{margin-left:24px;font-weight:600}

/* ---- AI Receptionist → Scripts & Test (2026-11-13) ---- */
.app-shell .scr-back { display: inline-block; margin-bottom: 6px; font-size: 14px; }
.app-shell .scr-lang { display: inline-flex; gap: 4px; padding: 4px; margin: 4px 0 14px; background: #eef2f8; border-radius: 10px; }
.app-shell .scr-lang a { padding: 7px 16px; border-radius: 8px; font-weight: 600; color: #334155; text-decoration: none; min-height: 36px; display: inline-flex; align-items: center; }
.app-shell .scr-lang a.is-current { background: #fff; color: #1d4ed8; box-shadow: 0 1px 2px rgba(15, 23, 42, .12); }
.app-shell .scr-lang a:focus-visible { outline: 3px solid #93c5fd; outline-offset: 1px; }
.app-shell .scr-status { display: grid; gap: 12px; margin-bottom: 16px; }
.app-shell .scr-status-row { display: flex; gap: 12px; align-items: flex-start; }
.app-shell .scr-status-row p { margin: 2px 0 0; }
.app-shell .scr-pill { flex: none; display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .02em; min-width: 92px; text-align: center; }
.app-shell .scr-pill.is-live { background: #dcfce7; color: #166534; }
.app-shell .scr-pill.is-draft { background: #fef3c7; color: #92400e; }
.app-shell .scr-pill.is-none { background: #f1f5f9; color: #5f6f86; }
.app-shell .scr-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; border-top: 1px solid #e2e8f0; padding-top: 12px; }
.app-shell .scr-confirm { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px; border: 1px solid #fcd34d; background: #fffbeb; border-radius: 10px; }
.app-shell .scr-confirm p { flex: 1 1 100%; margin: 0 0 4px; }
.app-shell .scr-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.app-shell .scr-side { display: grid; gap: 16px; }
.app-shell .scr-script h2, .app-shell .scr-test h2, .app-shell .scr-facts h2 { margin-top: 0; font-size: 18px; }
.app-shell .scr-example { margin: 12px 0 18px; padding: 12px 14px; background: #f0f7ff; border-left: 4px solid #3b82f6; border-radius: 8px; }
.app-shell .scr-example span { display: block; font-size: 12px; font-weight: 700; color: #1e40af; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.app-shell .scr-example q { font-size: 16px; color: #0f172a; }
.app-shell .scr-part { padding: 12px 0; border-top: 1px solid #eef2f7; }
.app-shell .scr-part label { display: block; }
.app-shell .scr-part p.conn-note { margin: 2px 0 6px; }
.app-shell .scr-part textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 15px; line-height: 1.5; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 8px; resize: vertical; }
.app-shell .scr-part textarea:focus { outline: 3px solid #bfdbfe; border-color: #3b82f6; }
.app-shell .scr-count { display: block; text-align: right; color: #5f6f86; font-size: 12px; }
.app-shell .scr-text { margin: 4px 0 0; padding: 10px 12px; background: #f8fafc; border-radius: 8px; white-space: pre-wrap; }
.app-shell .scr-default { margin-top: 6px; font-size: 14px; }
.app-shell .scr-default summary { cursor: pointer; color: #1d4ed8; }
.app-shell .scr-default p { margin: 6px 0 0; color: #475569; white-space: pre-wrap; }
.app-shell .scr-advanced { margin-top: 12px; }
.app-shell .scr-steps { margin: 8px 0 14px; padding-left: 20px; }
.app-shell .scr-steps li { margin-bottom: 6px; }
.app-shell .scr-test input[type=tel] { width: 100%; box-sizing: border-box; font-size: 16px; padding: 10px 12px; margin: 6px 0 4px; border: 1px solid #cbd5e1; border-radius: 8px; }
.app-shell .scr-test .primary-btn { width: 100%; margin-top: 8px; }
.app-shell .scr-call { display: grid; gap: 2px; margin-top: 12px; padding: 12px; border-radius: 10px; border: 1px solid #cbd5e1; background: #f8fafc; }
.app-shell .scr-call.is-calling { border-color: #93c5fd; background: #eff6ff; }
.app-shell .scr-call.is-completed { border-color: #86efac; background: #f0fdf4; }
.app-shell .scr-call.is-failed { border-color: #fca5a5; background: #fef2f2; }
.app-shell .scr-recent-h { font-size: 15px; margin: 18px 0 6px; }
.app-shell .scr-recent { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.app-shell .scr-recent li { display: flex; flex-wrap: wrap; gap: 4px 10px; padding: 6px 0; border-top: 1px solid #eef2f7; }
.app-shell .scr-recent-state.is-completed { color: #166534; }
.app-shell .scr-recent-state.is-failed { color: #b91c1c; }
.app-shell .scr-facts dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 12px; margin: 8px 0; font-size: 14px; }
.app-shell .scr-facts dt { color: #5f6f86; }
.app-shell .scr-facts dd { margin: 0; overflow-wrap: anywhere; }
.app-shell .scr-fact-links { font-size: 14px; margin: 8px 0 0; }
.app-shell .scr-diff { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 12px; }
.app-shell .scr-diff-row { display: grid; gap: 2px; margin-top: 4px; padding: 8px 10px; border-radius: 8px; background: #f8fafc; }
.app-shell .scr-diff-row.is-new { background: #f0fdf4; }
.app-shell .scr-diff-row p { margin: 0; white-space: pre-wrap; }
.app-shell .scr-diff-tag { font-size: 12px; font-weight: 700; color: #5f6f86; }
@media (max-width: 900px) {
    .app-shell .scr-layout { grid-template-columns: 1fr; }
    .app-shell .scr-actions > button { flex: 1 1 calc(50% - 8px); }
}
.app-shell .scr-actions .primary-btn, .app-shell .scr-actions .secondary-action,
.app-shell .scr-confirm .primary-btn, .app-shell .scr-confirm .secondary-action { min-height: 40px; padding: 8px 16px; font-size: 14px; border-radius: 8px; }

/* Scripts & Test: script library selector, two kinds of phone test, booking result (2026-11-14) */
.app-shell .scr-choose-row { display: grid; gap: 6px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid #eef2f7; }
.app-shell .scr-choose-row select { font-size: 16px; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; max-width: 100%; }
.app-shell .scr-part-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 10px; font-size: 14px; }
.app-shell .scr-part-status .scr-pill { min-width: 0; }
.app-shell .scr-mode { display: grid; gap: 8px; margin: 10px 0 12px; }
.app-shell .scr-mode-option { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 10px; cursor: pointer; }
.app-shell .scr-mode-option.is-on { border-color: #3b82f6; background: #eff6ff; }
.app-shell .scr-mode-option.is-off { opacity: .65; cursor: default; }
.app-shell .scr-mode-option input { margin-top: 4px; }
.app-shell .scr-mode-option small { display: block; color: #475569; font-size: 13px; margin-top: 2px; }
.app-shell .scr-test select#scr-booking-number { width: 100%; font-size: 16px; padding: 10px 12px; margin: 6px 0 4px; border: 1px solid #cbd5e1; border-radius: 8px; }
.app-shell .scr-booking-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 10px; margin: 8px 0 0; font-size: 14px; }
.app-shell .scr-booking-facts dt { color: #5f6f86; }
.app-shell .scr-booking-facts dd { margin: 0; overflow-wrap: anywhere; }
.app-shell .scr-booking-facts a { margin-left: 4px; }
.app-shell .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.app-shell .scr-section-h { font-size: 20px; margin: 4px 0 8px; }
.app-shell .scr-viewing { margin: -4px 0 10px; font-size: 14px; color: #334155; }

/* Plan & billing: what a plan includes; used and left this period (2026-11-14) */
.app-shell .plan-includes-price { margin: 0 0 10px; font-size: 15px; }
.app-shell .plan-includes-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; }
.app-shell .plan-includes h4 { margin: 0 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: #5f6f86; }
.app-shell .plan-includes-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-size: 14px; }
.app-shell .plan-includes-list li { display: flex; gap: 8px; align-items: baseline; }
.app-shell .plan-includes-list li.is-included > span:first-child { color: #15803d; font-weight: 700; }
.app-shell .plan-includes-list li.is-notincluded { color: #5f6f86; }
.app-shell .plan-includes-chip { margin-left: 4px; padding: 1px 8px; border-radius: 999px; background: #fef3c7; color: #92400e; font-size: 12px; font-weight: 700; }
.app-shell .plan-includes-allowances { display: grid; grid-template-columns: max-content 1fr; gap: 5px 12px; margin: 0; font-size: 14px; }
.app-shell .plan-includes-allowances dt { color: #5f6f86; }
.app-shell .plan-includes-allowances dd { margin: 0; font-weight: 600; }
.app-shell .plan-usage-h { font-size: 18px; margin: 18px 0 8px; }
.app-shell .plan-left { margin: 2px 0 6px; font-size: 14px; color: #334155; }
@media (max-width: 720px) { .app-shell .plan-includes-grid { grid-template-columns: 1fr; } }

/* ---- AI & Automation tabs: underline style; Scripts & Testing two-card workspace (2026-11-14) ---- */
.app-shell .ai-hub-tabs{display:flex;flex-wrap:wrap;gap:0 4px;width:100%;margin:0 0 22px;padding:0;background:none;border-radius:0;border-bottom:1px solid #e2e8f0}
.app-shell .ai-hub-tabs a{position:relative;padding:10px 14px 12px;border-radius:0;font-size:14px;font-weight:600;color:#475569;background:none;box-shadow:none}
.app-shell .ai-hub-tabs a:hover{background:none;color:#1d4ed8}
.app-shell .ai-hub-tabs a.is-current{background:none;box-shadow:none;color:#1d4ed8}
.app-shell .ai-hub-tabs a.is-current::after{content:"";position:absolute;left:10px;right:10px;bottom:-1px;height:3px;border-radius:3px 3px 0 0;background:#2563eb}
.app-shell .ai-hub-tabs a:focus-visible{outline:2px solid #2563eb;outline-offset:-2px;border-radius:6px}

.app-shell .scr-cards{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(0,1fr);gap:20px;align-items:stretch;margin-top:4px}
.app-shell .scr-card{display:flex;flex-direction:column;gap:14px;padding:22px 24px;margin:0;border:1px solid #e2e8f0;border-radius:14px;background:#fff;box-shadow:0 1px 2px rgba(15,23,42,.05)}
.app-shell .scr-card-head{min-height:38px;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 12px}
.app-shell .scr-card .scr-section-h,.app-shell .scr-editor .scr-section-h{margin:0;font-size:18px;font-weight:700;color:#0f172a}
.app-shell .scr-editor .scr-section-h small{font-size:13px;font-weight:500;color:#5f6f86}
.app-shell .scr-card .scr-lang{margin:0;padding:3px;border-radius:9px}
.app-shell .scr-card .scr-lang a{padding:5px 14px;min-height:32px;font-size:13px}
.app-shell .scr-card .scr-choose-row{margin:0;padding:0;border:0;gap:6px}
.app-shell .scr-card .scr-choose-row label,.app-shell .scr-field-label{font-size:13px;font-weight:600;color:#334155}
.app-shell .scr-card .scr-choose-row select{width:100%;font-size:15px;padding:10px 12px;border-radius:10px}
.app-shell .scr-card .scr-choose-row small{font-size:13px;color:#5f6f86}
.app-shell .scr-state{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0;font-size:13px;color:#475569}
.app-shell .scr-state .scr-pill{min-width:0;padding:2px 10px}
.app-shell .scr-card .scr-example{margin:0;padding:14px 16px;border-left:0;border:1px solid #dbe7fb;border-radius:12px;background:#f5f9ff}
.app-shell .scr-card .scr-example figcaption{display:block;margin-bottom:6px;font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:#1e40af}
.app-shell .scr-card .scr-example q{display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;font-size:15px;line-height:1.55;color:#0f172a}
.app-shell .scr-card-foot{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px;margin-top:auto}
.app-shell .scr-card-foot .primary-btn{min-height:42px;padding:9px 20px;border-radius:10px;font-size:14px}
.app-shell .scr-quiet-link{font-size:13px;color:#475569}
.app-shell .scr-test-uses{font-size:12px;font-weight:600;color:#5f6f86}
.app-shell .scr-card .scr-mode{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0}
.app-shell .scr-card .scr-mode-option{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:4px;padding:14px;border:1.5px solid #e2e8f0;border-radius:12px;background:#fff;cursor:pointer}
.app-shell .scr-card .scr-mode-option input{position:absolute;opacity:0;width:1px;height:1px;margin:0}
.app-shell .scr-card .scr-mode-option:has(input:focus-visible){outline:3px solid #93c5fd;outline-offset:1px}
.app-shell .scr-card .scr-mode-option.is-on{border-color:#2563eb;background:#f5f9ff}
.app-shell .scr-card .scr-mode-option.is-on::after{content:"";position:absolute;top:12px;right:12px;width:10px;height:10px;border-radius:50%;background:#2563eb;box-shadow:0 0 0 3px #fff,0 0 0 5px #2563eb}
.app-shell .scr-card .scr-mode-option.is-off{opacity:.6;cursor:default}
.app-shell .scr-mode-icon{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;margin-bottom:4px;border-radius:9px;background:#eaf1fe;color:#2563eb}
.app-shell .scr-card .scr-mode-option strong{font-size:14px;color:#0f172a}
.app-shell .scr-card .scr-mode-option small{margin:0;font-size:12.5px;font-weight:400;line-height:1.4;color:#5f6f86}
.app-shell .scr-mode-line{margin:0;font-size:13.5px;line-height:1.5;color:#334155}
.app-shell .scr-card.scr-test input[type=tel],.app-shell .scr-card.scr-test select#scr-booking-number{margin:-8px 0 0;font-size:15px;border-radius:10px}
.app-shell .scr-card.scr-test .scr-call-btn{width:100%;min-height:44px;margin:0;border-radius:10px;font-size:15px}
.app-shell .scr-plan-note{margin:-4px 0 0;font-size:12.5px;color:#5f6f86}
.app-shell .scr-card .scr-call{margin-top:0}
.app-shell .scr-editor{margin:20px 0 0;padding:22px 24px;border:1px solid #bfd3fb;border-radius:14px;background:#fff;display:grid;gap:10px}
.app-shell .scr-editor .scr-part{border-top:0;padding:0}
.app-shell .scr-editor .scr-actions{border-top:1px solid #e2e8f0;padding-top:14px}
.app-shell .scr-more{display:grid;gap:10px;margin-top:20px}
.app-shell .scr-more-item{margin:0;padding:14px 18px;border:1px solid #e2e8f0;border-radius:12px}
.app-shell .scr-more-item > summary{cursor:pointer;font-size:14px;font-weight:600;color:#334155;margin:0}
.app-shell .scr-more-item[open] > summary{margin-bottom:8px}
@media (max-width: 1100px){
    .app-shell .scr-cards{grid-template-columns:1fr}
}
@media (max-width: 480px){
    .app-shell .scr-card{padding:18px 16px}
    .app-shell .scr-card .scr-mode{grid-template-columns:1fr}
    .app-shell .ai-hub-tabs{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
    .app-shell .ai-hub-tabs a{white-space:nowrap;padding:10px 11px 12px}
}

/* Communications: Automatic text booking (header), Advanced settings group, thread appointment status (2026-11-15) */
.app-shell .cx-booking-setup{display:flex;flex-direction:column;align-items:flex-start;gap:4px;max-width:440px}
.app-shell .ab-control{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:6px 8px 6px 12px;border:1px solid #dbe3ef;border-radius:12px;background:#fff}
.app-shell .ab-label{font-weight:600;font-size:13.5px;color:#0f172a}
.app-shell .ab-pill{font-size:12px;font-weight:700;padding:2px 9px;border-radius:999px;background:#eef2f7;color:#475569}
.app-shell .ab-pill.ab-on{background:#dcfce7;color:#166534}
.app-shell .ab-pill.ab-needssetup,.app-shell .ab-pill.ab-paused{background:#fef3c7;color:#92400e}
.app-shell .ab-control .primary-btn{padding:6px 14px;font-size:13px;min-height:34px}
.app-shell .ab-next{text-decoration:none}
.app-shell .ab-detail{margin:0;font-size:12.5px;color:#5f6f86;line-height:1.4}
.app-shell .ab-confirm{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);width:min(460px,calc(100vw - 32px));background:#fff;border-radius:14px;padding:20px 22px;z-index:61;box-shadow:0 18px 48px rgba(15,23,42,.25)}
.app-shell .ab-confirm h2{font-size:18px;margin:0 0 8px}
.app-shell .ab-confirm p{margin:0 0 10px;color:#334155}
.app-shell .ab-facts{margin:0 0 14px;padding-left:18px;color:#475569;font-size:13.5px;line-height:1.5}
.app-shell .ab-confirm-actions{display:flex;gap:10px;flex-wrap:wrap}
.app-shell .ab-switch{position:relative;width:44px;height:26px;border-radius:999px;border:0;background:#cbd5e1;cursor:pointer;flex:none;padding:0;transition:background .15s}
.app-shell .ab-switch[aria-checked="true"]{background:#16a34a}
.app-shell .ab-switch .ab-knob{position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(15,23,42,.3);transition:left .15s}
.app-shell .ab-switch[aria-checked="true"] .ab-knob{left:21px}
.app-shell .ab-switch:focus-visible{outline:3px solid #2563eb;outline-offset:2px}
.app-shell .ab-switch:disabled{opacity:.6;cursor:default}
@media (prefers-reduced-motion:reduce){.app-shell .ab-switch,.app-shell .ab-switch .ab-knob{transition:none}}
.app-shell .cx-advanced{position:relative;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.app-shell .cx-advanced-body{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.app-shell .cx-advanced-body[hidden]{display:none}
.app-shell .cx-schedule-label{font-weight:700;color:#0f172a}
.app-shell .cx-schedule-staff .cx-schedule-label{color:#9a3412}
.app-shell .cx-schedule-done .cx-schedule-label{color:#166534}
@media (max-width:640px){.app-shell .cx-booking-setup{max-width:none;width:100%}}

/* Communications inbox (2026-11-16): list + thread; Details opens a third column (a full-width panel on narrow screens). */
.app-shell .cx-workspace{grid-template-columns:320px minmax(0,1fr)}
.app-shell .cx-more{position:relative}
.app-shell .cx-more-scrim{position:fixed;inset:0;z-index:40}
.app-shell .cx-more-menu{position:absolute;right:0;top:calc(100% + 6px);z-index:41;min-width:200px;display:grid;padding:6px;background:#fff;border:1px solid var(--dn-line);border-radius:12px;box-shadow:0 12px 32px rgba(15,23,42,.14)}
.app-shell .cx-more-menu > button,.app-shell .cx-more-menu > a{display:block;text-align:left;padding:9px 12px;border:0;background:none;border-radius:8px;font:inherit;font-size:14px;color:#142542;text-decoration:none;cursor:pointer}
.app-shell .cx-more-menu > button:hover,.app-shell .cx-more-menu > a:hover,.app-shell .cx-more-menu > :focus-visible{background:#eef3fc}
.app-shell .cx-advanced-body{display:block;margin:0 0 14px;padding:16px}
.app-shell .cx-advanced-body[hidden]{display:none}
.app-shell .cx-advanced-head,.app-shell .cx-details-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}
.app-shell .cx-advanced-head h2{margin:0;font-size:16px}
.app-shell .cx-details-head h3{margin:0}
.app-shell .cx-subpage-head{display:flex;align-items:center;gap:14px;margin:0 0 12px}
.app-shell .cx-subpage-head h2{margin:0;font-size:18px}
.app-shell .cx-assign{display:grid;gap:4px;margin-top:14px;font-size:12px;font-weight:700;color:#5f6f86}
.app-shell .cx-details-links{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.app-shell .cx-details-links .secondary-action{text-decoration:none;font-size:12.5px}
.app-shell .cx-context .sa-activity{margin-top:14px}
@media (max-width:900px){
  .app-shell .cx-workspace{grid-template-columns:1fr}
}
.app-shell .cx-workspace{grid-template-columns:320px minmax(0,1fr)!important}
@media (max-width:900px){.app-shell .cx-workspace{grid-template-columns:1fr!important}}
/* Details: a panel that slides over the thread, so the page stays two columns. */
.app-shell .cx-details-scrim{position:fixed;inset:0;z-index:60;background:rgba(15,23,42,.28)}
.app-shell .cx-details-drawer{position:fixed;top:0;right:0;bottom:0;z-index:61;width:min(360px,100vw);border-radius:16px 0 0 16px;overflow-y:auto;box-shadow:-12px 0 32px rgba(15,23,42,.18)}
/* Secondary navigation: a quiet link row under the header. */
.app-shell .cx-subnav{display:flex;flex-wrap:wrap;gap:4px;margin:4px 0 14px;border-bottom:1px solid var(--dn-line)}
.app-shell .cx-subnav > button,.app-shell .cx-subnav > a{padding:8px 12px;border:0;background:none;font:inherit;font-size:14px;font-weight:600;color:#5f6f86;text-decoration:none;border-bottom:2px solid transparent;margin-bottom:-1px;cursor:pointer}
.app-shell .cx-subnav > .active{color:#1f55d6;border-bottom-color:#1f55d6}
.app-shell .cx-subnav > :hover{color:#142542}
.app-shell .cx-subnav > :focus-visible{outline:3px solid #9ec0ff;outline-offset:-3px;border-radius:6px}
.app-shell .cx-subnav-settings{margin-left:auto}
/* The list never scrolls sideways: long previews are cut with an ellipsis (production 2026-11-16 showed a horizontal scrollbar). */
.app-shell .cx-rows{overflow-x:hidden}
.app-shell .cx-row{min-width:0;max-width:100%}
.app-shell .cx-row-preview{display:flex;min-width:0;gap:6px;align-items:center}
.app-shell .cx-row-preview > span:first-child{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Usage This Billing Cycle (UsageCycleCard, 2026-11-17) */
.app-shell .usage-cycle{padding:18px 20px;margin:0 0 18px;border:1px solid #e2e8f0;border-radius:12px;background:#fff}
.app-shell .usage-cycle-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap}
.app-shell .usage-cycle h2{font-size:17px;margin:0}
.app-shell .usage-cycle .muted{color:#5f6f86;font-size:13px;margin:2px 0 0}
.app-shell .usage-bars{list-style:none;margin:14px 0 0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.app-shell .usage-bar{min-width:0}
.app-shell .usage-bar-top{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:14px}
.app-shell .usage-track{height:8px;border-radius:999px;background:#e8eef6;margin:8px 0 6px;overflow:hidden}
.app-shell .usage-track span{display:block;height:100%;background:#2563eb;border-radius:999px}
.app-shell .usage-bar[data-state="Approaching limit"] .usage-track span{background:#d97706}
.app-shell .usage-bar[data-state="Allowance used"] .usage-track span{background:#dc2626}
.app-shell .usage-numbers{font-size:13px;color:#334155;margin:0}
.app-shell .usage-extra{font-size:13px;color:#9a3412;margin:4px 0 0}
.app-shell .usage-chip{font-size:11px;font-weight:700;border-radius:999px;padding:2px 8px;white-space:nowrap}
.app-shell .usage-chip-warn{background:#fef3c7;color:#92400e}
.app-shell .usage-chip-limit{background:#fee2e2;color:#991b1b}
.app-shell .usage-chip-off{background:#f1f5f9;color:#475569}
.app-shell .usage-cycle-foot{margin-top:14px;font-size:13px;color:#334155}
.app-shell .usage-cycle-foot p{margin:4px 0}
.app-shell .usage-followups{margin-top:16px;border-top:1px solid #e2e8f0;padding-top:12px}
.app-shell .usage-followups h3{font-size:15px;margin:0 0 6px}
.app-shell .usage-followups ul{list-style:none;padding:0;margin:0}
.app-shell .usage-followups li{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:6px 0;border-bottom:1px solid #f1f5f9;font-size:13px}
.app-shell .overage-form{display:grid;gap:10px;max-width:560px}
.app-shell .overage-form label{font-size:14px}
@media(max-width:760px){.app-shell .usage-bars{grid-template-columns:1fr}.app-shell .usage-cycle{padding:14px}}
.app-shell .usage-cycle-link{display:inline-flex;align-items:center;padding:7px 12px;border:1px solid #cbd5e1;border-radius:8px;color:#1e40af;font-weight:600;font-size:13px;text-decoration:none;background:#fff;white-space:nowrap}
.app-shell .usage-cycle-link:hover{background:#f1f5f9}
.app-shell .usage-cycle-foot{background:none;padding:0}

/* Insurance Center: automatic checks before visits (2026-11-18) */
.app-shell .usage-chip-ok{background:#e7f8ef;color:#126b43}
.app-shell .auto-elig-form{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;margin:10px 0 6px}
.app-shell .auto-elig-form .toggle-row{display:inline-flex;align-items:center;gap:8px;font-weight:600}
.app-shell .auto-elig-form select{min-height:38px;padding:6px 10px;border:1px solid #cbd5e1;border-radius:8px}
.app-shell .auto-elig-h{font-size:15px;margin:16px 0 6px}
.app-shell .auto-elig-runs{list-style:none;margin:0;padding:0}
.app-shell .auto-elig-runs li{padding:8px 0;border-top:1px solid #e2e8f0;font-size:14px;line-height:1.5}
.app-shell .auto-elig-runs li small{display:block;color:#5f6f86}
.app-shell .auto-elig-runs .usage-chip{margin-right:6px}

/* Dashboard "What's left this month" (2026-11-18): compact tiles, remaining amount first, one bar, one short line. */
.app-shell .usage-left{padding:14px 18px;margin:0 0 16px;border:1px solid #e2e8f0;border-radius:12px;background:#fff}
.app-shell .usage-left-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.app-shell .usage-left h2{font-size:16px;margin:0}
.app-shell .usage-left-reset{margin:2px 0 0;color:#5f6f86;font-size:13px}
.app-shell .usage-tiles{list-style:none;margin:12px 0 0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px}
.app-shell .usage-tile{display:flex;flex-direction:column;gap:4px;min-width:0;padding:10px 12px;border:1px solid #e8eef6;border-radius:10px;background:#f8fafc}
.app-shell .usage-tile-label{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:600;color:#334155}
.app-shell .usage-tile-value{font-size:18px;font-weight:700;color:#0f172a;line-height:1.25}
.app-shell .usage-tile-action{color:#1d4ed8;text-decoration:none}
.app-shell .usage-tile-action:hover,.app-shell .usage-tile-action:focus-visible{text-decoration:underline}
.app-shell .usage-tile-quiet{font-size:16px;color:#334155}
.app-shell .usage-tile-note{font-size:12.5px;color:#5f6f86}
.app-shell .usage-tile-track{height:6px;border-radius:999px;background:#e2e8f0;overflow:hidden;margin:2px 0}
.app-shell .usage-tile-track span{display:block;height:100%;background:#2563eb;border-radius:999px}
.app-shell .usage-tile[data-state="Approaching limit"] .usage-tile-track span{background:#d97706}
.app-shell .usage-tile[data-state="Allowance used"] .usage-tile-track span{background:#dc2626}
.app-shell .usage-tip{position:relative;display:inline-grid;place-items:center;width:16px;height:16px;border-radius:50%;border:1px solid #94a3b8;color:#475569;font-size:11px;font-weight:700;cursor:help}
.app-shell .usage-tip:focus-visible{outline:3px solid #93c5fd;outline-offset:1px}
.app-shell .usage-tip-text{display:none;position:absolute;left:50%;top:calc(100% + 6px);transform:translateX(-50%);z-index:30;width:250px;max-width:70vw;padding:8px 10px;border-radius:8px;background:#0f172a;color:#fff;font-size:12.5px;font-weight:400;line-height:1.45;text-align:left;box-shadow:0 6px 18px rgba(15,23,42,.2)}
.app-shell .usage-tip:hover .usage-tip-text,.app-shell .usage-tip:focus .usage-tip-text{display:block}
.app-shell .usage-left-shared{margin:10px 0 0;font-size:12.5px;color:#5f6f86}
.app-shell .usage-left-notice{margin:8px 0 0;padding:7px 10px;border-radius:8px;font-size:13px}
.app-shell .usage-left-notice.is-warn{background:#fffbeb;color:#92400e;border:1px solid #fde68a}
.app-shell .usage-left-notice.is-limit{background:#fef2f2;color:#991b1b;border:1px solid #fecaca}
@media(max-width:640px){.app-shell .usage-tiles{grid-template-columns:1fr}.app-shell .usage-left{padding:12px}.app-shell .usage-tip-text{left:auto;right:-8px;transform:none}}

/* Plan & billing (2026-11-18): exactly two Front Desk cards, the demo summary, and the small 3+ offices link. */
.app-shell .subscription-panel .sub-plans.sub-plans-two{grid-template-columns:repeat(2,minmax(0,1fr))}
.app-shell .sub-contact-more{margin:2px 0 12px;font-size:13.5px}
.app-shell .sub-demo-summary{padding:12px 16px;border:1px dashed #94a3b8;border-radius:12px;background:#f8fafc;margin-bottom:14px}
.app-shell .sub-demo-summary strong{display:block;font-size:17px}
.app-shell .sub-demo-summary small{display:block;color:#5f6f86;font-size:13px;margin-top:3px}
@media(max-width:900px){.app-shell .subscription-panel .sub-plans.sub-plans-two{grid-template-columns:1fr}}

/* Add/Edit insurance form: payer search tags, subscriber block, collapsed optional details (2026-11-19) */
.app-shell .payer-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: #e8f0fe; color: #1d4ed8; font-size: 11px; font-weight: 600; }
.app-shell #add-insurance-dialog .selected-payer { margin: 6px 0 0; }
.app-shell #add-insurance-dialog .ins-subscriber { border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px 12px 4px; margin: 0; }
.app-shell #add-insurance-dialog .ins-subscriber legend { padding: 0 4px; font-weight: 600; font-size: 13px; }
.app-shell #add-insurance-dialog details.ins-more, .app-shell #add-insurance-dialog details.manual-payer { border-top: 1px solid #e2e8f0; padding-top: 8px; }
.app-shell #add-insurance-dialog details > summary { cursor: pointer; font-weight: 600; color: #1e3a8a; padding: 4px 0; }
.app-shell #add-insurance-dialog details[open] > summary { margin-bottom: 8px; }

/* Dashboard "Front desk services" (FrontDeskServicesCard, 2026-11-19): one status per service, no gauges or counts. Status is text + dot. */
.app-shell .fd-services{padding:14px 18px;margin:0 0 16px;border:1px solid #e2e8f0;border-radius:12px;background:#fff}
.app-shell .fd-services-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.app-shell .fd-services h2{font-size:16px;margin:0}
.app-shell .fd-services-link{font-size:13.5px;font-weight:600;color:#1d4ed8;text-decoration:none}
.app-shell .fd-services-link:hover,.app-shell .fd-services-link:focus-visible{text-decoration:underline}
.app-shell .fd-services-muted{margin:6px 0 0;color:#5f6f86;font-size:13px}
.app-shell .fd-service-tiles{list-style:none;margin:12px 0 0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.app-shell .fd-service-tile{display:flex;gap:10px;align-items:flex-start;min-width:0;padding:10px 12px;border:1px solid #e8eef6;border-radius:10px;background:#f8fafc}
.app-shell .fd-service-icon{flex:none;display:grid;place-items:center;width:32px;height:32px;border-radius:8px;background:#eff6ff;color:#1d4ed8;font-size:16px}
.app-shell .fd-service-body{display:flex;flex-direction:column;gap:2px;min-width:0}
.app-shell .fd-service-name{font-size:13px;font-weight:600;color:#334155}
.app-shell .fd-service-status{display:flex;align-items:center;gap:6px;font-size:15.5px;font-weight:700;color:#0f172a;line-height:1.3}
.app-shell .fd-service-dot{flex:none;width:8px;height:8px;border-radius:50%;background:#94a3b8}
.app-shell .fd-service-tile[data-tone="ok"] .fd-service-dot{background:#16a34a}
.app-shell .fd-service-tile[data-tone="warn"] .fd-service-dot{background:#d97706}
.app-shell .fd-service-tile[data-tone="limit"] .fd-service-dot{background:#dc2626}
.app-shell .fd-service-tile[data-tone="setup"] .fd-service-dot{background:#2563eb}
.app-shell .fd-service-note{font-size:12.5px;color:#5f6f86}
.app-shell .fd-service-action{margin-top:2px;font-size:13px;font-weight:600;color:#1d4ed8;text-decoration:none}
.app-shell .fd-service-action:hover,.app-shell .fd-service-action:focus-visible{text-decoration:underline}
@media(max-width:900px){.app-shell .fd-service-tiles{grid-template-columns:1fr}.app-shell .fd-services{padding:12px}}

/* Insurance Center "Sample patients for demos" (InsuranceSamplesPanel, 2026-11-19, demo practice only) */
.app-shell .ins-samples-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap}
.app-shell .ins-samples-head h2{margin:0}
.app-shell .ins-sample-results{list-style:none;margin:12px 0 0;padding:0;display:grid;gap:8px}
.app-shell .ins-sample-result{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;padding:10px 12px;border:1px solid #e2e8f0;border-radius:10px;background:#f8fafc}
.app-shell .ins-sample-result.is-new{border-color:#93c5fd;background:#eff6ff}
.app-shell .ins-sample-tag{display:inline-block;margin-left:6px;padding:1px 8px;border-radius:999px;background:#fef3c7;color:#92400e;font-size:12px;font-weight:600}
.app-shell .ins-sample-status{font-weight:600;color:#0f172a}
.app-shell .ins-sample-actions{display:flex;gap:8px;flex-wrap:wrap}
#sample-insurance-dialog input[readonly],#sample-insurance-dialog select[disabled]{background:#f8fafc;color:#0f172a}

/* Claims Scrubber: sample claims and the Fix issues checklist (2026-11-21) */
.app-shell .sample-claim-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 12px 0; }
.app-shell .sample-claim-option { border: 1px solid #dbe3ee; border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.app-shell .sample-claim-option h3 { margin: 0; font-size: 1rem; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.app-shell .sample-claim-option p { margin: 0; }
.app-shell .sample-claim-option button { align-self: flex-start; margin-top: auto; }
.app-shell .sample-claim-steps { border: 1px solid #c7d7f5; background: #f5f8ff; border-radius: 10px; padding: 12px 14px; margin: 10px 0 14px; }
.app-shell .sample-claim-steps h3 { margin: 0 0 8px; font-size: 1rem; }
.app-shell .sample-claim-steps ol { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.app-shell .sample-claim-steps li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.app-shell .sample-claim-steps li.done > strong::after { content: " ✓"; color: #15803d; }
.app-shell .sample-claim-steps .sample-ack.ok { color: #15803d; font-weight: 600; }
.app-shell .sample-claim-steps .sample-ack.bad { color: #b42318; font-weight: 600; }
.app-shell .claims-demo-note { margin: -6px 0 12px; font-size: .85rem; }
.app-shell .fix-missing { border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 12px; margin: 10px 0; }
.app-shell .fix-missing summary { cursor: pointer; font-weight: 600; }
.app-shell .fix-missing ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.app-shell .fix-missing li { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.app-shell .fix-missing li.is-current { font-weight: 600; }
.app-shell .fix-missing-group { color: #5f6f86; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; min-width: 9em; }
