:root {
  --ink: #1f1f1d;
  --muted: #74716c;
  --line: #e5e1da;
  --paper: #f8f6f1;
  --surface: #fffdf9;
  --sage: #7f8879;
  --sage-deep: #4f594b;
  --clay: #9b624e;
  --sun: #b99a58;
  --blue: #536d78;
  --danger: #8c3f28;
  --soft: rgba(248, 246, 241, 0.55);
  --pill-bg: transparent;
  --pill-border: var(--line);
  --pill-text: var(--muted);
  --shadow: 0 16px 44px rgba(31, 31, 29, 0.07);
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

:root[data-theme="dark"] {
  --ink: #f2eee6;
  --muted: #aaa298;
  --line: #3a3833;
  --paper: #151513;
  --surface: #1f1e1b;
  --sage: #a2ad98;
  --sage-deep: #829075;
  --clay: #c88771;
  --sun: #d1b06a;
  --blue: #8db1c0;
  --danger: #d99a85;
  --soft: rgba(255, 253, 249, 0.05);
  --pill-bg: #2b2925;
  --pill-border: #4b4740;
  --pill-text: #e0d8cc;
  --shadow: 0 16px 44px rgba(0, 0, 0, 0.24);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: block;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

:root[data-theme="dark"] .brand-mark {
  filter: invert(1);
  mix-blend-mode: screen;
}

.brand h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.06rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.mode-tabs {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.session-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.session-bar > span {
  color: var(--muted);
  font-size: 0.82rem;
}

.demo-auth-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(140, 63, 40, 0.3);
  border-radius: 999px;
  background: rgba(140, 63, 40, 0.08);
  color: var(--danger);
  padding: 0 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mode-tabs button,
.view-tabs button {
  position: relative;
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 0 14px;
  white-space: nowrap;
}

.view-tabs button svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.view-tabs button.tab-icon {
  min-width: 46px;
  padding: 0 13px;
}

.client-tabs button.tab-icon {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  min-width: 54px;
  min-height: 54px;
  border-radius: 999px;
  padding: 0;
}

.client-tabs button.tab-icon svg {
  width: 23px;
  height: 23px;
}

.project-tabs button.tab-icon {
  display: inline-grid;
  place-items: center;
  width: 50px;
  height: 50px;
  min-width: 50px;
  min-height: 50px;
  border-radius: 999px;
  padding: 0;
}

.project-tabs button.tab-icon svg {
  width: 22px;
  height: 22px;
}

.mode-tabs button.active,
.view-tabs button.active {
  background: var(--ink);
  color: white;
}

:root[data-theme="dark"] .mode-tabs button.active,
:root[data-theme="dark"] .view-tabs button.active {
  background: #34322e;
  color: #f4f0e8;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  width: min(1360px, 100%);
  margin: 0 auto;
  padding: 28px clamp(16px, 4vw, 44px) 56px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 28px;
  align-items: end;
  min-height: 230px;
  padding: clamp(10px, 2vw, 18px) 0 12px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.hero h2 {
  max-width: 840px;
  margin: 0;
  font-family: Georgia, serif;
  font-size: clamp(2.3rem, 5vw, 5rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
}

.hero p {
  max-width: 560px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.stat {
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.stat strong {
  display: block;
  font-size: 1.7rem;
}

.stat span {
  color: var(--muted);
  font-size: 0.83rem;
}

.dashboard-grid {
  align-items: start;
}

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.appointment-list {
  display: grid;
  gap: 12px;
}

.appointment-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
}

.appointment-date {
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 88px;
  border-right: 1px solid var(--line);
}

.appointment-date strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.18rem;
  font-weight: 500;
}

.appointment-date span {
  color: var(--muted);
  font-size: 0.86rem;
}

.view-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  width: max-content;
  max-width: 100%;
}

.project-tabs {
  margin-bottom: 28px;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.two {
  grid-template-columns: minmax(300px, 0.92fr) minmax(0, 1.08fr);
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-workspace {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.project-workspace.collapsed {
  grid-template-columns: 80px minmax(0, 1fr);
}

.project-sidebar {
  overflow: hidden;
}

.project-sidebar-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.project-main {
  min-width: 0;
}

.mobile-project-switcher {
  display: none;
  align-items: center;
  gap: 8px;
}

.mobile-project-switcher svg {
  width: 18px;
  height: 18px;
}

.project-switcher-panel {
  display: grid;
  gap: 16px;
  width: min(520px, 100%);
}

.project-switcher-list {
  display: grid;
  gap: 10px;
}

.project-switcher-item {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  padding: 12px;
  text-align: left;
}

.project-switcher-item.active {
  border-color: var(--sage-deep);
  background: rgba(78, 100, 77, 0.08);
}

.project-switcher-initial {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-weight: 700;
}

.project-switcher-item strong,
.project-switcher-item small {
  display: block;
}

.project-switcher-item small {
  margin-top: 3px;
  color: var(--muted);
}

.profile-form {
  display: grid;
  gap: 18px;
}

.profile-display {
  display: grid;
  gap: 22px;
}

.profile-hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.profile-hero span,
.profile-grid span,
.profile-code span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.profile-hero h4 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 500;
  line-height: 1;
}

.profile-hero p,
.profile-grid p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.profile-code {
  min-width: 150px;
  text-align: right;
}

.profile-code strong {
  font-size: 1.05rem;
  letter-spacing: 0.08em;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.profile-grid section {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.profile-grid section.full {
  grid-column: 1 / -1;
}

.profile-grid strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 500;
}

.profile-room-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-workspace.collapsed .project-sidebar {
  padding: 14px 10px;
}

.project-workspace.collapsed .project-sidebar .panel-header {
  justify-content: center;
}

.project-workspace.collapsed .project-sidebar .panel-header > div:first-child {
  display: none;
}

.project-workspace.collapsed .project-sidebar-actions {
  display: grid;
  justify-items: center;
}

.project-workspace.collapsed .project-item {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  min-height: 48px;
  margin: 0 auto;
  border-radius: 50%;
  padding: 0;
}

.project-workspace.collapsed .project-item .row {
  justify-content: center;
}

.project-workspace.collapsed .project-sidebar .icon-button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.project-workspace.collapsed .project-item .notification-badge {
  top: -5px;
  right: -5px;
}

.schedule-workspace {
  align-items: start;
}

.schedule-options {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.schedule-option {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  padding: 0;
}

.schedule-option.active {
  background: var(--ink);
  border-color: var(--sage);
  color: var(--surface);
}

.schedule-option svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.schedule-choice-copy {
  margin-top: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.schedule-choice-copy strong {
  display: block;
  margin-bottom: 6px;
}

.schedule-choice-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

:root[data-theme="dark"] .schedule-option.active {
  background: #f2eee6;
  color: #1f1f1d;
  border-color: #f2eee6;
}

.client-appointments {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.client-appointments h4 {
  margin: 0;
  font-size: 0.95rem;
}

.client-appointment {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.client-appointment p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.compact-date {
  min-height: auto;
}

.compact-empty {
  padding: 18px;
}

.schedule-panel {
  min-height: 720px;
}

.calendly-frame {
  width: 100%;
  min-height: 620px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.full-width {
  grid-column: 1 / -1;
}

.card,
.modal-panel {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: none;
}

.panel {
  border: 0;
  border-radius: 6px;
  background: var(--surface);
  padding: 22px;
}

.panel-header,
.row,
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.panel-header {
  margin-bottom: 16px;
}

.panel-header h3,
.card h4 {
  margin: 0;
  font-size: 1rem;
}

.panel-header p,
.card p,
.muted {
  color: var(--muted);
}

.panel-header p,
.card p {
  margin: 4px 0 0;
  line-height: 1.45;
}

.toolbar {
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.tax-field {
  width: min(220px, 100%);
}

.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  color: var(--muted);
}

.checkbox-inline input {
  width: 16px;
  min-height: 16px;
}

.field {
  display: grid;
  gap: 7px;
}

.field span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
  padding: 10px 12px;
  outline: none;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(117, 133, 111, 0.18);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--ink);
  color: white;
  padding: 0 14px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.button.secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.auth-alt-actions {
  margin-top: 14px;
}

.auth-google-button {
  width: 100%;
  justify-content: center;
  padding: 0 16px;
}

.auth-google-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.auth-google-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.auth-google-icon img {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
}

.button.sage {
  border-color: var(--sage-deep);
  background: var(--sage-deep);
}

.button:disabled,
.button[disabled] {
  border-color: var(--line);
  background: #d7d3cb;
  color: #77716a;
  cursor: not-allowed;
}

:root[data-theme="dark"] .button:disabled,
:root[data-theme="dark"] .button[disabled] {
  border-color: #4b4740;
  background: #34322e;
  color: #8f877b;
}

.compact-button {
  min-height: 36px;
}

.save-state-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.save-state-pill.needs-save {
  border-color: rgba(184, 101, 74, 0.32);
  background: rgba(184, 101, 74, 0.08);
  color: var(--danger);
}

.save-state-pill.saved {
  border-color: rgba(78, 100, 77, 0.18);
  background: rgba(78, 100, 77, 0.08);
  color: var(--sage-deep);
}

.button.danger {
  border-color: rgba(184, 101, 74, 0.35);
  background: rgba(184, 101, 74, 0.08);
  color: var(--danger);
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
  font-size: 0.9rem;
  font-weight: 600;
}

.text-button:hover {
  color: var(--sage-deep);
}

.back-link span {
  font-size: 1.05rem;
  line-height: 1;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}

.icon-button svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.danger-icon {
  border-color: rgba(184, 101, 74, 0.28);
  background: rgba(184, 101, 74, 0.06);
  color: var(--danger);
}

.sage-icon {
  border-color: var(--sage-deep);
  background: var(--sage-deep);
  color: white;
}

.send-message-icon {
  justify-self: end;
  width: 48px;
  height: 48px;
}

.theme-toggle {
  font-size: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-grid .full {
  grid-column: 1 / -1;
}

.product-list,
.message-list,
.asset-grid,
.project-list {
  display: grid;
  gap: 12px;
}

.room-section {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.room-section + .room-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.room-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.room-header h4 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  font-weight: 500;
}

.room-header p,
.room-total span {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.room-total {
  text-align: right;
}

.room-total strong {
  display: block;
  margin-top: 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 500;
}

.product-card {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 14px;
  overflow: hidden;
  padding: 12px;
}

.product-card img,
.client-product img,
.asset-card img {
  width: 100%;
  object-fit: cover;
  background: var(--paper);
}

.product-card img {
  height: 108px;
  border-radius: 4px;
}

.product-image-frame {
  position: relative;
  min-width: 0;
}

.product-image-frame img {
  display: block;
}

.product-image-badges {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  gap: 6px;
}

.image-status-badge {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: rgba(31, 31, 29, 0.78);
  color: white;
  backdrop-filter: blur(8px);
}

.image-status-badge svg {
  width: 17px;
  height: 17px;
}

.image-status-badge.invoiced {
  background: rgba(63, 107, 132, 0.86);
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--pill-border);
  border-radius: 4px;
  background: var(--pill-bg);
  color: var(--pill-text);
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 600;
}

.pill.approved {
  border-color: rgba(78, 100, 77, 0.2);
  background: rgba(78, 100, 77, 0.1);
  color: var(--sage-deep);
}

.pill.purchased {
  border-color: rgba(63, 107, 132, 0.24);
  background: rgba(63, 107, 132, 0.1);
  color: var(--blue);
}

.pill.pending {
  border-color: rgba(217, 168, 73, 0.25);
  background: rgba(217, 168, 73, 0.14);
  color: #826019;
}

.pill.unread {
  border-color: rgba(63, 107, 132, 0.26);
  background: rgba(63, 107, 132, 0.1);
  color: var(--blue);
}

.pill.invoiced {
  border-color: rgba(63, 107, 132, 0.22);
  background: rgba(63, 107, 132, 0.08);
  color: var(--blue);
}

.pill.subtle {
  border-color: rgba(31, 31, 29, 0.12);
  background: rgba(31, 31, 29, 0.04);
  color: var(--muted);
}

:root[data-theme="dark"] .pill.approved {
  border-color: rgba(162, 173, 152, 0.35);
  background: rgba(162, 173, 152, 0.14);
  color: #d9e2d2;
}

:root[data-theme="dark"] .pill.purchased {
  border-color: rgba(141, 177, 192, 0.38);
  background: rgba(141, 177, 192, 0.16);
  color: #d7ebf2;
}

:root[data-theme="dark"] .pill.pending {
  border-color: rgba(209, 176, 106, 0.38);
  background: rgba(209, 176, 106, 0.16);
  color: #f0d99a;
}

:root[data-theme="dark"] .pill.unread {
  border-color: rgba(141, 177, 192, 0.38);
  background: rgba(141, 177, 192, 0.16);
  color: #cfe6ef;
}

:root[data-theme="dark"] .pill.invoiced {
  border-color: rgba(141, 177, 192, 0.38);
  background: rgba(141, 177, 192, 0.14);
  color: #cfe6ef;
}

:root[data-theme="dark"] .pill.subtle {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #b8b0a6;
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.catalog-toolbar-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: min(420px, 100%);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.catalog-toolbar-card strong {
  display: block;
  margin-top: 2px;
  font-size: 0.95rem;
}

.catalog-toolbar-label {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.shopping-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  margin: 4px 0 14px;
}

.shopping-view-toggle button {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 0 14px;
  font-size: 0.84rem;
  font-weight: 700;
}

.shopping-view-toggle button.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(31, 31, 29, 0.08);
}

.shopping-table-shell {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.shopping-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.shopping-table th,
.shopping-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  text-align: left;
}

.shopping-table td {
  font-size: 0.9rem;
}

.shopping-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.shopping-sort-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
}

.shopping-sort-button strong {
  font-size: 0.85em;
  line-height: 1;
}

.shopping-sort-button.active {
  color: var(--ink);
}

.shopping-table tbody tr:last-child td {
  border-bottom: 0;
}

.shopping-table tbody tr.is-approved {
  background: rgba(78, 100, 77, 0.03);
}

.shopping-table tbody tr.is-purchased {
  box-shadow: inset 3px 0 0 rgba(63, 107, 132, 0.72);
}

.shopping-table-product {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 240px;
}

.shopping-table-product-thumb,
.shopping-table-product-link {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  text-align: left;
  color: inherit;
}

.shopping-table-product-thumb {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 4px;
  overflow: hidden;
}

.shopping-table-product img {
  width: 44px;
  height: 44px;
  border-radius: 4px;
  object-fit: cover;
  background: var(--paper);
}

.shopping-table-product strong,
.shopping-table-product span {
  display: block;
}

.shopping-table-product-link {
  display: block;
}

.shopping-table-product strong {
  font-size: 0.92rem;
  transition: color 120ms ease;
}

.shopping-table-product span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
}

.shopping-table-product-thumb:hover img,
.shopping-table-product-thumb:focus-visible img {
  opacity: 0.9;
}

.shopping-table-product-link:hover strong,
.shopping-table-product-link:focus-visible strong {
  color: var(--sage-deep);
}

.shopping-table-product-thumb:focus-visible,
.shopping-table-product-link:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--sage-deep) 55%, white);
  outline-offset: 2px;
}

.shopping-table td .icon-button {
  width: 36px;
  height: 36px;
}

.table-empty-mark {
  color: var(--muted);
}

.saved-invoice-card > p {
  margin-bottom: 0;
}

.saved-invoice-actions {
  margin-top: 18px;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 220px);
  gap: 10px;
}

.checkbox-stack {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.checkbox-stack label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.checkbox-stack input {
  width: 16px;
  min-height: 16px;
}

.invoice-eligibility {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.invoice-eligibility p {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--soft);
}

.invoice-eligibility span {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.invoice-eligibility strong {
  display: block;
  margin-top: 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 500;
}

.reconciliation-summary {
  margin-bottom: 14px;
}

.reconciliation-summary p,
.purchase-reconciliation-banner p,
.reconciliation-inline p {
  margin: 0;
}

.reconciliation-summary .variance-positive span,
.purchase-reconciliation-banner .variance-positive span,
.reconciliation-inline.positive span,
.reconciliation-summary .variance-positive strong,
.purchase-reconciliation-banner .variance-positive strong,
.reconciliation-inline.positive strong {
  color: var(--sage-deep);
}

.reconciliation-summary .variance-negative span,
.purchase-reconciliation-banner .variance-negative span,
.reconciliation-inline.negative span,
.reconciliation-summary .variance-negative strong,
.purchase-reconciliation-banner .variance-negative strong,
.reconciliation-inline.negative strong {
  color: var(--danger);
}

.purchase-reconciliation-banner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.purchase-return-section {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: color-mix(in srgb, var(--paper) 55%, transparent);
}

.purchase-return-section.is-hidden {
  display: none;
}

.purchase-return-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.purchase-return-summary p {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
}

.purchase-return-summary span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.purchase-return-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 1rem;
}

.purchase-reconciliation-banner p,
.reconciliation-inline p {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--soft);
}

.purchase-reconciliation-banner span,
.reconciliation-inline span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.purchase-reconciliation-banner strong,
.reconciliation-inline strong {
  display: block;
  margin-top: 4px;
  font-size: 1rem;
}

.reconciliation-inline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0;
}

.reconciliation-inline.neutral span,
.reconciliation-inline.neutral strong {
  color: var(--ink);
}

.adjustment-list {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.adjustment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 42px;
  grid-template-areas:
    "description detail detail"
    "amount taxable remove";
  column-gap: 12px;
  row-gap: 14px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.adjustment-description {
  grid-area: description;
}

.adjustment-detail {
  grid-area: detail;
}

.adjustment-amount {
  grid-area: amount;
  max-width: 220px;
}

.adjustment-taxable {
  grid-area: taxable;
  align-self: center;
  justify-content: start;
  margin-bottom: 1px;
  white-space: nowrap;
}

.adjustment-remove {
  grid-area: remove;
  align-self: end;
}

.invoice-workspace {
  align-items: start;
  grid-template-columns: minmax(300px, 0.8fr) minmax(360px, 1.2fr);
}

.inline-invoice-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.inline-invoice-panel {
  max-width: 1040px;
}

.inline-invoice-form,
.invoice-editor-toolbar {
  display: grid;
  gap: 18px;
}

.invoice-editor-toolbar {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.invoice-editor-toolbar h3 {
  margin: 0 0 6px;
}

.invoice-editor-toolbar p {
  margin: 0;
  color: var(--muted);
}

.compact-project-select {
  max-width: 420px;
}

.invoice-preview {
  background: var(--surface);
  min-width: 0;
  border: 1px solid var(--line);
  padding: 18px;
}

.print-only-invoice {
  display: none;
}

.invoice-workspace > .panel {
  min-width: 0;
}

.invoice-document {
  display: grid;
  gap: 24px;
  min-width: 0;
  color: var(--ink);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: clamp(18px, 3vw, 34px);
}

.invoice-top,
.invoice-meta,
.invoice-totals p {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.invoice-top img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.invoice-top h3 {
  margin: 8px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 500;
}

.invoice-top p,
.invoice-meta p {
  margin: 6px 0 0;
  color: var(--muted);
}

.invoice-notes {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.invoice-meta {
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.invoice-editor-meta {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(170px, auto) minmax(120px, auto);
}

.invoice-meta span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.inline-invoice-field input,
.invoice-line-input,
.invoice-line-detail-input,
.invoice-money-input,
.invoice-inline-textarea textarea {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 4px;
  background: color-mix(in srgb, var(--paper) 64%, transparent);
  color: var(--ink);
  font: inherit;
}

.inline-invoice-field input {
  min-height: 42px;
  padding: 9px 10px;
}

.compact-tax-field {
  max-width: 130px;
}

.invoice-tax-summary {
  display: grid;
  gap: 4px;
  align-content: start;
}

.invoice-tax-summary strong {
  font-size: 1rem;
}

.invoice-tax-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.invoice-source-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-bottom: 2px;
}

.invoice-source-options label,
.tax-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 72%, transparent);
  color: var(--muted);
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.invoice-source-options input,
.tax-chip input {
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
}

.invoice-source-options strong {
  color: var(--ink);
}

.invoice-option-note {
  color: var(--muted);
  font-size: 0.78rem;
}

.invoice-advanced-options {
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--paper) 55%, transparent);
}

.invoice-advanced-options summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.invoice-advanced-options summary::-webkit-details-marker {
  display: none;
}

.invoice-advanced-options summary::after {
  content: "+";
  color: var(--ink);
  font-size: 1rem;
  line-height: 1;
}

.invoice-advanced-options[open] summary::after {
  content: "−";
}

.invoice-advanced-options-body {
  display: grid;
  gap: 8px;
  padding: 0 14px 14px;
}

.invoice-advanced-options-body label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 72%, transparent);
  color: var(--muted);
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.invoice-advanced-options-body input {
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
}

.invoice-advanced-options-body strong {
  color: var(--ink);
}

.invoice-advanced-options-body .field {
  display: grid;
  gap: 6px;
  width: min(220px, 100%);
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  white-space: normal;
}

.invoice-advanced-options-body .field span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.invoice-advanced-options-body .field input {
  width: 100%;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: color-mix(in srgb, var(--paper) 64%, transparent);
  color: var(--ink);
  padding: 9px 10px;
  font: inherit;
}

.invoice-selection-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: color-mix(in srgb, var(--paper) 55%, transparent);
}

.invoice-selection-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.invoice-selection-header strong {
  font-size: 0.9rem;
}

.invoice-selection-header span {
  color: var(--muted);
  font-size: 0.78rem;
}

.invoice-selection-list {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}

.invoice-selection-item {
  display: grid;
  grid-template-columns: auto 40px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
}

.invoice-selection-item input {
  width: auto;
  min-height: 0;
  margin: 0;
}

.invoice-selection-item img {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  object-fit: cover;
  background: var(--paper);
}

.invoice-selection-item span {
  min-width: 0;
}

.invoice-selection-item strong,
.invoice-selection-item em {
  display: block;
}

.invoice-selection-item strong {
  font-size: 0.88rem;
  font-style: normal;
}

.invoice-selection-item em {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.76rem;
  font-style: normal;
}

.invoice-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.mobile-invoice-lines {
  display: none;
}

.mobile-schedule-note {
  display: none;
}

.invoice-table th:first-child,
.invoice-table td:first-child {
  width: 52%;
}

.invoice-table th,
.invoice-table td {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.invoice-table th:nth-child(3),
.invoice-table td:nth-child(3),
.invoice-table th:nth-child(4),
.invoice-table td:nth-child(4) {
  text-align: right;
}

.invoice-editor-table th:first-child,
.invoice-editor-table td:first-child {
  width: 44%;
}

.invoice-editor-table th:nth-child(2),
.invoice-editor-table td:nth-child(2) {
  width: 14%;
}

.invoice-editor-table th:nth-child(3),
.invoice-editor-table td:nth-child(3) {
  width: 8%;
  text-align: right;
}

.invoice-editor-table th:nth-child(4),
.invoice-editor-table td:nth-child(4) {
  width: 22%;
  text-align: right;
}

.invoice-editor-table th:nth-child(5),
.invoice-editor-table td:nth-child(5) {
  width: 48px;
  text-align: right;
}

.invoice-table th {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.invoice-table td span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

.editable-invoice-row td {
  vertical-align: middle;
}

.invoice-reconciliation-row td {
  background: rgba(63, 107, 132, 0.04);
}

.invoice-return-credit-row td {
  background: rgba(155, 98, 78, 0.07);
}

.invoice-editor-table .tax-chip {
  border: 0;
  background: transparent;
  padding: 0;
}

.invoice-line-input {
  padding: 9px 10px;
  font-weight: 700;
}

.invoice-line-detail-input {
  margin-top: 6px;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.invoice-money-input {
  max-width: 150px;
  margin-left: auto;
  padding: 9px 10px;
  text-align: right;
}

.invoice-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
}

.design-fee-helper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 66%, transparent);
  padding: 14px;
}

.design-fee-helper span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.design-fee-helper strong {
  display: block;
  margin-top: 4px;
}

.design-fee-helper p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.invoice-inline-textarea {
  display: grid;
  gap: 8px;
}

.invoice-inline-textarea span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.invoice-inline-textarea textarea {
  min-height: 92px;
  padding: 12px;
  line-height: 1.45;
  resize: vertical;
}

.payment-options-editor {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.invoice-table th,
.invoice-table td {
  overflow-wrap: anywhere;
}

.invoice-totals {
  justify-self: end;
  width: min(320px, 100%);
}

.invoice-totals p {
  margin: 0;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.invoice-totals .grand-total {
  font-size: 1.15rem;
}

.paid-banner {
  justify-self: end;
  width: min(320px, 100%);
  border: 1px solid rgba(78, 100, 77, 0.28);
  background: rgba(78, 100, 77, 0.1);
  color: var(--sage-deep);
  padding: 12px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

:root[data-theme="dark"] .paid-banner {
  border-color: rgba(162, 173, 152, 0.35);
  background: rgba(162, 173, 152, 0.14);
  color: #d9e2d2;
}

.payment-options {
  padding-top: 22px;
  margin-top: 4px;
  border-top: 1px solid var(--line);
}

.payment-options span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.payment-options p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.invoice-action-toolbar {
  justify-content: flex-start;
  margin-top: 22px;
  margin-bottom: 0;
}

.payment-icon {
  text-decoration: none;
}

.payment-logo {
  display: inline-grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0;
}

.zelle-icon {
  border-color: #6d1ed4;
  background: #6d1ed4;
  color: white;
}

.venmo-icon {
  border-color: #008cff;
  background: #008cff;
  color: white;
}

.project-item {
  position: relative;
  padding: 14px;
  color: var(--ink);
  text-align: left;
}

.project-item.active {
  border-color: var(--sage-deep);
  background: var(--sage-deep);
  color: white;
  box-shadow: none;
}

.notification-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  border: 2px solid var(--surface);
  border-radius: 999px;
  background: #b7352b;
  color: white;
  padding: 0 6px;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
}

.view-tabs button .notification-badge {
  top: -8px;
  right: -5px;
}

.project-item.active .notification-badge {
  border-color: var(--sage-deep);
}

:root[data-theme="dark"] .notification-badge {
  border-color: var(--surface);
  background: #d15c50;
  color: #1f1f1d;
}

.notification-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 2;
  width: 11px;
  height: 11px;
  border: 2px solid var(--surface);
  border-radius: 999px;
  background: #d9a849;
}

:root[data-theme="dark"] .notification-dot {
  border-color: var(--surface);
  background: #f0d99a;
}

.project-item-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px;
  gap: 10px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--soft);
}

.project-item-fields .full {
  grid-column: 1 / -1;
}

.client-access {
  display: block;
}

.client-gallery {
  background: transparent;
}

.client-project-hub {
  display: grid;
  gap: 18px;
}

.client-account-project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.client-account-project-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.client-account-project-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.client-account-project-body {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.client-account-project-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.client-account-project-head h4 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.42rem;
  font-weight: 500;
}

.client-account-project-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.client-account-project-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.client-account-project-stats div {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.client-account-project-stats dt {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.client-account-project-stats dd {
  margin: 6px 0 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.client-project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.client-project-tile {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: white;
  padding: 0;
  text-align: left;
}

.client-project-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.client-project-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.06));
}

.client-project-tile.active::after {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.18));
}

.tile-hit-area {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 0;
  background: transparent;
  padding: 0;
}

.tile-title {
  position: absolute;
  z-index: 3;
  left: 16px;
  right: 16px;
  bottom: 14px;
  display: grid;
  gap: 3px;
  color: white;
  text-align: left;
  pointer-events: none;
}

.tile-title strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.18rem;
  font-weight: 500;
}

