/* CEREC workspace · shared visual system.
   Loaded after the feature styles. Calendar layout and Pavel's tooth geometry
   belong to their own modules; this layer defines surfaces and interactions. */

:root {
  --bg: #f2f4f7;
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --surface-3: #eaf0f6;
  --glass: rgba(255, 255, 255, .76);
  --glass-bar: rgba(242, 245, 249, .74);
  --glass-control: rgba(255, 255, 255, .82);
  --glass-sheet: rgba(255, 255, 255, .96);
  --glass-edge: rgba(255, 255, 255, .9);
  --edge-highlight: rgba(255, 255, 255, .82);
  --ambient: rgba(77, 113, 160, .07);
  --ink: #202b3b;
  --muted: #5e6b7d;
  --subtle: #617084;
  --line: #e4e9f0;
  --line-strong: #cbd5e2;
  --accent: #176be6;
  --accent-hover: #105dce;
  --accent-ink: #1b5fba;
  --accent-wash: #edf4ff;
  --action-start: #2270e2;
  --action-end: #1767da;
  --action-ink: #ffffff;
  --green: #20745c;
  --green-wash: #eaf5ef;
  --orange: #91631d;
  --orange-wash: #fcf4e6;
  --red: #b5434f;
  --red-wash: #fdf0f1;
  --focus: rgba(32, 108, 225, .48);
  --radius: 20px;
  --shadow-card: inset 0 1px 0 var(--edge-highlight), 0 1px 2px rgba(30, 49, 75, .025), 0 8px 24px -18px rgba(30, 49, 75, .18);
  --shadow-float: 0 2px 4px rgba(30, 49, 75, .035), 0 14px 36px -18px rgba(30, 49, 75, .25);
  --shadow: var(--shadow-card);
  --shadow-dialog: 0 2px 5px rgba(10, 24, 43, .05), 0 36px 110px -24px rgba(10, 24, 43, .32);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.2, .9, .2, 1);
  --motion-fast: 160ms;
  --motion-normal: 280ms;
  --motion-slow: 420ms;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI", sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", Inter, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  --bg: #11151c;
  --surface: #1b222c;
  --surface-2: #202936;
  --surface-3: #293444;
  --glass: rgba(34, 43, 56, .82);
  --glass-bar: rgba(24, 31, 41, .8);
  --glass-control: rgba(48, 58, 73, .76);
  --glass-sheet: rgba(29, 37, 49, .97);
  --glass-edge: rgba(173, 193, 221, .13);
  --edge-highlight: rgba(255, 255, 255, .065);
  --ambient: rgba(93, 130, 182, .055);
  --ink: #edf2fa;
  --muted: #b0bdcf;
  --subtle: #95a5bc;
  --line: #303b4b;
  --line-strong: #485970;
  --accent: #78aaff;
  --accent-hover: #a0c3ff;
  --accent-ink: #a1c5ff;
  --accent-wash: #263b58;
  --action-start: #83b1ff;
  --action-end: #6c9ded;
  --action-ink: #10213a;
  --green: #95d5b7;
  --green-wash: #203b33;
  --orange: #e5bf7f;
  --orange-wash: #40362a;
  --red: #ffb1b7;
  --red-wash: #432a33;
  --focus: rgba(144, 188, 255, .64);
  --shadow-card: inset 0 1px 0 var(--edge-highlight), 0 1px 2px rgba(0, 0, 0, .08), 0 12px 28px -17px rgba(0, 0, 0, .4);
  --shadow-float: 0 3px 6px rgba(0, 0, 0, .12), 0 18px 42px -16px rgba(0, 0, 0, .55);
  --shadow-dialog: 0 2px 5px rgba(0, 0, 0, .12), 0 38px 120px -24px rgba(0, 0, 0, .72);
}

body {
  background: radial-gradient(ellipse at 12% 0%, var(--ambient), transparent 52%), var(--bg);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: -.018em;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, .brand b, .entry-brand, .legal-brand { font-family: var(--font-display); }
button, input, select, textarea { font-family: inherit; }
button, a { touch-action: manipulation; }
button, a, input, select, textarea, summary { outline-offset: 4px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); }
::selection { background: var(--accent-wash); color: var(--accent-ink); }
.content { animation: none; }

/* Navigation stays visually quiet; one active location has one clear surface. */
.app { grid-template-columns: 260px minmax(0, 1fr); }
.side {
  width: 260px;
  padding: 32px 18px 22px;
  background: linear-gradient(160deg, var(--edge-highlight), transparent 48%), var(--glass-bar);
  border-right-color: color-mix(in srgb, var(--line) 82%, transparent);
  box-shadow: inset -1px 0 0 var(--edge-highlight);
  -webkit-backdrop-filter: blur(28px) saturate(1.25);
  backdrop-filter: blur(28px) saturate(1.25);
}
.brand { gap: 12px; margin: 0 12px 38px; }
.logo {
  width: 42px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(145deg, #2588e7, #137ca8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24), 0 4px 10px rgba(19, 94, 152, .12);
}
.brand b { font-size: 21px; line-height: 1.3; font-weight: 650; letter-spacing: -.8px; }
.brand small { font-size: 9px; margin-top: 3px; letter-spacing: 1.3px; }
.side-label { padding: 0 15px 14px; font-size: 9px; letter-spacing: 1.5px; }
.nav { gap: 5px; }
.nav button {
  min-height: 48px;
  padding: 12px 14px;
  gap: 12px;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 530;
  transition: color var(--motion-fast), background-color var(--motion-fast), box-shadow var(--motion-normal), transform var(--motion-fast) var(--ease-out);
}
.nav button.active {
  background: var(--glass-control);
  color: var(--ink);
  border-color: var(--glass-edge);
  box-shadow: inset 0 1px 0 var(--edge-highlight), 0 2px 5px rgba(24, 45, 72, .04), 0 7px 16px -12px rgba(24, 45, 72, .18);
  font-weight: 650;
}
.nav button.active .icon { color: var(--accent); }
.nav .count { font-size: 10px; font-weight: 650; background: var(--surface-2); min-width: 22px; text-align: center; }
.side-note { font-size: 12px; line-height: 1.8; margin: 22px 14px; }
.side .workspace-link { padding: 12px 0; min-height: 44px; font-size: 12px; }
.profile { padding: 20px 10px 0; gap: 12px; }
.profile b { font-size: 13px; font-weight: 600; }
.profile small { font-size: 11px; line-height: 1.7; }
.avatar { width: 38px; height: 38px; box-shadow: inset 0 0 0 1px rgba(60, 112, 183, .04); }
.topbar {
  height: 82px;
  padding: 0 38px;
  border-bottom-color: color-mix(in srgb, var(--line) 75%, transparent);
  background: var(--glass-bar);
  box-shadow: inset 0 1px 0 var(--edge-highlight);
  -webkit-backdrop-filter: blur(24px) saturate(1.35);
  backdrop-filter: blur(24px) saturate(1.35);
}
.breadcrumb { font-size: 12px; letter-spacing: 0; }
.breadcrumb > span { padding: 0 7px; color: var(--line-strong); }
.breadcrumb b { color: var(--ink); font-weight: 550; }
.top-actions { gap: 9px; }
.fixed-role { border: 0; background: transparent; font-size: 12px; padding: 7px; }
.demo-badge, .pilot-badge { border-radius: 7px; font-size: 9px; letter-spacing: .5px; padding: 5px 8px; }
.content { padding: 36px 38px 56px; max-width: 1512px; }
.eyebrow { font-size: 10px; font-weight: 600; letter-spacing: 1.6px; }
.page-head { margin: 9px 0 30px; gap: 24px; }
.page-head h1 { font-size: 36px; line-height: 1.12; letter-spacing: -1.45px; font-weight: 650; margin-bottom: 11px; }
.sub { font-size: 14px; line-height: 1.65; }

/* Controls have a light edge, tactile press, keyboard ring and honest disabled state. */
.primary, .secondary, .ghost, .danger {
  min-height: 46px;
  padding: 12px 18px;
  gap: 9px;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 600;
  border-radius: 13px;
  transition: background-color var(--motion-fast), color var(--motion-fast), border-color var(--motion-fast), box-shadow var(--motion-normal), transform var(--motion-fast) var(--ease-out);
}
.primary, :root[data-theme="dark"] .primary {
  color: var(--action-ink);
  background: linear-gradient(180deg, var(--action-start), var(--action-end));
  border-color: rgba(14, 70, 159, .1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 2px 3px rgba(21, 76, 157, .08), 0 6px 14px -9px rgba(21, 76, 157, .4);
}
.secondary {
  background: var(--glass-control);
  border-color: color-mix(in srgb, var(--line-strong) 75%, var(--glass-edge));
  box-shadow: inset 0 1px 0 var(--edge-highlight), 0 1px 2px rgba(22, 41, 64, .035);
}
.ghost { padding: 10px 12px; background: transparent; }
.danger { border-color: color-mix(in srgb, var(--red) 15%, transparent); }
.primary:active:not(:disabled), .secondary:active:not(:disabled), .ghost:active:not(:disabled), .danger:active:not(:disabled) {
  transform: translateY(1px) scale(.985);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .06);
}
.icon-button, .close, .availability .icon-button, .work-record > .icon-button,
.queued-photo .icon-button, .order-reminder .icon-button {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--glass-control);
  color: var(--muted);
  box-shadow: inset 0 1px 0 var(--edge-highlight), 0 2px 4px rgba(22, 41, 64, .025);
}
.close { border-radius: 12px; background: var(--surface-2); }
.icon { width: 19px; height: 19px; stroke-width: 1.65; }
.notification-dot { right: 8px; top: 8px; width: 6px; height: 6px; outline: 2px solid var(--surface); }
button:disabled, .primary:disabled, .secondary:disabled, .ghost:disabled, .danger:disabled {
  opacity: .46;
  transform: none;
  box-shadow: none;
}
[aria-busy="true"].primary, [aria-busy="true"].secondary { cursor: progress; }
.dialog-busy { opacity: .65; }

