/* Moon's existing brand, with reference-led hierarchy and short functional motion. */
:root{--moon-motion-fast:120ms;--moon-motion-state:200ms;--moon-ease:cubic-bezier(.2,0,0,1);--moon-surface-shadow:0 3px 14px #1b163305}
.content[data-page=dashboard]{display:flex;flex-direction:column;gap:24px}.content[data-page=dashboard]>.role-guide{order:2;margin:0}.moon-overview{order:1;min-width:0}
.overview-date{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:11px;margin-bottom:10px}.overview-date .icon{width:15px;height:15px}.moon-overview .heading{margin-bottom:26px}.moon-overview .heading h1{font-size:clamp(25px,2.4vw,34px);line-height:1.5}.moon-overview .heading p{max-width:62ch}.moon-overview .heading>.actions{align-items:center}
.overview-stats{margin:0 0 24px;gap:16px}.overview-stats .stat{background:#fff;border:1px solid var(--line);padding:20px 22px;border-radius:14px;box-shadow:var(--moon-surface-shadow)}.overview-stats .stat-label{font-size:12px;color:#625e6b}.overview-stats .stat-label .icon{background:#f4f0ff;color:var(--moon-purple);border-radius:10px}.overview-stats .stat strong{font-size:clamp(25px,2.6vw,36px);font-weight:600;line-height:1.65;margin:6px 0 2px;overflow-wrap:anywhere}.overview-stats .stat .sub{font-size:11px}
.overview-grid{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(270px,1fr);gap:20px;align-items:stretch}.overview-grid>.card{min-width:0;margin:0;border-radius:14px;box-shadow:var(--moon-surface-shadow)}.overview-grid .card-head{padding:20px 22px;min-height:91px;align-items:center}.overview-grid .card-head h2{font-size:17px;line-height:1.65}.overview-grid .card-head .text-link{display:inline-flex;align-items:center;gap:6px;flex-shrink:0}.overview-grid .text-link .icon{width:14px;height:14px}.overview-kicker{display:block;color:var(--muted);font-size:10px;font-weight:500;margin-bottom:4px}.overview-empty{padding:30px 24px;min-height:220px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}.overview-empty>.icon{width:30px;height:30px;color:#8a74bc;margin-bottom:12px}.overview-empty h3{font-size:15px;margin:0 0 6px}.overview-empty p{font-size:12px;color:var(--muted);max-width:48ch;margin:0 0 17px}.overview-empty .btn{display:inline-flex;gap:8px}.overview-tasks .card-body{padding:16px 22px}.overview-tasks .empty{padding:32px 12px}.overview-activity .card-body{padding:18px 22px}.overview-activity .chart{height:170px}.overview-chart-value{font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums;margin-bottom:6px}.overview-activity .bar-group{position:relative}.overview-chart-empty{min-height:170px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:8px}.overview-chart-empty>.icon{width:27px;height:27px;color:#8a74bc}.overview-chart-empty p{margin:0;font-size:13px}.overview-chart-empty .help{font-size:11px;max-width:44ch}
.overview-assistant{background:#f5f1ff;border-color:#e8dffc!important}.overview-assistant .card-body{position:relative;padding:24px;display:flex;flex-direction:column;align-items:flex-start;min-height:100%}.overview-assistant-mark{width:38px;height:38px;display:grid;place-items:center;background:#fff;border:1px solid #e5dafa;border-radius:12px;color:var(--moon-purple);margin-bottom:16px}.overview-assistant h2{font-size:18px;margin:0 0 8px}.overview-assistant p{margin:0 0 20px;color:#6a617a;font-size:12px;max-width:42ch}.overview-assistant .btn{margin-top:auto;background:white;display:inline-flex;gap:12px}
.content>.heading .actions .btn,.overview-grid .btn{min-height:44px}.nav-group>summary:after{transition:transform var(--moon-motion-state) var(--moon-ease)}.nav a:focus-visible{outline-offset:-3px}.card{transition:border-color var(--moon-motion-fast) var(--moon-ease)}.field input,.field select,.field textarea{transition:border-color var(--moon-motion-fast) var(--moon-ease),box-shadow var(--moon-motion-fast) var(--moon-ease)}
@media(hover:hover){.overview-stats .stat:hover{border-color:#d6c9ed}.overview-grid .btn:hover .icon{opacity:.75}.nav a:hover .icon{color:#eee7ff}}
@media(prefers-reduced-motion:no-preference){.btn{transition:background-color var(--moon-motion-fast) var(--moon-ease),border-color var(--moon-motion-fast) var(--moon-ease),box-shadow var(--moon-motion-fast) var(--moon-ease),transform var(--moon-motion-fast) var(--moon-ease)}.btn:active:not(:disabled){transform:translateY(1px) scale(.99)}.nav a{transition:background-color var(--moon-motion-fast) var(--moon-ease),color var(--moon-motion-fast) var(--moon-ease)}.nav .icon{transition:color var(--moon-motion-fast) var(--moon-ease)}dialog::backdrop{animation:moon-backdrop-in 180ms var(--moon-ease)}@keyframes moon-backdrop-in{from{opacity:0}to{opacity:1}}}
@media(max-width:1100px){.overview-grid{grid-template-columns:minmax(0,1.4fr) minmax(245px,1fr)}.overview-stats{gap:12px}.overview-stats .stat{padding:17px}.overview-grid .card-head{padding:17px;gap:12px;flex-wrap:wrap}}
@media(max-width:900px){.overview-grid{grid-template-columns:1fr 1fr}.overview-agenda{grid-column:1/-1}.overview-activity{grid-column:1/-1;grid-row:3}.overview-tasks{min-width:0}}
@media(max-width:600px){.content[data-page=dashboard]{gap:18px}.moon-overview .heading{margin-bottom:20px}.moon-overview .heading h1{font-size:27px}.overview-date{font-size:10px}.overview-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:18px}.overview-stats .stat{padding:14px 12px;border-radius:12px}.overview-stats .stat-label{font-size:10px;align-items:flex-start;gap:5px}.overview-stats .stat-label .icon{width:15px;height:15px;padding:6px;border-radius:8px}.overview-stats .stat strong{font-size:25px;line-height:1.6}.overview-stats .stat .sub{font-size:10px}.overview-grid{display:flex;flex-direction:column;gap:16px}.overview-grid .card-head{padding:16px;min-height:0}.overview-grid .card-head h2{font-size:16px}.overview-grid .card-head p{font-size:11px}.overview-grid .card-body{padding:17px}.overview-empty{padding:26px 18px;min-height:200px}.overview-assistant .card-body{padding:20px}.overview-chart-empty{min-height:150px}.overview-activity .chart{gap:8px}.overview-grid .chart-days{font-size:9px}.overview-grid .bar{width:14px}}
@media(prefers-reduced-motion:reduce){.btn:active:not(:disabled){transform:none}.overview-grid,.overview-stats,.nav a,.nav-group>summary:after,dialog,dialog::backdrop{animation:none!important;transition:none!important}}
@media print{.overview-grid{display:block}.overview-grid>.card{margin-bottom:20px}.overview-assistant,.content[data-page=dashboard]>.role-guide{display:none}.overview-stats{grid-template-columns:repeat(4,1fr)}.overview-date{color:#333}}
.overview-activity .bar-group{flex-direction:column;align-items:center;justify-content:flex-end}.overview-chart-value{flex-shrink:0}.overview-activity .bar.is-zero{height:0;min-height:0}
[dir=rtl] .moon-overview a .icon{transform:rotate(180deg)}
.moon-overview .heading .btn,.overview-grid .card-head .text-link{min-height:44px}
/* Moon colorful workspace: semantic statuses remain owned by the existing UI. */
:root{--bg:#eef2f8;--ink:#202538;--muted:#606a7a;--line:#dfe5ef;--radius:18px;--moon-surface-shadow:0 4px 18px #24335606;--moon-teal:#087d75;--moon-teal-soft:#e5f7f3;--moon-panel:#fff}
.layout{padding:14px;gap:18px;grid-template-columns:252px minmax(0,1fr);align-items:start;min-height:100dvh}
.sidebar{top:14px;height:calc(100dvh - 28px);border-radius:22px;background:#1b1b2b;border:1px solid #2f3046;padding:24px 14px 18px;box-shadow:0 12px 30px #1c204412}
.sidebar .brand{padding:0 5px 24px}.sidebar .brand-logo{width:158px;height:46px}.sidebar .brand-product{color:var(--moon-mint);border-color:#48465e}
.workspace{background:#28283b;border:1px solid #3b3b53;border-radius:14px;padding:14px 12px;margin-bottom:18px}.workspace .avatar{background:#3d335d;color:#e6dcff;border-color:#64528d;border-radius:11px}.workspace .tiny{color:#c0bfd0}
.sidebar .nav{padding-inline:0;scrollbar-color:#56506c transparent}.nav-primary{gap:6px;margin-bottom:18px}.nav a{min-height:46px;gap:10px;padding:8px 10px;border-radius:12px;font-size:12px;color:#ddddeb}
.nav a .icon{box-sizing:content-box;width:17px;height:17px;padding:7px;background:#303048;color:#bdb6ff;border-radius:9px;flex-shrink:0}
.nav a[data-nav-tone=medical] .icon{background:#193d3c;color:#7de8d4}.nav a[data-nav-tone=business] .icon{background:#40372f;color:#f2c48b}.nav a[data-nav-tone=intelligence] .icon{background:#403052;color:#dfb2f5}
.nav a:hover{background:#2d2c44}.nav a.active,.nav a.active:hover{background:#5930e8;box-shadow:0 4px 12px #0e08352e}.nav a.active .icon{background:#ffffff20;color:white}.nav a.active:before{inset-inline-start:0;top:15px;bottom:15px;width:3px}
.nav-group{margin-bottom:7px}.nav-group>summary{font-size:11px;color:#c7c4d8;padding:12px 10px;border-radius:10px}.nav-group>summary:hover{background:#25253a}.nav-group-links{gap:5px}.sidebar .nav-section-label{color:#b4b1c9;padding:9px 11px}.sidebar-footer{border-color:#39394e}.profile .avatar{background:#38344e;border-radius:11px}.sidebar-close{background:#242438}
.topbar{height:72px;top:14px;border:1px solid #e2e6ef;border-radius:18px;background:#fff;padding:0 20px;box-shadow:0 3px 12px #25314b03;gap:12px}.topbar .breadcrumb{color:#687186}.breadcrumb strong{color:#303049}.quick-nav-button{background:#f3f5fa;border-color:#e8ebf2;border-radius:11px;min-width:180px}.local-label{background:#edf7f4;color:#246b5f;border-color:#d3e9e2;border-radius:7px}
.content{padding:26px 8px 40px;--page-accent:#633bd6;--page-soft:#f1edff}
.content:is([data-page=clinical],[data-page=specialties],[data-page=prescriptions],[data-page=resources],[data-page=lab-catalog],[data-page=drug-catalog],[data-page=care-operations]){--page-accent:#087d75;--page-soft:#e5f7f3}
.content:is([data-page=finance],[data-page=approvals],[data-page=loyalty]){--page-accent:#96601e;--page-soft:#fff3df}
.content>.heading{padding:22px 24px;background:#fff;border:1px solid var(--line);border-inline-start:5px solid var(--page-accent);border-radius:18px;align-items:center;box-shadow:var(--moon-surface-shadow)}
.heading h1{font-size:28px;letter-spacing:-.3px;line-height:1.5}.heading p{color:#606a7a;font-size:13px;line-height:1.8}.heading .actions{padding-top:0}.content>.heading .actions{flex-wrap:wrap}.heading .actions:empty{display:none}
.card,.service,.lead-card{border-color:var(--line);border-radius:18px;box-shadow:var(--moon-surface-shadow)}.card-head{background:#fafbfe;border-color:#e8ecf3;border-radius:18px 18px 0 0;min-height:72px}.card-head h2{color:#282b43;font-size:17px}.card-head p{color:#606a7a}.card-body{padding:24px}.content>.card+.card{margin-top:20px}
.btn{border-radius:11px;min-height:44px;border-color:#dce2ec;color:#40465b;background:#fff;box-shadow:0 2px 3px #20294403}.btn.primary{background:var(--moon-purple);color:#fff;border-color:var(--moon-purple);box-shadow:0 4px 10px #520ef522}.btn.primary:hover{background:#4308d0;box-shadow:0 5px 14px #520ef52a}.btn:where(:not(.primary):not(.danger)):hover{background:#f2effb;border-color:#cbbdeb}.btn.danger{color:#a42c40;border-color:#e7c8ce}.btn:disabled{box-shadow:none}.btn.small{min-height:36px}.text-link{color:#5930c4}.filter{border-radius:10px}.btn:focus-visible,.text-link:focus-visible{outline:3px solid #9b80ed;outline-offset:3px}
.field{color:#454b60;font-size:12px}.field input,.field select,.field textarea{border-color:#d5dce8;border-radius:11px;background:#fcfdff;color:#22283b;box-shadow:none}.field input:focus,.field select:focus,.field textarea:focus{background:white;border-color:#8459e0;box-shadow:0 0 0 3px #8959e014}.field input::placeholder,.field textarea::placeholder{color:#737b8a}.field.checkbox input{accent-color:var(--moon-purple)}
.toolbar{padding:14px 16px;background:#f8faff;border:1px solid #e7ebf2;border-radius:13px;margin-bottom:18px}.card>.toolbar{margin:16px}.searchbox{background:white;border-radius:11px}.unit-filter-panel{border-radius:14px;background:#fff}.unit-filter-panel>summary{color:#5b4a83}
th{background:#f0f4fa;color:#555e73;font-size:12px;padding-block:14px}td{border-color:#eaf0f5;padding-block:17px}tbody tr:hover{background:#f6f4fe}.table-wrap{border-radius:0 0 18px 18px}.person .avatar{background:#e8f5f3;color:#286c65;border-color:#d4e8e4;border-radius:12px}.tag{border-radius:7px;padding:3px 9px}.empty,.help{color:#606a7a}
.stat{border-radius:18px;padding:22px;background:#fff}.stat-label{color:#586177}.stat strong{color:#252b40}.stat .sub{color:#606a7a}.stat-label .icon{background:#eee9fd;color:#6237c7;border-radius:11px}.content>.stats .stat{border-block-start:3px solid #ab92ed}
.overview-intro{padding:25px 28px;margin-bottom:22px;border-radius:22px;background:linear-gradient(115deg,#4b24b5,#5926db 60%,#6330eb);color:#fff;position:relative;isolation:isolate;box-shadow:0 8px 22px #4d2dba15}
.overview-intro .overview-date{display:inline-flex;padding:4px 10px;border:1px solid #ffffff40;background:#ffffff12;color:#f4efff;border-radius:8px;font-size:11px;margin-bottom:13px}.overview-intro .heading{margin:0;align-items:center;gap:20px}.overview-intro .heading h1{color:#fff;font-size:clamp(27px,2.6vw,36px);font-weight:600}.overview-intro .heading p{color:#eee7ff;font-size:13px}.overview-intro .heading .actions{max-width:none;flex-wrap:wrap}.overview-intro .btn{background:transparent;border-color:#c9b5ff;color:#fff;box-shadow:none}.overview-intro .btn:hover{background:#ffffff18}.overview-intro .btn.primary{background:#fff;border-color:#fff;color:#4622a3;box-shadow:0 3px 7px #25115b20}.overview-intro .btn.primary:hover{background:#eee8ff}.overview-intro .btn:focus-visible{outline-color:#68f4d4}
.overview-stats{gap:14px;margin-bottom:22px}.overview-stats .stat{padding:20px 22px;border-radius:18px;border:1px solid #00000006;box-shadow:none}.overview-stats .stat:nth-child(1){background:#e7f8f1}.overview-stats .stat:nth-child(2){background:#efeaff}.overview-stats .stat:nth-child(3){background:#fff0df}.overview-stats .stat:nth-child(4){background:#f9eaf1}.overview-stats .stat-label{color:#4e5668;font-size:12px}.overview-stats .stat strong{font-size:clamp(27px,2.7vw,38px);color:#272b40;margin-block:9px 5px}.overview-stats .stat .sub{color:#5d6073}.overview-stats .stat .icon{background:#ffffffa6;padding:8px;color:#5832bb;border-radius:11px}.overview-stats .stat:nth-child(1) .icon{color:#126b58}.overview-stats .stat:nth-child(3) .icon{color:#8a5719}.overview-stats .stat:nth-child(4) .icon{color:#99496a}
.overview-grid{gap:20px;grid-template-columns:minmax(0,1.6fr) minmax(260px,1fr)}.overview-grid>.card{border-radius:20px}.overview-grid .card-head{border-radius:20px 20px 0 0;padding:21px 23px}.overview-kicker{letter-spacing:.03em;color:#646780}.overview-agenda .card-head{background:#f2faf7}.overview-tasks .card-head{background:#f8f4fc}.overview-activity .card-head{background:#f5f8fd}.overview-empty{min-height:225px}.overview-empty>.icon{width:28px;height:28px;box-sizing:content-box;padding:13px;background:#e9f5ef;border-radius:16px;color:#347662}.overview-chart-empty>.icon{padding:12px;box-sizing:content-box;background:#edf1fb;border-radius:14px;color:#5c70a2}
.overview-assistant{background:#25223e;border-color:#302b4e!important;color:#fff}.overview-assistant .overview-kicker{color:#c9bedf}.overview-assistant h2{color:#fff}.overview-assistant p{color:#d8cfe9}.overview-assistant-mark{background:#3e365a;border-color:#5a4b7a;color:#cbb6ff}.overview-assistant .btn{background:#d0f8ed;color:#174b3e;border-color:#d0f8ed}.overview-assistant .btn:hover{background:#bceedd}.overview-assistant .card-body{padding:26px}.overview-grid .card-body{border-radius:0 0 20px 20px}
.clinical-day-controls{border-block-start:3px solid var(--moon-teal)}.clinical-day-controls .card-body{background:#fbfefd;border-radius:16px}.content[data-page=clinic-day]>.card:first-of-type{border-block-start:3px solid #9672e3}.content[data-page=clinic-day] [data-day=filter]{border-radius:22px;padding:9px 15px}.content[data-page=clinic-day] [data-day=filter]:not(.primary){background:#f2f4fa;border-color:#e4e7f0}.content[data-page=clinic-day] [data-day=filter][aria-pressed=true]{box-shadow:0 3px 10px #520ef520}
.day-patient{padding:20px 23px;gap:18px}.day-patient:hover{background:#f7fafc}.day-patient>div:first-child{border-inline-start:3px solid #d4e9e2;padding-inline-start:14px}.day-patient strong{font-size:14px}.clinical-context-banner{border-color:#cde7e1;background:#f1faf7}.service{border-block-start:3px solid #c5b7e8}.service .banner-icon{background:#e5f6f2;color:#1e7566}.service .price{color:#34304e}
dialog{border-radius:20px;border-color:#dce0ee;box-shadow:0 24px 100px #191b3840}.modal-head{background:#f7f8fd;border-color:#e6e9f1}.modal-head h2{color:#34304d}.modal-footer{background:#f7f8fc}.visit-fixed-context{background:#fff;border-bottom:1px solid #dbe8e4}.visit-identity{padding:15px 17px;border-radius:14px;background:#f1faf7;border:1px solid #d9ebe5}.visit-identity h2{color:#25584d}.visit-tabs{background:#f1f3f9;padding:8px;border-radius:14px}.visit-tabs .btn{background:transparent;border-color:transparent;box-shadow:none}.visit-tabs .btn[aria-pressed=true]{box-shadow:0 3px 9px #520ef51a}.visit-footer{background:#fff}.visit-allergy{color:#4d386e}.clinical-patient-bar{border-inline-start-color:var(--moon-teal)}
.channel-filter{border-radius:13px}.channel-filter.selected{background:#f0ecfc}.unified-inbox{border-radius:20px;box-shadow:var(--moon-surface-shadow)}.queue-head{background:#f5f7fc}.queue-row.active{background:#eeebfb}.inbox-messages{background:#f3f6fa}.inbox-message>div{box-shadow:0 2px 6px #24335605}.inbox-message.outgoing>div{background:#e9e3ff;border-color:#d6c9f4}.inbox-person{background:#fcfdff}.inbox-composer textarea{background:#f8faff;border-radius:12px}.inbox-welcome{background:#fafbfd}
.agency-nav{border-radius:12px;min-height:46px}.agency-nav.active{background:#5930e8}.moon-console .stats .stat{background:#f2eeff}.moon-console .agency-auth{border-radius:22px;box-shadow:var(--moon-surface-shadow)}
@media(hover:hover){.start-steps>a:hover,.service:hover{border-color:#bba4e2}.nav a:hover .icon{color:inherit}.btn:not(:disabled):hover .icon{opacity:.85}.overview-stats .stat:hover{border-color:#b6b5c8}}
@media(prefers-reduced-motion:no-preference){
 .nav a .icon,.agency-nav,.channel-filter,.visit-tabs .btn,.queue-row,tbody tr,.day-patient{transition:background-color 140ms var(--moon-ease),color 140ms var(--moon-ease),border-color 140ms var(--moon-ease)}
 .service,.start-steps>a,.overview-stats .stat{transition:box-shadow 180ms var(--moon-ease),border-color 140ms var(--moon-ease)}
 .btn:not(:disabled):active{transform:translateY(1px) scale(.98)}
 @keyframes moon-drawer-in{from{opacity:.65;transform:translateX(var(--drawer-start,16px))}to{opacity:1;transform:none}}
 @media(max-width:780px){.sidebar.open{animation:moon-drawer-in 220ms var(--moon-ease)}[dir=ltr] .sidebar{--drawer-start:-16px}}
}
@media(max-width:1100px){.layout{grid-template-columns:236px minmax(0,1fr);padding:10px;gap:12px}.sidebar{top:10px;height:calc(100dvh - 20px);border-radius:20px;padding-inline:12px}.topbar{top:10px;padding-inline:14px}.quick-nav-button{min-width:38px}.content{padding:22px 4px 34px}.content>.heading{padding:20px}.overview-intro{padding:24px}.overview-intro .heading{flex-wrap:wrap}.overview-intro .heading .actions{padding:0}.overview-grid{grid-template-columns:minmax(0,1.3fr) minmax(230px,1fr)}.overview-stats .stat{padding:18px 14px}.overview-stats .stat-label{font-size:11px}}
@media(max-width:900px) and (min-width:781px){.overview-grid{grid-template-columns:1fr}.overview-grid>.card{grid-column:auto;grid-row:auto}.overview-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:780px){.layout{display:block;padding:0;min-height:100dvh}.sidebar{top:0;height:100dvh;width:280px;border-radius:20px 0 0 20px;box-shadow:none;padding:22px 14px;position:fixed;z-index:70}.sidebar.open{display:flex}[dir=ltr] .sidebar{border-radius:0 20px 20px 0}.sidebar .brand{padding-inline-end:34px}.sidebar .brand-logo{width:145px}.sidebar-close{top:30px}.topbar{top:0;height:68px;border-width:0 0 1px;border-radius:0;padding:0 12px;gap:6px}.content{padding:20px 14px 32px}.content>.heading{padding:18px 16px;border-radius:16px;margin-bottom:18px}.heading h1{font-size:24px}.heading p{font-size:12px}.overview-intro{padding:21px 18px;border-radius:18px;margin-bottom:16px}.overview-intro .heading h1{font-size:28px}.overview-intro .heading p{font-size:12px}.overview-intro .heading .actions{gap:8px}.overview-intro .btn{padding:10px 12px;font-size:12px}.overview-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:18px}.overview-stats .stat{border-radius:15px;padding:16px 13px}.overview-stats .stat strong{font-size:28px;line-height:1.55}.overview-stats .stat .icon{padding:6px;width:15px;height:15px}.overview-stats .stat-label{font-size:11px}.overview-stats .stat .sub{font-size:10px}.overview-grid{display:flex;flex-direction:column;gap:16px}.overview-grid .card-head{padding:18px}.card-head,.card-body{padding:18px}.card-head h2{font-size:16px}.card,.service{border-radius:16px}.toolbar{padding:12px}.day-patient{padding:17px}.visit-tabs{padding:7px}.visit-identity{padding:12px}.moon-console .sidebar{position:static;height:auto;width:100%;border-radius:0}.moon-console .sidebar .brand{padding:0}.moon-console .topbar{top:0}.moon-console .nav{padding-top:8px}}
@media(max-width:380px){.content{padding-inline:10px}.topbar{padding-inline:8px}.overview-intro{padding:18px 15px}.overview-intro .heading h1{font-size:25px}.overview-intro .heading .actions{width:100%}.overview-intro .heading .btn{flex:1;min-width:0}.overview-stats .stat{padding:13px 11px}.overview-stats .stat-label .icon{display:none}.overview-stats .stat strong{font-size:25px}.content>.heading{padding:16px 13px}}
@media(prefers-reduced-motion:reduce){.sidebar.open,.nav a .icon,.agency-nav,.channel-filter,.visit-tabs .btn,.queue-row,tbody tr,.day-patient,.service,.start-steps>a,.overview-stats .stat{animation:none!important;transition:none!important}.btn:not(:disabled):active{transform:none}}
@media print{.layout{display:block;padding:0}.content{padding:0}.overview-intro{color:#111;background:#fff;box-shadow:none;border:1px solid #ccc;padding:16px}.overview-intro .heading h1,.overview-intro .heading p,.overview-intro .overview-date{color:#111}.overview-stats .stat,.card,.visit-identity{background:white;box-shadow:none}.content>.heading{border:0;padding:0}.visit-tabs{background:white}}

/* Moon customer workspace: one relationship, three explicit views. */
.customer-toolbar{flex-wrap:wrap;gap:10px}
.customer-toolbar>.actions:first-child{flex:1;min-width:250px}
.customer-toolbar .unit-filter-panel{margin:0;padding:0;background:transparent;border:0;border-radius:10px;box-shadow:none}
.customer-toolbar .unit-filter-panel>summary{padding:10px 12px;font-size:12px;border:1px solid #dfe5ef;border-radius:10px;background:#fff;white-space:nowrap}
.customer-toolbar .unit-filter-panel[open]{flex-basis:100%}
.customer-toolbar .unit-filter-panel[open]>summary{width:max-content}
.customer-toolbar .unit-filter-panel form{padding:18px 0 4px}
.content[data-page=customers]>.heading{padding-block:20px;margin-bottom:18px}
.customer-workspace-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 20px;flex-wrap:wrap}
.customer-snapshot{display:flex;align-items:center;gap:22px;flex-wrap:wrap;padding:8px 4px}
.customer-snapshot>div{display:flex;align-items:center;gap:8px}
.customer-snapshot strong{font-size:22px;line-height:1.2;font-variant-numeric:tabular-nums;color:#302255}
.customer-snapshot span{font-size:12px;color:#606a7a}
.customer-view-switch{display:flex;padding:5px;background:#e4e6f1;border:1px solid #d8dce9;border-radius:15px;gap:3px;isolation:isolate}
.customer-view-button{position:relative;isolation:isolate;display:flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:10px;min-height:40px;padding:8px 16px;font:inherit;font-size:13px;font-weight:600;color:#596075;background:transparent;cursor:pointer;transition:color 120ms}
.customer-view-button>svg,.customer-view-button>span:not(.customer-view-thumb){position:relative;z-index:1;pointer-events:none}
.customer-view-button[aria-pressed=true]{color:#fff}
.customer-view-thumb{position:absolute;inset:0;z-index:0;border-radius:10px;background:#520ef5;box-shadow:0 3px 8px #520ef530;pointer-events:none}
.customer-view-button:focus-visible{outline:3px solid #0b847c;outline-offset:3px}
.customer-card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(270px,100%),1fr));gap:18px}
.customer-card{--customer-tint:#efeaff;--customer-ink:#5931a6;min-width:0;overflow:hidden;border:1px solid #dfe5ef;border-radius:19px;background:#fff;box-shadow:0 3px 12px #29324b04;transition:box-shadow 160ms,border-color 160ms}
.customer-card[data-tone="1"]{--customer-tint:#e7f8f1;--customer-ink:#146a5b}
.customer-card[data-tone="2"]{--customer-tint:#fff0df;--customer-ink:#815022}
.customer-card-identity{display:grid;grid-template-columns:42px minmax(0,1fr);gap:3px 12px;align-items:center;padding:19px;background:linear-gradient(115deg,var(--customer-tint),#ffffff);border-bottom:1px solid #edf0f6}
.customer-avatar{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:42px;height:42px;border-radius:14px;background:var(--customer-tint,#efeaff);color:var(--customer-ink,#5931a6);box-shadow:0 0 0 4px #ffffffbd;font-size:20px;font-weight:600;grid-row:span 2}
.customer-card-identity h3{font-size:16px;line-height:1.6;margin:0;overflow-wrap:anywhere;color:#202538}
.customer-card-identity .tag{grid-column:2;width:max-content;margin-top:5px}
.customer-card-identity .tiny{font-size:11px;color:#606a7a}
.customer-card-body{padding:18px}
.customer-interest>span,.customer-profile-interest span{display:block;font-size:11px;color:#606a7a;margin-bottom:3px}
.customer-interest strong{font-size:14px;font-weight:500;overflow-wrap:anywhere;color:#30374b}
.customer-card-facts{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:18px 0}
.customer-card-facts dt,.customer-profile-facts dt{font-size:11px;color:#606a7a;margin-bottom:5px}
.customer-card-facts dd,.customer-profile-facts dd{margin:0;font-size:13px;color:#202538;overflow-wrap:anywhere}
.customer-score{display:grid;grid-template-columns:1fr auto;align-items:center;gap:7px;font-size:11px;color:#606a7a}
.customer-score strong{color:#45415b;font-size:12px;font-weight:500}
.customer-score-track{grid-column:1/-1;height:4px;border-radius:5px;background:#edeaf4;overflow:hidden}
.customer-score-track i{display:block;height:100%;background:#9877db;border-radius:inherit}
.customer-card-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:20px;padding-top:15px;border-top:1px solid #edf0f6}
.customer-card .customer-open{border:0;background:#f0ebff;color:#4b22ab;min-height:38px;padding:8px 12px;border-radius:10px;font-weight:600;gap:12px}
.customer-open .icon{width:16px;height:16px}
[dir=rtl] .customer-open .icon{transform:rotate(180deg)}
.customer-stage-control{position:relative;min-width:0;max-width:48%}
.customer-stage-control .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.customer-stage-control select{width:100%;font-size:12px;padding:8px;border-color:#dfe5ef;border-radius:9px;background:#fff;min-height:38px}
.customer-board{align-items:stretch;gap:16px;padding-bottom:12px;overscroll-behavior-inline:contain;scrollbar-width:thin;scrollbar-color:#bcb1da transparent}
.customer-board .kanban-col{flex:0 0 295px;min-width:295px;background:#e9edf5;border:1px solid #dde3ed;border-radius:18px;padding:12px}
.customer-board .kanban-col>h3{display:flex;align-items:center;justify-content:space-between;font-size:14px;padding:4px 6px 13px;margin:0;gap:10px}
.customer-stage-count{display:flex;align-items:center;justify-content:center;background:#fff;min-width:27px;height:27px;border-radius:9px;color:#54546e;font-size:12px}
.customer-board .customer-card+.customer-card{margin-top:14px}
.customer-stage-empty{padding:20px 12px;border:1px dashed #c9cfdd;border-radius:12px;line-height:1.8;color:#6b7181;text-align:center;font-size:12px}
.customer-table{overflow:hidden}
.customer-empty{padding:42px 22px;text-align:center;background:#fff;border:1px solid #dfe5ef;border-radius:20px}
.customer-empty-icon{display:inline-flex;padding:18px;border-radius:20px;background:#efeaff;color:#5931a6;margin-bottom:16px}
.customer-empty h2{font-size:20px;margin:0 0 8px}
.customer-empty p{font-size:14px;color:#606a7a;margin:0 auto 20px;max-width:450px;line-height:1.8}
.customer-profile-identity{display:flex;align-items:center;gap:20px;padding:22px;background:linear-gradient(110deg,#efeaff,#f8f6ff);border:1px solid #e6ddf9;border-radius:17px;margin-bottom:16px}
.customer-profile-identity .customer-avatar{width:62px;height:62px;border-radius:19px;font-size:28px}
.customer-profile-identity .eyebrow{font-size:10px;letter-spacing:.04em;color:#674b91;margin:0 0 4px}
.customer-profile-identity h3{font-size:22px;line-height:1.5;margin:0 0 8px;overflow-wrap:anywhere}
.customer-profile-interest{display:flex;gap:12px;align-items:center;padding:14px 18px;background:#eaf8f4;border:1px solid #d5ebe3;border-radius:13px;color:#176350}
.customer-profile-interest .icon{width:24px;height:24px}
.customer-profile-interest strong{display:block;font-size:15px;font-weight:500}
.customer-profile-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 20px;margin:16px 0 22px}
.customer-profile-facts>div{padding:12px 0;border-bottom:1px solid #edf0f6}
.customer-profile-facts dd{font-size:15px}
.customer-profile-notes{padding:16px;background:#f8f9fc;border:1px solid #e5e9f2;border-radius:13px;margin-bottom:24px}
.customer-profile-notes h3{font-size:13px;margin:0 0 8px}
.customer-profile-notes p{white-space:pre-wrap;margin:0;font-size:13px;line-height:1.9}
.customer-timeline-heading{display:flex;gap:10px;align-items:center;border-top:1px solid #edf0f6;padding-top:20px;margin-bottom:18px}
.customer-timeline-heading h3{margin:0;font-size:17px}
.customer-timeline{list-style:none;padding:0;margin:0 4px 22px}
.customer-timeline li{position:relative;display:flex;gap:17px;padding-bottom:23px;align-items:flex-start}
.customer-timeline li:not(:last-child):before{content:"";position:absolute;inset-inline-start:4px;top:10px;bottom:-1px;width:1px;background:#ddd7ed}
.customer-timeline-dot{position:relative;z-index:1;flex-shrink:0;width:9px;height:9px;background:#8f69d0;border-radius:50%;margin-top:8px;box-shadow:0 0 0 4px #f3eff9}
.customer-timeline p{margin:0 0 6px;color:#606a7a;font-size:11px}
.customer-timeline strong{font-size:14px;font-weight:500;overflow-wrap:anywhere}
/* Intentional feedback: visible choices, short transitions, no decorative loops. */
.nav a .icon{transition:transform 160ms cubic-bezier(.2,0,0,1),background-color 160ms,color 160ms}
.nav a:focus-visible{outline:2px solid #66e5ce;outline-offset:-2px}
.btn:focus-visible,.text-link:focus-visible{outline:3px solid #0b847c;outline-offset:3px}
.nav-group summary{transition:color 140ms,background-color 140ms}
.nav-group summary .chevron{transition:transform 180ms}
@media(hover:hover) and (prefers-reduced-motion:no-preference){
 .nav a:hover .icon{transform:translateY(-2px) rotate(-5deg)}
 .customer-card:hover{border-color:#b9a7e1;box-shadow:0 10px 25px #39246710}
 .customer-view-button:not([aria-pressed=true]):hover{color:#4b22ab;background:#ffffff70}
 .customer-open:hover .icon{translate:3px 0}
 [dir=rtl] .customer-open:hover .icon{translate:-3px 0}
 .customer-open .icon{transition:translate 150ms}
}
@media(max-width:780px){
 .customer-workspace-bar{gap:13px;margin-bottom:16px}
 .customer-snapshot{width:100%;gap:16px;justify-content:space-between;padding:2px 0}
 .customer-snapshot>div{display:block}
 .customer-snapshot strong{display:block;font-size:23px;margin-bottom:4px}
 .customer-snapshot span{font-size:10px}
 .customer-view-switch{width:100%}
 .customer-view-button{flex:1;padding:9px 6px;font-size:12px;gap:6px}
 .customer-card-grid{grid-template-columns:1fr;gap:14px}
 .customer-card-identity{padding:17px}
 .customer-profile-identity{padding:17px;gap:14px}
 .customer-profile-identity h3{font-size:18px}
 .customer-profile-identity .customer-avatar{width:44px;height:44px;font-size:22px}
 .customer-profile-facts{gap:0 12px}
 .customer-profile-facts dd{font-size:13px}
 .customer-board .kanban-col{flex-basis:280px;min-width:280px}
}
@media(prefers-reduced-motion:reduce){
 .customer-card,.customer-view-button,.customer-open .icon,.nav a .icon,.nav-group summary{transition:none!important}
}