.tile-title small {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
}

.client-project-tile.active {
  box-shadow: none;
}

.client-project-tile.active .tile-title {
  bottom: auto;
  top: 16px;
}

.tile-login {
  position: absolute;
  z-index: 3;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: grid;
  gap: 14px;
}

.tile-login .field span {
  color: rgba(255, 255, 255, 0.78);
}

.tile-login input {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.92);
  color: #1f1f1d;
}

.tile-login .form-error {
  margin: 0;
  color: #f2c6b8;
}

.login-panel {
  align-self: start;
}

.demo-auth-callout {
  margin-bottom: 18px;
  border-left: 3px solid var(--danger);
  background: color-mix(in srgb, var(--paper) 74%, var(--surface));
  padding: 12px 14px;
}

.demo-auth-callout strong {
  display: block;
  margin-bottom: 4px;
}

.demo-auth-callout p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.form-error {
  margin: 0;
  color: var(--danger);
}

.success-note {
  margin: 0;
  color: var(--sage);
  font-weight: 700;
}

.validation-banner {
  border-left: 3px solid var(--danger);
  background: rgba(140, 63, 40, 0.08);
  color: var(--danger);
  padding: 12px 14px;
  font-weight: 700;
}

.login-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.client-product {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: 22px;
  padding: 16px;
}