@media (hover: hover) and (pointer: fine) {
  .nav button:not(.active):hover { background: var(--surface-3); color: var(--ink); }
  .nav button.active:hover { background: var(--surface); border-color: var(--line-strong); }
  .primary:hover:not(:disabled), :root[data-theme="dark"] .primary:hover:not(:disabled) {
    background: linear-gradient(180deg, var(--action-start), var(--action-end));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 4px 10px -4px rgba(21, 76, 157, .22), 0 9px 20px -12px rgba(21, 76, 157, .45);
    transform: translateY(-1px);
  }
  .secondary:hover:not(:disabled), .icon-button:hover:not(:disabled), .close:hover:not(:disabled) {
    background: var(--surface-2);
    border-color: color-mix(in srgb, var(--accent) 24%, var(--line-strong));
    color: var(--ink);
  }
  .ghost:hover:not(:disabled) { background: var(--accent-wash); color: var(--accent-ink); }
  .primary:active:not(:disabled), .secondary:active:not(:disabled), .ghost:active:not(:disabled), .danger:active:not(:disabled) { transform: translateY(1px) scale(.985); }
  a:not([class]):hover { text-decoration-thickness: 1.5px; }
}

/* Inputs read as fields, while secondary information recedes by hierarchy. */
.date-input, .search, textarea.input, select.input, input.input {
  min-height: 46px;
  padding: 12px 14px;
  border-radius: 12px;
  border-color: var(--line-strong);
  background: var(--surface);
  font-size: 14px;
  line-height: 1.5;
  box-shadow: inset 0 1px 2px rgba(26, 47, 74, .025);
  transition: border-color var(--motion-fast), background-color var(--motion-fast), box-shadow var(--motion-fast);
}
.input::placeholder, .search::placeholder { color: var(--subtle); opacity: .9; }
.input:focus, .search:focus, .date-input:focus { border-color: var(--accent); background: var(--surface); }
.input:disabled, .search:disabled, .date-input:disabled { background: var(--surface-2); cursor: not-allowed; }
.input[aria-invalid="true"] { border-color: var(--red); background: var(--red-wash); }
.field { gap: 8px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.field small, .privacy-caption { font-size: 11px; line-height: 1.65; }
.check { min-height: 44px; font-size: 13px; gap: 11px; line-height: 1.65; }
.check input { width: 19px; height: 19px; margin-top: 2px; }
.form-note { font-size: 12px; line-height: 1.75; padding: 15px 17px; border-radius: 14px; }
.form-error:not(:empty) { padding: 11px 13px; border: 1px solid color-mix(in srgb, var(--red) 20%, transparent); background: var(--red-wash); border-radius: 11px; line-height: 1.65; }
.form-error:empty { min-height: 0; margin-top: 0; }
.filter-bar { gap: 16px; margin-bottom: 22px; }
.filter-tabs, .theme-picker, .auth-tabs {
  padding: 5px;
  gap: 3px;
  background: var(--surface-3);
  border: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
  border-radius: 14px;
  box-shadow: inset 0 1px 2px rgba(18, 42, 72, .025);
}
.filter-tabs button, .theme-picker button, .auth-tabs button {
  min-height: 44px;
  padding: 9px 13px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.4;
}
.filter-tabs button[aria-pressed="true"], .theme-picker button[aria-pressed="true"], .auth-tabs button.active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(22, 40, 65, .07), 0 3px 8px -4px rgba(22, 40, 65, .08);
  font-weight: 600;
}
.filter-tabs, .theme-picker, .chat, .modal, .side { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.filter-tabs::-webkit-scrollbar, .theme-picker::-webkit-scrollbar { height: 3px; }
.chat::-webkit-scrollbar, .modal::-webkit-scrollbar, .side::-webkit-scrollbar { width: 5px; }
.filter-tabs::-webkit-scrollbar-thumb, .theme-picker::-webkit-scrollbar-thumb,
.chat::-webkit-scrollbar-thumb, .modal::-webkit-scrollbar-thumb, .side::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 9px; }

