@font-face { font-family: Geist; src: url('fonts/Geist-Variable.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('fonts/GeistMono-Variable.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }

/* All surfaces and foregrounds share the same appearance system. */
:root {
  color-scheme: light;
  --ink: #252724;
  --muted: #696e69;
  --faint: #777d76;
  --canvas: #f3f4f2;
  --surface: #ffffff;
  --surface-soft: #f7f8f6;
  --surface-hover: #f0f2ee;
  --sidebar-bg: #f8f9f7;
  --line: #e2e5df;
  --line-soft: #eceee9;
  --input-border: #dce0d8;
  --active-bg: #ffffff;
  --active-border: #e4e7e1;
  --primary: #292d28;
  --primary-text: #ffffff;
  --link: #426347;
  --selection: #f0f4ee;
  --selection-line: #8ea184;
  --avatar: #edf0e9;
  --avatar-ink: #5e6d55;
  --chip: #eef1eb;
  --green-ink: #4d6b55;
  --green-bg: #eff5ee;
  --green-line: #dbe6d8;
  --warning: #8b5b22;
  --warning-bg: #fbf7ef;
  --danger: #a63e39;
  --danger-bg: #fff2f0;
  --danger-line: #efc8c4;
  --focus: #76917a;
  --shadow: 0 1px 3px #242a2010;
  --panel-shadow: 0 2px 7px #242a2005;
  --overlay: #22282060;
  --tooltip: #292d28;
  --tooltip-text: #ffffff;
  font-family: Geist, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  font-synthesis: none;
}
html[data-theme='dark'] {
  color-scheme: dark;
  --ink: #ececea;
  --muted: #a7aaa8;
  --faint: #9da19e;
  --canvas: #171819;
  --surface: #202123;
  --surface-soft: #252628;
  --surface-hover: #2c2e30;
  --sidebar-bg: #1c1d1f;
  --line: #36383a;
  --line-soft: #2c2e30;
  --input-border: #414447;
  --active-bg: #2c2e30;
  --active-border: #424547;
  --primary: #edede9;
  --primary-text: #222426;
  --link: #bacfb1;
  --selection: #29322c;
  --selection-line: #8da07e;
  --avatar: #303b32;
  --avatar-ink: #c5d3ba;
  --chip: #2d3330;
  --green-ink: #a8c89b;
  --green-bg: #283723;
  --green-line: #3c4d34;
  --warning: #d9b985;
  --warning-bg: #302b20;
  --danger: #efaaa2;
  --danger-bg: #3b2623;
  --danger-line: #65403c;
  --focus: #aec5a0;
  --shadow: 0 1px 3px #00000035;
  --panel-shadow: 0 2px 8px #00000012;
  --overlay: #08090b78;
  --tooltip: #edede9;
  --tooltip-text: #222426;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .42; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
#main:focus { outline: none; }
input, select, textarea { width: 100%; min-height: 38px; padding: 8px 11px; border: 1px solid var(--input-border); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 13px; box-shadow: var(--panel-shadow); }
input::placeholder { color: var(--faint); }
input:disabled { color: var(--faint); background: var(--surface-soft); }
input[type='checkbox'] { width: 15px; height: 15px; min-height: 15px; padding: 0; flex: none; accent-color: var(--link); box-shadow: none; }
label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 12px; font-weight: 500; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 25px; line-height: 1.2; letter-spacing: -.045em; font-weight: 600; margin-bottom: 5px; }
h2 { font-size: 14px; line-height: 1.4; letter-spacing: -.015em; font-weight: 550; margin-bottom: 0; }
h3 { font-size: 14px; font-weight: 550; margin-bottom: 9px; }
p { margin-bottom: 14px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.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; }
.skip-link { position: fixed; top: -60px; left: 12px; z-index: 100; padding: 12px; background: var(--surface); }
.skip-link:focus { top: 12px; }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; stroke-width: 1.6; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* Navigation: neutral surface, a quiet selected row, and contextual client links. */
.shell { display: grid; grid-template-columns: 216px minmax(0,1fr); height: 100dvh; overflow: hidden; }
.sidebar { display: flex; flex-direction: column; min-height: 0; background: var(--sidebar-bg); border-right: 1px solid var(--line); z-index: 30; }
.brand-row { display: flex; align-items: center; gap: 8px; padding: 22px 14px 21px; flex: none; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); flex: 1; min-width: 0; }
.brand:hover { text-decoration: none; }
.brand-mark { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex: none; border-radius: 9px; background: var(--primary); color: var(--primary-text); }
.brand-mark svg { width: 26px; height: 26px; fill: currentColor; }
.brand-name { display: block; font-size: 18px; font-weight: 600; letter-spacing: -.045em; line-height: 1.2; }
.studio-name { display: block; font-size: 10px; color: var(--muted); margin-top: 3px; }
.sidebar-toggle { width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; flex: none; border: 0; border-radius: 7px; background: transparent; color: var(--muted); }
.sidebar-toggle:hover { color: var(--ink); background: var(--surface-hover); }
.sidebar-toggle .icon { width: 16px; height: 16px; }
.sidebar-navigation { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; padding-bottom: 14px; }
.nav-label { font-size: 11px; color: var(--faint); padding: 0 22px 11px; }
.main-nav { display: grid; gap: 4px; padding: 0 12px; }
.nav-item { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 40px; padding: 9px 11px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--muted); text-align: left; font-size: 13px; font-weight: 450; }
.nav-item > .icon { width: 18px; height: 18px; }
.nav-item:hover { color: var(--ink); background: var(--surface-hover); }
.nav-item.active { color: var(--ink); background: var(--active-bg); border-color: var(--active-border); box-shadow: var(--shadow); font-weight: 550; }
.nav-context-indicator { display: flex; margin-left: auto; color: var(--muted); }
.nav-context-indicator .icon { width: 12px; height: 12px; transform: rotate(90deg); }
.client-subnav { display: grid; gap: 2px; margin: 5px 0 8px 21px; padding-left: 15px; border-left: 1px solid var(--line); }
.client-subnav a, .client-subnav button { display: flex; align-items: center; min-height: 30px; border: 0; border-radius: 6px; padding: 5px 9px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 450; text-align: left; }
.client-subnav .active { color: var(--ink); background: var(--surface-hover); font-weight: 500; }
.client-subnav a:hover, .client-subnav button:hover { color: var(--ink); background: var(--surface-hover); text-decoration: none; }
.sidebar-bottom { flex: none; padding: 14px 14px 13px; border-top: 1px solid var(--line); }
.theme-switch { --theme-index: 0; position: relative; isolation: isolate; display: grid; grid-template-columns: repeat(3,1fr); width: 144px; max-width: 100%; padding: 4px 4px 0; margin: 0 auto; }
.theme-switch[data-mode='auto'] { --theme-index: 1; }
.theme-switch[data-mode='dark'] { --theme-index: 2; }
.theme-switch::before { content: ''; position: absolute; inset: 0 0 auto; height: 36px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-soft); z-index: -2; }
.theme-thumb { position: absolute; top: 4px; left: calc(4px + (100% - 8px) / 3 * (var(--theme-index) + .5) - 14px); width: 28px; height: 28px; border: 1px solid var(--active-border); border-radius: 50%; background: var(--active-bg); box-shadow: var(--shadow); transition: left .18s cubic-bezier(.22,.8,.25,1), top .18s cubic-bezier(.22,.8,.25,1); z-index: -1; pointer-events: none; }
.theme-switch button { display: grid; grid-template-rows: 28px 18px; gap: 3px; justify-items: center; width: 100%; min-width: 0; padding: 0; border: 0; background: transparent; color: var(--muted); }
.theme-icon { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; }
.theme-icon .icon { width: 16px; height: 16px; stroke-width: 1.6; }
.theme-label { color: var(--muted); font-size: 11px; line-height: 18px; font-weight: 450; }
.theme-switch button:hover { color: var(--ink); }
.theme-switch button[aria-checked='true'] { color: var(--ink); }
.theme-switch button[aria-checked='true'] .theme-label { color: var(--ink); font-weight: 550; }
.theme-switch button:focus-visible { outline: none; }
.theme-switch button:focus-visible .theme-icon { outline: 2px solid var(--focus); outline-offset: 2px; }
.sidebar-account { display: flex; align-items: center; gap: 9px; width: 100%; padding: 13px 2px 0; border: 0; border-radius: 7px; text-align: left; color: var(--ink); background: transparent; }
.sidebar-account-copy { flex: 1; min-width: 0; }
.sidebar-account-copy strong { display: block; font-size: 11px; font-weight: 500; line-height: 1.45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-account-copy > span { display: block; font-size: 10px; color: var(--muted); margin-top: 2px; }
.sidebar-account > .icon { width: 12px; height: 12px; color: var(--muted); transform: rotate(90deg); }
.avatar { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--avatar); color: var(--avatar-ink); font-size: 10px; font-weight: 550; border: 1px solid var(--line); }
.sidebar-close, .navigation-scrim { display: none; }
.navigation-scrim[hidden] { display: none; }