.client-room-section {
  margin-top: 24px;
}

.order-ledger {
  display: grid;
  gap: 14px;
}

.client-order-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 12px;
}

.client-order-card img {
  width: 72px;
  height: 72px;
  border-radius: 4px;
  object-fit: cover;
}

.client-order-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.client-order-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.client-order-head h4 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  font-weight: 500;
}

.client-order-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.shopping-summary {
  text-align: right;
}

.shopping-summary span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.shopping-summary strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  font-weight: 500;
}

.client-shopping-controls {
  display: grid;
  gap: 12px;
  margin: 14px 0 18px;
}

.client-shopping-controls > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-chips button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
  font-size: 0.82rem;
  font-weight: 700;
}

.filter-chips button.active {
  border-color: var(--ink);
  background: var(--ink);
  color: white;
}

.shopping-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.shopping-totals p {
  margin: 0;
}

.shopping-totals span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.mobile-cost-details {
  display: none;
}

.room-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.room-toggle {
  flex: 0 0 auto;
}

.show-more-room {
  justify-self: center;
  margin-top: 4px;
}

.client-product img {
  aspect-ratio: 4 / 3;
  border-radius: 4px;
}

.client-product-body {
  display: grid;
  gap: 14px;
}

.client-product-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.client-product-head h4 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  font-weight: 500;
}