/* Cards share a refined edge and lift; original information structure is retained. */
.panel { border-color: var(--line); box-shadow: var(--shadow-card); }
.panel-head { padding: 23px 25px; }
.panel-head h2 { font-size: 16px; font-weight: 600; letter-spacing: -.35px; }
.panel-head small { font-size: 12px; }
.section-pad { padding: 25px; }
.section-pad h3 { font-size: 15px; letter-spacing: -.25px; font-weight: 600; }
.text-small { font-size: 13px; line-height: 1.65; }
.stack { gap: 22px; }
.columns, .detail-columns { gap: 24px; }
.hero { border-radius: 24px; min-height: 278px; margin-bottom: 24px; box-shadow: var(--shadow-card); }
.hero-copy { padding: 34px 36px; }
.hero h2 { font-size: 33px; font-weight: 550; line-height: 1.12; letter-spacing: -1.2px; margin: 14px 0; }
.hero p { font-size: 14px; line-height: 1.65; max-width: 310px; }
.hero .ghost { padding-left: 0; font-size: 13px; }
.stats { gap: 16px; margin-bottom: 28px; }
.stat { padding: 22px 24px; border-radius: 19px; gap: 17px; }
.stat .stat-icon { border-radius: 14px; width: 45px; height: 45px; background: var(--surface-2); }
.stat b { font-size: 30px; letter-spacing: -1px; font-weight: 560; }
.stat small { font-size: 12px; line-height: 1.5; }
.case-row { padding: 21px 25px; }
.row-main b { font-size: 14px; letter-spacing: -.2px; }
.row-main small, .row-end small { font-size: 12px; }
.all-link { min-height: 52px; padding: 18px 25px; font-size: 13px; font-weight: 550; }
.pill { border: 1px solid color-mix(in srgb, currentColor 8%, transparent); font-size: 11px; line-height: 1.3; border-radius: 8px; padding: 5px 9px; }
.booking-card { padding: 25px; }
.mini-date { font-size: 13px; }
.slots { gap: 9px; }
.booking-card .slot { min-height: 46px; font-size: 14px; border-radius: 12px; font-weight: 550; background: var(--surface); }
.booking-card .slot:hover:not(:disabled) { background: var(--accent-wash); color: var(--accent-ink); border-color: var(--accent); }
.booking-note { font-size: 12px; line-height: 1.6; }
.empty { padding: 46px 28px; font-size: 14px; }
.empty strong { font-size: 17px; letter-spacing: -.35px; font-weight: 600; }
.empty p { line-height: 1.7; }
.notice { font-size: 11px; line-height: 1.7; margin-top: 28px; padding: 0 2px; }
.notice .icon { margin-top: 2px; opacity: .8; }
.workspace-banner { padding: 17px 21px; border-radius: 16px; }
.order-tiles { gap: 20px; }
.pavel-order-tile { border-color: var(--line); border-radius: 20px; box-shadow: var(--shadow-card); }
.pavel-tile-header { min-height: 76px; padding: 18px 21px 14px; gap: 11px; }
.pavel-tile-person > strong { font-size: 14px; font-weight: 600; }
.pavel-tile-person > small { font-size: 11px; line-height: 1.55; }
.pavel-tile-avatar { width: 37px; height: 37px; background: var(--surface-2); color: var(--accent-ink); }
.pavel-tile-main { margin: 4px 8px; padding: 19px 17px; min-height: 142px; border-radius: 14px; background: linear-gradient(135deg, var(--accent-wash), color-mix(in srgb, var(--accent-wash) 45%, var(--surface))); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 5%, transparent); }
.pavel-tile-title { font-size: 22px; line-height: 1.25; font-weight: 600; letter-spacing: -.7px; }
.pavel-task-badge { font-size: 11px; line-height: 1.5; padding: 7px 9px; gap: 6px; background: var(--surface); box-shadow: 0 1px 2px rgba(17, 44, 79, .025); }
.pavel-task-badge .icon { width: 17px; height: 17px; }
.pavel-tile-price { font-size: 21px; font-weight: 600; letter-spacing: -.6px; color: var(--ink); }
.pavel-tile-statuses { padding: 10px 22px 16px; }
.pavel-status-row { padding: 8px 0; font-size: 12px; }
.pavel-status-row > span:first-child { font-size: 11px; }
.pavel-tile-foot { font-size: 11px; line-height: 1.65; padding-top: 12px; }
.case-row.order-tile { padding: 22px; border-radius: 18px; }
.panel > .case-row.order-tile { border-radius: 0; padding: 22px 25px; }
.order-tile-number { font-size: 12px; }
.order-tile-meta, .order-tile-note, .order-tile-footer { font-size: 12px; }

@media (hover: hover) and (pointer: fine) {
  .pavel-order-tile:hover, .order-tiles > .order-tile:hover { border-color: var(--line-strong); box-shadow: var(--shadow-float); transform: translateY(-3px); }
  .pavel-order-tile:active, .order-tiles > .order-tile:active { transform: translateY(0) scale(.99); }
}

/* Detail, production and communication retain their content but gain hierarchy. */
.case-summary { padding: 28px; gap: 24px; }
.case-summary h2 { font-size: 28px; font-weight: 600; letter-spacing: -.9px; }
.case-summary p { font-size: 13px; line-height: 1.8; }
.price { font-size: 27px; letter-spacing: -.8px; }
.price small { font-size: 11px; letter-spacing: 0; }
.next-stage { font-size: 25px; line-height: 1.3; letter-spacing: -.75px; }
.live-order { border-color: color-mix(in srgb, var(--accent) 14%, var(--line)); border-radius: 18px; box-shadow: var(--shadow-float); }
.live-order-title strong { font-size: 14px; font-weight: 600; }
.live-order-title small { font-size: 11px; }
.order-progress-top { font-size: 12px; }
.order-progress-top strong { font-size: 13px; }
.order-progress .progress-track { height: 5px; margin-top: 12px; background: var(--surface-3); }
.order-progress .progress-track span { background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 75%, var(--green))); }
.order-description-text { font-size: 14px; line-height: 1.8; }
.prescription-readonly article { padding: 16px 17px; border-radius: 13px; }
.prescription-readonly strong { font-size: 13px; font-weight: 600; }
.order-reminder { border-radius: 15px; gap: 14px; }
.order-reminder p { font-size: 13px; line-height: 1.65; }
.timeline li { min-height: 39px; font-size: 12px; gap: 14px; }
.timeline li:after { top: 25px; bottom: -14px; }
.history p { padding-bottom: 13px; margin-bottom: 13px; line-height: 1.6; }
.history small { font-size: 11px; }
.production-grid { gap: 20px; }
.production-lane { padding: 16px; border-radius: 21px; background: color-mix(in srgb, var(--surface-2) 80%, var(--bg)); }
.lane-title { font-size: 13px; padding: 4px 3px 5px; font-weight: 600; }
.production-card { padding: 20px; border-radius: 16px; box-shadow: var(--shadow-card); margin-bottom: 12px; }
.production-card > strong { font-size: 14px; letter-spacing: -.2px; }
.production-card > small { font-size: 12px; line-height: 1.6; }
.production-quick-action { font-size: 12px; margin-top: 16px; }
.production-card:last-child { margin-bottom: 0; }
.lane-empty { padding: 32px 10px; font-size: 13px; }
.messenger { gap: 22px; }
.messenger-contacts { padding: 22px 12px; }
.messenger-contacts h3 { font-size: 13px; font-weight: 600; }
.messenger-contacts > button { padding: 14px 11px; border-radius: 13px; gap: 12px; }
.messenger-contacts > button strong { font-size: 12px; line-height: 1.6; }
.messenger-contacts > button small { font-size: 11px; line-height: 1.6; }
.messenger-chat { padding: 26px; }
.messenger-chat > h3 { font-size: 16px; font-weight: 600; padding-bottom: 21px; }
.messenger-chat .chat { min-height: 300px; }
.bubble { font-size: 14px; line-height: 1.65; padding: 14px 16px; border-radius: 17px 17px 17px 5px; }
.bubble.mine { background: var(--accent-wash); border-radius: 17px 17px 5px 17px; }
.bubble small { font-size: 11px; margin-bottom: 5px; }
.compose { gap: 10px; margin-top: 22px; }
.compose .input { background: var(--surface-2); border-color: var(--line); }
.compose .primary { min-width: 46px; padding: 12px; }
.activity-row { padding: 22px 25px; gap: 16px; }
.activity-row .activity-icon { padding: 11px; border-radius: 13px; }
.activity-row .row-main strong { font-size: 13px; font-weight: 600; }
.activity-row .row-main p { font-size: 14px; line-height: 1.7; margin-top: 6px; }
.activity-row > time { font-size: 11px; padding-top: 2px; }

