/* Merevia · a considered studio workspace. Original theme, MIT licensed.
   All typography and photography are bundled locally. */

/* 01 — Type, appearance and foundational elements */
@font-face {
  font-family: 'Manrope';
  src: url('../fonts/manrope-variable.ttf') format('truetype');
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('../fonts/source-sans-3-variable.ttf') format('truetype');
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
}
:root {
  color-scheme: light;
  --canvas: #f6f5f7;
  --surface: #ffffff;
  --surface-soft: #f0edf3;
  --surface-raised: #faf9fb;
  --ink: #30283a;
  --muted: #6c6275;
  --line: #e4dfe9;
  --line-strong: #c7bdce;
  --accent: #72547f;
  --accent-hover: #5c3f69;
  --accent-ink: #ffffff;
  --accent-soft: #eee6f2;
  --good: #386b57;
  --good-soft: #e5f1e9;
  --warm: #825a2d;
  --warm-soft: #f7eddf;
  --bad: #a13f50;
  --bad-soft: #fae8ec;
  --brass: #72547f;
  --brass-text: #72547f;
  --moss: #457b67;
  --clay: #b16b7d;
  --font: 'Source Sans 3', Arial, sans-serif;
  --font-heading: 'Manrope', Arial, sans-serif;
  --radius: 18px;
  --sidebar-width: 248px;
  --shadow: 0 2px 3px #30283a03, 0 7px 24px #30283a05;
  --shadow-lift: 0 12px 30px #392c4612, 0 3px 8px #392c4607;
  --shadow-dialog: 0 30px 100px #21162933, 0 6px 24px #2116291a;
  --modal-head: linear-gradient(120deg, #f0e9f4, #f7f3f9);
  --modal-foot: #f6f3f8;
  --sidebar-bg: linear-gradient(170deg, #fcfafc 0%, #f5f1f7 70%, #eee8f2 100%);
  --accent-gradient: linear-gradient(135deg, #81618e, #674775);
  --canvas-glow: #eae0f044;
  --focus-ring: #886497;
  --ease: cubic-bezier(0.2, 0.75, 0.25, 1);
}
html[data-theme='dark'] {
  color-scheme: dark;
  --canvas: #211d27;
  --surface: #2c2634;
  --surface-soft: #342d3e;
  --surface-raised: #302938;
  --ink: #f0eaf4;
  --muted: #bcb0c6;
  --line: #463c51;
  --line-strong: #675773;
  --accent: #c5a5d4;
  --accent-hover: #dbb9e9;
  --accent-ink: #2c1b36;
  --accent-soft: #43314e;
  --good: #a9d9be;
  --good-soft: #293c34;
  --warm: #ebc28c;
  --warm-soft: #443726;
  --bad: #f0a7b7;
  --bad-soft: #462b36;
  --brass: #c5a5d4;
  --brass-text: #c5a5d4;
  --moss: #9acbb2;
  --clay: #dda4b2;
  --shadow: 0 2px 4px #0c071012, 0 8px 26px #0c071018;
  --shadow-lift: 0 12px 36px #0c071033, 0 2px 8px #0c071022;
  --shadow-dialog: 0 28px 100px #0c071080;
  --modal-head: linear-gradient(120deg, #3d3048, #352b40);
  --modal-foot: #332b3c;
  --sidebar-bg: linear-gradient(165deg, #2d2534, #28212f 70%, #302538);
  --accent-gradient: linear-gradient(135deg, #cfb1dc, #b99aca);
  --canvas-glow: #58416620;
  --focus-ring: #d6b9e6;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-padding-top: 100px;
  scroll-behavior: auto;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(ellipse at 95% 0%, var(--canvas-glow), transparent 45%), var(--canvas);
  font: 400 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
[hidden] {
  display: none !important;
}
::selection {
  color: var(--ink);
  background: var(--accent-soft);
}
a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 4px;
}
a:hover {
  color: var(--accent-hover);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea,
summary {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled,
input:disabled,
select:disabled,
textarea:disabled,
[aria-disabled='true'] {
  cursor: not-allowed;
  opacity: 0.56;
}
img,
svg {
  vertical-align: middle;
}
img {
  max-width: 100%;
}
input,
select,
textarea {
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--ink);
  background: var(--surface);
  font-size: 15px;
  line-height: 1.4;
  transition:
    border-color 0.18s,
    box-shadow 0.18s,
    background-color 0.18s;
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 0.82;
}
input:not(:disabled):hover,
select:not(:disabled):hover,
textarea:not(:disabled):hover {
  border-color: var(--accent);
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
}
input[type='checkbox'],
input[type='radio'] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  flex: 0 0 18px;
  padding: 0;
  margin: 0;
  vertical-align: middle;
  accent-color: var(--accent);
}
input[type='range'] {
  padding: 0;
  accent-color: var(--accent);
}
input[type='color'] {
  width: 60px;
  padding: 5px;
}
input[type='file'] {
  width: 100%;
  font-size: 14px;
}
input::file-selector-button {
  padding: 6px 10px;
  margin: -4px 10px -4px -6px;
  border: 0;
  border-radius: 6px;
  color: var(--accent);
  background: var(--accent-soft);
  font: 600 14px var(--font);
  cursor: pointer;
}
textarea {
  resize: vertical;
  min-height: 106px;
}
select {
  padding-right: 30px;
}
option {
  color: var(--ink);
  background: var(--surface);
}
label {
  display: grid;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
}
fieldset {
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
}
legend {
  float: none;
  width: auto;
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 600;
}
h1,
h2,
h3,
h4,
h5,
h6,
.brand {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.035em;
  color: var(--ink);
  line-height: 1.35;
}
h1 {
  margin: 0 0 8px;
  font-size: 28px;
  letter-spacing: -0.045em;
}
h2 {
  margin: 0;
  font-size: 18px;
}
h3 {
  margin: 0 0 8px;
  font-size: 16px;
}
h4,
h5,
h6 {
  font-size: 15px;
}
p {
  margin: 0 0 16px;
}
small,
.small {
  font-size: 13px;
}
small,
.subtle,
.muted,
.help-text,
.subtle-note,
.kpi-foot {
  color: var(--muted);
}
strong {
  font-weight: 650;
}
hr {
  margin: 22px 0;
  border: 0;
  border-top: 1px solid var(--line);
  opacity: 1;
}
code,
pre,
.mono {
  font:
    13px/1.65 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
}
code {
  color: var(--accent);
  overflow-wrap: anywhere;
}
pre {
  max-width: 100%;
  padding: 16px;
  background: var(--surface-soft);
  border-radius: 10px;
  overflow: auto;
}
.icon {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
}
.sr-only,
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 110;
}
.skip-link:focus {
  top: 16px;
  padding: 12px 18px;
  border-radius: 9px;
  background: var(--surface);
  box-shadow: var(--shadow-dialog);
}
main:focus {
  outline: none;
}

/* 02 — Permanent studio navigation and compact application header */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  padding: 26px 16px 16px;
  border-right: 1px solid var(--line);
  background: var(--sidebar-bg);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
  transition: transform 0.26s var(--ease);
}
.sidebar > .nav-close {
  display: none;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 8px 28px;
  font-size: 29px;
  letter-spacing: -0.065em;
}
.brand:hover {
  color: var(--ink);
}
.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 41px;
  height: 43px;
  flex: 0 0 41px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: 13px 13px 5px 13px;
  color: var(--accent-ink);
  background: var(--accent-gradient);
  box-shadow: 0 4px 10px #49255416;
  font-size: 28px;
}
.brand-mark > span {
  position: absolute;
  right: 5px;
  bottom: 0;
  font-size: 18px;
}
.brand small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font: 650 10px/1.5 var(--font);
  letter-spacing: 0.16em;
}
.studio-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  box-shadow: 0 2px 4px #30283a03;
  font-size: 14px;
  font-weight: 600;
}
.studio-switch > span:last-child {
  margin-left: auto;
  color: var(--muted);
}
.studio-switch small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 400;
}
.workspace-monogram,
.avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 35px;
  width: 35px;
  height: 35px;
  border: 1px solid color-mix(in srgb, var(--accent) 10%, var(--line));
  border-radius: 11px;
  color: var(--accent);
  background: var(--accent-soft);
  font: 700 12px var(--font-heading);
  letter-spacing: -0.03em;
}
.avatar {
  border-radius: 50%;
}
.avatar-lg {
  width: 64px;
  height: 64px;
  flex-basis: 64px;
  font-size: 21px;
}
.avatar.tiny,
.avatar.small {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
  font-size: 12px;
}
.avatar.large {
  width: 58px;
  height: 58px;
  flex-basis: 58px;
  font-size: 19px;
}
.sidebar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 16px 0 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface) 65%, transparent);
  font-size: 13px;
  text-align: left;
}
.sidebar-search .icon {
  width: 16px;
  height: 16px;
  flex-basis: 16px;
}
kbd {
  margin-left: auto;
  padding: 2px 4px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  background: var(--surface);
  font: 12px var(--font);
  white-space: nowrap;
}
.nav-section {
  margin-top: 22px;
}
.nav-label {
  display: block;
  padding: 0 11px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 39px;
  margin: 3px 0;
  padding: 8px 11px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 500;
  transition:
    background 0.18s,
    border-color 0.18s,
    color 0.18s,
    transform 0.18s var(--ease);
}
.nav-item .icon {
  color: var(--muted);
  width: 18px;
  height: 18px;
  flex-basis: 18px;
}
.nav-item:hover,
.nav-item:focus-visible {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent-soft) 65%, transparent);
}
.nav-item.active {
  color: var(--accent-hover);
  border-color: color-mix(in srgb, var(--accent) 16%, var(--line));
  background: var(--accent-soft);
  font-weight: 650;
  box-shadow: 0 2px 4px #30283a04;
}
.nav-item.active .icon {
  color: var(--accent);
}
.nav-item.active::after {
  position: absolute;
  right: 12px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  content: '';
}
.sidebar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  margin-top: auto;
  padding: 24px 3px 0;
}
.user-profile {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
}
.user-profile small {
  display: block;
  font-size: 11px;
  font-weight: 400;
}
.app-shell {
  margin-left: var(--sidebar-width);
  min-width: 0;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
  padding: 14px 32px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(16px);
}
.topbar-location,
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 13px;
}
.topbar-location {
  min-width: 0;
  color: var(--muted);
}
.topbar-location > span:last-child {
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar-location > span[aria-hidden] {
  color: var(--line-strong);
}
.topbar-actions {
  flex-shrink: 0;
}
.topbar .header-search {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}
.topbar .mobile-menu,
.nav-scrim {
  display: none;
}
main {
  width: 100%;
  max-width: 1580px;
  margin: auto;
  padding: 30px 32px 24px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}
.page-heading > div:first-child {
  min-width: 0;
}
.page-heading p {
  max-width: 740px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}
.eyebrow {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.095em;
  line-height: 1.5;
}
.eyebrow > span {
  margin-left: 4px;
  font-weight: 400;
  letter-spacing: 0.025em;
}
.heading-actions {
  flex-shrink: 0;
}
.footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.footer a:hover {
  text-decoration: underline;
}
.demo-note {
  margin: 26px 0 20px;
  color: var(--muted);
  font-size: 12px;
}
.noscript {
  padding: 16px;
  margin: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--warm-soft);
  color: var(--warm);
}