/* The application frame keeps desktop controls visible while data panels scroll. */
.main-area { grid-column: 2; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 54px; flex: none; padding: 0 24px; border-bottom: 1px solid var(--line); background: var(--surface); }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 15px; }
.breadcrumb { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; flex-wrap: wrap; }
.breadcrumb a { color: var(--muted); }
.breadcrumb .current { color: var(--ink); font-weight: 450; }
.crumb-separator { color: var(--faint); }
.review-badge { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10px; background: var(--surface-soft); padding: 3px 7px; border-radius: 5px; }
.review-badge .icon { width: 11px; height: 11px; }
.topbar-right > .icon-button { width: 29px; height: 29px; box-shadow: none; }
.topbar-right > .icon-button .icon { width: 13px; height: 13px; }
.mobile-menu { display: none; background: transparent; border: 0; color: var(--ink); padding: 8px; }
.mobile-brand { display: none; }
.content { min-height: 0; flex: 1; padding: 22px 24px 16px; overflow: auto; scrollbar-gutter: stable; }
.view-workspace, .view-list { display: flex; flex-direction: column; overflow: hidden; scrollbar-gutter: auto; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 17px; flex: none; }
.page-heading p { color: var(--muted); font-size: 12px; margin: 0; }
.heading-actions { display: flex; align-items: center; gap: 8px; }
.section-nav { display: none; align-items: center; gap: 22px; min-height: 34px; border-bottom: 1px solid var(--line); margin-bottom: 14px; flex: none; }
.section-nav a, .section-nav button { display: flex; align-items: center; padding: 0 0 10px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 12px; font-weight: 450; min-height: 34px; white-space: nowrap; }
.section-nav .active { color: var(--ink); font-weight: 550; border-bottom-color: var(--ink); }
.section-nav a:hover, .section-nav button:hover { color: var(--ink); text-decoration: none; }
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 7px; min-height: 38px; padding: 8px 13px; border: 1px solid var(--input-border); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 12px; font-weight: 500; white-space: nowrap; text-decoration: none; box-shadow: var(--panel-shadow); }
.btn .icon { width: 15px; height: 15px; }
.btn:hover { background: var(--surface-hover); text-decoration: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.btn.primary:hover { opacity: .88; }
.btn.subtle { background: transparent; border-color: transparent; color: var(--muted); box-shadow: none; }
.btn.compact { min-height: 29px; padding: 5px 9px; font-size: 11px; }
.link-button { min-height: 29px; border: 0; padding: 0; background: transparent; color: var(--link); font-size: 12px; font-weight: 500; text-align: left; }
.link-button:hover { text-decoration: underline; }
.icon-button { position: relative; display: inline-flex; justify-content: center; align-items: center; width: 35px; height: 35px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--muted); box-shadow: var(--shadow); }
.icon-button:hover { color: var(--ink); background: var(--surface-hover); }
.icon-button .icon { width: 15px; height: 15px; }
.button-tooltip { position: absolute; top: calc(100% + 8px); right: 0; width: max-content; max-width: 240px; padding: 6px 9px; border-radius: 6px; background: var(--tooltip); color: var(--tooltip-text); font-size: 11px; opacity: 0; visibility: hidden; pointer-events: none; z-index: 50; }
.icon-button:hover .button-tooltip, .icon-button:focus-visible .button-tooltip { opacity: 1; visibility: visible; }
.export-label { color: var(--muted); font-size: 11px; margin-right: 3px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--panel-shadow); overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 17px 12px; flex: none; }
.card-head p { color: var(--muted); font-size: 12px; margin-bottom: 0; }
.card-kicker { font-size: 11px; color: var(--faint); white-space: nowrap; }
.card-body { padding: 0 17px 16px; }