/* Feedback and delay chips are large enough for an operator working on a phone. */
.delay-reasons, .delay-minutes, .feedback-rating, .feedback-tags { gap: 8px; }
.delay-reasons label span, .delay-minutes label span, .feedback-rating label span,
.feedback-tags label span, .feedback-tags > span {
  min-height: 44px;
  padding: 11px 13px;
  font-size: 12px;
  line-height: 1.45;
  border-radius: 12px;
  background: var(--surface);
  transition: color var(--motion-fast), background-color var(--motion-fast), border-color var(--motion-fast), box-shadow var(--motion-fast);
}
.delay-reasons input:checked + span, .delay-minutes input:checked + span,
.feedback-rating input:checked + span, .feedback-tags input:checked + span {
  border-color: var(--accent);
  background: var(--accent-wash);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent-ink);
}
.delay-minutes label span { font-size: 16px; min-height: 48px; font-variant-numeric: tabular-nums; }
.feedback-rating label span { min-height: 49px; font-size: 12px; }
.feedback-group-label { font-size: 13px; }
.feedback-metric { font-size: 13px; gap: 16px; margin: 19px 0; }
.feedback-metric > div { height: 7px; border-radius: 8px; }
.feedback-metric strong { font-size: 13px; font-variant-numeric: tabular-nums; }
.feedback-entry { padding: 19px 0; font-size: 13px; }
.feedback-entry p { font-size: 14px; line-height: 1.7; }
.photo-grid { gap: 12px; }
.photo-grid a { border-radius: 13px; transition: border-color var(--motion-fast), box-shadow var(--motion-normal); }
.photo-grid a:hover { border-color: var(--line-strong); box-shadow: var(--shadow-card); }
.photo-grid span { padding: 10px 11px; font-size: 11px; }
.photo-empty { font-size: 12px; line-height: 1.6; padding: 17px; border-radius: 13px; }
.file-action { min-height: 44px; padding: 10px 14px; }
.flow-row { padding: 16px 0; font-size: 13px; line-height: 1.6; }
.availability li { min-height: 58px; font-size: 13px; gap: 14px; }
.security-links { font-size: 13px; gap: 18px; align-items: center; }
.security-links a { min-height: 44px; display: inline-flex; align-items: center; }
.section-menu { gap: 10px; margin-bottom: 25px; }
.help-card { padding: 28px; }
.help-card h2 { font-size: 19px; font-weight: 600; letter-spacing: -.5px; }
.help-card p, .help-card li { font-size: 14px; line-height: 1.8; }
.service-card { padding: 27px; }
.service-card h3 { font-size: 18px; font-weight: 600; letter-spacing: -.45px; }
.service-card > p { font-size: 14px; line-height: 1.75; }
.service-card > strong { font-size: 28px; font-weight: 550; letter-spacing: -.9px; margin-bottom: 19px; }
.service-card > button { font-size: 13px; }
.about-hero { border-radius: 24px; }
.about-hero p { font-size: 14px; }
.about-equipment span { font-size: 11px; padding: 8px 11px; border-radius: 10px; }

/* Sheets use focused depth. No new sizing or transforms are applied to teeth. */
.modal-backdrop { background: rgba(18, 29, 45, .27); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: premium-veil var(--motion-normal) var(--ease-out); }
.modal { border-radius: 24px; background: var(--glass-sheet); border-color: var(--glass-edge); box-shadow: inset 0 1px 0 var(--edge-highlight), var(--shadow-dialog); animation: premium-sheet var(--motion-normal) var(--ease-spring); }
.modal-header { padding: 22px 26px; background: var(--glass); border-bottom-color: var(--line); }
.modal-header h2 { font-size: 20px; font-weight: 600; letter-spacing: -.6px; line-height: 1.35; }
.modal form, .modal-body { padding: 26px; }
.modal.order-modal { border-radius: 26px; }
.order-modal form.prescription-form { padding: 0; }
.prescription-order-info, .work-editor, .prescription-work-list, .protocol-fields { border-radius: 16px; }
.prescription-field .input { min-height: 44px; font-size: 13px; }
.prescription-field > span:first-child, .prescription-order-info .field { font-size: 12px; }
.work-editor-actions button { min-height: 44px; font-size: 12px; }
.prescription-form .check { font-size: 12px; }
.prescription-menu > button { min-height: 48px; border-radius: 12px; }
.additional-parameters summary { min-height: 44px; display: list-item; padding: 11px 0; font-size: 12px; }
.tooth-chip { min-height: 38px; padding: 8px 10px; font-size: 12px; }
.work-record { padding: 13px 15px; border-radius: 13px; }
.work-record-body strong { font-size: 13px; }
.work-record-body span, .work-record-body small { font-size: 11px; }
.add-work { min-height: 44px; font-size: 12px; padding: 10px 0; }
.prescription-form .form-bottom .primary { min-height: 46px; }
#toast { border: 1px solid color-mix(in srgb, var(--bg) 10%, transparent); border-radius: 15px; padding: 15px 21px; font-size: 13px; line-height: 1.6; box-shadow: var(--shadow-float); transition: opacity var(--motion-normal) var(--ease-out), transform var(--motion-normal) var(--ease-out); }
@keyframes premium-veil { from { opacity: 0; } to { opacity: 1; } }
@keyframes premium-sheet { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* Entry and authentication belong to the same product as the workspace. */
.entry-main { max-width: 1080px; padding: 34px 40px 48px; }
.entry-brand { font-size: 24px; letter-spacing: -.9px; }
.entry-intro { padding: 66px 0 42px; }
.entry-intro h1 { font-size: clamp(40px, 5.2vw, 64px); line-height: 1.08; letter-spacing: -2.5px; font-weight: 600; margin-top: 16px; }
.entry-intro > p:last-child { font-size: 17px; line-height: 1.75; }
.entry-apps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
.entry-card { min-width: 0; max-width: 100%; padding: 34px; border-radius: 24px; background: var(--glass); border-color: var(--glass-edge); box-shadow: var(--shadow-card); -webkit-backdrop-filter: blur(24px) saturate(1.15); backdrop-filter: blur(24px) saturate(1.15); }
.entry-card img { margin-bottom: 30px; box-shadow: 0 8px 18px -9px rgba(15, 66, 121, .25), inset 0 1px 0 rgba(255, 255, 255, .1); }
.entry-card h2 { font-size: 30px; font-weight: 600; letter-spacing: -1.1px; }
.entry-card > p:not(.eyebrow) { font-size: 15px; line-height: 1.75; }
.entry-card .primary { min-width: 0; max-width: 100%; min-height: 50px; white-space: normal; text-align: center; }
.entry-register { min-height: 44px; display: flex; align-items: center; margin-top: 10px; font-size: 13px; }
.entry-demo { min-height: 44px; display: flex; align-items: center; margin-top: 0; font-size: 12px; text-underline-offset: 4px; text-decoration-color: var(--line-strong); }
.entry-foot { padding-top: 32px; gap: 18px; line-height: 1.7; }
.entry-foot a { min-height: 44px; display: inline-flex; align-items: center; }
.auth-shell { grid-template-columns: minmax(0, 1fr); padding: 40px 24px; background: radial-gradient(ellipse at 80% 0%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 55%), var(--bg); }
.auth-card { width: 100%; min-width: 0; max-width: 560px; padding: 44px; border-radius: 26px; border-color: var(--glass-edge); box-shadow: inset 0 1px 0 var(--edge-highlight), var(--shadow-float); background: var(--glass-sheet); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); }
.auth-card form, .auth-card fieldset, .auth-card .field, .auth-card .input { min-width: 0; }
.auth-card .primary { min-width: 0; max-width: 100%; white-space: normal; text-align: center; }
.auth-brand { font-family: var(--font-display); font-weight: 600; font-size: 23px; letter-spacing: -.7px; gap: 12px; margin-bottom: 34px; text-decoration: none; }
.auth-card h1 { font-size: 33px; font-weight: 600; letter-spacing: -1.1px; margin: 11px 0 15px; }
.auth-card p { font-size: 14px; line-height: 1.75; }
.auth-tabs { margin: 25px 0 22px; }
.auth-tabs button { min-height: 44px; font-size: 13px; }
.auth-card .field { margin-top: 19px; font-size: 13px; }
.auth-card fieldset:disabled { opacity: .7; }
.auth-card .login-submit { min-height: 48px; margin-top: 24px; }
.auth-demo { margin-top: 24px; padding-top: 24px; }
.auth-demo .primary { min-height: 50px; }
.auth-demo p { font-size: 12px; }
.auth-app-link { min-height: 44px; display: flex; justify-content: center; align-items: center; margin-top: 19px; font-size: 13px; }
.auth-card .auth-foot { margin-top: 16px !important; text-align: center; }
.auth-card .theme-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; min-width: 0; margin-top: 24px; overflow: visible; }
.auth-card .theme-picker button { min-width: 0; justify-content: center; white-space: normal; }
.legal-bar { background: var(--glass-bar); }
.legal-section { border-radius: 22px; }
.legal-tabs a { min-height: 44px; display: inline-flex; align-items: center; }