/* 03 — Actions, status and shared surfaces */
.btn,
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 41px;
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--ink);
  background: var(--surface);
  font: 600 14px/1.4 var(--font);
  text-decoration: none;
  text-align: center;
  white-space: normal;
  transition:
    background 0.18s,
    border-color 0.18s,
    color 0.18s,
    box-shadow 0.18s,
    transform 0.18s var(--ease);
}
.btn:hover,
.icon-btn:hover {
  color: var(--ink);
  border-color: var(--accent);
  background: var(--surface-soft);
  text-decoration: none;
  box-shadow: 0 3px 8px #30283a08;
  transform: translateY(-1px);
}
.btn:active,
.icon-btn:active {
  color: var(--ink);
  background: var(--accent-soft);
  transform: translateY(1px);
  box-shadow: none;
}
.btn:focus-visible,
.icon-btn:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
  color: var(--ink);
  border-color: var(--accent);
  background: var(--surface-soft);
  box-shadow: none;
}
.btn.primary {
  border-color: var(--accent);
  color: var(--accent-ink);
  background: var(--accent-gradient);
  box-shadow:
    0 3px 8px #5c3f6918,
    inset 0 1px 0 #ffffff1a;
}
.btn.primary:hover,
.btn.primary:focus-visible {
  color: var(--accent-ink);
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 5px 15px #5c3f6924;
}
.btn.primary:active {
  background: var(--accent);
  box-shadow: none;
}
.btn.danger {
  color: var(--bad);
  border-color: color-mix(in srgb, var(--bad) 24%, var(--line));
}
.btn.danger:hover {
  background: var(--bad-soft);
  border-color: var(--bad);
}
.btn.quiet {
  color: var(--muted);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
.btn.small {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 13px;
}
.btn.large {
  min-height: 48px;
  padding: 12px 20px;
  font-size: 16px;
}
.btn:disabled,
.icon-btn:disabled {
  transform: none;
  box-shadow: none;
}
.icon-btn {
  width: 40px;
  min-width: 40px;
  padding: 9px;
  flex: 0 0 40px;
}
.text-link {
  padding: 0;
  border: 0;
  color: var(--accent);
  background: transparent;
  font: 600 14px/1.5 var(--font);
  text-align: left;
}
.text-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}
.actions,
.form-actions,
.workflow-links,
.context-bar,
.demo-row,
.between {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.between,
.context-bar {
  justify-content: space-between;
}
.workflow-links,
.context-bar {
  margin-bottom: 22px;
}
.workflow-links > .subtle {
  margin-left: auto;
  font-size: 13px;
}
.badge,
.count-pill,
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  max-width: 100%;
  padding: 4px 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  background: var(--surface-soft);
  font: 600 12px/1.45 var(--font);
  white-space: normal;
  vertical-align: middle;
  text-align: center;
}
.badge.good,
.tag.good {
  color: var(--good);
  background: var(--good-soft);
  border-color: color-mix(in srgb, var(--good) 9%, transparent);
}
.badge.warm,
.tag.warm {
  color: var(--warm);
  background: var(--warm-soft);
  border-color: color-mix(in srgb, var(--warm) 9%, transparent);
}
.badge.bad,
.tag.bad {
  color: var(--bad);
  background: var(--bad-soft);
  border-color: color-mix(in srgb, var(--bad) 9%, transparent);
}
.count-pill {
  min-width: 26px;
  margin-left: 6px;
  color: var(--accent);
  background: var(--accent-soft);
}
.tag {
  padding: 5px 10px;
  border-color: var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: var(--surface-raised);
  font-weight: 500;
}
a.tag:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}
.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 3px var(--good-soft);
}
.divider-v {
  display: inline-block;
  width: 1px;
  height: 15px;
  margin: 0 12px;
  background: var(--line-strong);
  vertical-align: middle;
}
.panel,
.kpi,
.note-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.panel {
  padding: 23px;
  margin-bottom: 22px;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.panel-head > div {
  min-width: 0;
}
.panel-head h3,
.panel-head p {
  margin: 0;
}
.panel-head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 14px;
}
.panel-head .eyebrow {
  margin-bottom: 5px;
}
.panel-note {
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.kpi-grid:has(> :last-child:nth-child(3)) {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.kpi {
  position: relative;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 20px;
  background: linear-gradient(135deg, var(--surface) 45%, var(--surface-raised));
  overflow-wrap: anywhere;
}
.kpi::before {
  position: absolute;
  top: 21px;
  right: 18px;
  width: 7px;
  height: 7px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  content: '';
}
.kpi:first-child::before {
  border-color: var(--accent);
  background: var(--accent);
}
.kpi:first-child {
  background: linear-gradient(
    120deg,
    var(--surface),
    color-mix(in srgb, var(--accent-soft) 58%, var(--surface))
  );
  border-color: color-mix(in srgb, var(--accent) 25%, var(--line));
}
.kpi-label {
  padding-right: 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}
.kpi-number {
  color: var(--ink);
  font: 700 clamp(23px, 2.2vw, 29px) / 1.2 var(--font-heading);
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}
.kpi-foot {
  font-size: 12px;
  line-height: 1.45;
}
body[data-family='table'] .kpi-number {
  font-size: clamp(21px, 2vw, 26px);
}
[data-premium-card] {
  transition:
    transform 0.22s var(--ease),
    box-shadow 0.22s var(--ease),
    border-color 0.22s,
    background-color 0.22s;
}
[data-premium-card]:hover,
[data-premium-card]:focus-visible,
[data-premium-card]:focus-within {
  border-color: color-mix(in srgb, var(--accent) 52%, var(--line));
  box-shadow: var(--shadow-lift);
  transform: translateY(-3px);
}

/* 04 — Studio desk, useful photography and report canvas */
.period-toolbar,
.chart-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
}
.period-toolbar {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}
.period-toolbar > div:first-child {
  display: grid;
  gap: 5px;
}
.period-toolbar > div:first-child > .badge {
  width: fit-content;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  font-size: 14px;
  font-weight: 600;
}
.period-toolbar .subtle {
  font-size: 12px;
}
.period-toolbar label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}
.period-toolbar select {
  min-height: 40px;
  font-size: 14px;
}
.studio-desk-grid,
.studio-note-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 294px;
  align-items: start;
  gap: 22px;
}
.studio-desk-main,
.studio-rail {
  min-width: 0;
}
.card-photo {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: cover;
  object-position: center;
  border-radius: 12px;
  transition:
    transform 0.45s var(--ease),
    filter 0.3s;
}
.studio-status-card,
.next-guest-card {
  padding: 0;
  overflow: hidden;
}
.studio-status-card .card-photo,
.next-guest-card .card-photo {
  height: 168px;
  border-radius: 0;
}
.studio-status-card {
  background: linear-gradient(135deg, var(--surface), var(--surface-raised));
}
.studio-status-card .card-content {
  border-top: 1px solid var(--line);
}
.studio-status-card .panel-head {
  gap: 8px;
  margin-bottom: 10px;
}
.studio-status-card .panel-head h2 {
  font-size: 17px;
}
.studio-status-card .btn {
  margin-top: 10px;
  width: 100%;
}
.studio-status-card:hover .card-photo,
.next-guest-card:hover .card-photo {
  transform: scale(1.025);
}
.card-content {
  position: relative;
  padding: 20px;
}
.card-content > h2,
.card-content > h3 {
  margin-bottom: 10px;
}
.card-content > p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}
.card-content > :last-child {
  margin-bottom: 0;
}
.readiness-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.readiness-item > span:first-child {
  color: var(--muted);
}
.next-guest-card .card-photo {
  height: 162px;
  object-position: center 36%;
}
.next-guest-card .card-content {
  background: linear-gradient(120deg, var(--surface), var(--accent-soft));
}
.next-guest-card h3 {
  font-size: 16px;
  line-height: 1.5;
}
.studio-rail.panel {
  padding: 12px;
}
.studio-rail.panel > .card-content {
  padding: 18px 9px 10px;
}
.agenda-panel th:first-child {
  width: 72px;
}
.agenda-panel td:first-child {
  color: var(--accent);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.agenda-panel td {
  padding-block: 16px;
  font-size: 14px;
}
.chart-canvas {
  position: relative;
  width: 100%;
  height: 252px;
  min-width: 0;
}
.chart-canvas.tall {
  height: 340px;
}
.chart-canvas canvas {
  max-width: 100%;
}
.chart-meta {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 13px;
}
.chart-meta strong {
  color: var(--ink);
}
.chart-panel .panel-head {
  margin-bottom: 16px;
}
.mini-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 18px 0;
}
.mini-kpis > div {
  display: grid;
  gap: 5px;
}
.display-number {
  display: block;
  margin: 12px 0;
  font: 700 46px/1.15 var(--font-heading);
  letter-spacing: -0.05em;
}

/* 05 — Registers, search, column menus and pagination */
.table-scroll {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
table {
  width: 100%;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--ink);
  font-size: 14px;
}
th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  line-height: 1.5;
}
th {
  color: var(--muted);
  background: var(--surface-raised);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
th:first-child {
  border-top-left-radius: 8px;
}
th:last-child {
  border-top-right-radius: 8px;
}
tbody tr {
  transition: background-color 0.16s;
}
tbody tr:hover {
  background: var(--surface-raised);
}
tbody tr:has(input[type='checkbox']:checked) {
  background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface));
}
tbody tr:last-child td {
  border-bottom: 0;
}
td .actions {
  flex-wrap: nowrap;
  gap: 7px;
}
td .btn {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 12px;
  white-space: nowrap;
}
td .text-link {
  font-size: 14px;
}
.data-table {
  min-width: 780px;
}
.data-table td:first-child,
.data-table th:first-child {
  width: 40px;
  padding-inline: 10px;
  text-align: center;
}
.data-table td:nth-child(2) {
  min-width: 145px;
  font-weight: 600;
}
.data-table td:last-child {
  min-width: 144px;
  white-space: nowrap;
}
.data-table td:last-child .btn + .btn {
  margin-left: 5px;
}
.data-table td:has(.badge) {
  white-space: nowrap;
}
.sort-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
}
.sort-button:hover,
.sort-button[aria-sort] {
  color: var(--accent);
}
.sort-button > span {
  font-size: 14px;
  opacity: 0.65;
}
.table-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.table-toolbar label {
  font-size: 13px;
}
.table-toolbar > label:not(.search-field) {
  min-width: 130px;
}
.table-toolbar select {
  min-height: 42px;
  padding-block: 9px;
  font-size: 14px;
}
.search-field,
.input-icon {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}
.search-field {
  flex: 1 1 220px;
}
.search-field input,
.input-icon input {
  width: 100%;
  padding-left: 37px;
}
.search-field > .icon,
.input-icon > .icon {
  position: absolute;
  left: 12px;
  color: var(--muted);
  width: 17px;
  height: 17px;
  pointer-events: none;
}
.column-picker {
  position: relative;
}
.column-picker summary {
  list-style: none;
}
.column-picker summary::-webkit-details-marker {
  display: none;
}
.column-picker[open] summary {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.column-options {
  position: absolute;
  right: 0;
  z-index: 15;
  min-width: 205px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--surface);
  box-shadow: var(--shadow-dialog);
  animation: merevia-pop-in 0.16s var(--ease);
}
.column-options label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 37px;
  padding: 7px 8px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
}
.column-options label:hover {
  background: var(--surface-soft);
}
.bulk-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px;
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--accent-soft);
  font-size: 14px;
}
.bulk-bar strong {
  margin-right: auto;
}
.table-footer,
.table-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 18px;
  margin-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.table-footer label,