/* Clients workspace. */
.workspace-grid { display: grid; grid-template-columns: minmax(0,1fr) 280px; gap: 16px; flex: 1; min-height: 0; }
.workspace-primary, .workspace-secondary { display: flex; flex-direction: column; gap: 16px; min-width: 0; min-height: 0; }
.search-card, .tools-card { flex: none; }
.search-fields { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,1fr) auto; gap: 10px; align-items: end; }
.search-input { position: relative; }
.search-input .icon { position: absolute; left: 11px; top: 11px; width: 15px; height: 15px; color: var(--faint); }
.search-input input { padding-left: 34px; }
.search-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.check-label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 400; margin: 0; cursor: pointer; }
.search-note { font-size: 10px; color: var(--faint); }
.lookup-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); margin-top: 12px; }
.lookup-row label { font-size: 11px; color: var(--muted); }
.input-action { position: relative; }
.input-action input { min-width: 0; min-height: 34px; padding-right: 36px; background: var(--surface-soft); font-size: 12px; }
.lookup-button { position: absolute; right: 4px; top: 3px; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); }
.lookup-button:hover { background: var(--surface-hover); color: var(--ink); }
.lookup-button .icon { width: 14px; height: 14px; }
.recent-card, .appointments { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.recent-list, .appointment-list { overflow: auto; min-height: 0; flex: 1; }
.recent-entry { display: flex; align-items: center; gap: 11px; padding: 11px 17px; min-height: 62px; border-top: 1px solid var(--line-soft); color: var(--ink); }
.recent-entry:hover { background: var(--surface-soft); text-decoration: none; }
.recent-entry > .icon { width: 13px; height: 13px; color: var(--faint); }
.recent-person { flex: 1; min-width: 0; }
.recent-person strong { display: block; font-size: 13px; font-weight: 500; }
.recent-sub { display: block; color: var(--muted); font-family: 'Geist Mono', monospace; font-size: 10px; letter-spacing: -.025em; margin-top: 2px; }
.recent-group { font-size: 11px; color: var(--muted); background: var(--surface-soft); padding: 3px 6px; border-radius: 5px; }
.initials { display: flex; align-items: center; justify-content: center; width: 31px; height: 31px; border-radius: 50%; background: var(--avatar); color: var(--avatar-ink); border: 1px solid var(--line-soft); font-size: 10px; font-weight: 500; flex: none; }
.initials.large { width: 43px; height: 43px; border-radius: 11px; font-size: 13px; }
.workspace-inspector { gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--panel-shadow); overflow: hidden; }
.inspector-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 45px; padding: 9px 16px; border-bottom: 1px solid var(--line-soft); flex: none; }
.inspector-heading h2 { font-size: 12px; font-weight: 500; color: var(--muted); }
.inspector-count { color: var(--muted); background: var(--surface-soft); font-size: 10px; padding: 1px 6px; border-radius: 5px; }
.tool-group { padding: 12px 14px 9px; }
.tool-group + .tool-group { border-top: 1px solid var(--line-soft); }
.tool-group-title { color: var(--faint); font-size: 10px; font-weight: 450; margin: 0 2px 7px; }
.tool-link { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 33px; padding: 5px 3px; border: 0; border-radius: 7px; text-align: left; background: transparent; color: var(--muted); font-size: 12px; }
.tool-link:hover { color: var(--ink); background: var(--surface-hover); }
.tool-link .icon { width: 15px; height: 15px; color: var(--muted); }
.tool-link .icon:last-child:not(:first-child) { width: 11px; height: 11px; color: var(--faint); margin-left: auto; }
.workspace-inspector .appointments { border-top: 1px solid var(--line); }
.workspace-inspector .appointments h2 { color: var(--muted); font-size: 12px; font-weight: 500; }
.appointment { display: flex; gap: 11px; padding: 11px 16px; border-top: 1px solid var(--line-soft); }
.appointment-person { min-width: 0; }
.appointment a { font-size: 12px; color: var(--ink); font-weight: 500; }
.appointment p { font-size: 11px; color: var(--muted); margin: 3px 0 5px; line-height: 1.5; }
.time { width: 42px; flex: none; font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; padding-top: 2px; }
.time-note { font-size: 10px; font-weight: 400; color: var(--muted); margin-top: 3px; }
.appointment-status { display: inline-flex; align-items: center; gap: 5px; color: var(--green-ink); font-size: 10px; }
.appointment-status > span { width: 4px; height: 4px; border-radius: 50%; background: var(--green-ink); }
.workspace-footer { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--faint); margin: 12px 0 0; flex: none; }
.workspace-footer .icon { width: 11px; height: 11px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 6px; border: 1px solid var(--green-line); border-radius: 5px; color: var(--green-ink); background: var(--green-bg); font-size: 10px; font-weight: 450; white-space: nowrap; }
.badge.neutral, .badge.blue { color: var(--muted); background: var(--surface-soft); border-color: var(--line); }