/* Installation and connection state use the active theme, including browser dialogs. */
.pwa-dialog, html[data-theme="dark"] .pwa-dialog { background: var(--surface); color: var(--ink); border-color: var(--line); border-radius: 26px; padding: 30px; box-shadow: var(--shadow-dialog); font-family: var(--font-body); }
.pwa-dialog::backdrop { background: rgba(18, 29, 45, .34); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.pwa-dialog-title { font-size: 27px; font-weight: 600; letter-spacing: -.9px; }
.pwa-dialog-eyebrow { color: var(--accent-ink); font-size: 10px; letter-spacing: 1.3px; }
.pwa-dialog-description, .pwa-steps, html[data-theme="dark"] .pwa-dialog-description, html[data-theme="dark"] .pwa-steps { color: var(--muted); line-height: 1.75; }
.pwa-install-note, html[data-theme="dark"] .pwa-install-note { color: var(--subtle); line-height: 1.7; }
.pwa-dialog-close, html[data-theme="dark"] .pwa-dialog-close { width: 44px; height: 44px; min-height: 44px; background: var(--surface-2); color: var(--muted); border-color: var(--line); }
.pwa-platform, html[data-theme="dark"] .pwa-platform { min-height: 44px; border-radius: 12px; color: var(--muted); background: var(--surface); border-color: var(--line-strong); }
.pwa-platform[aria-pressed="true"], html[data-theme="dark"] .pwa-platform[aria-pressed="true"] { color: var(--accent-ink); background: var(--accent-wash); border-color: var(--accent); }
.pwa-steps li::marker { color: var(--accent-ink); }
.pwa-install-action { background: linear-gradient(180deg, var(--action-start), var(--action-end)); color: var(--action-ink); min-height: 48px; border-radius: 13px; }
.pwa-status, html[data-theme="dark"] .pwa-status { background: var(--orange-wash); border-color: color-mix(in srgb, var(--orange) 22%, var(--line)); color: var(--orange); box-shadow: var(--shadow-float); border-radius: 17px; }
.pwa-status-update, html[data-theme="dark"] .pwa-status-update { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.pwa-update-button, html[data-theme="dark"] .pwa-update-button { min-height: 44px; background: var(--surface); color: var(--accent-ink); border-color: var(--line-strong); border-radius: 11px; }
.pwa-success, html[data-theme="dark"] .pwa-success { background: var(--green-wash); color: var(--green); border-color: color-mix(in srgb, var(--green) 20%, var(--line)); border-radius: 14px; }

/* The overview leads with one useful next action; supporting lists stay quiet. */
.home-workspace { display: grid; gap: 26px; }
.home-workspace > .page-head { margin-bottom: 0; }
.home-focus {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 30px 32px;
  border: 1px solid var(--glass-edge);
  border-radius: 22px;
  background: linear-gradient(125deg, color-mix(in srgb, var(--accent-wash) 55%, transparent), transparent 72%), var(--glass);
  box-shadow: inset 0 1px 0 var(--edge-highlight), var(--shadow-card);
  -webkit-backdrop-filter: blur(24px) saturate(1.15);
  backdrop-filter: blur(24px) saturate(1.15);
}
.home-focus-copy { min-width: 0; flex: 1; }
.home-focus h2 { margin: 9px 0 10px; font-size: clamp(23px, 2.3vw, 30px); line-height: 1.2; font-weight: 600; letter-spacing: -.9px; }
.home-focus p { margin: 0; max-width: 58ch; color: var(--muted); font-size: 14px; line-height: 1.7; }
.home-focus-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 18px; margin-top: 16px; font-size: 12px; color: var(--muted); }
.home-focus-meta strong { color: var(--ink); font-weight: 550; }
.home-focus-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.home-focus-side { display: grid; gap: 7px; justify-items: end; max-width: 230px; text-align: right; color: var(--muted); font-size: 12px; }
.home-focus-side > strong { color: var(--ink); font-size: 27px; line-height: 1.2; letter-spacing: -.8px; font-weight: 550; font-variant-numeric: tabular-nums; }
.home-columns { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr); gap: 24px; align-items: start; }
.home-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 15px; }
.home-section-heading h2 { margin: 0; font-size: 16px; line-height: 1.4; font-weight: 600; letter-spacing: -.3px; }
.home-section-heading small { color: var(--subtle); font-size: 12px; }
.home-attention .empty { padding: 30px 22px; text-align: left; }
.home-attention .empty strong { font-size: 15px; }
.home-attention .empty p { max-width: none; margin: 0; font-size: 13px; }
.home-workspace .stats { margin: 0; gap: 12px; }
.home-workspace .stat { padding: 17px 20px; border-radius: 16px; box-shadow: none; }
.home-workspace .stat b { font-size: 25px; }
.home-workspace .stat .stat-icon { width: 37px; height: 37px; border-radius: 11px; }
.home-workspace .notice { margin-top: 0; }
.home-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.home-summary-item { display: flex; align-items: center; gap: 14px; min-width: 0; min-height: 80px; padding: 18px 21px; border: 1px solid var(--line); border-radius: 15px; background: color-mix(in srgb, var(--surface) 70%, transparent); color: var(--ink); text-align: left; }
.home-summary-item strong { font-size: 27px; line-height: 1.2; letter-spacing: -.8px; font-weight: 550; font-variant-numeric: tabular-nums; }
.home-summary-item > span { color: var(--muted); font-size: 12px; line-height: 1.5; }
.panel-head.home-section-heading { margin-bottom: 0; padding: 17px 22px; min-height: 78px; }
.home-section-heading > .count { display: inline-grid; place-items: center; min-width: 25px; min-height: 25px; padding: 2px 7px; border-radius: 8px; background: var(--surface-2); color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.home-section-heading > .ghost { padding: 9px 0 9px 10px; font-size: 12px; min-height: 44px; }
.home-next-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto 14px; align-items: center; column-gap: 14px; row-gap: 6px; width: 100%; min-height: 93px; border: 0; border-bottom: 1px solid var(--line); background: var(--surface); padding: 20px 22px; text-align: left; }
.home-next-row:last-child { border-bottom: 0; }
.home-next-time { display: grid; gap: 5px; align-self: start; font-variant-numeric: tabular-nums; }
.home-next-time strong { color: var(--ink); font-size: 18px; line-height: 1.3; font-weight: 550; letter-spacing: -.45px; }
.home-next-time small { color: var(--subtle); font-size: 11px; }
.home-next-copy { display: grid; gap: 5px; min-width: 0; }
.home-next-copy > strong { color: var(--ink); font-size: 13px; font-weight: 600; line-height: 1.4; }
.home-next-copy > span { color: var(--muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.home-next-row > .pill { white-space: normal; line-height: 1.4; max-width: 170px; }
.home-next-row > .icon, .home-attention-row > .icon { width: 14px; height: 14px; color: var(--subtle); }
.home-attention-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) 14px; align-items: start; gap: 12px; width: 100%; min-height: 84px; padding: 20px 22px; border: 0; border-bottom: 1px solid var(--line); background: var(--surface); text-align: left; }
.home-attention-row:last-child { border-bottom: 0; }
.home-attention-symbol { display: grid; place-items: center; width: 32px; height: 34px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--muted); }
.home-attention-symbol .icon { width: 17px; height: 17px; }
.home-attention-row > span:nth-child(2) { min-width: 0; }
.home-attention-row strong { display: block; color: var(--ink); font-size: 13px; font-weight: 600; line-height: 1.5; }
.home-attention-row small { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.home-attention-row > .icon { align-self: center; }
.home-next-row:focus-visible, .home-attention-row:focus-visible { outline-offset: -4px; }

/* Native disclosures keep short forms approachable and remain keyboard operable. */
.order-section { min-width: 0; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: clip; }
.order-section > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 70px;
  padding: 16px 19px;
  cursor: pointer;
  list-style: none;
  color: var(--ink);
  transition: background-color var(--motion-fast);
}
.order-section > summary::-webkit-details-marker { display: none; }
.order-section > summary::marker { content: ''; }
.order-section-number { display: grid; place-items: center; width: 30px; height: 30px; flex-shrink: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 550; font-variant-numeric: tabular-nums; }
.order-section-title { min-width: 0; flex: 1; font-size: 14px; line-height: 1.5; font-weight: 600; }
.order-section-title small { display: block; margin-top: 3px; font-size: 12px; font-weight: 400; line-height: 1.55; color: var(--muted); }
.order-section > summary > .icon { width: 16px; height: 16px; color: var(--subtle); transform: rotate(90deg); transition: transform var(--motion-fast) var(--ease-out); }
.order-section[open] > summary { border-bottom: 1px solid var(--line); }
.order-section[open] > summary .order-section-number { border-color: color-mix(in srgb, var(--accent) 20%, var(--line)); background: var(--accent-wash); color: var(--accent-ink); }
.order-section[open] > summary > .icon { transform: rotate(-90deg); }
.order-section-body { padding: 20px; min-width: 0; }
.order-section-body > :first-child { margin-top: 0; }
.order-section-body > :last-child { margin-bottom: 0; }
.order-section > summary:focus-visible { outline-offset: -4px; border-radius: 15px; }
.order-steps { display: flex; gap: 6px; padding: 5px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-2); overflow-x: auto; }
.order-steps > button, .order-steps > a { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; flex: 1; padding: 10px 13px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--muted); font-size: 12px; text-decoration: none; white-space: nowrap; }
.order-steps > [aria-current="step"] { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow-card); color: var(--ink); font-weight: 600; }
.delay-reasons input:focus-visible + span, .delay-minutes input:focus-visible + span,
.feedback-rating input:focus-visible + span, .feedback-tags input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 3px; }
.work-record, .work-editor { animation: none; }