.table-bottom label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 400;
}
.table-footer select,
.table-bottom select {
  min-height: 36px;
  padding: 6px 27px 6px 9px;
  font-size: 14px;
}
.pagination {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}
.pagination .btn {
  min-height: 36px;
  padding: 7px 11px;
  font-size: 13px;
}
.empty-inline {
  padding: 32px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* 06 — Forms, shared details, booking and consultation preparation */
.form-layout,
.split-grid,
.component-layout,
.settings-layout,
.checkin-workspace,
.split-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(240px, 1fr);
  align-items: start;
  gap: 22px;
}
.form-grid,
.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.three-col {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.business-form,
.stack-form {
  display: grid;
  gap: 20px;
  min-width: 0;
}
.business-form > .btn {
  justify-self: start;
}
.business-form input:not([type='checkbox']):not([type='radio']),
.business-form select,
.business-form textarea,
.stack-form input:not([type='checkbox']):not([type='radio']),
.stack-form select,
.stack-form textarea,
.form-grid input:not([type='checkbox']):not([type='radio']),
.form-grid select,
.form-grid textarea {
  width: 100%;
}
.full {
  grid-column: 1 / -1;
}
.required {
  display: inline;
  color: var(--bad);
}
.form-grid label:has(> .required) {
  position: relative;
}
.form-grid label > .required {
  position: absolute;
  top: 0;
  right: 0;
}
.check-label,
.switch-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
}
.check-label input,
.switch-label input {
  margin-top: 3px;
}
.form-actions,
.form-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.form-actions > .primary {
  order: 2;
}
.form-footer > span {
  margin-right: auto;
  color: var(--muted);
  font-size: 13px;
}
.help-text,
.subtle-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
}
.help-text + .form-actions {
  margin-top: 0;
}
.form-result,
.alert {
  padding: 14px 16px;
  margin: 0;
  border: 1px solid color-mix(in srgb, var(--good) 22%, var(--line));
  border-radius: 10px;
  color: var(--good);
  background: var(--good-soft);
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.form-result.bad,
.alert.bad {
  color: var(--bad);
  border-color: color-mix(in srgb, var(--bad) 22%, var(--line));
  background: var(--bad-soft);
}
.form-result.warm,
.alert.warm {
  color: var(--warm);
  border-color: color-mix(in srgb, var(--warm) 22%, var(--line));
  background: var(--warm-soft);
}
.form-result a,
.alert a {
  color: inherit;
  text-decoration: underline;
}
.form-result:empty {
  display: none;
}
.alert {
  margin-bottom: 20px;
}
.alert > p:last-child {
  margin: 0;
}
[aria-invalid='true'],
.was-validated :invalid {
  border-color: var(--bad);
}
.conditional-fields {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-raised);
}
.tag-list,
.tag-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.tag-preview:empty {
  display: none;
}
.detail-list {
  display: grid;
  gap: 0;
  margin: 0;
}
.detail-list > div {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) 1.8fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.detail-list > div:last-child {
  border-bottom: 0;
}
.detail-list dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}
.detail-list dd {
  margin: 0;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.detail-list + .actions,
.detail-list + .btn {
  margin-top: 20px;
}
.identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.identity p {
  margin: 4px 0 8px;
  color: var(--muted);
  font-size: 14px;
}
.identity h2,
.identity h3 {
  margin: 0;
}
.identity > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.profile-overview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  background: linear-gradient(120deg, var(--surface), var(--surface-soft));
}
.consultation-note {
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
}
.consultation-note:hover,
.consultation-note:focus-within {
  padding-inline: 12px;
  border-radius: 10px;
  background: var(--surface-raised);
  transform: translateY(-1px);
}
.consultation-note .panel-head {
  margin-bottom: 10px;
}
.consultation-note .text-link {
  display: inline-block;
  margin-top: 12px;
}
.booking-summary,
.membership-summary,
.eligibility-note,
.score-preview,
.forecast-result {
  padding: 20px;
  border: 1px solid color-mix(in srgb, var(--accent) 16%, var(--line));
  border-radius: 12px;
  background: linear-gradient(
    120deg,
    var(--surface-raised),
    color-mix(in srgb, var(--accent-soft) 45%, var(--surface))
  );
}
.booking-summary h3,
.membership-summary h3 {
  margin-bottom: 10px;
}
.session-overview .card-photo,
.stylist-overview .card-photo {
  height: 340px;
}
.session-overview .card-photo[src*='portrait'] {
  object-position: center 35%;
}
.session-overview .card-content,
.stylist-overview .card-content {
  padding: 6px 0;
}
.session-overview .card-content > p,
.stylist-overview .card-content > p {
  margin-top: 10px;
}
.roster-session-card {
  padding: 12px;
}
.roster-session-card .card-content {
  padding: 18px 8px 8px;
}
.roster-session-summary {
  margin-top: 18px;
  font-size: 14px;
}
.client-access-card {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 13px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(120deg, var(--surface-raised), var(--good-soft));
}
.client-access-card > div {
  flex: 1;
  min-width: 150px;
}
.client-access-card h3 {
  margin: 0 0 5px;
}
.client-access-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.checkin-main .card-photo {
  height: 260px;
  margin-bottom: 24px;
}
.checkin-side .card-content {
  padding: 18px 0 0;
}
.checkin-side > .panel:first-child {
  background: linear-gradient(120deg, var(--surface), var(--good-soft));
}
.checkin-side .display-number {
  color: var(--good);
}
.wizard-shell {
  display: grid;
  grid-template-columns: 235px minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}
.wizard-steps {
  display: grid;
  gap: 8px;
  list-style: none;
  padding: 12px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.wizard-steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 10px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 14px;
}
.wizard-steps li > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  font-size: 12px;
}
.wizard-steps li.active {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}
.wizard-steps li.active > span {
  color: var(--accent-ink);
  border-color: var(--accent);
  background: var(--accent);
}
.wizard-steps li.complete > span {
  color: var(--good);
  background: var(--good-soft);
}
.wizard-step > h2 {
  margin-bottom: 12px;
}
.wizard-step > p {
  color: var(--muted);
  font-size: 15px;
}
.wizard-step .form-grid {
  margin-top: 24px;
}
.wizard-step .check-label {
  margin-top: 20px;
}
.wizard-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.wizard-actions > span {
  margin-left: auto;
  margin-right: auto;
  color: var(--muted);
  font-size: 13px;
}
.wizard-shell [role='status']:not([hidden]) {
  margin-top: 20px;
}
.upload-zone {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 36px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: var(--surface-raised);
  text-align: center;
}
.upload-zone > .icon {
  width: 32px;
  height: 32px;
  color: var(--accent);
}
.upload-zone.drag-over,
.upload-zone:focus-within {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.upload-zone p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.upload-zone input {
  max-width: 400px;
}
.upload-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}
.upload-item,
.upload-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.file-button {
  position: relative;
  overflow: hidden;
}
.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* 07 — Native dialogs, detail drawers and command search */
.app-dialog,
.command-dialog {
  width: min(600px, calc(100% - 32px));
  max-width: calc(100% - 32px);
  max-height: calc(100dvh - 40px);
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 19px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-dialog);
  overflow: auto;
}
.app-dialog[open],
.command-dialog[open] {
  animation: merevia-dialog-in 0.24s var(--ease);
}
.app-dialog::backdrop,
.command-dialog::backdrop,
.contextual-copilot::backdrop {
  background: #25172e66;
  backdrop-filter: blur(4px);
  animation: merevia-backdrop-in 0.2s ease-out;
}
.modal-header,
.dialog-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 21px 24px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  background: var(--modal-head);
}
.modal-header h2 {
  font-size: 19px;
}
.modal-header .icon-btn {
  color: var(--muted);
  border-color: var(--line);
  background: var(--surface);
}
.modal-body {
  position: relative;
  padding: 24px;
  color: var(--ink);
  background: var(--surface);
}
.modal-body .stack-form {
  gap: 18px;
}
.modal-body .stack-form > .muted {
  margin: 0;
  font-size: 13px;
}
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  padding: 17px 24px;
  border-top: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  background: var(--modal-foot);
}
.modal-footer > * {
  margin: 0;
}
.modal-footer > span {
  margin-right: auto;
  color: var(--muted);
  font-size: 12px;
}
.modal-body > .stack-form > .modal-footer,
.modal-body > .prose > .modal-footer {
  margin: 6px -24px -24px;
  padding: 17px 24px;
}
.app-dialog.drawer {
  width: min(540px, calc(100% - 24px));
  margin: 12px 12px 12px auto;
  height: calc(100dvh - 24px);
  max-height: calc(100dvh - 24px);
  border-radius: 16px;
}
.app-dialog.drawer[open] {
  animation: merevia-drawer-in 0.26s var(--ease);
}
.command-dialog {
  width: min(650px, calc(100% - 32px));
  margin-top: min(16vh, 140px);
}
.command-input {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-raised);
}
.command-input > .icon {
  color: var(--accent);
}
.command-input input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 8px 2px;
  background: transparent;
  font-size: 17px;
  box-shadow: none;
}
.command-input input:focus {
  outline-offset: 2px;
}
.command-input > .btn {
  min-height: 30px;
  padding: 5px 8px;
  color: var(--muted);
  font-size: 12px;
}
.command-results {
  max-height: min(56vh, 460px);
  padding: 10px;
  overflow-y: auto;
}
.command-result,
.search-result {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  border: 1px solid transparent;
  border-radius: 9px;
}
.command-result:hover,
.command-result:focus-visible,
.command-result.active,
.command-result[aria-selected='true'],
.search-result:hover {
  color: var(--ink);
  border-color: var(--line);
  background: var(--accent-soft);
}
.command-result small,
.search-result small {
  color: var(--muted);
  font-size: 12px;
}
.command-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 13px 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: var(--modal-foot);
  font-size: 12px;
}
.toast-region {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 100;
  display: grid;
  gap: 10px;
  width: max-content;
  max-width: min(440px, calc(100% - 44px));
}
.toast-region .toast {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  margin: 0;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-dialog);
  font-size: 14px;
  opacity: 1;
  animation: merevia-pop-in 0.2s var(--ease);
}
.toast-region .toast.bad {
  border-color: var(--bad);
}
.toast-region .toast .icon-btn {
  margin-left: auto;
  width: 32px;
  min-width: 32px;
  flex-basis: 32px;
  min-height: 32px;
  padding: 6px;
}

/* 08 — Consultation board, calendar, tasks and client conversations */
.board,
.kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(225px, 1fr));
  align-items: start;
  gap: 16px;
  max-width: 100%;
  padding: 3px 2px 18px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.board-column,