.client-product-head p {
  margin: 5px 0 0;
  color: var(--muted);
}

.client-price-row {
  display: grid;
  grid-template-columns: minmax(120px, 1.1fr) minmax(70px, 0.6fr) minmax(100px, 0.9fr) minmax(100px, 0.9fr) minmax(120px, 1fr);
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.client-price-row span,
.product-detail-list span,
.order-status-grid span,
.client-selection span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.client-price-row strong,
.order-status-grid strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 2.1vw, 1.7rem);
  font-weight: 500;
}

.client-price-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.25;
}

.order-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.order-detail-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 0.86rem;
}

.client-selection {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--soft);
}

.client-selection p {
  margin: 0;
  line-height: 1.45;
}

.client-selection .muted {
  margin-top: 6px;
}

.product-details-drawer {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.product-details-drawer summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.product-details-drawer summary::-webkit-details-marker {
  display: none;
}

.product-details-drawer summary span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.product-details-drawer summary strong {
  font-size: 1.1rem;
  font-weight: 500;
}

.product-details-drawer[open] summary strong {
  transform: rotate(45deg);
}

.product-detail-list {
  display: grid;
  gap: 12px;
  padding: 0 0 14px;
}

.product-detail-list p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.product-detail-list strong {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
}

.highlight-product {
  outline: 2px solid var(--sage);
  outline-offset: 4px;
}

.panel-section {
  margin: 24px 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.panel-header.compact {
  margin-bottom: 12px;
}

.approval-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.product-question-button {
  width: 42px;
  height: 42px;
}

.approval-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.asset-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.asset-grid.compact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.asset-card {
  overflow: hidden;
}

.asset-card img {
  aspect-ratio: 4 / 3;
}

.asset-card div {
  padding: 12px;
}

.asset-card a {
  color: var(--ink);
  text-decoration: none;
}

.asset-card a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.client-asset-grid {
  gap: 18px;
}

.client-asset-card {
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.client-asset-card img {
  border-radius: 0;
}

.asset-open {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
}

.client-asset-card div {
  padding: 18px 0 0;
}

.client-asset-card h4 {
  margin-top: 8px;
}

.client-asset-card .pill {
  margin-bottom: 2px;
}

.asset-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.asset-controls .compact-field {
  min-width: 180px;
  max-width: 220px;
}

.asset-group-section {
  display: grid;
  gap: 12px;
  margin-bottom: 22px;
}

.asset-group-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.asset-group-header h4,
.asset-group-header p {
  margin: 0;
}

.asset-group-header p {
  color: var(--muted);
  font-size: 0.82rem;
}

.asset-meta-line {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.82rem;
}

.appointment-actions {
  margin-top: 12px;
}

.asset-viewer {
  display: grid;
  gap: 16px;
}

.asset-viewer-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.asset-viewer-toolbar > span {
  min-width: 54px;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: center;
}

.asset-preview-window {
  position: relative;
  height: min(72vh, 760px);
  overflow: auto;
  border: 0;
  background: var(--paper);
}

.asset-nav-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 96px;
  border: 0;
  background: transparent;
  color: var(--ink);
  opacity: 0;
  transition: opacity 0.16s ease;
}

.asset-preview-window:hover .asset-nav-zone,
.asset-nav-zone:focus-visible {
  opacity: 1;
}

.asset-nav-zone svg {
  width: 46px;
  height: 46px;
  padding: 12px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  box-shadow: 0 8px 28px rgba(31, 31, 29, 0.12);
}

.asset-nav-prev {
  left: 0;
}

.asset-nav-next {
  right: 0;
}

.asset-preview-canvas {
  min-width: 60%;
  margin: 0 auto;
}

.asset-count {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.asset-preview-canvas img,
.asset-preview-canvas iframe {
  display: block;
  width: 100%;
  min-height: 720px;
  border: 0;
  background: white;
}

.asset-preview-canvas .dropbox-embed-host {
  width: 100%;
  min-height: 720px;
  background: white;
}

.asset-preview-canvas img {
  min-height: auto;
  height: auto;
}

.asset-preview-fallback {
  min-height: 720px;
  display: grid;
  place-content: center;
  gap: 12px;
  justify-items: center;
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

.message {
  padding: 14px;
}

.thread-card {
  width: 100%;
  color: var(--ink);
  text-align: left;
}

.thread-card.active {
  border-color: var(--sage);
  box-shadow: inset 2px 0 0 var(--sage);
}

.thread-panel {
  display: grid;
  gap: 12px;
  align-content: start;
  max-height: 620px;
  overflow: auto;
  padding: 4px;
}

.project-message-panel {
  display: grid;
  gap: 14px;
}

.studio-reply-form {
  position: sticky;
  bottom: 12px;
  z-index: 8;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 16px 40px rgba(31, 31, 29, 0.1);
}

.studio-reply-form textarea {
  min-height: 54px;
  max-height: 150px;
  resize: vertical;
}

.message-bubble {
  position: relative;
  width: min(76%, 560px);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.message-bubble p {
  margin: 8px 0 0;
  line-height: 1.5;
}

.message-product-link {
  display: grid;
  gap: 3px;
  width: 100%;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--soft);
  color: var(--ink);
  padding: 9px 10px;
  text-align: left;
}

.message-product-link span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.message-product-link strong {
  font-size: 0.86rem;
}

.studio-bubble {
  justify-self: end;
  border-bottom-right-radius: 4px;
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}

.studio-bubble .bubble-meta,
.studio-bubble .inline-action {
  color: rgba(255, 255, 255, 0.75);
}

.client-bubble {
  justify-self: start;
  border-bottom-left-radius: 4px;
  background: var(--surface);
}

.studio-bubble::after,
.client-bubble::after {
  position: absolute;
  bottom: -7px;
  width: 0;
  height: 0;
  border: 8px solid transparent;
  border-bottom: 0;
  content: "";
}

.studio-bubble::after {
  right: 14px;
  border-top-color: var(--ink);
}

.client-bubble::after {
  left: 14px;
  border-top-color: var(--surface);
  filter: drop-shadow(0 1px 0 var(--line));
}

:root[data-theme="dark"] .studio-bubble {
  background: #f2eee6;
  border-color: #f2eee6;
  color: #1f1f1d;
}

:root[data-theme="dark"] .studio-bubble .bubble-meta,
:root[data-theme="dark"] .studio-bubble .inline-action {
  color: #5f5a52;
}

:root[data-theme="dark"] .studio-bubble .message-product-link {
  background: rgba(31, 31, 29, 0.06);
  color: #1f1f1d;
}

:root[data-theme="dark"] .client-bubble {
  background: #23221f;
  border-color: #4b4740;
  color: #f2eee6;
}

:root[data-theme="dark"] .studio-bubble::after {
  border-top-color: #f2eee6;
}

:root[data-theme="dark"] .client-bubble::after {
  border-top-color: #23221f;
  filter: drop-shadow(0 1px 0 #4b4740);
}

:root[data-theme="dark"] .client-bubble .bubble-meta {
  color: #bdb5aa;
}

:root[data-theme="dark"] .client-bubble .message-product-link {
  border-color: #4b4740;
  background: #2b2925;
  color: #f2eee6;
}

.unread-bubble {
  box-shadow: inset 3px 0 0 var(--blue);
}

.bubble-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.78rem;
}

.inline-action {
  margin-top: 8px;
  border: 0;
  background: transparent;
  color: var(--blue);
  padding: 0;
  font-size: 0.78rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.message.unread-message {
  border-color: rgba(63, 107, 132, 0.35);
  box-shadow: inset 2px 0 0 var(--blue);
}

.message time {
  color: var(--muted);
  font-size: 0.78rem;
}

.empty {
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  color: var(--muted);
  text-align: center;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(37, 35, 33, 0.44);
}

.modal-panel {
  width: min(720px, 100%);
  max-height: min(780px, 92vh);
  overflow: auto;
  padding: 20px;
}

.invoice-modal-panel {
  display: grid;
  gap: 16px;
  width: min(900px, 100%);
  padding: 18px;
}

.invoice-modal-toolbar {
  position: sticky;
  top: -18px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  padding: 0 0 14px;
}

.invoice-modal-toolbar h3 {
  margin: 0;
  font-size: 1rem;
}

.invoice-modal-toolbar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.invoice-modal-panel .invoice-document {
  width: min(760px, 100%);
  margin: 0 auto;
}

.catalog-picker-panel {
  display: block;
  width: min(1120px, 100%);
  padding: 0 20px 20px;
}

.catalog-picker-sticky {
  position: sticky;
  top: 0;
  z-index: 2;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  margin: 0 -20px;
  padding: 20px 20px 0;
}

.catalog-picker-header {
  margin-bottom: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.catalog-picker-controls {
  align-items: end;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 10px 0 16px;
  margin-top: 0;
}

.catalog-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
  padding-top: 16px;
}

.catalog-picker-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  border-color: transparent;
  background: color-mix(in srgb, var(--paper) 70%, var(--surface));
  padding: 16px;
}

.catalog-picker-card img {
  width: 100%;
  height: 112px;
  border-radius: 4px;
  object-fit: cover;
  background: var(--paper);
}

.catalog-picker-card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  min-height: 100%;
}

.catalog-picker-card-head {
  align-items: start;
  gap: 12px;
}

.catalog-picker-card-head strong {
  white-space: nowrap;
  flex: 0 0 auto;
}

.catalog-picker-card .product-actions {
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
  width: 100%;
}

.catalog-add-button {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
}

.catalog-price-pending {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(31, 31, 29, 0.05);
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  flex: 0 0 auto;
}

.message-dock {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 45;
  display: grid;
  gap: 12px;
  width: min(390px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(31, 31, 29, 0.16);
  padding: 14px;
}

.message-dock.minimized {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  color: var(--ink);
  text-align: left;
}

.message-dock-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.message-dock-header span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.82rem;
}

.dock-actions {
  display: flex;
  gap: 6px;
}

.dock-actions .icon-button {
  width: 34px;
  height: 34px;
}

.dock-reference {
  margin-top: 0;
}

.message-dock textarea {
  min-height: 118px;
}

.toast-notice {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 70;
  max-width: min(360px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--ink);
  color: var(--surface);
  box-shadow: 0 16px 42px rgba(31, 31, 29, 0.18);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 12px 14px;
}

.mobile-chat-overlay {
  display: none;
}

.hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .hero,
  .grid.two,
  .grid.three,
  .project-workspace,
  .project-workspace.collapsed,
  .invoice-workspace,
  .client-access,
  .client-product,
  .asset-grid {
    grid-template-columns: 1fr;
  }

  .project-sidebar {
    display: none;
  }

  .mobile-project-switcher {
    display: inline-flex;
  }

  .client-price-row {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .invoice-eligibility {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .invoice-editor-toolbar,
  .invoice-editor-meta {
    grid-template-columns: 1fr;
  }

  .invoice-editor-toolbar .toolbar {
    justify-content: flex-start;
  }

  .hero {
    min-height: 420px;
    align-items: end;
  }

  .client-hero:not(.access-hero) {
    grid-template-columns: 1fr;
    gap: 10px;
    min-height: auto;
    align-items: start;
    padding: 12px 0;
  }

  .client-hero:not(.access-hero) h2 {
    font-size: clamp(1.9rem, 8vw, 3rem);
  }

  .client-hero:not(.access-hero) p {
    margin-top: 8px;
    font-size: 0.92rem;
    line-height: 1.45;
  }

  .hero-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .client-hero:not(.access-hero) .hero-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .client-project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .client-account-project-grid {
    grid-template-columns: 1fr;
  }

  .profile-hero,
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .profile-hero {
    display: grid;
  }

  .profile-code {
    text-align: left;
  }

  .hero.access-hero {
    min-height: 180px;
  }
}

@media (max-width: 680px) {
  .layout {
    gap: 12px;
    padding: 18px 12px 42px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .session-bar {
    justify-content: flex-start;
  }

  .topbar {
    position: static;
  }

  .panel {
    padding: 14px 0;
    background: transparent;
  }

  .panel-header {
    margin-bottom: 10px;
  }

  .panel-header,
  .row,
  .toolbar {
    gap: 10px;
  }

  .grid,
  .product-list,
  .message-list,
  .asset-grid,
  .project-list,
  .order-ledger {
    gap: 10px;
  }

  .card {
    border-radius: 4px;
  }

  .product-card,
  .client-product,
  .client-order-card,
  .message {
    padding: 12px;
  }

  .client-product {
    padding: 14px;
  }

  .asset-grid.compact-grid {
    gap: 16px;
  }

  .admin-asset-card {
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
  }

  .admin-asset-card img {
    border-radius: 0;
  }

  .admin-asset-card div {
    padding: 12px 0 0;
  }

  .saved-invoice-actions,
  .product-meta,
  .toolbar {
    margin-bottom: 10px;
  }

  .saved-invoice-actions {
    margin-top: 12px;
  }

  .mode-tabs,
  .view-tabs,
  .search-row,
  .form-grid,
  .invoice-eligibility,
  .project-item-fields,
  .adjustment-row,
  .profile-grid,
  .room-header,
  .studio-reply-form {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .invoice-editor-document {
    overflow-x: auto;
  }

  .invoice-preview,
  .invoice-workspace .invoice-preview,
  .invoice-editor-document,
  .invoice-document {
    background: var(--surface);
  }

  .invoice-preview {
    padding: 14px;
  }

  .invoice-editor-table {
    min-width: 680px;
  }

  .design-fee-helper {
    align-items: flex-start;
    flex-direction: column;
  }

  .room-header {
    display: grid;
    align-items: start;
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--sage) 32%, var(--line));
    border-radius: 6px;
    background: color-mix(in srgb, var(--sage) 10%, var(--surface));
  }

  .room-total {
    text-align: left;
  }

  .room-header h4 {
    font-size: clamp(1.35rem, 8vw, 1.8rem);
  }

  .room-header p,
  .room-total span {
    color: color-mix(in srgb, var(--ink) 62%, var(--muted));
  }

  .room-header.is-open {
    border-color: color-mix(in srgb, var(--sage-deep) 54%, var(--line));
    background: color-mix(in srgb, var(--sage) 14%, var(--surface));
  }

  .room-toggle {
    width: 38px;
    height: 38px;
    border-color: color-mix(in srgb, var(--sage-deep) 44%, var(--line));
    background: var(--surface);
    color: var(--ink);
  }

  .studio-reply-form .send-message-icon {
    justify-self: end;
  }

  .mode-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .client-tabs {
    flex-wrap: nowrap;
    justify-content: space-between;
  }

  .project-tabs {
    flex-wrap: nowrap;
    justify-content: space-between;
  }

  .client-tabs button.tab-icon {
    flex: 1 1 0;
    width: 40px;
    height: 40px;
    min-width: 0;
    min-height: 40px;
    max-width: 40px;
    padding: 0;
  }

  .project-tabs button.tab-icon {
    flex: 1 1 0;
    width: 38px;
    height: 38px;
    min-width: 0;
    min-height: 38px;
    max-width: 38px;
    padding: 0;
  }

  .client-tabs button.tab-icon svg {
    width: clamp(18px, 5vw, 22px);
    height: clamp(18px, 5vw, 22px);
  }

  .project-tabs button.tab-icon svg {
    width: clamp(17px, 4.5vw, 20px);
    height: clamp(17px, 4.5vw, 20px);
  }

  .adjustment-row {
    grid-template-areas:
      "description"
      "detail"
      "amount"
      "taxable"
      "remove";
  }

  .adjustment-amount {
    max-width: none;
  }

  .adjustment-remove {
    justify-self: start;
  }

  .hero {
    min-height: 460px;
  }

  .client-hero:not(.access-hero) {
    min-height: auto;
    padding: 8px 0 10px;
  }

  .hero.access-hero {
    min-height: 170px;
  }

  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .client-hero:not(.access-hero) .hero-stats {
    display: none;
  }

  .client-invoice-workspace .invoice-table {
    display: none;
  }

  .client-invoice-workspace .mobile-invoice-lines {
    display: grid;
    gap: 10px;
  }

  .mobile-invoice-line {
    display: grid;
    gap: 4px;
    border-bottom: 1px solid var(--line);
    padding: 12px 0;
  }

  .mobile-invoice-line span,
  .mobile-invoice-line p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
  }

  .mobile-invoice-line b {
    color: var(--ink);
    white-space: nowrap;
  }

  .client-project-grid {
    grid-template-columns: 1fr;
  }

  .client-account-project-grid {
    grid-template-columns: 1fr;
  }

  .client-project-tile {
    min-height: 210px;
  }

  .client-order-card {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 10px;
  }

  .client-order-card img {
    width: 64px;
    height: 64px;
  }

  .client-order-head {
    display: grid;
  }

  .dashboard-metrics,
  .appointment-card,
  .client-appointment {
    grid-template-columns: 1fr;
  }

  .appointment-date,
  .compact-date {
    min-height: auto;
    padding-bottom: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .schedule-panel {
    min-height: auto;
  }

  .calendly-frame {
    display: none;
  }

  .mobile-schedule-note {
    display: block;
    margin: 8px 0 0;
    color: var(--muted);
  }

  .asset-preview-window {
    height: min(50vh, 420px);
  }

  .product-card {
    grid-template-columns: 1fr;
  }

  .client-price-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 14px;
    padding: 12px 0;
  }

  .order-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .desktop-cost-summary {
    display: none;
  }

  .mobile-cost-details {
    display: block;
    margin: 0 0 12px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .mobile-cost-details summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    color: var(--ink);
    cursor: pointer;
    font-weight: 700;
    list-style: none;
  }

  .mobile-cost-details summary::-webkit-details-marker {
    display: none;
  }

  .mobile-cost-details summary::after {
    content: "+";
    color: var(--muted);
    font-size: 1.25rem;
    font-weight: 400;
  }

  .mobile-cost-details[open] summary::after {
    content: "−";
  }

  .shopping-totals {
    grid-template-columns: 1fr;
  }

  .compact-cost-summary {
    gap: 8px;
    margin: 0;
    padding: 0 0 14px;
    border: 0;
  }

  .compact-cost-summary p {
    display: flex;
    justify-content: space-between;
    gap: 16px;
  }

  body.mobile-chat-open {
    overflow: hidden;
  }

  .client-message-composer-panel {
    position: static;
    border-radius: 6px;
    background: transparent;
    padding: 14px 0;
    box-shadow: none;
  }

  .client-message-composer-panel .panel-header {
    margin-bottom: 10px;
  }

  .client-message-composer-panel .panel-header p {
    display: none;
  }

  #client-message-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 10px;
    align-items: end;
  }

  #client-message-form textarea {
    min-height: 52px;
    max-height: 120px;
  }

  .send-message-icon {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-chat-overlay {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    background: var(--paper);
    color: var(--ink);
  }

  .mobile-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: calc(14px + env(safe-area-inset-top, 0px)) 14px 12px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 96%, transparent);
  }

  .mobile-chat-header h3,
  .mobile-chat-header p {
    margin: 0;
  }

  .mobile-chat-header p {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.86rem;
  }

  .mobile-chat-thread {
    min-height: 0;
    overflow: auto;
    padding: 14px;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-chat-thread .thread-panel {
    gap: 14px;
  }

  .mobile-chat-thread .button {
    width: max-content;
  }

  .mobile-chat-composer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 46px;
    gap: 10px;
    align-items: end;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 98%, transparent);
  }

  .mobile-chat-composer textarea {
    min-height: 46px;
    max-height: 140px;
    resize: none;
  }

  .toast-notice {
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    left: 12px;
    max-width: none;
    text-align: center;
  }

  .room-actions {
    width: 100%;
    justify-content: space-between;
  }

  .room-section {
    gap: 10px;
    margin-top: 14px;
  }

  .client-room-section {
    margin-top: 16px;
  }

  .room-section + .room-section {
    margin-top: 18px;
    padding-top: 16px;
  }

  .panel-section {
    margin: 16px 0;
    padding-top: 14px;
  }

  .client-product {
    gap: 14px;
  }

  .client-product-body {
    gap: 12px;
  }

  .client-product-head {
    gap: 8px;
    padding-bottom: 10px;
  }

  .asset-card div {
    padding: 10px;
  }

  .admin-asset-card div {
    padding: 12px 0 0;
  }

  .client-asset-card div {
    padding: 12px 0 0;
  }

  .thread-panel {
    gap: 10px;
    padding: 0;
  }

  .message-bubble {
    width: min(86%, 560px);
    padding: 11px 12px;
  }

  .studio-bubble {
    justify-self: end;
    margin-left: auto;
    border-bottom-right-radius: 4px;
  }

  .client-bubble {
    justify-self: start;
    margin-right: auto;
  }

  .product-card img {
    height: auto;
    aspect-ratio: 4 / 3;
  }
}

@media print {
  body {
    background: white;
  }

  .topbar,
  .hero,
  .view-tabs,
  .invoice-workspace > .panel:first-child,
  .invoice-workspace > .full-width {
    display: none !important;
  }

  .layout,
  .invoice-workspace {
    display: block;
    width: 100%;
    padding: 0;
  }

  .invoice-preview {
    border: 0;
    padding: 0;
  }

  .print-only-invoice {
    display: block !important;
  }

  body.printing-modal-invoice .layout,
  body.printing-modal-invoice .topbar {
    display: none !important;
  }

  body.printing-modal-invoice .modal {
    position: static;
    display: block;
    padding: 0;
    background: white;
  }

  body.printing-modal-invoice .invoice-modal-toolbar {
    display: none !important;
  }

  body.printing-modal-invoice .modal-panel {
    width: 100%;
    max-height: none;
    overflow: visible;
    border: 0;
    padding: 0;
  }

  body.printing-modal-invoice .invoice-document {
    width: 100%;
    margin: 0;
  }
}