@media (hover: hover) and (pointer: fine) {
  .home-summary-item:hover { border-color: var(--line-strong); background: var(--surface); }
  .home-next-row:hover, .home-attention-row:hover { background: var(--surface-2); }
  .order-section > summary:hover { background: var(--surface-2); }
  .order-steps > button:hover, .order-steps > a:hover { color: var(--ink); background: var(--surface); }
}

@media (max-width: 1080px) {
  .home-columns { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1180px) {
  .app { grid-template-columns: 212px minmax(0, 1fr); }
  .side { width: 212px; padding-left: 12px; padding-right: 12px; }
  .brand { gap: 9px; margin-left: 9px; margin-right: 5px; }
  .brand b { font-size: 18px; }
  .brand small { font-size: 8px; }
  .nav button { gap: 10px; font-size: 12px; padding: 11px 12px; }
  .content { padding: 30px 28px 50px; }
  .topbar { padding: 0 28px; }
  .page-head h1 { font-size: 33px; }
  .stats { gap: 11px; }
  .stat { padding: 20px 16px; gap: 12px; }
  .stat small { font-size: 11px; }
  .hero-copy { padding: 30px; }
  .production-grid { gap: 14px; }
}

@media (max-width: 800px) {
  .messenger-contacts { padding: 12px; }
  .messenger-contacts > button { min-height: 60px; padding: 12px; }
  .prescription-menu > button { min-height: 44px; }
}

@media (max-width: 680px) {
  body { font-size: 14px; }
  .home-workspace { gap: 21px; }
  .home-focus { display: block; padding: 23px; border-radius: 20px; }
  .home-focus h2 { font-size: 25px; letter-spacing: -.8px; }
  .home-focus p { font-size: 13px; }
  .home-focus-meta { gap: 8px 14px; font-size: 12px; }
  .home-focus-actions { margin-top: 19px; }
  .home-focus-actions .primary { flex: 1; }
  .home-focus-side { justify-items: start; text-align: left; max-width: none; margin-top: 22px; padding-top: 17px; border-top: 1px solid var(--line); }
  .home-focus-side > strong { font-size: 25px; }
  .home-columns { gap: 21px; }
  .home-workspace .stat { padding: 16px 12px; }
  .home-workspace .stat b { font-size: 25px; }
  .home-workspace .stat .stat-icon { display: none; }
  .home-section-heading { gap: 10px; margin-bottom: 12px; }
  .home-section-heading h2 { font-size: 15px; }
  .home-section-heading small { font-size: 11px; }
  .home-summary { gap: 8px; }
  .home-summary-item { display: grid; gap: 6px; align-content: start; min-height: 93px; padding: 15px 12px; border-radius: 13px; }
  .home-summary-item strong { font-size: 26px; }
  .home-summary-item > span { font-size: 11px; line-height: 1.5; }
  .panel-head.home-section-heading { padding: 15px 19px; min-height: 73px; }
  .home-section-heading > .ghost { gap: 5px; font-size: 11px; }
  .home-section-heading > .ghost > .icon { width: 16px; height: 16px; }
  .home-next-row { grid-template-columns: 56px minmax(0, 1fr) 14px; column-gap: 12px; row-gap: 9px; padding: 19px; }
  .home-next-time { grid-column: 1; grid-row: 1 / 3; }
  .home-next-time strong { font-size: 17px; }
  .home-next-time small { font-size: 10px; }
  .home-next-copy { grid-column: 2; grid-row: 1; }
  .home-next-copy > span { font-size: 12px; }
  .home-next-row > .pill { grid-column: 2; grid-row: 2; justify-self: start; max-width: 100%; }
  .home-next-row > .icon { grid-column: 3; grid-row: 1 / 3; }
  .home-attention-row { padding: 19px; gap: 11px; }
  .order-section > summary { padding: 15px; gap: 10px; }
  .order-section-title { font-size: 14px; }
  .order-section-title small { font-size: 12px; }
  .order-section-body { padding: 17px 15px; }
  .app { display: block; }
  .side { display: none; }
  .topbar {
    height: calc(72px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 20px 0;
    background: var(--glass-bar);
  }
  .mobile-brand { font-size: 16px; font-weight: 650; gap: 9px; }
  .mobile-brand .logo { width: 32px; height: 34px; border-radius: 11px; }
  .topbar .icon-button { width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 11px; border-radius: 13px; }
  .topbar .top-actions { gap: 7px; }
  .content { padding: 27px 20px calc(126px + env(safe-area-inset-bottom)); }
  .eyebrow { font-size: 9px; letter-spacing: 1.4px; }
  .page-head { margin: 8px 0 24px; gap: 14px; }
  .page-head h1 { font-size: 31px; letter-spacing: -1.15px; margin-bottom: 10px; }
  .sub { font-size: 13px; line-height: 1.65; }
  .page-head > .primary { min-height: 46px; min-width: 46px; max-width: 100%; padding: 12px; font-size: 12px; white-space: normal; }
  .page-head > .primary .icon { width: 20px; height: 20px; }
  .primary, .secondary, .ghost, .danger { min-height: 46px; padding: 12px 15px; font-size: 13px; border-radius: 13px; }
  .date-input, .search, textarea.input, select.input, input.input, .prescription-field .input { font-size: 16px; min-height: 48px; }
  .hero { min-height: 270px; border-radius: 22px; margin-bottom: 19px; }
  .hero-copy { padding: 25px; max-width: 83%; }
  .hero h2 { font-size: 28px; letter-spacing: -.9px; }
  .hero p { font-size: 13px; max-width: 235px; }
  .hero .ghost { font-size: 12px; }
  .stats { gap: 9px; margin-bottom: 24px; }
  .stat { display: block; padding: 17px 12px; border-radius: 16px; }
  .stat .stat-icon { display: none; }
  .stat b { font-size: 27px; font-weight: 550; letter-spacing: -.9px; }
  .stat small { font-size: 11px; line-height: 1.45; margin-top: 6px; }
  .columns, .detail-columns { gap: 19px; }
  .panel { border-radius: 20px; }
  .panel-head { padding: 21px; }
  .panel-head h2 { font-size: 15px; }
  .panel-head small { font-size: 11px; }
  .section-pad { padding: 22px; }
  .section-pad h3 { font-size: 15px; }
  .case-row, .panel > .case-row.order-tile { padding: 21px; }
  .all-link { padding: 18px 21px; }
  .booking-card { padding: 21px; }
  .row-main b { font-size: 13px; }
  .row-main small, .row-end small { font-size: 11px; }
  .pill { font-size: 10px; }
  .filter-tabs button, .theme-picker button { min-height: 44px; font-size: 11px; padding: 10px 12px; }
  .filter-bar .search { margin-bottom: 15px; }
  .filter-tabs { padding: 4px; }
  .order-tiles { gap: 16px; }
  .pavel-order-tile { min-height: 340px; border-radius: 20px; }
  .pavel-tile-header { min-height: 73px; padding: 17px 19px 12px; }
  .pavel-tile-main { margin: 4px 7px; min-height: 138px; padding: 18px 16px; }
  .pavel-tile-title { font-size: 22px; }
  .pavel-task-badge { font-size: 11px; }
  .pavel-tile-price { font-size: 21px; }
  .pavel-tile-statuses { padding: 10px 20px 15px; }
  .pavel-status-row { font-size: 12px; }
  .pavel-tile-foot { font-size: 11px; }
  .order-tile-meta, .order-tile-note, .order-tile-footer { font-size: 11px; }
  .case-summary { padding: 23px; gap: 16px; }
  .case-summary h2 { font-size: 23px; }
  .case-summary p { font-size: 12px; }
  .price { font-size: 22px; letter-spacing: -.6px; }
  .price small { font-size: 10px; }
  .live-order { top: calc(84px + env(safe-area-inset-top)); border-radius: 16px; }
  .live-order-title strong { font-size: 13px; }
  .live-order-title small { font-size: 10px; }
  .order-reminder { padding: 14px; }
  .order-reminder p { font-size: 12px; }
  .detail-top .ghost { min-height: 44px; padding-left: 0; font-size: 12px; }
  .detail-actions .secondary { min-height: 44px; font-size: 11px; padding: 10px; }
  .production-lane { padding: 16px; border-radius: 19px; }
  .production-card { padding: 20px; }
  .messenger-chat { padding: 21px; }
  .messenger-chat .chat { min-height: 230px; }
  .bubble { font-size: 13px; padding: 13px 15px; }
  .compose { gap: 8px; }
  .activity-row { padding: 20px; gap: 12px; }
  .activity-row .row-main p { font-size: 13px; }
  .activity-row > time { font-size: 10px; }
  .activity-row .activity-icon { padding: 10px; }
  .delay-reasons label span, .feedback-tags label span { min-height: 44px; font-size: 12px; padding: 11px 12px; }
  .feedback-rating { gap: 7px; }
  .feedback-rating label { min-width: 79px; }
  .feedback-rating label span { min-height: 48px; font-size: 11px; padding: 11px 8px; }
  .delay-minutes label span { min-height: 48px; font-size: 16px; }
  .stats-period button { min-height: 44px; font-size: 12px; }
  .feedback-metric { font-size: 12px; grid-template-columns: 110px minmax(30px, 1fr) 22px; gap: 12px; }
  .photo-grid { gap: 9px; }
  .photo-phase .file-action { min-height: 44px; padding: 10px 12px; font-size: 12px !important; }
  .photo-grid span { padding: 9px; font-size: 10px; }
  .help-card { padding: 24px; }
  .help-card p, .help-card li { font-size: 13px; }
  .service-card { padding: 24px; }
  .service-card h3 { font-size: 18px; }
  .service-card > p { font-size: 13px; }
  .service-card > button { min-height: 46px; font-size: 12px; }
  .section-menu .secondary { min-height: 46px; font-size: 12px; padding: 11px; }
  .modal-backdrop { padding: 0; }
  .modal, .modal.order-modal { border-radius: 26px 26px 0 0; max-height: 94dvh; border-bottom: 0; }
  .modal-header, .order-modal .modal-header { padding: 17px 20px; }
  .modal-header h2, .order-modal .modal-header h2 { font-size: 18px; letter-spacing: -.5px; }
  .modal form, .modal-body { padding: 23px 20px; }
  .order-modal form.prescription-form { padding: 0; }
  .prescription-main { padding: 22px 17px; }
  .prescription-order-info, .work-editor { padding: 17px; }
  .prescription-menu { gap: 4px; padding: 10px 12px; }
  .prescription-menu > button { min-height: 44px; font-size: 11px; padding: 10px 8px; }
  .work-editor-actions button { min-height: 46px; font-size: 12px; }
  .prescription-form .form-bottom { gap: 12px; padding-top: 15px; padding-bottom: 10px; }
  .prescription-form .form-bottom .primary { min-height: 46px; font-size: 12px; }
  .prescription-form .form-bottom .text-small { font-size: 10px; }
  .entry-main { padding: 25px 22px 36px; }
  .entry-apps { grid-template-columns: minmax(0, 1fr); }
  .entry-intro { padding: 44px 0 29px; }
  .entry-intro h1 { font-size: clamp(36px, 10vw, 48px); letter-spacing: -1.65px; }
  .entry-intro > p:last-child { font-size: 15px; }
  .entry-card { padding: 27px; border-radius: 25px; }
  .entry-card h2 { font-size: 27px; }
  .entry-card img { margin-bottom: 22px; }
  .entry-card > p:not(.eyebrow) { font-size: 14px; }
  .entry-top .secondary { min-height: 44px; font-size: 11px; padding: 10px 13px; }
  .auth-shell { padding: max(22px, env(safe-area-inset-top)) 19px max(22px, env(safe-area-inset-bottom)); }
  .auth-card { padding: 29px 23px; border-radius: 26px; }
  .auth-brand { font-size: 22px; margin-bottom: 29px; }
  .auth-card h1 { font-size: 30px; }
  .auth-card .field { font-size: 12px; }
  .auth-card .input { min-height: 48px; }
  .auth-card .theme-picker button { flex-direction: column; min-height: 56px; gap: 4px; padding: 8px 4px; }
  .auth-card p { font-size: 13px; }
  .auth-demo p { font-size: 12px; }
  .auth-demo .primary { font-size: 12px; }
  .pwa-dialog, html[data-theme="dark"] .pwa-dialog { padding: 25px; border-radius: 25px; }
  .pwa-dialog-title { font-size: 25px; }
  .pwa-status-rail { bottom: calc(98px + env(safe-area-inset-bottom)); }
  .mobile-nav {
    left: 12px;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    border: 1px solid var(--glass-edge);
    border-radius: 22px;
    padding: 7px 5px;
    background: var(--glass);
    box-shadow: inset 0 1px 0 var(--edge-highlight), var(--shadow-float);
    -webkit-backdrop-filter: blur(28px) saturate(1.3);
    backdrop-filter: blur(28px) saturate(1.3);
  }
  .mobile-nav button { min-height: 52px; padding: 7px 3px; gap: 5px; border-radius: 15px; font-size: 10px; font-weight: 500; }
  .mobile-nav button.active { background: var(--accent-wash); color: var(--accent-ink); font-weight: 650; }
  .mobile-nav .icon { width: 21px; height: 21px; stroke-width: 1.7; }
  #toast { bottom: calc(96px + env(safe-area-inset-bottom)); font-size: 12px; max-width: calc(100% - 36px); }
}

@media (max-width: 380px) {
  .content { padding-left: 16px; padding-right: 16px; }
  .topbar { padding-left: 16px; padding-right: 16px; }
  .mobile-brand { font-size: 15px; }
  .page-head h1 { font-size: 29px; }
  .hero-copy { padding: 23px; }
  .hero h2 { font-size: 26px; }
  .panel-head, .booking-card, .section-pad, .case-row, .panel > .case-row.order-tile { padding: 19px; }
  .case-summary { padding: 20px; }
  .case-summary h2 { font-size: 21px; }
  .price { font-size: 20px; }
  .hero { min-height: 263px; }
  .stats { gap: 7px; }
  .stat { padding: 16px 10px; }
  .stat small { font-size: 10px; }
  .pavel-tile-main { padding-left: 14px; padding-right: 14px; }
  .pavel-task-badge { font-size: 10px; padding: 7px; }
  .pavel-tile-price { font-size: 20px; }
  .prescription-main { padding-left: 13px; padding-right: 13px; }
  .prescription-menu { padding-left: 8px; padding-right: 8px; }
  .prescription-menu > button { padding-left: 7px; padding-right: 7px; }
  .prescription-form .form-bottom .primary { font-size: 11px; padding-left: 12px; padding-right: 12px; }
  .entry-main { padding-left: 19px; padding-right: 19px; }
  .entry-card { padding: 25px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .pavel-order-tile:hover, .order-tile:hover, .primary:hover, .primary:active,
  .secondary:active, .ghost:active, .danger:active { transform: none !important; }
}

/* Glass is an enhancement: keep every surface readable when blur is unavailable. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .side, .topbar, .mobile-nav, .modal-header, .entry-card, .auth-card, .home-focus { background: var(--surface); }
  .modal { background: var(--surface); }
}

@media (prefers-reduced-transparency: reduce) {
  :root, :root[data-theme="dark"] { --glass: var(--surface); --glass-bar: var(--surface-2); --glass-control: var(--surface); --glass-sheet: var(--surface); }
  .side, .topbar, .mobile-nav, .modal-header, .entry-card, .auth-card, .home-focus,
  .modal-backdrop, .pwa-dialog::backdrop, .prescription-form .form-bottom { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .side, .home-focus { background: var(--surface); }
  .modal-backdrop, .pwa-dialog::backdrop { background: rgba(12, 21, 34, .58); }
}

@media (forced-colors: active) {
  .panel, .pavel-order-tile, .entry-card, .auth-card, .modal, .pwa-dialog,
  .primary, .secondary, .icon-button, .close, .mobile-nav { border: 1px solid CanvasText; box-shadow: none; }
  .primary, :root[data-theme="dark"] .primary { color: ButtonText; background: ButtonFace; }
  .nav button.active, .mobile-nav button.active, .filter-tabs button[aria-pressed="true"], .theme-picker button[aria-pressed="true"] { border: 2px solid Highlight; }
  .delay-reasons input:checked + span, .delay-minutes input:checked + span,
  .feedback-rating input:checked + span, .feedback-tags input:checked + span { border: 2px solid Highlight; }
  .order-section, .home-focus, .order-steps { border: 1px solid CanvasText; box-shadow: none; }
  .order-steps > [aria-current="step"] { border-color: Highlight; }
  .side, .topbar, .mobile-nav, .modal-header, .entry-card, .auth-card, .home-focus,
  .modal-backdrop { -webkit-backdrop-filter: none; backdrop-filter: none; }
}

@media print {
  body { background: #fff; color: #000; }
  .content { padding: 0; }
  .panel, .pavel-order-tile { box-shadow: none; }
}
/* Operational feedback follows the same visual hierarchy as the order. */
.planning-notice{margin:18px 0 26px;padding:22px 24px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);color:var(--ink)}
.planning-notice.needs-review{border-color:color-mix(in srgb,#ba7b20 28%,var(--line));background:color-mix(in srgb,#ba7b20 5%,var(--surface))}
.planning-notice>strong{font-size:16px}.planning-notice p{font-size:14px;line-height:1.6;color:var(--muted);max-width:76ch;margin:8px 0}.planning-notice .workspace-actions{margin-top:16px}
#form-reservation{margin:14px 0 22px;padding:16px 18px;border-radius:16px;background:var(--accent-wash);border:1px solid var(--line);font-size:13px;line-height:1.55}
#form-reservation strong{font-size:14px;color:var(--ink)}#form-reservation p{margin:6px 0;color:var(--muted)}#form-reservation .form-error{color:var(--danger,#bc3838);margin-top:10px}