.kanban-column {
  min-width: 0;
  padding: 15px 12px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(145deg, var(--surface-soft), var(--surface-raised));
}
.board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.board-head h2 {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
}
.board-head h2 > i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.board-column:nth-child(2) .board-head i {
  background: var(--clay);
}
.board-column:nth-child(3) .board-head i {
  background: var(--warm);
}
.board-column:nth-child(4) .board-head i {
  background: var(--good);
}
.board-head h2 > span {
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--muted);
  background: var(--surface);
  font: 500 12px var(--font);
}
.board-head .icon-btn {
  width: 30px;
  min-width: 30px;
  min-height: 30px;
  flex-basis: 30px;
  padding: 3px;
  font-size: 21px;
}
.board-total {
  margin: 7px 0 16px;
  font-size: 14px;
  font-weight: 600;
}
.board-total > span {
  margin-left: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
.board-drop {
  min-height: 120px;
  padding: 2px;
  border-radius: 10px;
  transition: background 0.18s;
}
.board-drop.drag-over,
.board-column.drag-over .board-drop {
  background: var(--accent-soft);
  outline: 2px dashed var(--accent);
  outline-offset: 3px;
}
.deal-card {
  padding: 17px 15px;
  margin: 0 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  box-shadow: 0 3px 7px #30283a05;
  cursor: grab;
  transition:
    transform 0.18s var(--ease),
    box-shadow 0.18s,
    border-color 0.18s;
}
.deal-card:last-child {
  margin-bottom: 0;
}
.deal-card:hover,
.deal-card:focus-within {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
}
.deal-card:active {
  cursor: grabbing;
}
.deal-card.dragging {
  opacity: 0.5;
  transform: rotate(1deg);
}
.deal-card h3 {
  font-size: 15px;
  line-height: 1.5;
}
.deal-card > strong {
  display: block;
  margin: 12px 0;
  font: 700 20px var(--font-heading);
  letter-spacing: -0.03em;
}
.deal-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  margin-bottom: 14px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.deal-stage-label {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
.deal-card select {
  width: 100%;
  min-height: 36px;
  padding: 7px 28px 7px 10px;
  font-size: 13px;
  background: var(--surface-raised);
}
.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.calendar-weekdays {
  padding: 13px 0;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  color: var(--muted);
  background: var(--surface-raised);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}
.calendar-grid {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-radius: 0 0 10px 10px;
}
.calendar-grid > div,
.calendar-day {
  min-width: 0;
  min-height: 116px;
  padding: 8px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.calendar-grid > .outside {
  color: var(--muted);
  background: var(--surface-raised);
}
.calendar-grid > .today {
  background: color-mix(in srgb, var(--accent-soft) 50%, var(--surface));
}
.day-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  min-height: 30px;
  padding: 4px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--ink);
  background: transparent;
  font-size: 13px;
  font-weight: 500;
}
.outside .day-number {
  color: var(--muted);
}
.today .day-number {
  color: var(--accent-ink);
  background: var(--accent);
}
.day-number:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}
.calendar-event {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 6px 7px;
  border: 1px solid color-mix(in srgb, var(--accent) 12%, var(--line));
  border-left: 2px solid var(--accent);
  border-radius: 5px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 12px;
  line-height: 1.4;
  text-align: left;
  overflow-wrap: anywhere;
}
.calendar-event:hover {
  color: var(--accent-hover);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent-soft) 80%, var(--surface));
}
.calendar-event-dot {
  display: none;
}
.calendar-agenda {
  margin-top: 22px;
}
.agenda-event {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  width: 100%;
  padding: 16px 12px;
  border: 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
  text-align: left;
  font-size: 14px;
}
.agenda-event:hover {
  border-radius: 8px;
  background: var(--surface-soft);
}
.agenda-event > time {
  color: var(--accent);
  font-weight: 600;
}
.agenda-event small {
  display: block;
  margin-top: 4px;
}
.task-list {
  display: grid;
}
.task-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.task-row:first-child {
  border-top: 0;
  padding-top: 0;
}
.task-row h3 {
  margin: 0 0 5px;
  font-size: 15px;
}
.task-row p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.task-row.completed h3 {
  color: var(--muted);
  text-decoration: line-through;
}
.task-row .btn {
  min-height: 35px;
  padding: 6px 11px;
  font-size: 13px;
}
.mail-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  align-items: start;
  gap: 22px;
}
.mail-folders {
  display: grid;
  gap: 6px;
  padding: 16px;
}
.mail-folders h2 {
  margin: 7px 8px 14px;
}
.folder {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
  text-align: left;
}
.folder span {
  font-size: 12px;
}
.folder:hover,
.folder.active {
  color: var(--accent);
  background: var(--accent-soft);
}
.folder.active {
  font-weight: 600;
}
.mail-folders > .btn {
  margin-top: 12px;
}
.mail-row {
  display: grid;
  grid-template-columns: 28px 36px minmax(0, 1fr) 74px;
  align-items: center;
  gap: 12px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.mail-row:first-child {
  border-top: 0;
}
.mail-row h3 {
  margin: 5px 0;
  font-size: 15px;
  font-weight: 600;
}
.mail-row p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.mail-row a strong {
  color: var(--ink);
  font-size: 13px;
}
.mail-row > div:last-child {
  display: grid;
  justify-items: end;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}
.star-button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 25px;
}
.star-button:hover {
  background: var(--warm-soft);
  color: var(--warm);
}
.star-button[aria-pressed='true'] {
  color: var(--warm);
}
.email-body {
  max-width: 1000px;
}
.email-body .identity {
  padding-bottom: 22px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.email-content {
  max-width: 760px;
  margin-bottom: 28px;
  line-height: 1.8;
}
.note-card {
  padding: 21px;
  margin-bottom: 16px;
}
.note-card h3 {
  margin: 10px 0;
}
.note-card p {
  color: var(--muted);
  font-size: 14px;
}
.note-card .actions {
  margin-top: 18px;
}
.notebook-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.notebook-list .note-card {
  margin: 0;
}
.approval-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 20px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.approval-row:first-child {
  border-top: 0;
}
.approval-row h3 {
  margin-bottom: 5px;
}
.approval-row p {
  color: var(--muted);
  margin: 0;
  font-size: 14px;
}

/* 09 — Documents, line-item editors and estimates */
.invoice-sheet {
  max-width: 1080px;
  margin-inline: auto;
  padding: 32px;
}
.invoice-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 26px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line);
}
.invoice-heading h2 {
  margin: 4px 0 10px;
  font-size: 24px;
}
.invoice-heading h3 {
  margin: 4px 0 10px;
  font-size: 19px;
}
.invoice-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.package-brand,
.package-reference {
  min-width: 0;
  overflow-wrap: anywhere;
}
.package-reference {
  text-align: right;
}
.package-selection {
  padding: 20px;
  margin-bottom: 26px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-raised);
}
.invoice-address {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  margin: 24px 0;
}
.invoice-address > div,
.invoice-address > dl {
  min-width: 0;
}
.invoice-address h3 {
  margin: 6px 0 10px;
}
.invoice-address p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 14px;
  overflow-wrap: anywhere;
}
.invoice-address dl {
  display: grid;
  gap: 8px;
  margin: 0;
  font-size: 13px;
}
.invoice-address dl > div {
  display: grid;
  grid-template-columns: 85px 1fr;
  gap: 20px;
}
.invoice-address dt {
  color: var(--muted);
  font-weight: 400;
}
.invoice-address dd {
  margin: 0;
}
.invoice-items {
  min-width: 630px;
  table-layout: fixed;
}
.invoice-items th,
.invoice-items td {
  padding: 14px 10px;
}
.invoice-items input {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 8px;
  font-size: 14px;
}
.invoice-items td:last-child {
  text-align: right;
}
.invoice-items td:last-child .btn {
  white-space: nowrap;
}
.package-description-col {
  width: 34%;
}
.package-quantity-col {
  width: 13%;
}
.package-price-col {
  width: 18%;
}
.package-amount-col {
  width: 18%;
}
.package-action-col {
  width: 17%;
}
.invoice-totals {
  display: flex;
  justify-content: flex-end;
  margin: 24px 0;
}
.invoice-totals dl {
  width: min(100%, 360px);
  margin: 0;
}
.invoice-totals dl > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 0;
  font-size: 14px;
}
.invoice-totals dt {
  color: var(--muted);
  font-weight: 400;
}
.invoice-totals dd {
  margin: 0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.invoice-totals .total {
  margin-top: 8px;
  padding: 16px 0;
  border-top: 1px solid var(--line-strong);
}
.invoice-totals .total dt,
.invoice-total {
  color: var(--ink);
  font-weight: 600;
}
.invoice-totals .total dd {
  color: var(--accent);
  font: 700 25px var(--font-heading);
  letter-spacing: -0.04em;
}
.invoice-terms {
  padding: 20px;
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-raised);
}
.invoice-terms h3 {
  font-size: 14px;
}
.invoice-terms p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.document-grid,
.file-grid,
.export-grid,
.help-grid,
.card-grid,
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.document-card {
  margin: 0;
}
.document-icon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 600;
}
.document-icon .icon {
  width: 23px;
  height: 27px;
}
.document-card h2 {
  font-size: 16px;
}
.document-card p {
  margin: 10px 0 24px;
  color: var(--muted);
  font-size: 14px;
}
.document-card .between {
  align-items: flex-end;
}
.document-card .btn {
  min-height: 36px;
  font-size: 13px;
}
.export-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(140deg, var(--surface), var(--surface-raised));
}
.export-card > span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 18px;
  border-radius: 11px;
  color: var(--accent);
  background: var(--accent-soft);
}
.export-card p {
  color: var(--muted);
  font-size: 14px;
}
.export-card .btn {
  margin-top: auto;
}
.saved-presets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

/* 10 — Reports, goals and legible chart specimens */
.report-workspace {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 22px;
}
.cohort-matrix .table-scroll {
  padding: 2px;
}
.cohort-matrix table {
  min-width: 570px;
}
.cohort-matrix td {
  text-align: center;
}
.cohort-matrix th:first-child,
.cohort-matrix td:first-child {
  text-align: left;
}
.heat-cell {
  padding: 13px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--accent) calc(var(--heat, 0.2) * 45%), var(--surface));
}
.heatmap {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-top: 20px;
}
.heatmap > div {
  display: grid;
  place-items: center;
  min-height: 60px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--accent-soft);
  font-size: 13px;
}
.heatmap:has(.table-scroll) {
  display: block;
}
.heatmap > .table-scroll {
  display: block;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.heatmap table {
  min-width: 620px;
}
.heatmap .heat-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 10px 8px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--surface-raised);
  font-size: 14px;
  font-weight: 600;
}
.heatmap .heat-cell[data-intensity='1'] {
  background: color-mix(in srgb, var(--accent-soft) 50%, var(--surface));
}
.heatmap .heat-cell[data-intensity='2'] {
  background: var(--accent-soft);
}
.heatmap .heat-cell[data-intensity='3'] {
  background: color-mix(in srgb, var(--accent) 22%, var(--surface));
}
.heatmap .heat-cell[data-intensity='4'] {
  background: color-mix(in srgb, var(--accent) 32%, var(--surface));
}
.funnel-list {
  display: grid;
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}
.funnel-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-raised);
  font-size: 14px;
}
.funnel-list strong {
  color: var(--accent);
  font: 700 23px var(--font-heading);
}
.funnel-list progress {
  grid-column: 1 / -1;
}
progress,
.meter {
  display: block;
  width: 100%;
  height: 8px;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  color: var(--accent);
  background: var(--surface-soft);
  accent-color: var(--accent);
}
progress::-webkit-progress-bar {
  border-radius: 10px;
  background: var(--surface-soft);
}
progress::-webkit-progress-value {
  border-radius: 10px;
  background: var(--accent-gradient);
}
progress::-moz-progress-bar {
  border-radius: 10px;
  background: var(--accent);
}
.meter > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent-gradient);
  transition: width 0.2s var(--ease);
}
.capacity-line {
  margin: 16px 0;
}
.goal-list {
  display: grid;
  gap: 16px;
}
.goal-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px 110px 55px auto;
  align-items: center;
  gap: 20px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-raised);
}
.goal-card h3 {
  font-size: 15px;
}
.goal-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.goal-card label {
  font-size: 12px;
}
.goal-card input {
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
}
.goal-card > strong {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.goal-card .btn {
  font-size: 13px;
}
.forecast-result {
  margin-top: 20px;
}
.forecast-result strong {
  color: var(--accent);
  font-size: 20px;
}
.period-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}
.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 18px;
  padding: 0 0 28px;
}
.timeline-item:not(:last-child)::before {
  position: absolute;
  top: 15px;
  bottom: 0;
  left: 6px;
  width: 1px;
  background: var(--line-strong);
  content: '';
}
.timeline-dot {
  position: relative;
  width: 13px;
  height: 13px;
  margin-top: 4px;
  border: 3px solid var(--accent-soft);
  border-radius: 50%;
  background: var(--accent);
}
.timeline-item h3 {
  margin-bottom: 6px;
}
.timeline-item p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
}
.service-glyph {
  display: inline-grid;
  place-items: center;
  width: 45px;
  height: 45px;
  margin-bottom: 18px;
  border-radius: 12px;
  color: var(--accent);
  background: var(--accent-soft);
}
.service-glyph .icon {
  width: 23px;
  height: 23px;
}
.package-line-action {
  white-space: nowrap;
}
.check-cell {
  text-align: center;
}