/* Lists and the selected-client inspector. */
.view-list > .page-heading p { display: none; }
.filter-card { margin-bottom: 14px; overflow: visible; flex: none; }
.filter-fields { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.15fr) auto; gap: 14px; padding: 14px 17px 10px; align-items: end; }
.filter-options { display: flex; justify-content: space-between; gap: 16px; padding: 0 17px 12px; }
.filter-options > .small { color: var(--faint); font-size: 10px; }
.result-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 13px; flex: none; }
.result-heading-copy { display: flex; align-items: center; gap: 11px; min-width: 0; flex-wrap: wrap; }
.result-heading h2 { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 13px; }
.count { padding: 1px 6px; border-radius: 5px; background: var(--chip); color: var(--muted); font-size: 10px; font-weight: 500; }
.filter-summary { display: flex; flex-wrap: wrap; gap: 5px; font-size: 10px; color: var(--muted); margin: 0; }
.filter-summary span { border: 1px solid var(--line); padding: 2px 6px; border-radius: 5px; background: var(--surface-soft); }
.results-grid { display: grid; grid-template-columns: minmax(0,1fr) 258px; gap: 16px; flex: 1; min-height: 0; }
.results-card { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.table-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 15px; border-bottom: 1px solid var(--line-soft); flex: none; }
.table-search { position: relative; max-width: 280px; flex: 1; }
.table-search input { height: 34px; min-height: 34px; padding: 8px 62px 8px 32px; background: var(--surface-soft); font-size: 12px; }
.table-search > .icon { position: absolute; left: 10px; top: 10px; width: 14px; height: 14px; color: var(--faint); }
.results-search-button { position: absolute; right: 4px; top: 4px; bottom: 4px; padding: 0 8px; border: 0; border-radius: 5px; background: var(--surface-hover); color: var(--muted); font-size: 10px; font-weight: 500; }
.results-search-button:hover { color: var(--ink); }
.table-hint { color: var(--faint); font-size: 10px; white-space: nowrap; }
.table-scroll { overflow: auto; min-height: 0; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.results-card > .table-scroll { flex: 1; overscroll-behavior: contain; }
table { width: 100%; border-collapse: separate; border-spacing: 0; text-align: left; font-size: 13px; }
th { position: sticky; top: 0; z-index: 1; padding: 11px 13px; border-bottom: 1px solid var(--line); background: var(--surface-soft); color: var(--muted); font-size: 10px; font-weight: 500; white-space: nowrap; }
td { height: 45px; padding: 9px 13px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
.client-table { min-width: 580px; }
.client-table th:first-child, .client-table td:first-child { padding-left: 15px; }
.client-table td:last-child { padding-right: 15px; }
.client-table tbody tr { cursor: pointer; }
.client-table tbody tr:hover { background: var(--surface-soft); }
.client-table tbody tr.selected { background: var(--selection); }
.client-table tbody tr.selected td:first-child { box-shadow: inset 2px 0 var(--selection-line); }
.client-id { font-family: 'Geist Mono', monospace; font-size: 10px; font-weight: 400; color: var(--muted); letter-spacing: -.025em; white-space: nowrap; }
.client-name { font-weight: 500; white-space: nowrap; }
.client-name button { min-height: 27px; border: 0; padding: 0; background: transparent; color: var(--ink); font-size: 13px; font-weight: 500; text-align: left; }
.client-name button:hover { color: var(--link); }
.money { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; font-size: 12px; }
.balance-due { color: var(--warning); font-weight: 500; }
.row-link { font-size: 11px; color: var(--muted); }
.row-link:hover { color: var(--ink); }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 15px; border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 10px; flex: none; }
.page-buttons { display: flex; align-items: center; gap: 5px; }
.page-number { min-width: 27px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-soft); color: var(--muted); text-align: center; }
.preview { display: flex; flex-direction: column; min-height: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--panel-shadow); }
.inspector-edit { display: flex; align-items: center; justify-content: center; width: 27px; height: 27px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); }
.inspector-edit:hover { color: var(--ink); background: var(--surface-hover); text-decoration: none; }
.inspector-edit .icon { width: 13px; height: 13px; }
.preview-body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.preview-body:focus-visible { outline-offset: -3px; }
.preview-profile { padding: 14px 16px 13px; }
.preview-identity { display: flex; align-items: center; gap: 10px; }
.preview-identity > div { min-width: 0; }
.preview-identity .initials { width: 38px; height: 38px; border-radius: 10px; font-size: 12px; }
.preview-name { font-size: 17px; line-height: 1.3; letter-spacing: -.04em; font-weight: 550; margin: 0 0 4px; overflow-wrap: anywhere; }
.preview-identity .client-id { font-size: 10px; }
.preview-status { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 10px; color: var(--green-ink); }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green-ink); }
.status-dot.archived { background: var(--muted); }
.preview-group { margin-top: 12px; }
.inspector-label { display: block; color: var(--muted); font-size: 10px; line-height: 1.4; font-weight: 450; }
.preview-group p { font-size: 12px; margin: 5px 0 0; line-height: 1.55; }
.record-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.record-metrics > div { display: flex; align-items: baseline; gap: 7px; }
.record-metrics strong { font-size: 19px; font-weight: 500; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.record-metrics span { font-size: 10px; color: var(--muted); }
.preview-balance { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 16px; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); background: var(--surface-soft); }
.preview-balance strong { display: block; margin-top: 3px; font-size: 22px; font-weight: 500; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.balance-status { color: var(--green-ink); font-size: 10px; white-space: nowrap; }
.preview-balance.has-balance { background: var(--warning-bg); }
.has-balance strong, .has-balance .balance-status { color: var(--warning); }
.preview-contact { padding: 16px; }
.preview-contact h3 { margin: 0 0 13px; font-weight: 500; }
.contact-row { display: flex; align-items: flex-start; gap: 9px; overflow-wrap: anywhere; }
.contact-row + .contact-row { margin-top: 12px; }
.contact-row > .icon { width: 14px; height: 14px; color: var(--muted); margin-top: 3px; }
.contact-row > div { min-width: 0; }
.contact-row span { display: block; color: var(--muted); font-size: 10px; }
.contact-row p { margin: 3px 0 0; font-size: 12px; line-height: 1.5; user-select: text; }
.preview-actions { flex: none; padding: 11px 14px; border-top: 1px solid var(--line); background: var(--surface); }
.preview-actions .btn { width: 100%; justify-content: space-between; font-size: 12px; min-height: 36px; }
.preview-actions .icon { width: 13px; height: 13px; }
.empty { padding: 35px 20px; text-align: center; flex: 1; min-height: 0; overflow: auto; }
.empty .icon { width: 27px; height: 27px; color: var(--faint); margin-bottom: 12px; }
.empty h3 { margin-bottom: 7px; }
.empty p { color: var(--muted); font-size: 12px; max-width: 340px; margin: 0 auto 16px; }
.empty-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 7px; }
.loading { padding: 36px; text-align: center; color: var(--muted); }
.spinner { width: 22px; height: 22px; border: 2px solid var(--line); border-top-color: var(--link); border-radius: 50%; margin: 0 auto 12px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Record details and the edit form use the same quiet surfaces. */
.back-link { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; margin-bottom: 16px; color: var(--muted); font-size: 12px; }
.back-link .icon { width: 14px; height: 14px; }
.client-heading { display: flex; align-items: center; gap: 13px; }
.client-heading h1 { margin-bottom: 5px; }
.client-heading p { margin: 0; font-size: 11px; }
.heading-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.detail-top { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.detail-grid { display: grid; grid-template-columns: 258px minmax(0,1fr); gap: 16px; }
.detail-info { align-self: start; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--panel-shadow); }
.detail-info > .info-card { border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.detail-info > .info-card + .info-card { border-top: 1px solid var(--line-soft); }
.detail-info .card-head h2 { font-size: 12px; color: var(--muted); font-weight: 500; }
.info-row { margin-bottom: 13px; }
.info-row:last-child { margin-bottom: 0; }
.info-row dt { font-size: 10px; color: var(--muted); margin-bottom: 3px; }
.info-row dd { margin: 0; font-size: 12px; overflow-wrap: anywhere; }
.detail-summary { display: grid; grid-template-columns: repeat(3,1fr); padding: 16px 20px; border-bottom: 1px solid var(--line); }
.detail-summary div + div { border-left: 1px solid var(--line); padding-left: 20px; }
.detail-summary span { display: block; font-size: 10px; color: var(--muted); }
.detail-summary strong { display: block; margin-top: 3px; font-size: 23px; font-weight: 500; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.detail-tabs { display: flex; gap: 22px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.detail-tabs button { display: flex; align-items: center; gap: 6px; min-height: 42px; padding: 12px 0; border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; font-size: 12px; }
.detail-tabs button[aria-selected='true'] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 500; }
.detail-tabs .count { font-size: 9px; }
.tab-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; font-size: 12px; }
.detail-table { min-width: 480px; }
.detail-table td, .detail-table th { padding-left: 18px; padding-right: 18px; }
.order-status { display: block; max-width: 200px; font-size: 11px; }
.panel-note { margin: 0; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-soft); color: var(--muted); font-size: 11px; }
.album-row { display: flex; align-items: center; width: 100%; gap: 12px; padding: 15px 20px; border: 0; border-top: 1px solid var(--line); background: var(--surface); color: var(--ink); text-align: left; cursor: pointer; }
.album-row:hover { background: var(--surface-hover); }
.album-row:focus-visible { outline: 2px solid var(--focus); outline-offset: -3px; }
.album-icon { display: flex; flex: none; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 8px; background: var(--surface-soft); color: var(--muted); }
.album-copy { min-width: 0; }
.album-count { display: block; margin-top: 3px; font-size: 11px; color: var(--muted); }
.album-arrow { display: flex; margin-left: auto; color: var(--faint); }
.album-arrow .icon { width: 16px; height: 16px; }
.album-row:hover .album-arrow, .album-row:focus-visible .album-arrow { color: var(--ink); }
.notes { padding: 16px 20px; border-top: 1px solid var(--line); font-size: 12px; }
.notes p { margin: 0; color: var(--muted); }
.edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.edit-card { overflow: visible; }
.edit-card .card-body { padding-top: 4px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; }
.form-grid .full { grid-column: 1/-1; }
.form-hint { display: block; font-size: 11px; color: var(--muted); margin-top: 5px; }
.edit-wide { grid-column: 1/-1; }
.address-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.address-block + .address-block { padding-left: 20px; border-left: 1px solid var(--line); }
.address-block h3 { font-size: 12px; margin-bottom: 12px; }
.address-block .form-grid { gap: 10px; }
.save-bar { position: sticky; bottom: -16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); z-index: 10; }
.save-bar p { margin: 0; color: var(--muted); font-size: 11px; }
.save-actions { display: flex; gap: 8px; }
.error-message { color: var(--danger); font-size: 12px; margin-top: 5px; }
.invalid { border-color: var(--danger); }
.error-summary { padding: 12px 16px; margin-bottom: 16px; border: 1px solid var(--danger-line); border-radius: 8px; background: var(--danger-bg); color: var(--danger); font-size: 12px; }
.error-summary:empty { display: none; }

