/* Shared presentation layer. Workflow, permissions and data stay in their modules. */
:root {
  --bg:#f7f8fa; --surface:#fff; --surface-2:#f5f6f8; --surface-3:#eceff3;
  --ink:#20242c; --muted:#606773; --subtle:#69717d;
  --line:#e5e8ed; --line-strong:#c9cfd8;
  --accent:#2463d4; --accent-hover:#1c50b3; --accent-ink:#235cbf; --accent-wash:#edf3ff;
  --green:#27745c; --green-wash:#edf7f2;
  --orange:#885d19; --orange-wash:#fff6e8; --red:#b33f49; --red-wash:#fff0f1;
  --action-ink:#fff; --radius:12px; --focus:#2463d477;
  --shadow:none; --shadow-card:none; --shadow-float:none;
  --shadow-dialog:0 18px 60px #121c3026;
  --glass:var(--surface); --glass-bar:var(--surface); --glass-control:var(--surface);
  --glass-sheet:var(--surface); --edge-highlight:transparent; --ambient:transparent;
}
:root[data-theme=dark] {
  --bg:#141619; --surface:#1d2025; --surface-2:#25292f; --surface-3:#30353d;
  --ink:#f0f2f5; --muted:#b2b9c4; --subtle:#a1aab7;
  --line:#333840; --line-strong:#515a67;
  --accent:#88b0fa; --accent-hover:#a8c6ff; --accent-ink:#a8c6ff; --accent-wash:#26354e;
  --green:#a0d9bc; --green-wash:#223b31;
  --orange:#edc78c; --orange-wash:#3d3325; --red:#ffb3ba; --red-wash:#422c32;
  --action-ink:#14203a; --focus:#a8c6ff88; --shadow-dialog:0 18px 60px #0006;
  --glass:var(--surface); --glass-bar:var(--surface); --glass-control:var(--surface);
  --glass-sheet:var(--surface); --edge-highlight:transparent; --ambient:transparent;
  --shadow:none; --shadow-card:none; --shadow-float:none;
}
body { background:var(--bg); font-size:15px; line-height:1.55; letter-spacing:-.012em; }
h1,h2,h3 { font-weight:600; }
.app { grid-template-columns:224px minmax(0,1fr); }
.side { width:224px; padding:24px 14px 18px; background:var(--surface); box-shadow:none; backdrop-filter:none; -webkit-backdrop-filter:none; }
.brand { margin:0 10px 28px; gap:10px; }
.brand b { font-size:19px; letter-spacing:-.5px; }
.brand small { font-size:9px; letter-spacing:.6px; }
.logo { width:34px; height:36px; border-radius:9px; background:var(--accent); color:var(--action-ink); box-shadow:none; border:0; }
.side-label { padding:0 12px 9px; letter-spacing:.6px; }
.nav { gap:3px; }
.nav button { min-height:44px; padding:10px 12px; border-radius:8px; font-size:13px; gap:10px; }
.side-note { margin:16px 12px; line-height:1.55; }
.profile { padding:16px 8px 0; }
.profile b { font-size:12px; }
.profile small { font-size:11px; }
.avatar { width:34px; height:34px; box-shadow:none; }
.topbar,body.msg-route .topbar { position:static; height:64px; padding:0 30px; background:var(--surface); box-shadow:none; backdrop-filter:none; -webkit-backdrop-filter:none; }
.top-actions { gap:8px; }
.top-actions .icon-button { border:0; background:transparent; }
.content { max-width:1340px; padding:28px 30px 44px; }
.page-head { margin:0 0 24px; gap:16px; }
.page-head h1 { font-size:clamp(26px,2.6vw,32px); letter-spacing:-.8px; line-height:1.2; margin:0 0 8px; }
.eyebrow { font-size:10px; letter-spacing:.8px; }
.sub { font-size:14px; line-height:1.55; }
.primary,.secondary,.ghost,.danger { min-height:44px; border-radius:8px; padding:10px 14px; font-size:13px; font-weight:600; box-shadow:none; }
.primary,:root[data-theme=dark] .primary { background:var(--accent); color:var(--action-ink); border-color:transparent; box-shadow:none; }
.primary:hover:not(:disabled),:root[data-theme=dark] .primary:hover:not(:disabled) { background:var(--accent-hover); box-shadow:none; transform:none; }
.secondary { background:var(--surface); border-color:var(--line-strong); box-shadow:none; }
.ghost { background:transparent; }
.icon-button,.close,.cal-small-button,.cal-today,.home-film-toggle { min-width:44px; min-height:44px; height:44px; border-radius:8px; box-shadow:none; background:var(--surface); }
.close,.top-actions>.icon-button { border-radius:8px; }
.icon-button:active:not(:disabled),.close:active:not(:disabled),.secondary:active:not(:disabled),.primary:active:not(:disabled),.cal-small-button:active:not(:disabled),.cal-today:active:not(:disabled) { transform:none; box-shadow:none; }
.context-help { width:28px; min-width:28px; height:28px; border-color:var(--line); background:transparent; }
.context-help:hover { background:var(--accent-wash); }
.filter-tabs,.theme-picker,.auth-tabs,.cal-view-switch,.cal-unit-choice>div { border-radius:9px; background:var(--surface-2); border-color:var(--line); box-shadow:none; backdrop-filter:none; -webkit-backdrop-filter:none; }
.filter-tabs button,.theme-picker button,.auth-tabs button,.cal-view-switch button,.cal-unit-choice button { border-radius:6px; min-height:38px; }
/* Static, high-contrast active states replace decorative moving glass. */
.glass-selection { display:none; }
[data-glass-switcher]>button.active,[data-glass-switcher]>button.active:hover,[data-glass-switcher]>button[aria-pressed=true],[data-glass-switcher]>button[aria-current=page] { background:var(--surface); color:var(--ink); border-color:var(--line); box-shadow:none; }
.nav[data-glass-switcher]>button.active,.nav button.active,.nav button.active:hover { background:var(--accent-wash); color:var(--accent-ink); border-color:transparent; box-shadow:none; }
.date-input,.search,textarea,select.input,input.input,.partner-shell .input { background:var(--surface); border:1px solid var(--line-strong); border-radius:8px; padding:10px 12px; min-height:44px; font-size:14px; box-shadow:none; }
.field,.partner-shell .field { font-size:13px; }
.field small,.field-hint { font-size:12px; line-height:1.55; }
.panel,.stat,.auth-card,.entry-card,.partner-panel,.partner-job,.capacity-card,.capacity-form,.settings-list { border-radius:12px; border-color:var(--line); box-shadow:none; background:var(--surface); backdrop-filter:none; -webkit-backdrop-filter:none; }
.panel-head { padding:18px 20px; }
.panel-head h2 { font-size:16px; }
.section-pad,.booking-card { padding:20px; }
.pill,.partner-status { border-radius:5px; font-size:11px; line-height:1.4; padding:4px 7px; }
.home-hero { grid-template-columns:minmax(0,1fr); gap:16px; }
.home-workspace { gap:18px; }
.home-focus { padding:22px 24px; background:var(--surface); border:1px solid var(--line); border-radius:12px; min-height:0; box-shadow:none; backdrop-filter:none; -webkit-backdrop-filter:none; }
.home-focus h2 { font-size:25px; letter-spacing:-.6px; line-height:1.3; margin:8px 0; }
.home-summary { gap:0; margin:0; border:1px solid var(--line); border-radius:10px; overflow:hidden; background:var(--surface); }
.home-summary-item { padding:15px 20px; min-height:65px; border:0; border-right:1px solid var(--line); border-radius:0; background:transparent; box-shadow:none; }
.home-columns { gap:18px; }
.home-next-row { min-height:76px; padding:16px 20px; }
.home-summary-item:last-child { border-right:0; }
.home-summary-item>strong { font-size:24px; }
.outsourcing-entry { padding:16px 20px; gap:14px; border-radius:10px; box-shadow:none; background:var(--surface); }
.outsourcing-entry h2,.outsourcing-entry h3 { font-size:16px; }
.outsourcing-entry p { font-size:12px; line-height:1.5; margin:5px 0 0; }
.outsourcing-entry .eyebrow { margin:0 0 4px; }
.order-tiles { grid-template-columns:repeat(auto-fill,minmax(270px,1fr)); gap:12px; }
.case-row.order-tile { padding:18px; border-radius:10px; box-shadow:none; }
.order-tile:hover { transform:none; box-shadow:none; border-color:var(--line-strong); }
.order-tile-title { font-size:16px; }
.order-tile-meta,.order-tile-note { font-size:12px; }
.order-progress .progress-track { height:3px; }
.case-heading { padding-bottom:20px; }
.case-heading h2 { font-size:28px; letter-spacing:-.7px; }
.case-heading-price { font-size:22px; }
.case-command,.operator-command,.doctor-command { position:static; top:auto; padding:20px; margin-bottom:20px; border-radius:12px; background:var(--surface); border:1px solid var(--line); box-shadow:none; backdrop-filter:none; -webkit-backdrop-filter:none; }
.case-command h3 { font-size:20px; }
.case-command-actions { margin-top:14px; }
.case-progress-rail { position:static; top:auto; max-height:none; overflow:visible; }
.live-order { position:static; top:auto; background:var(--surface); box-shadow:none; backdrop-filter:none; -webkit-backdrop-filter:none; }
.detail-columns.role-detail { grid-template-columns:minmax(0,1fr) 290px; gap:20px; }
.case-prescription,.case-clinical-content>.section-pad,.process-panel,.case-eta { padding:20px; }
.case-prescription h3,.case-clinical-content>.section-pad h3 { font-size:20px; }
.case-prescription .prescription-readonly article { border-radius:8px; padding:14px; }
.case-instructions { margin-top:18px; }
.case-instructions>p { font-size:14px; line-height:1.65; }
.process-stage-image { max-height:130px; border-radius:8px; object-fit:cover; }
.production-lane { padding:14px; border-radius:10px; }
.production-card { padding:16px; box-shadow:none; border-radius:8px; }
.stat { padding:16px 18px; border-radius:10px; }
.stat b,.material-totals strong { font-size:27px; }
.material-totals>div { padding:18px; }
.inventory-item,.guide-intro { padding:22px; }
.guide-intro h2 { font-size:28px; }
.service-visual>div,.guide-stage>div { padding:20px; }
.form-note,.pilot-file-note,.case-material-note,.order-reminder,.auth-requirements { border-radius:8px; }
.status-explainer,.material-alert,.partner-warning,.partner-success { border-radius:8px; padding:14px 16px; }
.modal-backdrop { background:#12192466; backdrop-filter:none; -webkit-backdrop-filter:none; }
.modal,.modal.order-modal,.context-popover,.cal-month-popover,.msg-attachment-menu { border-radius:14px; background:var(--surface); border:1px solid var(--line); backdrop-filter:none; -webkit-backdrop-filter:none; box-shadow:var(--shadow-dialog); }
.modal-header,.order-modal .modal-header { position:static; top:auto; border-radius:0; padding:18px 22px; background:var(--surface); backdrop-filter:none; -webkit-backdrop-filter:none; }
.modal-header h2 { font-size:21px; }
.modal form,.modal-body { padding:22px; }
.order-form-footer,.prescription-form .form-bottom { position:static; bottom:auto; background:var(--surface); box-shadow:none; backdrop-filter:none; -webkit-backdrop-filter:none; }
.order-section,.work-record { border-radius:9px; }
.auth-shell { background:var(--bg); }
.auth-card { padding:30px; }
/* All hidden content has a labelled, keyboard-operable disclosure. */
.minimal-disclosure { border:1px solid var(--line); border-radius:10px; background:var(--surface); margin:16px 0; min-width:0; }
.minimal-disclosure>summary { cursor:pointer; padding:15px 18px; font-size:13px; font-weight:550; color:var(--muted); min-height:48px; }
.minimal-disclosure[open]>summary { border-bottom:1px solid var(--line); color:var(--ink); }
.minimal-disclosure-body { padding:18px; }
.minimal-disclosure>summary>span { margin-left:8px; font-weight:400; font-size:12px; }
.minimal-notice { display:block; font-size:12px; margin-top:20px; }
.minimal-notice>summary { cursor:pointer; }
.minimal-notice>p { max-width:720px; line-height:1.6; }
.case-process-details { margin:0; }
.case-process-details .process-panel { border:0; box-shadow:none; }
.minimal-disclosure .home-film { max-width:580px; border-radius:8px; box-shadow:none; }
.minimal-disclosure .home-film-caption { min-height:52px; }
.home-hero .minimal-disclosure { grid-column:1/-1; margin:0; }
.home-hero .minimal-disclosure .home-film { display:block; }
.clinical-history>summary,.case-payment>summary { padding:16px 20px; font-size:13px; }
/* One Pro, with the same visual hierarchy in each specialist's workspace. */
.partner-shell { max-width:1120px; padding:22px 28px 50px; }
.partner-top { padding-bottom:18px; }
.partner-heading { margin:28px 0 22px; }
.partner-heading h1 { font-size:30px; letter-spacing:-.7px; }
.partner-heading>p:last-child { font-size:14px; line-height:1.55; }
.partner-demo { background:var(--surface); border-radius:8px; padding:12px 16px; margin-top:18px; }
details.partner-demo { display:block; padding:0 16px; }
.partner-demo-controls { padding:0 0 16px; display:grid; gap:12px; }
.partner-demo-controls p { margin:0; }
.partner-demo-controls label { display:grid; gap:6px; max-width:400px; }
.partner-demo-controls nav { margin:0; }
.partner-stats { gap:0; border:1px solid var(--line); border-radius:10px; overflow:hidden; background:var(--surface); }
.partner-stats>div { padding:14px 18px; border:0; border-right:1px solid var(--line); border-radius:0; background:transparent; }
.partner-stats>div:last-child { border-right:0; }
.partner-stats b { font-size:24px; }
.partner-toolbar { margin:20px 0; }
.partner-panel,.partner-job { padding:20px; margin:14px 0; }
.partner-job h3 { font-size:19px; }
.partner-facts { padding:12px 0; margin:14px 0; gap:16px; }
.partner-action,.partner-upload,.partner-review { padding:16px; border-radius:8px; background:var(--surface-2); }
.partner-history { margin-top:16px; }
.partner-shell summary { min-height:44px; display:list-item; padding:10px 0; }
.partner-shell .partner-panel>summary { padding:0; }
.partner-job-body>summary { font-weight:600; color:var(--accent-ink); }
.partner-job-body[open]>summary { margin-bottom:12px; }
.partner-open-hint { display:block; font-size:12px; color:var(--muted); font-weight:400; margin-top:3px; }
.partner-alternative { border-top:1px solid var(--line); margin-top:16px; }
.partner-toolbar [data-tab][aria-pressed=true] { background:var(--accent-wash); color:var(--accent-ink); border-color:transparent; }
.pro-role-help { margin:16px 0; color:var(--muted); font-size:13px; }
.pro-role-help>summary { cursor:pointer; padding:10px 0; min-height:44px; }
.partner-empty { border-style:solid; border-radius:10px; }
.pro-role-picker { max-width:880px; padding:48px 24px; }
.pro-role-picker>h1 { font-size:28px; letter-spacing:-.7px; margin-bottom:10px; }
.pro-role-picker>p { font-size:15px; }
.pro-role-cards { grid-template-columns:1fr; gap:12px; margin:28px 0; }
.pro-role-card { position:relative; padding:20px 24px; border:1px solid var(--line); border-radius:10px; background:var(--surface); }
.pro-role-card h2 { font-size:19px; margin:0 0 6px; }
.pro-role-card p { min-height:0; font-size:14px; color:var(--muted); margin:0 0 12px; }
.pro-role-card strong { font-size:13px; color:var(--accent-ink); }
.pro-role-card:hover { border-color:var(--line-strong); background:var(--surface-2); }
/* Conversation controls and media remain intact; the canvas is quiet. */
:root body.msg-route,:root[data-theme=dark] body.msg-route {
  --bg:inherit; --surface:inherit; --surface-2:inherit; --surface-3:inherit;
  --ink:inherit; --muted:inherit; --subtle:inherit; --line:inherit;
  --glass:inherit; --glass-bar:inherit; --accent-wash:inherit; --accent-ink:inherit; --focus:inherit;
}
:root .msg-app,:root .messenger-workspace,:root[data-theme=dark] .msg-app,:root[data-theme=dark] .messenger-workspace {
  --msg-ink:var(--ink); --msg-muted:var(--muted); --msg-panel:var(--surface); --msg-line:var(--line);
  --msg-thread-bg:var(--bg); --msg-mine:var(--accent-wash); --msg-bubble:var(--surface);
  --msg-field:var(--surface-2); --msg-green:var(--ink); --msg-action:var(--accent);
}
.msg-app,.messenger-workspace { box-shadow:none; border-radius:12px; }
.msg-thread { background-color:var(--msg-thread-bg); }
:root:not([data-chat-wallpaper=on]) .msg-thread { background-image:none; }
.msg-bubble { box-shadow:none; }
.msg-mine>footer,.msg-mine .msg-audio-clock,:root[data-theme=dark] .msg-mine>footer,:root[data-theme=dark] .msg-mine .msg-audio-clock { color:var(--muted); }
.msg-composer>.msg-send,.msg-record-start,.messenger-unread { color:var(--action-ink); }
.msg-app .msg-attachment-menu { background:var(--surface); border-radius:12px; backdrop-filter:none; -webkit-backdrop-filter:none; }
.msg-attachment-menu>button { box-shadow:none; background:var(--surface-2); border-radius:8px; }
.settings-list { overflow:hidden; }
.settings-row { min-height:64px; }
.capacity-shell { max-width:1280px; padding:24px 28px 40px; }
.capacity-intro { padding:32px 0 20px; }
.capacity-intro h1 { font-size:34px; letter-spacing:-.8px; }
.capacity-card,.capacity-form { padding:20px; }
.capacity-notice,.capacity-cycle,.capacity-kpi { border-radius:8px; }
.capacity-kpi strong { font-size:30px; }
.capacity-top,.legal-top { position:static; }
.legal-card { border-radius:12px; box-shadow:none; }
/* Entry: choice first, optional presentation after the choice. */
.entry-main { max-width:1000px; padding:24px 30px 36px; }
.entry-main:before { content:none; }
.entry-hero { display:block; padding:42px 0 26px; }
.entry-hero .entry-intro h1 { font-size:clamp(30px,4vw,42px); letter-spacing:-1px; margin:10px 0 14px; }
.entry-intro>p:last-child { font-size:16px; line-height:1.6; }
.entry-apps { gap:18px; }
.entry-card { padding:24px; }
.entry-card img { width:44px; height:44px; border-radius:11px; margin-bottom:16px; box-shadow:none; }
.entry-card h2 { font-size:25px; margin:5px 0 10px; }
.entry-card>p:not(.eyebrow) { font-size:14px; margin-bottom:20px; }
.entry-card .primary { min-height:44px; }
.entry-register,.entry-demo { margin-top:14px; }
.entry-foot { gap:12px 22px; padding-top:24px; }
@media (max-width:1100px) and (min-width:801px) {
  .app { grid-template-columns:204px minmax(0,1fr); }
  .side { width:204px; padding-left:10px; padding-right:10px; }
  .content { padding:24px; }
}
@media (max-width:960px) {
  .detail-columns.role-detail { grid-template-columns:1fr; }
  .case-progress-rail { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
}
@media (max-width:800px) {
  .content { padding:22px 18px 96px; }
  .home-focus { padding:20px; }
  .page-head h1 { font-size:28px; }
  .case-heading h2 { font-size:25px; }
}
@media (max-width:680px) {
  .app { display:block; }
  .side { display:none; }
  .topbar { height:calc(60px + env(safe-area-inset-top)); padding:env(safe-area-inset-top) 16px 0; }
  .mobile-brand { font-size:17px; }
  .mobile-brand .logo { width:30px; height:32px; border-radius:8px; }
  .top-actions { gap:4px; }
  .top-actions .secondary { padding:8px; font-size:11px; }
  .mobile-nav { left:0; right:0; bottom:0; width:100%; max-width:none; border:0; border-top:1px solid var(--line); border-radius:0; padding:4px 8px max(4px,env(safe-area-inset-bottom)); background:var(--surface); box-shadow:none; backdrop-filter:none; -webkit-backdrop-filter:none; }
  .mobile-nav button { min-height:52px; border-radius:7px; padding:6px 2px; gap:4px; font-size:10px; }
  .mobile-nav[data-glass-switcher]>button.active { background:var(--accent-wash); color:var(--accent-ink); }
  .mobile-nav .icon { width:20px; height:20px; }
  .content { padding:20px 16px calc(86px + env(safe-area-inset-bottom)); }
  .page-head { gap:12px; margin-bottom:20px; }
  .page-head h1 { font-size:26px; }
  .page-head .sub { font-size:13px; }
  .home-focus h2 { font-size:22px; }
  .home-focus { padding:18px; }
  .home-focus .eyebrow { margin:0 0 12px; }
  .home-focus-actions { gap:8px; margin-top:16px; }
  .home-focus-actions .primary,.home-focus-actions .secondary { font-size:12px; padding:10px 11px; }
  .home-focus-actions .primary { white-space:nowrap; }
  .home-focus-side { display:flex; flex-wrap:wrap; align-items:baseline; gap:5px 10px; margin-top:16px; padding-top:12px; }
  .home-focus-side>strong { font-size:22px; }
  .home-focus-side>span { margin-right:auto; }
  .home-focus-side>small { flex-basis:100%; font-size:11px; }
  .home-summary-item { padding:13px 12px; }
  .home-summary-item>strong { font-size:23px; }
  .home-summary-item>span { font-size:11px; }
  .outsourcing-entry { padding:16px; }
  .outsourcing-entry .eyebrow { display:block; font-size:9px; margin:0; }
  .outsourcing-entry h3 { margin:4px 0; }
  .outsourcing-entry .secondary { width:100%; }
  .case-command { padding:16px; }
  .case-command h3 { font-size:18px; }
  .stage-advance { min-width:0; }
  .case-command-actions>.primary { flex:1; }
  .case-progress-rail { grid-template-columns:1fr; }
  .case-heading { align-items:flex-start; gap:12px; }
  .case-heading h2 { font-size:24px; }
  .case-heading-price { font-size:19px; }
  .modal-backdrop { padding:10px; }
  .modal,.modal.compact,.modal.order-modal { border-radius:12px; max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 20px); }
  .modal-header,.order-modal .modal-header { padding:16px; border-radius:0; }
  .modal-header h2 { font-size:20px; }
  .modal form,.modal-body { padding:16px; }
  .date-input,.search,textarea,select.input,input.input,.partner-shell .input { font-size:16px; }
  .partner-shell { padding:18px 16px 32px; }
  .partner-heading { margin:24px 0 20px; }
  .partner-heading h1 { font-size:26px; }
  .partner-panel,.partner-job { padding:16px; }
  .partner-stats>div { padding:12px; }
  .partner-facts { gap:12px; }
  .partner-action,.partner-upload,.partner-review { padding:14px; }
  .pro-role-picker { padding:30px 18px; }
  .pro-role-card { padding:18px; }
  .entry-main { padding:20px 18px 30px; }
  .entry-hero { padding:32px 0 20px; }
  .entry-apps { grid-template-columns:1fr; gap:14px; }
  .entry-card { padding:22px; }
  .entry-foot { line-height:1.6; }
  .capacity-shell { padding:20px 16px; }
  .capacity-intro h1 { font-size:28px; }
}
@media (forced-colors:active) {
  [data-glass-switcher]>button.active,[data-glass-switcher]>button[aria-pressed=true],[data-glass-switcher]>button[aria-current=page] { background:Highlight; color:HighlightText; border:2px solid Highlight; }
  .primary,.secondary,.panel,.partner-job,.pro-role-card { border:1px solid CanvasText; }
}
@media (prefers-reduced-motion:reduce) {
  .content,.order-tile,.primary,.secondary,.icon-button { animation:none; transition:none; }
}