/* 11 — Settings, access, assistance and the complete page directory */
.security-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.security-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--good);
  background: var(--good-soft);
}
.preference-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.preference-row:first-child {
  border-top: 0;
}
.preference-row h3 {
  margin-bottom: 5px;
  font-size: 15px;
}
.preference-row p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.permission-table {
  min-width: 800px;
  table-layout: fixed;
}
.permission-table th:first-child {
  width: 240px;
  white-space: normal;
}
.permission-table thead th {
  white-space: normal;
}
.permission-table select {
  width: 100%;
  min-width: 0;
  padding: 10px 24px 10px 10px;
  font-size: 14px;
}
.permission-scroll-note {
  margin: 0 18px 12px;
  color: var(--muted);
  font-size: 13px;
}
@media (max-width: 600px) {
  .permission-table {
    min-width: 736px;
  }
  .permission-table th:first-child {
    width: 176px;
  }
}
.permission-description {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  white-space: normal;
  color: var(--muted);
}
.permission-table th:not(:first-child),
.permission-table td:not(:first-child) {
  text-align: center;
}
.plan-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-raised);
}
.plan-card.featured,
.plan-card:has(.badge.good) {
  border-color: var(--accent);
  background: linear-gradient(140deg, var(--surface), var(--accent-soft));
}
.plan-card ul {
  padding-left: 18px;
  color: var(--muted);
  font-size: 14px;
}
.plan-card .btn {
  margin-top: auto;
  width: 100%;
}
.plan-price {
  color: var(--ink);
  font: 700 30px var(--font-heading);
  letter-spacing: -0.04em;
}
.plan-price small {
  font: 400 14px var(--font);
  letter-spacing: 0;
}
.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 0;
  min-height: 590px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.auth-editorial {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 36px;
  color: #fff;
  background:
    linear-gradient(0deg, #302038ed 0%, #302038a8 55%, #30203833),
    url('../images/salon-interior.webp') center/cover;
}
.auth-editorial h2 {
  margin: 14px 0 20px;
  color: #fff;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.25;
  letter-spacing: -0.05em;
}
.auth-editorial p {
  max-width: 300px;
  color: #f3eaf5;
  font-size: 16px;
  line-height: 1.7;
}
.auth-editorial .eyebrow {
  color: #f1dfeb;
}
.auth-editorial .mono {
  color: #eee0f0;
  font-size: 12px;
}
.editorial-rule {
  width: 42px;
  height: 2px;
  margin: 12px 0 22px;
  background: #d5b7df;
}
.auth-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 38px;
}
.auth-card h2 {
  margin: 4px 0 12px;
  font-size: 24px;
}
.auth-card > p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}
.auth-card .stack-form {
  margin: 8px 0 20px;
}
.auth-card label {
  position: relative;
}
.auth-card label > .required {
  position: absolute;
  right: 0;
  top: 0;
}
.auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding-top: 18px;
  margin-bottom: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.auth-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}
.password-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.password-wrap input {
  flex: 1;
  width: 100%;
}
.error-layout {
  display: grid;
  justify-items: center;
  padding: 50px 24px 70px;
  text-align: center;
}
.error-code {
  margin: 10px 0 24px;
  color: var(--accent);
  font: 700 clamp(74px, 12vw, 144px) / 1 var(--font-heading);
  letter-spacing: -0.08em;
}
.error-layout h2 {
  margin-bottom: 14px;
  font-size: 25px;
}
.error-layout p {
  max-width: 520px;
  color: var(--muted);
}
.error-layout .actions {
  justify-content: center;
  margin-top: 14px;
}
.search-panel > label {
  margin-bottom: 12px;
}
.big-search {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface-raised);
}
.big-search > .icon {
  width: 22px;
  height: 22px;
  color: var(--accent);
}
.big-search input {
  flex: 1;
  width: 100%;
  padding-inline: 0;
  border: 0;
  background: transparent;
  font-size: 19px;
  box-shadow: none;
}
.search-filters {
  margin: 20px 0;
}
.search-results {
  display: grid;
  gap: 4px;
}
.search-result {
  padding-block: 16px;
  border-bottom-color: var(--line);
  border-radius: 0;
}
.search-result h3 {
  margin-bottom: 5px;
  font-size: 16px;
}
.search-result p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.resource-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--accent);
  background: var(--surface-raised);
  font-size: 14px;
  font-weight: 600;
}
.resource-link:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.directory-intro {
  padding: 26px;
  background: linear-gradient(110deg, var(--surface), var(--accent-soft));
}
.directory-intro h2 {
  margin-bottom: 10px;
  font-size: 22px;
}
.directory-intro p {
  max-width: 760px;
  color: var(--muted);
}
.directory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.directory-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-raised);
  transition:
    transform 0.2s var(--ease),
    box-shadow 0.2s,
    border-color 0.2s;
}
.directory-card:hover,
.directory-card:focus-visible {
  color: var(--ink);
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
}
.directory-card > strong {
  font-family: var(--font-heading);
  font-size: 14px;
}
.directory-card > span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}
.directory-card small {
  margin-top: auto;
  padding-top: 3px;
  color: var(--accent);
  font-size: 12px;
}
.directory-section {
  scroll-margin-top: 95px;
}
.prose,
.readable {
  max-width: 900px;
  overflow-wrap: anywhere;
}
.prose h2 {
  margin: 26px 0 12px;
}
.prose h3 {
  margin: 24px 0 10px;
}
.prose > h2:first-child,
.prose > h3:first-child {
  margin-top: 0;
}
.prose p,
.prose li {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}
.prose li {
  margin: 7px 0;
}
.prose a:not(.btn):not(.text-link) {
  color: var(--accent);
  text-decoration: underline;
}
.prose .card-photo {
  margin: 20px 0;
}
.prose .actions {
  margin-top: 20px;
}
.section-number {
  display: inline-block;
  margin-right: 10px;
  color: var(--accent);
  font-size: 13px;
}

/* 12 — Real API result surfaces. The supplied client owns network behavior. */
.ai-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(250px, 1fr);
  align-items: start;
  gap: 22px;
}
.prompt-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.prompt-suggestions .btn {
  min-height: 36px;
  padding: 7px 11px;
  font-size: 13px;
}
.ai-output {
  min-height: 108px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--surface-raised);
  font-size: 15px;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.ai-output p:last-child {
  margin: 0;
}
.ai-output[data-ai-state='idle'] {
  color: var(--muted);
}
.ai-output[data-ai-state='loading'] {
  border-color: var(--accent);
  background: linear-gradient(130deg, var(--surface-raised), var(--accent-soft));
}
.ai-output[data-ai-state='error'] {
  border-color: color-mix(in srgb, var(--bad) 40%, var(--line));
  color: var(--bad);
  background: var(--bad-soft);
}
.ai-output[data-ai-state='success'] {
  border-color: color-mix(in srgb, var(--good) 35%, var(--line));
}
.ai-output .btn {
  margin-top: 14px;
  white-space: normal;
}
.ai-output a {
  color: var(--accent);
  text-decoration: underline;
}
.integration-state {
  padding: 16px;
  margin: 0 0 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  font-size: 14px;
}
.integration-state small {
  display: block;
  margin-top: 5px;
  font-size: 13px;
}
.integration-icon {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--accent);
  background: var(--accent-soft);
}
.integration-icon .icon {
  width: 23px;
  height: 23px;
}
body[data-family='integrations'] .card-content {
  padding: 0;
}
body[data-family='integrations'] .card-content > .btn {
  margin: 20px 0 16px;
}
body[data-family='integrations'] .card-content a:not(.btn) {
  color: var(--accent);
}

/* 13 — Secondary component and layout library */
.tabs,
.tab-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}
.tabs > button,
.tabs > a,
.tab,
.tab-list > button {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  transition:
    background 0.18s,
    color 0.18s,
    box-shadow 0.18s;
}
.tabs > button:hover,
.tab:hover,
.tab-list > button:hover {
  color: var(--accent);
  background: var(--accent-soft);
}
.tabs > .active,
.tab.active,
.tab-list > .active,
[role='tab'][aria-selected='true'] {
  color: var(--accent);
  border-color: var(--line);
  background: var(--surface);
  box-shadow: 0 2px 5px #30283a08;
  font-weight: 600;
}
.tab-content {
  padding: 5px 0;
}
.tab-content h3 {
  margin-top: 10px;
}
.tab-content p {
  color: var(--muted);
  font-size: 15px;
}
.segmented {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}
.segmented > button {
  min-height: 36px;
  padding: 7px 14px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  transition:
    background 0.18s,
    color 0.18s;
}
.segmented > button:hover {
  color: var(--accent);
}
.segmented > button.active,
.segmented > button[aria-pressed='true'] {
  color: var(--accent);
  border-color: var(--line);
  background: var(--surface);
  box-shadow: 0 1px 4px #30283a08;
}
.component-directory {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.component-directory .tag {
  padding: 8px 11px;
  font-size: 13px;
}
.component-specimen {
  min-width: 0;
}
.component-specimen > .demo-row {
  margin-bottom: 24px;
}
.component-specimen > p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}
.component-specimen .check-label + .check-label {
  margin-top: 10px;
}
.component-specimen .demo-row + .demo-row {
  margin-top: 18px;
}
.component-layout > .panel {
  height: auto;
}
.component-layout > .panel:nth-child(2) {
  background: linear-gradient(140deg, var(--surface), var(--surface-raised));
}
.demo-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 13px;
}
.demo-breadcrumb a {
  color: var(--accent);
}
.color-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.color-swatch {
  min-width: 0;
  padding: 22px 12px;
  border-radius: 13px;
  text-align: left;
  font-size: 15px;
  transition:
    transform 0.18s var(--ease),
    box-shadow 0.18s;
}
.color-swatch:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}
.color-swatch code {
  display: inline-block;
  margin: 7px 0;
}
.accordion {
  padding: 0;
  margin: 0 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: var(--surface-raised);
}
.accordion > summary {
  padding: 16px 18px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.accordion[open] > summary {
  border-bottom: 1px solid var(--line);
  color: var(--accent);
}
.accordion > p {
  margin: 0;
  padding: 16px 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}
.empty-example {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 32px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 13px;
  background: var(--surface-raised);
  text-align: center;
}
.empty-example > .icon {
  width: 32px;
  height: 32px;
  color: var(--accent);
}
.empty-example h3,
.empty-example p {
  margin: 0;
}
.empty-example p {
  color: var(--muted);
  font-size: 14px;
}
.empty-inline > h3 {
  color: var(--ink);
}
.empty-inline > p {
  margin: 10px 0;
}
.progress-examples {
  display: grid;
  gap: 22px;
}
.progress-examples label {
  display: flex;
  justify-content: space-between;
}
.spinner {
  width: 22px;
  height: 22px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
}
/* This static specimen avoids perpetual decorative motion. */
.skeleton-block {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-raised);
}
.skeleton-block > span {
  display: block;
  height: 12px;
  border-radius: 6px;
  background: var(--line);
}
.skeleton-block > span:nth-child(2) {
  width: 75%;
}
.skeleton-block > span:nth-child(3) {
  width: 50%;
}
.padded {
  padding: 20px;
}
.project-card {
  padding: 12px;
  overflow: hidden;
}
.project-card .card-content {
  padding: 20px 10px 12px;
}
.project-card .card-photo {
  height: 180px;
}
.project-card:hover .card-photo {
  transform: scale(1.02);
}
.three-col > .panel:has(> .card-content):not(:has(> .card-photo)) {
  padding: 20px;
}
.three-col > .panel > .card-content:only-child {
  padding: 0;
}
.three-col .card-content > .icon {
  width: 27px;
  height: 27px;
  margin-bottom: 22px;
  color: var(--accent);
}
.three-col .card-content > .badge {
  margin-bottom: 16px;
}
.session-photo {
  display: block;
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  border-radius: 12px;
}
.session-overview:has(> .session-photo) {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: start;
  gap: 26px;
}
.compact-workspace {
  max-width: 1200px;
  margin-inline: auto;
}
.compact-workspace .panel {
  padding: 18px;
}
.compact-workspace td,
.compact-workspace th {
  padding-block: 10px;
}
.focus-workspace {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}
.focus-workspace > .panel {
  padding: 30px;
}
.focus-workspace .stack-form {
  margin-top: 24px;
}
.horizontal-workspace-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}
.horizontal-workspace-nav .btn {
  border-color: transparent;
  background: var(--surface-raised);
}
.foundation-disclosure {
  background: var(--surface-raised);
}
.foundation-disclosure .panel-head:last-child {
  margin-bottom: 0;
}