/* Dialogs and feedback follow appearance too. */
dialog { width: min(460px,calc(100vw - 32px)); padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); box-shadow: 0 24px 70px var(--overlay); }
dialog::backdrop { background: var(--overlay); }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 21px 22px 12px; }
.dialog-header h2 { font-size: 18px; margin: 0; }
.close-dialog { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); }
.close-dialog:hover { background: var(--surface-hover); color: var(--ink); }
.dialog-body { padding: 4px 22px 20px; color: var(--muted); font-size: 13px; }
.dialog-body p:last-child { margin-bottom: 0; }
.dialog-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--surface-soft); }
.dialog-menu { display: grid; gap: 3px; }
.dialog-menu .tool-link { padding: 10px; }
.toast { position: fixed; bottom: 20px; right: 20px; z-index: 80; max-width: calc(100vw - 32px); padding: 12px 17px; border-radius: 9px; background: var(--tooltip); color: var(--tooltip-text); box-shadow: var(--shadow); font-size: 12px; }
.toast[hidden] { display: none; }

@media (min-width: 1650px) {
  .content, .topbar { padding-left: 32px; padding-right: 32px; }
  .workspace-grid { grid-template-columns: minmax(0,1fr) 310px; }
  .results-grid { grid-template-columns: minmax(0,1fr) 280px; }
}
@media (min-width: 901px) {
  html[data-sidebar='collapsed'] .shell { grid-template-columns: 76px minmax(0,1fr); }
  html[data-sidebar='collapsed'] .brand-row { flex-direction: column; gap: 12px; padding: 20px 12px 17px; }
  html[data-sidebar='collapsed'] .brand { flex: none; }
  html[data-sidebar='collapsed'] .brand-copy,
  html[data-sidebar='collapsed'] .nav-label,
  html[data-sidebar='collapsed'] .nav-text,
  html[data-sidebar='collapsed'] .nav-context-indicator,
  html[data-sidebar='collapsed'] .client-subnav,
  html[data-sidebar='collapsed'] .theme-label,
  html[data-sidebar='collapsed'] .sidebar-account-copy,
  html[data-sidebar='collapsed'] .sidebar-account > .icon { display: none; }
  html[data-sidebar='collapsed'] .sidebar-toggle .icon { transform: rotate(180deg); }
  html[data-sidebar='collapsed'] .main-nav { padding: 0 14px; gap: 7px; }
  html[data-sidebar='collapsed'] .nav-item { padding: 11px 0; min-height: 43px; justify-content: center; }
  html[data-sidebar='collapsed'] .sidebar-bottom { padding: 14px 12px; }
  html[data-sidebar='collapsed'] .sidebar-account { justify-content: center; padding-top: 12px; }
  html[data-sidebar='collapsed'] .theme-switch { grid-template-columns: 1fr; gap: 2px; width: 36px; padding: 4px; }
  html[data-sidebar='collapsed'] .theme-switch::before { height: 100%; }
  html[data-sidebar='collapsed'] .theme-thumb { left: 4px; top: calc(4px + var(--theme-index) * 30px); }
  html[data-sidebar='collapsed'] .theme-switch button { grid-template-rows: 28px; gap: 0; }
  html[data-sidebar='collapsed'] .section-nav { display: flex; }
}
@media (max-width: 1200px) {
  .content { padding: 18px 19px 14px; }
  .topbar { padding: 0 19px; }
  .workspace-grid { grid-template-columns: minmax(0,1fr) 254px; gap: 12px; }
  .workspace-primary { gap: 12px; }
  .search-fields { position: relative; grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .search-fields > .btn { grid-column: 1/-1; justify-self: end; position: absolute; right: 0; bottom: -38px; min-height: 30px; padding: 4px 13px; }
  .search-bottom { min-height: 30px; padding-right: 82px; }
  .search-note, .table-hint, .recent-group { display: none; }
  .results-grid { grid-template-columns: minmax(0,1fr) 242px; gap: 12px; }
  .detail-grid { grid-template-columns: 230px minmax(0,1fr); }
  .address-grid { grid-template-columns: 1fr; }
  .address-block + .address-block { border-left: 0; border-top: 1px solid var(--line); padding: 18px 0 0; }
}
@media (min-width: 901px) and (max-height: 720px) {
  .content { padding-top: 14px; padding-bottom: 12px; }
  .page-heading { margin-bottom: 12px; }
  .page-heading p { display: none; }
  h1 { font-size: 23px; margin-bottom: 0; }
  .card-head { padding-top: 12px; padding-bottom: 10px; }
  .card-body { padding-bottom: 13px; }
  .tool-group { padding-top: 10px; padding-bottom: 7px; }
  .tool-link { min-height: 31px; }
  .appointment { padding-top: 9px; padding-bottom: 9px; }
  .preview-profile { padding-top: 10px; padding-bottom: 9px; }
  .preview-identity .initials { width: 32px; height: 32px; }
  .preview-name { font-size: 16px; margin-bottom: 2px; }
  .preview-status { margin-top: 7px; }
  .preview-group, .record-metrics { margin-top: 8px; }
  .preview-group p { margin-top: 3px; }
  .record-metrics { padding-top: 7px; }
  .record-metrics strong { font-size: 17px; }
  .preview-balance { padding-top: 9px; padding-bottom: 9px; }
  .preview-balance strong { font-size: 20px; }
  .workspace-footer { margin-top: 9px; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; height: auto; min-height: 100dvh; overflow: visible; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 224px; visibility: hidden; transform: translateX(-100%); box-shadow: var(--shadow); }
  .sidebar.open { visibility: visible; transform: translateX(0); }
  .sidebar-toggle { display: none; }
  .sidebar-close { position: absolute; top: 8px; right: 7px; display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border: 0; border-radius: 50%; color: var(--muted); background: transparent; }
  .sidebar-close:hover { color: var(--ink); background: var(--surface-hover); }
  .sidebar-close .icon { width: 13px; height: 13px; }
  .navigation-scrim { display: block; position: fixed; inset: 0; z-index: 25; background: var(--overlay); }
  .main-area { grid-column: 1; min-height: 100dvh; }
  .topbar { position: sticky; top: 0; z-index: 20; }
  .topbar-left { gap: 10px; }
  .mobile-menu { display: flex; }
  .mobile-brand { display: block; font-size: 15px; font-weight: 550; letter-spacing: -.035em; }
  .breadcrumb { display: none; }
  .content { overflow: visible; padding: 20px; }
  .view-workspace, .view-list { display: block; }
  .section-nav { display: flex; }
  .workspace-grid { grid-template-columns: minmax(0,1fr) 254px; align-items: start; }
  .workspace-primary { gap: 14px; }
  .recent-card, .appointments { min-height: auto; }
  .search-fields { grid-template-columns: 1fr; }
  .search-fields > .btn { position: static; grid-column: auto; justify-self: start; min-height: 36px; padding: 8px 13px; }
  .search-bottom { min-height: 20px; padding-right: 0; }
  .lookup-row { grid-template-columns: 1fr; }
  .results-grid { grid-template-columns: minmax(0,1fr) 240px; align-items: start; }
  .results-card > .table-scroll { max-height: 480px; }
  .preview { position: sticky; top: 72px; max-height: calc(100dvh - 88px); }
  .filter-fields { grid-template-columns: 1fr 1fr; }
  .filter-fields > .btn { grid-column: 1/-1; justify-self: start; }
  .save-bar { bottom: 0; }
  .workspace-footer { margin-top: 16px; }
}
@media (max-width: 680px) {
  .topbar { padding: 0 12px; }
  .review-badge { display: none; }
  .content { padding: 18px 14px 24px; }
  .page-heading { gap: 10px; }
  .page-heading h1 { font-size: 24px; }
  .page-heading p { font-size: 11px; max-width: 200px; }
  .heading-actions { flex-wrap: wrap; }
  .section-nav { gap: 22px; overflow: auto; }
  .workspace-grid { grid-template-columns: 1fr; gap: 14px; }
  .search-fields, .lookup-row { grid-template-columns: 1fr 1fr; }
  .search-fields > .btn { grid-column: 1/-1; }
  .tools-card { display: grid; grid-template-columns: 1fr 1fr; }
  .tool-group + .tool-group { border-top: 0; border-left: 1px solid var(--line-soft); }
  .tool-group { padding: 13px 12px; }
  .tool-link { font-size: 11px; }
  .tool-link .icon:last-child:not(:first-child) { display: none; }
  .appointment-list { display: grid; grid-template-columns: 1fr 1fr; }
  .appointment + .appointment { border-left: 1px solid var(--line-soft); }
  .recent-group { display: block; }
  .results-grid { grid-template-columns: 1fr; gap: 14px; }
  .preview { position: static; max-height: none; }
  .preview-body { display: grid; grid-template-columns: 1fr 1fr; overflow: visible; }
  .preview-balance { grid-column: 1; }
  .preview-contact { grid-column: 2; grid-row: 1/3; border-left: 1px solid var(--line-soft); }
  .preview-identity .client-id { white-space: normal; overflow-wrap: anywhere; }
  .balance-status { white-space: normal; text-align: right; }
  .result-heading-copy { display: block; }
  .result-heading-copy .filter-summary { margin-top: 6px; }
  .result-heading .heading-actions { flex-wrap: nowrap; }
  .export-label { display: none; }
  .filter-fields { grid-template-columns: 1fr; padding: 14px; }
  .filter-fields > .btn { grid-column: auto; }
  .filter-options { padding: 0 14px 14px; }
  .filter-options > .small { display: none; }
  .pagination { flex-wrap: wrap; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-top { flex-wrap: wrap; align-items: start; }
  .detail-summary { padding: 14px; }
  .detail-summary div + div { padding-left: 14px; }
  .detail-tabs { gap: 18px; padding: 0 14px; }
  .detail-tabs button { font-size: 11px; }
  .edit-grid { grid-template-columns: 1fr; }
  .edit-wide { grid-column: auto; }
  .save-bar { padding: 12px; gap: 10px; }
  .save-bar p { max-width: 150px; }
  .table-search { max-width: none; }
}
@media (max-width: 420px) {
  .search-fields, .lookup-row, .tools-card, .appointment-list { grid-template-columns: 1fr; }
  .tool-group + .tool-group { border-left: 0; border-top: 1px solid var(--line-soft); }
  .appointment + .appointment { border-left: 0; }
  .preview-body { display: block; }
  .preview-contact { border-left: 0; }
  .recent-group { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .save-bar p { display: none; }
  .save-actions { margin-left: auto; }
  .page-heading > .heading-actions .btn { font-size: 11px; padding: 8px; }
  .section-nav { gap: 18px; }
}
@media (min-width: 901px) and (max-height: 540px) {
  .view-workspace, .view-list { display: block; overflow: auto; }
  .workspace-grid { min-height: 430px; }
  .results-grid { min-height: 360px; }
  .results-card > .table-scroll { max-height: 320px; }
  .preview { max-height: 420px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Connected working surfaces share the approved Clients palette. */
.view-workflow { font-size: 14px; }
.view-workflow label, .view-workflow input, .view-workflow select, .view-workflow .btn { font-size: 14px; }
.wf-toolbar { display: flex; align-items: end; gap: 14px; padding: 14px 16px; margin-bottom: 18px; flex-wrap: wrap; }
.wf-toolbar > div { flex: 1; min-width: 160px; }
.wf-form { display: grid; gap: 16px; }
.wf-form .form-grid { gap: 14px; }
.eyebrow { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.calendar-layout { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(280px,1fr); gap: 18px; }
.month-heading { display: flex; align-items: center; gap: 12px; }
.month-heading .icon-button { width: 28px; height: 28px; }
.calendar-month-picker { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; white-space: nowrap; }
.calendar-month-picker:hover { background: var(--surface-hover); }
.calendar-month-picker .icon { width: 12px; height: 12px; transform: rotate(90deg); color: var(--muted); }
.calendar-filters { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)) auto; gap: 12px; }
.calendar-filters > div { min-width: 0; }
.view-workflow .calendar-filters label, .view-workflow .calendar-filters input, .view-workflow .calendar-filters select, .view-workflow .calendar-filters .btn { font-size: 12px; }
.calendar-week, .calendar-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); }
.calendar-week { border-top: 1px solid var(--line); padding: 12px 0; text-align: center; color: var(--muted); font-size: 12px; }
.calendar-day, .calendar-blank { min-height: 81px; border: 0; border-top: 1px solid var(--line-soft); border-right: 1px solid var(--line-soft); background: transparent; padding: 9px; color: var(--ink); text-align: left; }
.calendar-day { display: flex; flex-direction: column; gap: 1px; padding: 4px 7px; font-size: 12px; line-height: 1.2; }
.calendar-day:hover { background: var(--surface-hover); }
.calendar-day.selected { background: var(--selection); box-shadow: inset 0 0 0 1px var(--selection-line); }
.calendar-count { font-weight: 600; color: var(--green-ink); font-size: 12px; }
.calendar-count-label { margin-left: 3px; font-size: 9px; font-weight: 400; }
.calendar-confirmed { font-size: 9px; color: var(--muted); }
.agenda-list { max-height: 530px; overflow: auto; }
.agenda-entry { display: flex; align-items: start; gap: 14px; padding: 17px; border-top: 1px solid var(--line-soft); }
.agenda-time { font-family: 'Geist Mono',monospace; font-size: 14px; min-width: 48px; }
.agenda-time span { display: block; font-family: Geist,sans-serif; font-size: 12px; color: var(--muted); margin-top: 3px; }
.agenda-copy { min-width: 0; flex: 1; }
.agenda-copy > a { font-weight: 550; color: var(--ink); }
.agenda-copy p { margin: 5px 0; font-size: 13px; }
.agenda-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
@media(max-width:1100px) { .calendar-layout { grid-template-columns: 1fr; } .agenda-list { max-height: 350px; } }
@media(max-width:680px) { .calendar-day, .calendar-blank { padding: 6px; min-height: 60px; } .calendar-count-label, .calendar-confirmed { display: none; } .wf-toolbar { align-items: stretch; } .wf-toolbar > div { min-width: 100%; } }
@media(max-width:680px) { .calendar-filters { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; align-items: end; }.calendar-filters > div { min-width: 0; }.calendar-filters > div:first-child { grid-column: 1/-1; }.calendar-filters .btn { grid-column: 1/-1; justify-self: end; min-height: 32px; padding: 6px 16px; }.month-heading { gap: 7px; }.calendar-month-picker { font-size: 12px; gap: 5px; padding: 5px 7px; }.calendar-card .card-head { gap: 9px; flex-wrap: wrap; } }
.wf-table-scroll { overflow: auto; max-width: 100%; scrollbar-width: thin; }
.wf-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 650px; }
.wf-table th { color: var(--muted); background: var(--surface-soft); text-align: left; font-size: 12px; font-weight: 500; white-space: nowrap; }
.wf-table td, .wf-table th { padding: 14px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.wf-table tbody tr:hover { background: var(--surface-soft); }
.wf-table .money { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wf-table .order-status { font-size: 13px; }
.wf-table tfoot { background: var(--selection); font-weight: 550; }
.wf-table tfoot th { background: var(--selection); }
.wf-person { font-weight: 550; color: var(--ink); }
.table-meta { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.row-actions { display: flex; align-items: center; gap: 14px; white-space: nowrap; }
.row-actions .icon-button { width: 28px; height: 28px; }
.wf-subline { margin: 5px 0 0; }
.wf-inline-lookup { display: flex; align-items: end; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.wf-inline-lookup > div { width: 230px; }
.wf-inline-lookup > span { align-self: center; }
.order-ribbon { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; padding: 18px; gap: 18px; margin-bottom: 18px; }
.order-ribbon > span { font-size: 13px; }
.order-balance strong { font-size: 22px; font-weight: 500; }
.order-layout { display: grid; grid-template-columns: minmax(0,1fr) 295px; gap: 18px; align-items: start; }
.order-main, .order-side { display: grid; gap: 18px; min-width: 0; }
.address-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.address-pair .card-body { padding-top: 0; font-size: 14px; }
.financial-summary { margin: 0; padding: 0 18px 18px; }
.financial-summary > div { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 13px; padding: 7px 0; }
.financial-summary dd { margin: 0; font-variant-numeric: tabular-nums; }
.financial-total { border-top: 1px solid var(--line); margin-top: 5px; font-weight: 550; }
.order-tools { display: grid; gap: 8px; padding-top: 0; }
.order-tools .btn { justify-content: start; }
.sample-image { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 70px; min-height: 75px; padding: 12px 4px; border-radius: 7px; background: var(--surface-soft); color: var(--muted); font-size: 11px; }
.comment-entry { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13px; margin-bottom: 14px; }
.comment-entry p { white-space: pre-wrap; margin-bottom: 0; margin-top: 5px; }
.order-history { padding-left: 18px; margin: 0; font-size: 13px; color: var(--muted); }
.order-history li + li { margin-top: 12px; }
.catalog-grid, .admin-catalog { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.catalog-entry { display: flex; align-items: center; gap: 16px; padding: 24px; color: var(--ink); }
.catalog-entry:hover { text-decoration: none; border-color: var(--selection-line); background: var(--surface-soft); }
.catalog-entry > div { flex: 1; }
.catalog-entry p { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.catalog-icon { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); background: var(--surface-soft); border-radius: 10px; color: var(--muted); flex: none; }
.report-filters { padding: 18px; }
.report-filter-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.report-run { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.report-run p { margin: 0; font-size: 12px; }
.report-filters .error-summary { margin: 16px 0 0; }
.report-scope { font-size: 13px; margin: 18px 0; }
.report-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); padding: 22px 0; gap: 24px; }
.report-metrics span { display: block; font-size: 12px; color: var(--muted); }
.report-metrics strong { display: block; font-size: 26px; font-weight: 500; letter-spacing: -.04em; margin-top: 5px; font-variant-numeric: tabular-nums; }
.sales-table { min-width: 1550px; }
.sales-table th:first-child { min-width: 260px; position: sticky; left: 0; z-index: 1; background: var(--surface-soft); }
.sales-table tbody th:first-child { background: var(--surface); color: var(--ink); white-space: normal; }
.sales-table tfoot th:first-child { background: var(--selection); }
.conversion-panel { margin-top: 18px; padding: 20px; }
.conversion-panel p { margin: 6px 0 18px; }
.conversion-row { display: grid; grid-template-columns: 180px minmax(0,1fr) 65px; gap: 18px; align-items: center; font-size: 13px; margin-top: 12px; }
.conversion-row meter { width: 100%; height: 12px; accent-color: var(--link); }
.conversion-row strong { font-weight: 500; text-align: right; }
.review-states { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 14px; color: var(--muted); font-size: 12px; }
.review-states summary { cursor: pointer; }
.review-states > .btn, .review-states > p { margin-top: 12px; }
.admin-category .card-head { border-bottom: 1px solid var(--line-soft); }
.admin-links { padding: 6px 10px; }
.admin-links a { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 8px; color: var(--ink); border-radius: 6px; }
.admin-links a:hover { text-decoration: none; background: var(--surface-soft); }
.admin-links strong { font-weight: 500; font-size: 14px; }
.admin-links span span { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
.admin-links .icon { width: 14px; color: var(--muted); }
.admin-form-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.admin-form-fields .full { grid-column: 1/-1; }
.admin-edit .save-bar { margin: 0; border-radius: 0 0 12px 12px; border: 0; border-top: 1px solid var(--line); bottom: -16px; }
.wf-gap { margin-top: 18px; }
.message-preview { white-space: pre-wrap; }
.roster-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1px; background: var(--line-soft); }
.roster-grid a { display: flex; align-items: center; gap: 10px; padding: 18px; background: var(--surface); font-size: 13px; color: var(--ink); }
@media(max-width:1200px) { .order-layout { grid-template-columns: minmax(0,1fr) 260px; } .order-ribbon { grid-template-columns: 1fr 1fr; } .report-filter-grid { grid-template-columns: 1fr 1fr; } }
@media(max-width:900px) { .order-layout { grid-template-columns: 1fr; } .order-side { grid-template-columns: 1fr 1fr; align-items: start; } .roster-grid { grid-template-columns: 1fr 1fr; } }
@media(max-width:680px) { .catalog-grid, .admin-catalog, .address-pair, .order-side, .admin-form-fields, .report-filter-grid { grid-template-columns: 1fr; } .catalog-entry { padding: 18px; } .report-metrics { grid-template-columns: 1fr 1fr; gap: 20px; } .report-metrics strong { font-size: 23px; } .report-run { flex-wrap: wrap; } .conversion-row { grid-template-columns: 1fr 55px; gap: 8px; } .conversion-row > span { grid-column: 1/-1; } .order-ribbon { gap: 14px; } .order-ribbon > span { overflow-wrap: anywhere; } .roster-grid { grid-template-columns: 1fr; } .view-workflow .page-heading { flex-wrap: wrap; } }
.settings-section { border-bottom: 1px solid var(--line-soft); padding: 16px 0; }
.settings-section:first-of-type { padding-top: 0; }
.settings-section:last-of-type { border-bottom: 0; }
.settings-section summary { cursor: pointer; font-size: 15px; font-weight: 550; }
.settings-section .admin-form-fields { margin-top: 20px; }
@media(min-width:1101px) { .calendar-layout { height: calc(100dvh - 272px); min-height: 390px; max-height: 650px; } .calendar-card, .day-agenda { display: flex; flex-direction: column; overflow: hidden; min-height: 0; } .calendar-grid { flex: 1; grid-auto-rows: 1fr; min-height: 0; } .calendar-day, .calendar-blank { min-height: 0; } .agenda-list { flex: 1; max-height: none; min-height: 0; } }
.appointment-status-field { border: 0; padding: 0; margin: 0; }
.appointment-status-field legend { color: var(--muted); font-size: 12px; margin-bottom: 7px; }
@media(min-width:901px) and (max-width:1100px) { .calendar-layout { grid-template-columns: minmax(0,1fr) 260px; height: calc(100dvh - 250px); min-height: 370px; } .calendar-card, .day-agenda { display: flex; flex-direction: column; overflow: hidden; min-height: 0; } .calendar-grid { flex: 1; grid-auto-rows: 1fr; min-height: 0; } .calendar-day, .calendar-blank { min-height: 0; } .calendar-count-label, .calendar-confirmed { display: none; } .agenda-list { flex: 1; max-height: none; min-height: 0; } .month-heading { gap: 7px; } }
@media(min-width:1101px) and (max-height:680px) { .calendar-confirmed { display: none; } }

/* Portrait cells share one local synthetic image asset. */
.portrait { display: inline-block; position: relative; overflow: hidden; width: 31px; height: 31px; border-radius: 50%; flex: none; background: var(--avatar); border: 1px solid var(--line-soft); }
.portrait img { position: absolute; width: 400%; height: 400%; max-width: none; }
.portrait.large { width: 43px; height: 43px; border-radius: 11px; }
.client-name button { display: inline-flex; align-items: center; gap: 9px; }
.portrait.gallery { width: 100%; height: auto; aspect-ratio: 1; border-radius: 8px; }
.portrait.full { display: block; width: min(380px,100%); height: auto; aspect-ratio: 1; margin: auto; border-radius: 9px; }
.portrait.order-portrait { width: 64px; height: 64px; border-radius: 7px; }
.image-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.image-tile { background: transparent; border: none; padding: 0; text-align: left; color: var(--ink); }
.image-tile > span:last-child { display: block; padding-top: 5px; font-size: 11px; }
.image-tile:hover .portrait { outline: 2px solid var(--focus); outline-offset: 2px; }
.image-page-actions { display: flex; gap: 8px; margin-left: auto; }
.login-page { min-height: 100dvh; display: flex; flex-direction: column; background: var(--canvas); }
.login-header { display: flex; align-items: center; justify-content: space-between; padding: 27px 5vw; }
.login-header .brand-mark { font-size: 24px; font-weight: 650; }
.login-layout { flex: 1; display: grid; grid-template-columns: 1fr 1fr; width: min(1080px,90vw); margin: 36px auto 50px; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--surface); }
.login-story { padding: clamp(30px,4vw,58px); background: var(--surface-soft); display: flex; flex-direction: column; justify-content: center; }
.login-story h1 { font-size: clamp(30px,3vw,42px); line-height: 1.13; font-weight: 550; letter-spacing: -1.5px; margin: 18px 0; }
.login-story > p { font-size: 14px; line-height: 1.7; max-width: 330px; color: var(--muted); }
.login-records { display: grid; gap: 9px; margin: 28px 0; }
.login-record { display: flex; align-items: center; gap: 11px; background: var(--surface); border: 1px solid var(--line); padding: 13px; border-radius: 10px; }
.login-record strong { display: block; font-size: 12px; font-weight: 550; }
.login-record div > span { display: block; font-family: 'Geist Mono',monospace; color: var(--muted); font-size: 10px; margin-top: 4px; }
.login-record-status { margin-left: auto; color: var(--muted); font-size: 10px; white-space: nowrap; }
.login-scale { display: flex; gap: 40px; padding-top: 12px; }
.login-scale strong { display: block; font-size: 22px; font-weight: 500; letter-spacing: -.5px; }
.login-scale span { display: block; margin-top: 5px; font-size: 11px; color: var(--muted); }
.login-form-panel { display: flex; align-items: center; justify-content: center; padding: 45px 32px; border-left: 1px solid var(--line); }
.login-form-wrap { width: min(330px,100%); }
.login-form-wrap h2 { margin: 16px 0 9px; font-size: 27px; font-weight: 550; letter-spacing: -.8px; }
.login-form-wrap > p { color: var(--muted); font-size: 13px; line-height: 1.6; }
#demo-login { display: grid; gap: 20px; margin-top: 30px; }
#demo-login input { min-height: 43px; }
.password-field { position: relative; }
.password-field input { padding-right: 45px; }
.password-toggle { position: absolute; right: 3px; top: 3px; bottom: 3px; width: 38px; background: transparent; border: none; color: var(--muted); display: grid; place-items: center; border-radius: 5px; }
.password-toggle:hover { background: var(--surface-hover); color: var(--ink); }
.login-submit { min-height: 43px; width: 100%; justify-content: space-between; }
#login-error:empty { display: none; }
.login-note { display: flex; gap: 7px; align-items: center; justify-content: center; margin-top: 20px; font-size: 11px; color: var(--muted); }
.login-note .icon { width: 13px; height: 13px; }
.login-footer { display: flex; justify-content: space-between; padding: 0 5vw 23px; font-size: 11px; color: var(--muted); }
@media(max-width:900px) { .login-layout { width: min(480px,90vw); display: block; margin: 25px auto 40px; } .login-story { display: none; } .login-form-panel { border: none; min-height: 450px; } }
@media(max-width:480px) { .login-header { padding-top: 20px; } .login-header .studio-name { display: none; } .login-header .brand-copy { display: block; } .login-header .theme-switch { width: 132px; } .login-form-panel { padding: 34px 24px; min-height: 420px; } .login-footer { gap: 20px; font-size: 10px; } .image-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
.login-layout { flex: 0 0 auto; }
.login-footer { margin-top: auto; }
.pagination { flex-wrap: wrap; gap: 12px; }
.page-buttons { flex-wrap: wrap; }
@media(max-width:680px) { .pagination { align-items: flex-start; } .pagination > span { width: 100%; } .page-buttons { gap: 5px; } .page-buttons .btn { font-size: 11px; padding: 6px 9px; } }
.login-header { padding-top: 22px; padding-bottom: 22px; }
.login-layout { margin-top: 18px; margin-bottom: 24px; }
.login-story { padding: 34px 40px; }
.login-story h1 { font-size: 36px; margin: 14px 0; }
.login-story > p { margin: 0; font-size: 13px; line-height: 1.65; }
.login-records { margin: 22px 0; gap: 8px; }
.login-record { padding: 10px 12px; }
.login-record .portrait.large { width: 35px; height: 35px; border-radius: 8px; }
.login-form-panel { padding-top: 34px; padding-bottom: 34px; }
html[data-sidebar='collapsed'] .login-header .brand-copy { display: flex; }
html[data-sidebar='collapsed'] .login-header .theme-switch { display: grid; grid-template-columns: repeat(3,1fr); gap: 0; width: 144px; padding: 4px; }
html[data-sidebar='collapsed'] .login-header .theme-thumb { left: calc(4px + (100% - 8px) / 3 * (var(--theme-index) + .5) - 14px); top: 4px; }
html[data-sidebar='collapsed'] .login-header .theme-label { display: block; }
html[data-sidebar='collapsed'] .login-header .theme-switch button { grid-template-rows: 28px auto; gap: 3px; }
@media(max-width:480px) { .login-header .theme-switch,html[data-sidebar='collapsed'] .login-header .theme-switch { width: 144px; } }

.image-id { display: block; color: var(--muted); font-size: 9px; font-family: 'Geist Mono',monospace; padding-top: 3px; }
.orders-queue .wf-table-scroll { max-height: 360px; }
.orders-queue thead, .report-data thead { position: sticky; top: 0; background: var(--surface-soft); z-index: 1; }
.report-data .wf-table-scroll { max-height: 420px; }
.roster-grid { max-height: 480px; overflow: auto; }
@media(max-width:680px) { .orders-queue .wf-table-scroll { max-height: 340px; } }