/* 14 — Purposeful entrance and state transitions; content is visible without JS. */
@keyframes merevia-reveal {
  from {
    transform: translateY(8px);
    opacity: 0.7;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes merevia-dialog-in {
  from {
    transform: translateY(14px) scale(0.985);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}
@keyframes merevia-drawer-in {
  from {
    transform: translateX(28px);
    opacity: 0.3;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes merevia-pop-in {
  from {
    transform: translateY(5px);
    opacity: 0.3;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes merevia-backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: no-preference) {
  [data-reveal] {
    animation: merevia-reveal 0.45s var(--ease) backwards;
  }
  [data-reveal]:nth-child(2) {
    animation-delay: 0.045s;
  }
  [data-reveal]:nth-child(3) {
    animation-delay: 0.09s;
  }
  [data-reveal]:nth-child(4) {
    animation-delay: 0.135s;
  }
}

/* 15 — Responsive application geometry, including runtime-created controls */
@media (min-width: 1600px) {
  main {
    padding-inline: 38px;
  }
  .studio-desk-grid,
  .studio-note-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 26px;
  }
  .studio-status-card .card-photo {
    height: 195px;
  }
}
@media (max-width: 1279px) {
  main {
    padding: 26px 24px 24px;
  }
  .topbar {
    padding-inline: 24px;
  }
  .studio-desk-grid,
  .studio-note-layout {
    grid-template-columns: minmax(0, 1fr) 254px;
    gap: 18px;
  }
  .panel {
    padding: 20px;
  }
  .studio-status-card,
  .next-guest-card {
    padding: 0;
  }
  .kpi {
    padding: 18px;
  }
  .kpi-grid {
    gap: 12px;
  }
  .kpi-number {
    font-size: 26px;
  }
  .kpi::before {
    right: 16px;
    top: 20px;
  }
  .card-content {
    padding: 18px;
  }
  .directory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .goal-card {
    grid-template-columns: minmax(0, 1fr) 90px auto;
    gap: 16px;
  }
  .goal-card > div {
    grid-column: 1 / -1;
  }
  .goal-card progress {
    grid-column: 1;
  }
  .goal-card > strong {
    grid-column: 2;
  }
  .goal-card > .btn {
    grid-column: 3;
  }
  .goal-card label {
    grid-column: 3;
    grid-row: 1;
    width: 90px;
    justify-self: end;
  }
  .goal-card > div {
    padding-right: 106px;
  }
  .document-grid,
  .export-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .three-col .card-content {
    padding-inline: 0;
  }
  .demo-badge {
    display: none;
  }
  .auth-card {
    padding: 28px;
  }
  .auth-editorial {
    padding: 28px;
  }
  .invoice-sheet {
    padding: 26px;
  }
}
@media (max-width: 1023px) {
  .sidebar > .nav-close {
    display: inline-flex;
    align-self: flex-end;
    flex-shrink: 0;
    margin: -10px 0 16px;
  }
  .sidebar {
    transform: translateX(-100%);
    visibility: hidden;
    width: 268px;
    max-width: calc(100% - 60px);
    box-shadow: var(--shadow-dialog);
  }
  .nav-open .sidebar {
    transform: translateX(0);
    visibility: visible;
  }
  .nav-open {
    overflow: hidden;
  }
  .nav-open .nav-scrim {
    position: fixed;
    inset: 0;
    z-index: 35;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: #25172e66;
    backdrop-filter: blur(3px);
    animation: merevia-backdrop-in 0.22s ease-out;
  }
  .app-shell {
    margin-left: 0;
  }
  .topbar {
    min-height: 68px;
  }
  .topbar .mobile-menu {
    display: inline-flex;
  }
  .topbar-location > a,
  .topbar-location > span[aria-hidden] {
    display: none;
  }
  .nav-label {
    font-size: 12px;
  }
  .brand small {
    font-size: 11px;
  }
  .user-profile small {
    font-size: 12px;
  }
  .topbar .btn.primary {
    min-height: 40px;
  }
  .studio-desk-grid {
    grid-template-columns: minmax(0, 1fr) 260px;
  }
  .form-layout,
  .component-layout,
  .settings-layout,
  .checkin-workspace,
  .split-workspace {
    gap: 18px;
  }
  .chart-canvas.tall {
    height: 300px;
  }
  .three-col,
  .plan-grid,
  .help-grid,
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .three-col > :last-child:nth-child(3) {
    grid-column: 1 / -1;
  }
  .three-col > .project-card:last-child:nth-child(3) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
  }
  .mail-layout {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 18px;
  }
  .auth-layout {
    min-height: 550px;
  }
  .resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 759px) {
  html {
    scroll-padding-top: 88px;
  }
  main {
    padding: 23px 16px 20px;
  }
  .topbar {
    min-height: 66px;
    padding: 11px 16px;
    gap: 12px;
  }
  .topbar-location {
    gap: 10px;
  }
  .topbar-location > span:last-child {
    max-width: 140px;
    font-size: 13px;
  }
  .topbar-actions {
    gap: 8px;
  }
  .topbar-actions .header-search {
    display: none;
  }
  .topbar-actions > .btn.primary {
    padding-inline: 12px;
    font-size: 13px;
  }
  .topbar-actions > .btn.primary .icon {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
  }
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 22px;
  }
  .page-heading p {
    font-size: 15px;
  }
  .heading-actions {
    max-width: 100%;
  }
  h1 {
    font-size: 26px;
  }
  h2 {
    font-size: 18px;
  }
  .eyebrow,
  .nav-label,
  .brand small,
  .user-profile small {
    font-size: 12px;
  }
  .eyebrow {
    letter-spacing: 0.06em;
  }
  .eyebrow > span {
    letter-spacing: 0;
  }
  .panel {
    padding: 18px;
    margin-bottom: 18px;
    border-radius: 15px;
  }
  .panel-head {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
  }
  .panel-head > .actions {
    max-width: 100%;
  }
  .kpi-grid,
  .kpi-grid:has(> :last-child:nth-child(3)) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
  }
  .kpi-grid > :last-child:nth-child(3) {
    grid-column: 1 / -1;
  }
  .kpi {
    gap: 9px;
    padding: 16px;
    border-radius: 14px;
  }
  .kpi-number {
    font-size: 25px;
  }
  .kpi-label {
    font-size: 14px;
  }
  .kpi-foot {
    font-size: 12px;
  }
  .kpi::before {
    top: 20px;
    right: 14px;
    width: 6px;
    height: 6px;
  }
  .period-toolbar {
    padding: 14px;
    gap: 16px;
  }
  .period-toolbar > .actions {
    width: 100%;
    align-items: stretch;
  }
  .period-toolbar label {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
  }
  .period-toolbar select {
    width: auto;
    max-width: 225px;
  }
  .period-toolbar .btn {
    width: 100%;
  }
  .period-toolbar > p {
    margin: 0;
    font-size: 14px;
  }
  .studio-desk-grid,
  .studio-note-layout,
  .form-layout,
  .settings-layout,
  .component-layout,
  .split-grid,
  .checkin-workspace,
  .split-workspace,
  .report-workspace,
  .ai-workspace {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .studio-rail:not(.panel) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 16px;
  }
  .studio-status-card,
  .next-guest-card {
    padding: 0;
  }
  .studio-status-card .card-photo,
  .next-guest-card .card-photo {
    height: 160px;
  }
  .studio-rail.panel > .card-photo {
    height: 220px;
  }
  .studio-rail .card-content {
    padding: 16px;
  }
  .studio-status-card .panel-head {
    align-items: center;
  }
  .card-content {
    padding: 18px 0 0;
  }
  .studio-status-card .card-content,
  .next-guest-card .card-content {
    padding: 18px;
  }
  .agenda-panel .table-scroll > table {
    min-width: 520px;
  }
  body[data-page='index'] .agenda-panel .table-scroll > table {
    min-width: 0;
  }
  body[data-page='index'] .agenda-panel table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
  body[data-page='index'] .agenda-panel tbody {
    display: block;
  }
  body[data-page='index'] .agenda-panel tbody tr {
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 4px 12px;
    padding: 17px 0;
    border-top: 1px solid var(--line);
  }
  body[data-page='index'] .agenda-panel td {
    display: block;
    width: auto;
    padding: 0;
    border: 0;
    font-size: 14px;
  }
  body[data-page='index'] .agenda-panel td:first-child {
    grid-column: 1;
    grid-row: 1 / 4;
    padding-top: 1px;
    font-size: 15px;
  }
  body[data-page='index'] .agenda-panel td:nth-child(2) {
    grid-column: 2;
    font-weight: 600;
  }
  body[data-page='index'] .agenda-panel td:nth-child(3) {
    grid-column: 2;
    color: var(--muted);
  }
  body[data-page='index'] .agenda-panel td:nth-child(4) {
    grid-column: 2;
    color: var(--accent);
    font-size: 12px;
  }
  .chart-canvas {
    height: 240px;
  }
  .chart-canvas.tall {
    height: 280px;
  }
  .workflow-links {
    gap: 8px;
  }
  .workflow-links .btn {
    flex: 1 1 auto;
    padding-inline: 12px;
  }
  .workflow-links > .subtle {
    flex-basis: 100%;
    margin-left: 0;
    padding-top: 4px;
  }
  .table-toolbar {
    align-items: flex-end;
    gap: 12px;
  }
  .table-toolbar > .search-field {
    flex-basis: 100%;
  }
  .table-toolbar > label:not(.search-field) {
    flex: 1 1 140px;
  }
  .table-toolbar > .btn {
    flex: 1 1 auto;
  }
  .table-toolbar .column-picker {
    flex: 1 1 auto;
  }
  .column-picker .btn {
    width: 100%;
  }
  .table-footer,
  .table-bottom {
    gap: 16px;
    align-items: center;
  }
  .pagination {
    flex-basis: 100%;
    justify-content: space-between;
  }
  .pagination .btn {
    min-height: 40px;
  }
  .data-table {
    font-size: 14px;
  }
  .data-panel .panel-head {
    align-items: center;
  }
  .form-grid,
  .two-col,
  .security-grid,
  .notebook-list,
  .saved-presets {
    grid-template-columns: minmax(0, 1fr);
  }
  .full {
    grid-column: auto;
  }
  .business-form,
  .stack-form {
    gap: 20px;
  }
  input,
  select,
  textarea {
    font-size: 16px;
  }
  .business-form input,
  .business-form select,
  .business-form textarea {
    font-size: 16px;
  }
  .form-actions {
    gap: 10px;
    padding-top: 18px;
  }
  .form-actions .btn {
    flex: 1 1 auto;
  }
  .form-layout > aside.panel,
  .form-layout > section.panel:last-child:not(:first-child) {
    margin-top: 0;
  }
  .booking-summary,
  .membership-summary {
    padding: 16px;
  }
  .detail-list > div {
    grid-template-columns: minmax(100px, 0.8fr) minmax(0, 1.4fr);
    gap: 14px;
  }
  .profile-overview {
    align-items: flex-start;
  }
  .profile-overview > .actions {
    width: 100%;
  }
  .session-overview .card-photo,
  .stylist-overview .card-photo {
    height: 265px;
  }
  .session-overview .card-content,
  .stylist-overview .card-content {
    padding-top: 22px;
  }
  .session-overview:has(> .session-photo) {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .session-photo {
    max-height: 260px;
  }
  .wizard-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .wizard-steps {
    display: flex;
    align-items: stretch;
    gap: 6px;
    padding: 8px;
  }
  .wizard-steps li {
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
    min-width: 0;
    padding: 9px;
    font-size: 12px;
  }
  .wizard-steps li > span {
    width: 27px;
    height: 27px;
    flex-basis: 27px;
  }
  .wizard-actions {
    gap: 9px;
  }
  .wizard-actions .btn {
    padding-inline: 11px;
  }
  .board,
  .kanban {
    grid-template-columns: repeat(4, 272px);
    scroll-snap-type: x proximity;
    padding-bottom: 16px;
  }
  .board-column {
    scroll-snap-align: start;
  }
  .context-bar > div:first-child {
    max-width: 100%;
    font-size: 14px;
  }
  .calendar-grid > div {
    position: relative;
    min-height: 54px;
    padding: 5px 0;
    text-align: center;
  }
  .calendar-weekdays {
    padding-block: 10px;
    font-size: 12px;
  }
  .calendar-event {
    display: none;
  }
  .day-number {
    min-width: 32px;
    min-height: 32px;
    padding: 5px 3px;
    font-size: 13px;
  }
  .calendar-event-dot {
    position: absolute;
    bottom: 6px;
    left: calc(50% - 2px);
    display: block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
  }
  .calendar-agenda {
    margin-top: 18px;
  }
  .agenda-event {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    padding: 17px 5px;
    font-size: 14px;
  }
  .agenda-event > time {
    font-size: 13px;
  }
  .agenda-event > span {
    color: var(--muted);
    font-size: 13px;
  }
  .task-row {
    grid-template-columns: 20px minmax(0, 1fr) auto;
    gap: 12px;
  }
  .task-row > .actions {
    grid-column: 2 / -1;
  }
  .task-row h3 {
    font-size: 15px;
  }
  .mail-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .mail-folders {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    padding: 14px;
  }
  .mail-folders h2 {
    width: 100%;
    margin: 3px 5px 6px;
  }
  .folder {
    flex: 1 1 130px;
    padding: 10px;
    background: var(--surface-raised);
  }
  .mail-folders > .btn {
    flex: 1 1 130px;
    margin: 0;
  }
  .mail-row {
    grid-template-columns: 25px 32px minmax(0, 1fr);
    gap: 9px;
  }
  .mail-row > .avatar {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }
  .mail-row > div:last-child {
    grid-column: 3;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .mail-layout .panel-head > .input-icon {
    width: 100%;
  }
  .approval-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
  }
  .approval-row > .actions {
    grid-column: 1 / -1;
  }
  .invoice-sheet {
    padding: 20px 16px;
  }
  .invoice-heading {
    gap: 18px;
    padding-bottom: 22px;
  }
  .invoice-heading h2 {
    font-size: 21px;
  }
  .invoice-heading h3 {
    font-size: 17px;
  }
  .package-reference {
    min-width: 110px;
  }
  .invoice-address {
    flex-direction: column;
    gap: 24px;
  }
  .invoice-address dl {
    width: 100%;
  }
  .invoice-address dl > div {
    grid-template-columns: minmax(90px, 0.6fr) minmax(0, 1fr);
  }
  .package-selection {
    padding: 16px;
  }
  .invoice-totals dl {
    width: 100%;
  }
  .invoice-terms {
    padding: 16px;
  }
  .document-grid,
  .file-grid,
  .export-grid,
  .plan-grid,
  .directory-grid,
  .help-grid,
  .card-grid,
  .three-col,
  .resource-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .three-col > :last-child:nth-child(3) {
    grid-column: auto;
  }
  .three-col > .project-card:last-child:nth-child(3) {
    display: block;
  }
  .document-card,
  .project-card {
    margin-bottom: 0;
  }
  .project-card {
    padding: 12px;
  }
  .project-card .card-content {
    padding: 18px 6px 8px;
  }
  .three-col {
    margin-bottom: 20px;
  }
  .goal-card {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 16px;
    gap: 14px;
  }
  .goal-card > div {
    grid-column: 1 / -1;
    padding-right: 0;
  }
  .goal-card > label {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
    width: 100%;
  }
  .goal-card input {
    max-width: 150px;
  }
  .goal-card > .btn {
    grid-column: 2;
  }
  .goal-card progress {
    grid-column: 1;
    grid-row: 3;
  }
  .goal-card > strong {
    grid-column: 2;
    grid-row: 3;
    justify-self: end;
  }
  .auth-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .auth-editorial {
    min-height: 290px;
    padding: 28px;
  }
  .auth-editorial h2 {
    margin-top: 7px;
    font-size: 30px;
  }
  .auth-editorial h2 br {
    display: none;
  }
  .auth-editorial p {
    max-width: 100%;
    font-size: 15px;
  }
  .auth-editorial .editorial-rule {
    margin-block: 0 14px;
  }
  .auth-card {
    padding: 28px 22px;
  }
  .error-layout {
    padding: 30px 5px 50px;
  }
  .error-layout h2 {
    font-size: 22px;
  }
  .big-search {
    padding-inline: 12px;
    gap: 10px;
  }
  .big-search input {
    font-size: 16px;
  }
  .directory-intro {
    padding: 22px;
  }
  .directory-intro h2 {
    font-size: 21px;
  }
  .color-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .color-swatch {
    padding: 16px 10px;
    font-size: 14px;
  }
  .component-specimen > .demo-row {
    gap: 9px;
  }
  .component-directory .tag {
    font-size: 13px;
  }
  .preference-row {
    gap: 16px;
  }
  .preference-row input {
    flex-shrink: 0;
  }
  .tabs,
  .tab-list {
    gap: 2px;
  }
  .tabs > button,
  .tabs > a,
  .tab,
  .tab-list > button {
    padding-inline: 11px;
    font-size: 14px;
  }
  .segmented > button {
    padding-inline: 11px;
    font-size: 14px;
  }
  .focus-workspace > .panel {
    padding: 20px;
  }
  .app-dialog,
  .command-dialog {
    max-height: calc(100dvh - 24px);
    width: calc(100% - 24px);
    max-width: calc(100% - 24px);
    border-radius: 15px;
  }
  .modal-header,
  .dialog-head {
    padding: 18px;
    gap: 14px;
  }
  .modal-body {
    padding: 20px;
  }
  .modal-footer {
    padding: 16px 20px;
  }
  .modal-body > .stack-form > .modal-footer,
  .modal-body > .prose > .modal-footer {
    margin: 4px -20px -20px;
    padding: 16px 20px;
  }
  .modal-footer > span {
    width: 100%;
    font-size: 12px;
  }
  .modal-footer > .btn {
    flex: 1;
  }
  .app-dialog.drawer {
    width: calc(100% - 24px);
  }
  .command-input {
    padding: 14px;
    gap: 10px;
  }
  .command-input input {
    font-size: 16px;
  }
  .command-footer {
    padding-inline: 16px;
  }
  .toast-region {
    right: 16px;
    bottom: max(16px, env(safe-area-inset-bottom));
    max-width: calc(100% - 32px);
  }
  .toast-region .toast {
    padding: 13px;
    font-size: 14px;
  }
  .footer {
    gap: 10px;
    line-height: 1.8;
  }
  .footer > span {
    width: 100%;
  }
}
@media (max-width: 479px) {
  .topbar-location > span:last-child {
    display: none;
  }
  .topbar-actions > .btn.primary {
    padding-inline: 12px;
  }
  .studio-rail:not(.panel) {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .studio-status-card .card-photo {
    height: 180px;
  }
  .next-guest-card {
    display: grid;
    grid-template-columns: 105px minmax(0, 1fr);
  }
  .next-guest-card .card-photo {
    height: 100%;
    min-height: 210px;
    object-position: 50% center;
  }
  .next-guest-card .card-content {
    padding: 16px;
  }
  .next-guest-card h3 {
    font-size: 15px;
  }
  .next-guest-card p {
    font-size: 13px;
  }
  .kpi {
    padding: 15px;
  }
  .kpi-number {
    font-size: 24px;
  }
  .kpi-label {
    font-size: 13px;
  }
  body[data-family='table'] .kpi-number {
    font-size: 21px;
  }
  .kpi-grid > :last-child:nth-child(3) .kpi-number {
    font-size: 24px;
  }
  .period-toolbar select {
    max-width: 200px;
  }
  .period-toolbar label {
    font-size: 13px;
  }
  .detail-list > div {
    grid-template-columns: minmax(85px, 0.75fr) minmax(0, 1.4fr);
    gap: 12px;
  }
  .detail-list dt,
  .detail-list dd {
    font-size: 14px;
  }
  .panel-head > .actions {
    width: 100%;
  }
  .data-panel .panel-head > .actions .btn {
    flex: 1;
  }
  .invoice-heading {
    flex-direction: column;
    gap: 20px;
  }
  .package-reference {
    text-align: left;
  }
  .invoice-heading .package-reference {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    padding-top: 18px;
    border-top: 1px solid var(--line);
  }
  .package-reference > .eyebrow {
    width: 100%;
    margin-bottom: 0;
  }
  .invoice-heading .package-reference h3 {
    margin: 0;
  }
  .calendar-agenda .panel-head > h2 {
    font-size: 17px;
  }
  .task-row {
    grid-template-columns: 20px minmax(0, 1fr);
  }
  .task-row > .badge {
    grid-column: 2;
    justify-self: start;
  }
  .task-row > .actions {
    grid-column: 2;
  }
  .approval-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .approval-row > .badge {
    justify-self: start;
  }
  .upload-zone {
    padding: 28px 14px;
  }
  .upload-zone input {
    font-size: 13px;
  }
  .modal-header h2 {
    font-size: 18px;
  }
  .command-input {
    gap: 8px;
  }
  .command-input > .icon {
    display: none;
  }
}
@media (max-height: 620px) {
  .sidebar {
    padding-top: 18px;
  }
  .brand {
    margin-bottom: 18px;
  }
  .app-dialog {
    max-height: calc(100dvh - 20px);
  }
  .modal-header {
    padding-block: 12px;
  }
  .command-dialog {
    margin-top: 14px;
  }
  .command-results {
    max-height: 52vh;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-delay: 0s !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0s !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
@media (forced-colors: active) {
  .btn,
  .badge,
  .panel,
  .kpi,
  .nav-item.active,
  .day-number {
    border: 1px solid ButtonText;
  }
  .btn.primary,
  .nav-item.active {
    forced-color-adjust: auto;
  }
  .calendar-event-dot,
  .live-dot {
    background: CanvasText;
  }
}
/* Focused salon overview: preparation on the left, a working daybook on the right. */
.salon-daybook {
  display: grid;
  grid-template-columns: minmax(260px, 0.86fr) minmax(0, 2.4fr);
  align-items: start;
  gap: 24px;
  margin-bottom: 24px;
}
.daybook-workspace {
  grid-column: 2;
  grid-row: 1;
  padding: 0;
  overflow: hidden;
}
.daybook-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 24px 22px 18px;
  background: linear-gradient(120deg, var(--surface), var(--accent-soft));
  border-bottom: 1px solid var(--line);
}
.daybook-heading h2 {
  margin: 4px 0 0;
  font-size: 22px;
}
.daybook-heading label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}
.daybook-heading select {
  min-height: 40px;
  width: 176px;
  color: var(--ink);
  font-size: 14px;
}
.daybook-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 22px;
}
.daybook-tabs {
  display: inline-flex;
  padding: 4px;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}
.daybook-tabs button {
  padding: 7px 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  transition:
    background 0.18s,
    color 0.18s,
    box-shadow 0.18s;
}
.daybook-tabs [aria-selected='true'] {
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--shadow);
}
.daybook-tabs button:hover {
  color: var(--accent);
  background: var(--surface-raised);
}
.daybook-lanes {
  display: grid;
  grid-template-columns: repeat(var(--stylist-count, 3), minmax(0, 1fr));
  gap: 14px 12px;
  padding: 0 22px 20px;
}
.daybook-staff {
  grid-column: var(--lane);
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 0 12px;
  border-bottom: 2px solid var(--line);
}
.daybook-staff .avatar {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  font-size: 12px;
}
.daybook-staff h3 {
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}
.daybook-staff div > span {
  color: var(--muted);
  font-size: 12px;
}
.daybook-visit {
  grid-column: var(--lane);
  grid-row: var(--slot-order);
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  min-height: 166px;
  padding: 15px 13px;
  text-align: left;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: linear-gradient(145deg, var(--surface-raised), var(--surface));
  box-shadow: 0 3px 8px #30283a04;
  transition:
    transform 0.18s var(--ease),
    box-shadow 0.18s var(--ease),
    border-color 0.18s,
    background 0.18s;
}
.daybook-visit.is-opening {
  border-style: dashed;
  background: var(--surface);
}
.daybook-visit[aria-pressed='true'] {
  border: 1px solid var(--accent);
  background: linear-gradient(130deg, var(--accent-soft), var(--surface-raised));
  box-shadow:
    inset 3px 0 var(--accent),
    var(--shadow);
}
.daybook-visit:hover,
.daybook-visit:focus-visible {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow-lift);
}
.daybook-visit:active {
  transform: translateY(0);
}
.daybook-visit-time {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
  color: var(--accent);
  font: 700 17px/1.3 var(--font-heading);
  font-variant-numeric: tabular-nums;
}
.daybook-visit-time > span {
  font: 400 12px var(--font);
  color: var(--muted);
}
.daybook-guest {
  font: 700 14px/1.45 var(--font-heading);
  margin-top: 3px;
}
.daybook-service {
  font-size: 14px;
}
.daybook-visit-station,
.daybook-visit-date {
  font-size: 12px;
  color: var(--muted);
}
.daybook-visit-status {
  margin-top: auto;
  padding-top: 7px;
  color: var(--good);
  font-size: 12px;
  font-weight: 600;
}
.is-opening .daybook-visit-status {
  color: var(--accent);
}
.daybook-key {
  margin: 0;
  padding: 0 22px 20px;
  color: var(--muted);
  font-size: 12px;
}
.daybook-empty-lane {
  grid-column: var(--lane);
  grid-row: 2;
  margin: 0;
  padding: 14px;
  background: var(--surface-soft);
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
}
.daybook-empty {
  grid-column: 1 / -1;
  padding: 18px;
  margin: 0;
  font-size: 14px;
}
.daybook-workspace .agenda-panel {
  padding: 0 22px 12px;
}
.daybook-workspace .simple-table {
  font-size: 14px;
}
.daybook-totals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 18px 22px;
  background: var(--surface-raised);
  border-block: 1px solid var(--line);
  gap: 12px;
}
.daybook-totals .kpi {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 0 10px 0 0;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.daybook-totals .kpi::before {
  content: none;
}
.daybook-totals .kpi:last-child {
  border: 0;
}
.daybook-totals .kpi-label {
  padding: 0;
  font-size: 12px;
}
.daybook-totals .kpi-number {
  font-size: 22px;
}
.daybook-totals .kpi-foot {
  font-size: 12px;
  color: var(--muted);
}
.daybook-footnote {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 22px 8px;
  font-size: 12px;
  color: var(--muted);
}
.daybook-basis {
  margin: 0;
  padding: 0 22px 16px;
  font-size: 12px;
  color: var(--muted);
}
.visit-preparation {
  grid-column: 1;
  grid-row: 1;
  padding: 0;
  overflow: hidden;
  background: linear-gradient(150deg, var(--surface), var(--surface-raised));
}
.visit-preparation .visit-photo-wrap {
  position: relative;
  height: 175px;
  overflow: hidden;
}
.visit-photo-caption {
  position: absolute;
  bottom: 9px;
  left: 10px;
  padding: 3px 7px;
  border-radius: 5px;
  background: #30283ae8;
  color: #fff;
  font-size: 12px;
}
.visit-preparation .card-photo {
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: cover;
  object-position: center 36%;
}
.visit-preparation-heading {
  padding: 18px 20px 15px;
  background: linear-gradient(110deg, var(--accent-soft), var(--surface-raised));
  border-bottom: 1px solid var(--line);
}
.visit-preparation-heading h2 {
  margin: 5px 0 0;
  font-size: 18px;
}
.visit-preparation-body {
  padding: 20px;
}
.visit-preparation-body > h3 {
  font-size: 19px;
  line-height: 1.4;
  margin: 12px 0 16px;
}
.visit-preparation-body > p {
  font-size: 14px;
}
.visit-facts {
  margin: 0 0 16px;
}
.visit-facts > div {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 10px;
  padding: 5px 0;
  font-size: 14px;
}
.visit-facts dt {
  font-weight: 400;
  color: var(--muted);
}
.visit-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.visit-goals {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}
.visit-goals p {
  margin: 6px 0 0;
  font-size: 14px;
}
.visit-goals .eyebrow {
  font-size: 12px;
  letter-spacing: 0.04em;
}
.visit-arrival-state {
  padding: 12px 0;
  margin: 0;
  color: var(--muted);
}
.visit-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 9px;
}
.visit-actions .btn {
  white-space: normal;
  min-height: 42px;
}
.visit-actions > .text-link {
  text-align: center;
  padding-top: 4px;
}
.daybook-back {
  display: none;
}
.daybook-support {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 24px;
}
.daybook-studio-card {
  display: grid;
  grid-template-columns: 40% minmax(0, 1fr);
  gap: 20px;
  padding: 0;
  overflow: hidden;
}
.daybook-studio-card > img {
  width: 100%;
  height: 100%;
  min-height: 240px;
  object-fit: cover;
}
.daybook-studio-card > div {
  align-self: center;
  padding: 22px 22px 22px 0;
}
.daybook-studio-card h2 {
  margin: 8px 0;
  font-size: 20px;
}
.daybook-studio-card p {
  font-size: 14px;
  color: var(--muted);
}
.daybook-service-mix .chart-canvas {
  height: 180px;
}
@media (max-width: 1250px) {
  .salon-daybook {
    grid-template-columns: minmax(240px, 0.9fr) minmax(0, 2fr);
    gap: 18px;
  }
  .daybook-staff .avatar {
    display: none;
  }
  .daybook-heading,
  .daybook-controls {
    padding-inline: 18px;
  }
  .daybook-lanes {
    padding-inline: 18px;
    gap: 12px 8px;
  }
  .daybook-visit {
    padding: 13px 10px;
  }
}
@media (max-width: 1100px) {
  .salon-daybook {
    grid-template-columns: minmax(0, 1fr);
  }
  .daybook-workspace,
  .visit-preparation {
    grid-column: auto;
    grid-row: auto;
  }
  .daybook-staff .avatar {
    display: grid;
  }
  .visit-preparation {
    display: grid;
    grid-template-columns: 0.75fr 1fr;
  }
  .visit-preparation .visit-photo-wrap {
    grid-column: 1;
    grid-row: 1 / 4;
    height: 100%;
  }
  .visit-preparation-heading,
  .visit-preparation-body {
    grid-column: 2;
  }
  .daybook-back {
    grid-column: 2;
    display: block;
    padding: 0 20px 20px;
  }
  .daybook-support {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .daybook-heading {
    align-items: start;
    padding: 18px 16px 14px;
    flex-direction: column;
    gap: 12px;
  }
  .daybook-heading h2 {
    font-size: 21px;
  }
  .daybook-heading label {
    width: 100%;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 12px;
    font-size: 14px;
  }
  .daybook-heading select {
    width: 100%;
  }
  .daybook-controls {
    flex-wrap: wrap;
    padding: 14px 16px;
    gap: 10px;
  }
  .daybook-controls > .text-link {
    font-size: 14px;
    min-height: 36px;
  }
  .daybook-lanes {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 16px 16px;
  }
  .daybook-staff,
  .daybook-empty-lane {
    display: none;
  }
  .daybook-visit {
    min-height: 0;
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    padding: 14px;
    gap: 4px 10px;
    width: 100%;
  }
  .daybook-visit-time {
    grid-column: 1;
    grid-row: 1 / 4;
    flex-direction: column;
    align-items: start;
    padding-top: 2px;
    font-size: 18px;
  }
  .daybook-guest,
  .daybook-service,
  .daybook-visit-station,
  .daybook-visit-status,
  .daybook-visit-date {
    grid-column: 2;
    margin: 0;
  }
  .daybook-visit-date {
    grid-row: 1;
  }
  .daybook-visit-status {
    padding-top: 3px;
  }
  .daybook-key {
    padding-inline: 16px;
  }
  .daybook-totals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding: 16px;
  }
  .daybook-totals .kpi:nth-child(even) {
    border-right: 0;
  }
  .daybook-totals .kpi-number {
    font-size: 23px;
  }
  .daybook-footnote {
    padding-inline: 16px;
  }
  .daybook-basis {
    padding-inline: 16px;
  }
  .daybook-workspace .agenda-panel {
    padding-inline: 16px;
  }
  body[data-page='index'] .daybook-workspace .agenda-panel tbody tr {
    grid-template-columns: 92px minmax(0, 1fr);
  }
  .visit-preparation {
    display: block;
  }
  .visit-preparation .visit-photo-wrap {
    height: 210px;
  }
  .daybook-studio-card {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .daybook-studio-card > img {
    height: 180px;
    min-height: 0;
  }
  .daybook-studio-card > div {
    padding: 20px;
  }
}
@media print {
  .sidebar,
  .topbar,
  .no-print,
  .toast-region,
  .demo-note,
  .footer,
  .heading-actions,
  dialog {
    display: none !important;
  }
  .app-shell {
    margin: 0;
  }
  main {
    max-width: none;
    padding: 0;
  }
  body {
    background: #fff;
    color: #222;
  }
  .panel {
    border-color: #ddd;
    box-shadow: none;
    break-inside: avoid;
  }
  .invoice-sheet {
    max-width: none;
    padding: 20px;
  }
  .table-scroll {
    overflow: visible;
  }
  .invoice-items {
    min-width: 0;
  }
}
