:root {
  --bg: #f6f3ec;
  --bg-2: #f0ece2;
  --surface: #fffdfa;
  --surface-2: #f8f5ef;
  --surface-3: #f0ece2;
  --surface-muted: #f0ece2;
  --surface-soft: #f8f5ef;
  --line: #ebe6dc;
  --line-strong: #ded7c9;
  --border: #ded7c9;
  --border-soft: #ebe6dc;
  --text: #171814;
  --muted: #707568;
  --faint: #9a9a8f;
  --text-muted: #707568;
  --text-soft: #9a9a8f;
  --accent: #d8b87a;
  --accent-strong: #b98c45;
  --accent-soft: #efe3ca;
  --sage: #cfd8c6;
  --blue-soft: #dbe4ea;
  --rose-soft: #ead8d4;
  --success: #cfe2d1;
  --warning: #ead9be;
  --amber: #b98c45;
  --green: #6d8464;
  --blue: #6f8ea0;
  --red: #ad675e;
  --cream: #efe3ca;
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --radius: 12px;
  --shadow-soft: 0 18px 50px rgba(36, 32, 24, 0.08);
  --shadow-card: 0 6px 20px rgba(36, 32, 24, 0.05);
  --shadow: var(--shadow-soft);
  --sidebar-width: 252px;
  color-scheme: light;
}

:root[data-theme="light"] {
  --bg: #f6f3ec;
  --bg-2: #f0ece2;
  --surface: #fffdfa;
  --surface-2: #f8f5ef;
  --surface-3: #f0ece2;
  --surface-muted: #f0ece2;
  --surface-soft: #f8f5ef;
  --line: #ebe6dc;
  --line-strong: #ded7c9;
  --border: #ded7c9;
  --border-soft: #ebe6dc;
  --text: #171814;
  --muted: #707568;
  --faint: #9a9a8f;
  --text-muted: #707568;
  --text-soft: #9a9a8f;
  --accent: #d8b87a;
  --accent-strong: #b98c45;
  --accent-soft: #efe3ca;
  --sage: #cfd8c6;
  --blue-soft: #dbe4ea;
  --rose-soft: #ead8d4;
  --success: #cfe2d1;
  --warning: #ead9be;
  --amber: #b98c45;
  --green: #6d8464;
  --blue: #6f8ea0;
  --red: #ad675e;
  --cream: #efe3ca;
  --shadow: var(--shadow-soft);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #10110f;
  --bg-2: #151713;
  --surface: #1b1d18;
  --surface-2: #20231d;
  --surface-3: #282b23;
  --surface-muted: #23261f;
  --surface-soft: #181a16;
  --line: #31362c;
  --line-strong: #49503f;
  --border: #404637;
  --border-soft: #2d3229;
  --text: #f6f0e5;
  --muted: #b4bca7;
  --faint: #858d7c;
  --text-muted: #b4bca7;
  --text-soft: #858d7c;
  --accent: #d7ad67;
  --accent-strong: #e5c987;
  --accent-soft: rgba(215, 173, 103, 0.18);
  --sage: #8ea07d;
  --blue-soft: rgba(112, 149, 166, 0.2);
  --rose-soft: rgba(190, 112, 102, 0.19);
  --success: rgba(108, 145, 94, 0.22);
  --warning: rgba(211, 161, 63, 0.2);
  --amber: #e0b66f;
  --green: #96ad86;
  --blue: #8fb8ca;
  --red: #dc8b81;
  --cream: #d7ad67;
  --shadow-soft: 0 22px 70px rgba(0, 0, 0, 0.34);
  --shadow-card: 0 12px 32px rgba(0, 0, 0, 0.22);
  --shadow: var(--shadow-soft);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body {
  overflow-x: hidden;
}

body.public-portal-body {
  background: #faf7f1;
  color: #1e1e1c;
}

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

.public-portal-page {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(241, 245, 237, 0.92)),
    #f7f3ea;
}

.sc-public-page {
  min-height: 100vh;
  background: #faf7f1;
  color: #1e1e1c;
}

.sc-home-hero {
  position: relative;
  min-height: clamp(620px, calc(100svh - 84px), 860px);
  overflow: hidden;
  padding: clamp(8px, 1.2vw, 16px);
  background: #f6f3ec;
}

.sc-home-mosaic {
  height: clamp(620px, calc(100svh - 108px), 860px);
  display: grid;
  grid-template-columns: minmax(360px, 1.36fr) repeat(5, minmax(112px, 0.58fr));
  grid-template-rows: minmax(0, 1fr);
  gap: clamp(7px, 0.8vw, 12px);
  background: transparent;
}

.sc-home-tile {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: #e8e2d8;
  box-shadow: 0 16px 34px rgba(37, 31, 25, 0.08);
}

.sc-home-tile picture {
  width: 100%;
  height: 100%;
  display: block;
}

.sc-home-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  transform: scale(1.01);
  transition: transform 900ms ease, opacity 700ms ease;
}

.sc-home-tile video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
  transform: scale(1.01);
}

.sc-home-mobile-media {
  display: none;
}

.sc-home-tile > span {
  font: 700 42px/1 Georgia, "Times New Roman", serif;
  color: #bdb4a8;
}

.sc-admin-mode-bar {
  position: fixed;
  top: 12px;
  left: 50%;
  z-index: 8500;
  width: min(560px, calc(100vw - 28px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 253, 248, 0.18);
  border-radius: 999px;
  background: rgba(20, 20, 17, 0.82);
  color: #fffdf8;
  box-shadow: 0 18px 48px rgba(20, 20, 17, 0.22);
  transform: translateX(-50%);
  backdrop-filter: blur(14px);
}

.sc-admin-mode-bar > div:first-child {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.sc-admin-mode-bar strong,
.sc-admin-mode-bar span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sc-admin-mode-bar strong {
  font-size: 13px;
}

.sc-admin-mode-bar span {
  color: rgba(255, 253, 248, 0.68);
  font-size: 11px;
}

.sc-admin-mode-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sc-admin-mode-actions a,
.sc-admin-mode-actions button,
.sc-admin-dock-close {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border: 1px solid rgba(255, 253, 248, 0.18);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.1);
  color: #fffdf8;
  font-size: 11px;
  font-weight: 760;
  text-decoration: none;
  cursor: pointer;
}

.sc-admin-mode-actions button {
  font: inherit;
}

.sc-admin-mode-actions button:disabled,
.sc-admin-quick-actions button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.sc-admin-tile-grip {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fffdf8;
  cursor: grab;
  text-align: left;
}

.sc-admin-editing [data-editor-drag="hero-tile"] {
  touch-action: none;
}

body.is-portal-dragging,
body.is-portal-dragging [data-editor-drag="hero-tile"] {
  cursor: grabbing;
}

.sc-admin-tile-grip:active {
  cursor: grabbing;
}

.sc-admin-tile-grip::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.sc-admin-tile-grip:hover::before,
.sc-admin-tile-grip.selected::before {
  border-color: rgba(216, 184, 122, 0.95);
  box-shadow: inset 0 0 0 1px rgba(20, 20, 17, 0.24);
  background: rgba(216, 184, 122, 0.08);
}

.sc-admin-tile-number,
.sc-admin-tile-name,
.sc-admin-tile-hint {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  max-width: calc(100% - 18px);
  border: 1px solid rgba(255, 253, 248, 0.22);
  background: rgba(20, 20, 17, 0.68);
  color: #fffdf8;
  font-size: 11px;
  font-weight: 780;
  backdrop-filter: blur(10px);
}

.sc-admin-tile-number {
  top: 8px;
  left: 8px;
  justify-content: center;
  min-width: 28px;
  min-height: 28px;
  border-radius: 999px;
}

.sc-admin-tile-name {
  right: 8px;
  bottom: 8px;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sc-admin-tile-hint {
  left: 8px;
  bottom: 8px;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  color: rgba(255, 253, 248, 0.78);
  font-size: 10px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.sc-admin-tile-grip:hover .sc-admin-tile-hint,
.sc-admin-tile-grip.selected .sc-admin-tile-hint {
  opacity: 1;
  transform: translateY(0);
}

.sc-admin-dock {
  position: fixed;
  top: 104px;
  right: 18px;
  z-index: 8400;
  width: min(410px, calc(100vw - 28px));
  max-height: calc(100vh - 124px);
  overflow: auto;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 253, 248, 0.18);
  border-radius: 14px;
  background: rgba(20, 20, 17, 0.9);
  color: #fffdf8;
  box-shadow: 0 22px 70px rgba(20, 20, 17, 0.34);
  backdrop-filter: blur(18px);
}

.sc-admin-dock-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.sc-admin-dock-head > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.sc-admin-dock-head strong {
  font-size: 15px;
}

.sc-admin-dock-head span,
.sc-admin-selected-media span {
  color: rgba(255, 253, 248, 0.64);
  font-size: 12px;
  line-height: 1.35;
}

.sc-admin-quick-actions,
.sc-admin-tile-strip,
.sc-admin-editorial-list {
  display: grid;
  gap: 8px;
}

.sc-admin-quick-actions {
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}

.sc-admin-tile-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sc-admin-tile-strip button {
  min-width: 0;
  min-height: 44px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 7px;
  border: 1px solid rgba(255, 253, 248, 0.12);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.08);
  color: #fffdf8;
  font-size: 13px;
  font-weight: 780;
  cursor: pointer;
}

.sc-admin-tile-strip button[draggable="true"] {
  cursor: grab;
}

.sc-admin-tile-strip button[draggable="true"]:active {
  cursor: grabbing;
}

.sc-admin-tile-strip button.active {
  border-color: rgba(216, 184, 122, 0.92);
  background: rgba(216, 184, 122, 0.18);
}

.sc-admin-tile-strip span {
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 253, 248, 0.62);
  font-size: 10px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sc-admin-editor-section {
  border: 1px solid rgba(255, 253, 248, 0.12);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.06);
}

.sc-admin-editor-section summary {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 12px;
  color: #fffdf8;
  font-size: 13px;
  font-weight: 820;
  cursor: pointer;
}

.sc-admin-editor-section > *:not(summary) {
  margin: 0 12px 12px;
}

.sc-admin-selected-media,
.sc-admin-editorial-item {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.sc-admin-selected-media .portal-media-thumb,
.sc-admin-editorial-item .portal-media-thumb {
  border-color: rgba(255, 253, 248, 0.14);
  border-radius: 10px;
}

.sc-admin-selected-media strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sc-admin-form-grid {
  grid-template-columns: 1fr;
}

.sc-admin-dock .field input,
.sc-admin-dock .field select,
.sc-admin-dock .field textarea,
.sc-admin-dock .portal-model-select {
  border-color: rgba(255, 253, 248, 0.14);
  background: rgba(255, 253, 248, 0.96);
  color: #1e1e1c;
}

.sc-admin-dock .table-label {
  color: rgba(255, 253, 248, 0.72);
}

.sc-admin-dock .btn,
.sc-admin-dock .small-file-btn {
  border-color: rgba(255, 253, 248, 0.14);
}

.sc-admin-editorial-item {
  grid-template-columns: 70px minmax(0, 1fr);
  padding: 10px 0 0;
  border-top: 1px solid rgba(255, 253, 248, 0.1);
}

.sc-admin-editorial-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.sc-admin-editorial-item .small-file-btn {
  grid-column: 1 / -1;
}

.sc-admin-models-editing .brand-model-card.admin-editable {
  cursor: pointer;
}

.sc-admin-models-editing .brand-model-card.admin-editable .brand-model-media {
  outline: 2px solid transparent;
  outline-offset: -2px;
  transition: outline-color 160ms ease, box-shadow 160ms ease;
}

.sc-admin-models-editing .brand-model-card.admin-editable:hover .brand-model-media,
.sc-admin-models-editing .brand-model-card.admin-selected .brand-model-media {
  outline-color: rgba(216, 184, 122, 0.96);
  box-shadow: inset 0 0 0 1px rgba(20, 20, 17, 0.2);
}

.sc-admin-models-editing .brand-model-card.admin-editable .brand-model-add {
  display: none;
}

.sc-admin-models-editing .brand-model-card.admin-editable::after {
  content: "Klik for edit";
  position: absolute;
  left: 8px;
  bottom: 54px;
  z-index: 4;
  min-height: 23px;
  display: inline-flex;
  align-items: center;
  max-width: calc(100% - 16px);
  padding: 3px 7px;
  border: 1px solid rgba(255, 253, 248, 0.22);
  border-radius: 999px;
  background: rgba(20, 20, 17, 0.66);
  color: #fffdf8;
  font-size: 10px;
  font-weight: 760;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
  backdrop-filter: blur(10px);
}

.sc-admin-models-editing .brand-model-card.admin-selected::after {
  content: "Redigerer";
  background: rgba(185, 140, 69, 0.88);
  color: #fffdf8;
}

.brand-model-admin-badge {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 54px;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  gap: 6px;
  pointer-events: none;
}

.brand-model-admin-badge span {
  min-height: 23px;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 3px 7px;
  border: 1px solid rgba(255, 253, 248, 0.22);
  border-radius: 999px;
  background: rgba(20, 20, 17, 0.66);
  color: #fffdf8;
  font-size: 10px;
  font-weight: 760;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  backdrop-filter: blur(10px);
}

.sc-admin-model-summary {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 253, 248, 0.12);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.06);
}

.sc-admin-model-summary > div:last-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.sc-admin-model-summary strong,
.sc-admin-model-summary span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sc-admin-model-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.sc-admin-model-preview > div {
  position: relative;
  min-width: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.12);
}

.sc-admin-model-preview img,
.sc-admin-model-preview em {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  object-fit: cover;
  color: rgba(255, 253, 248, 0.64);
  font-style: normal;
}

.sc-admin-model-preview span {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 2;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(20, 20, 17, 0.66);
  color: #fffdf8;
  font-size: 10px;
  font-weight: 760;
}

.sc-admin-media-picker {
  display: grid;
  gap: 9px;
}

.sc-admin-media-choice {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 8px;
  border: 1px solid rgba(255, 253, 248, 0.1);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.045);
}

.sc-admin-media-choice.is-primary,
.sc-admin-media-choice.is-hover {
  border-color: rgba(216, 184, 122, 0.52);
}

.sc-admin-media-choice .portal-media-thumb {
  border-color: rgba(255, 253, 248, 0.12);
  border-radius: 9px;
}

.sc-admin-media-choice > div:last-child {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.sc-admin-media-choice strong,
.sc-admin-media-choice span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sc-admin-media-choice span {
  min-height: 15px;
  color: rgba(255, 253, 248, 0.62);
  font-size: 11px;
}

.sc-admin-portfolio-dock {
  width: min(520px, calc(100vw - 28px));
}

.sc-admin-portfolio-dock .portal-import-summary,
.sc-admin-portfolio-dock .portal-section-editor,
.sc-admin-portfolio-dock .portal-media-row,
.sc-admin-portfolio-dock .portal-add-media {
  border-color: rgba(255, 253, 248, 0.12);
  background: rgba(255, 253, 248, 0.06);
}

.sc-admin-portfolio-dock .portal-section-editor {
  padding: 10px;
}

.sc-admin-portfolio-dock .portal-media-row,
.sc-admin-portfolio-dock .portal-tile-editor {
  grid-template-columns: 76px minmax(0, 1fr);
}

.sc-admin-portfolio-dock .portal-media-thumb {
  border-color: rgba(255, 253, 248, 0.14);
  border-radius: 10px;
}

.sc-admin-portfolio-dock .portal-section-settings,
.sc-admin-portfolio-dock .form-grid {
  grid-template-columns: 1fr;
}

.sc-admin-portfolio-dock .portal-media-list,
.sc-admin-portfolio-dock .sc-admin-portfolio-sections {
  display: grid;
  gap: 10px;
}

.sc-admin-portfolio-dock .section-title,
.sc-admin-portfolio-dock .portal-row-title strong,
.sc-admin-portfolio-dock .portal-import-summary strong {
  color: #fffdf8;
}

.sc-admin-portfolio-dock .section-sub,
.sc-admin-portfolio-dock .portal-row-title span,
.sc-admin-portfolio-dock .portal-import-summary span,
.sc-admin-portfolio-dock .meta-line {
  color: rgba(255, 253, 248, 0.62);
}

.sc-admin-portfolio-dock .portal-add-media {
  padding: 10px;
}

.sc-admin-portfolio-dock .portal-import-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 760px) {
  .sc-admin-mode-bar {
    top: 8px;
    align-items: flex-start;
    flex-direction: column;
    border-radius: 14px;
  }

  .sc-admin-mode-actions {
    width: 100%;
  }

  .sc-admin-mode-actions a,
  .sc-admin-mode-actions button {
    flex: 1;
  }

  .sc-admin-dock {
    top: auto;
    right: 8px;
    bottom: 8px;
    left: 8px;
    width: auto;
    max-height: 58vh;
  }

  .sc-admin-tile-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.sc-home-feature-tile {
  grid-column: auto;
  grid-row: auto;
}

.sc-home-feature-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(34, 29, 24, 0.66), rgba(34, 29, 24, 0.22) 62%, rgba(34, 29, 24, 0.03)),
    linear-gradient(180deg, rgba(34, 29, 24, 0.02), rgba(34, 29, 24, 0.38));
}

.sc-home-video-tile {
  grid-column: auto;
}

.sc-home-tile-3 {
  grid-column: auto;
}

.sc-home-tile-4 {
  grid-column: auto;
}

.sc-home-tile-5 {
  grid-column: auto;
}

.sc-home-tile-6 {
  grid-column: auto;
}

.sc-home-tile-7 {
  grid-column: auto;
}

.sc-home-tile-8 {
  grid-column: auto;
}

.sc-home-feature-content {
  position: absolute;
  left: clamp(26px, 3.5vw, 58px);
  right: clamp(22px, 3vw, 48px);
  bottom: clamp(28px, 5.6vw, 70px);
  z-index: 2;
  display: grid;
  gap: clamp(22px, 3vw, 34px);
  color: #fffdf8;
}

.sc-home-feature-content h1 {
  max-width: 630px;
  margin: 0;
  font-family: "Cormorant Garamond", "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: clamp(56px, 4vw, 70px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: 0;
}

.sc-home-cta {
  display: grid;
  gap: 22px;
  justify-items: start;
}

.sc-home-cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.sc-home-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border-radius: 8px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  font-weight: 760;
}

.sc-home-button-primary {
  min-height: 58px;
  padding: 0 28px 0 30px;
  background: #1e1e1c;
  color: #fffdf8;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.18);
}

.sc-home-button-secondary {
  min-height: 58px;
  padding: 0 34px;
  background: rgba(255, 253, 248, 0.92);
  color: #1e1e1c;
}

.sc-home-button:hover,
.sc-home-button:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.sc-home-button:focus-visible,
.sc-home-apply-link:focus-visible,
.sc-models-nav a:focus-visible,
.sc-mobile-menu a:focus-visible,
.sc-public-instagram:focus-visible,
.sc-editorial-card:focus-visible,
.sc-footer-links a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.sc-home-button svg,
.sc-home-apply-link svg,
.sc-editorial-card em svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sc-home-apply-link {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 253, 248, 0.86);
  color: #fffdf8;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  font-weight: 760;
}

.sc-home-dots {
  display: none;
  gap: 8px;
  align-items: center;
}

.sc-home-dots span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.48);
}

.sc-home-dots span:first-child {
  width: 22px;
  background: #fffdf8;
}

.sc-hero-play {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  color: #fffdf8;
  text-decoration: none;
}

.sc-hero-play::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(30, 30, 28, 0.3), rgba(30, 30, 28, 0.02));
}

.sc-hero-play svg {
  position: relative;
  z-index: 1;
  width: 76px;
  height: 76px;
  padding: 20px;
  border: 2px solid rgba(255, 253, 248, 0.88);
  border-radius: 999px;
  fill: #fffdf8;
  stroke: none;
  backdrop-filter: blur(3px);
}

.sc-hero-play:hover svg,
.sc-hero-play:focus-visible svg {
  background: rgba(255, 253, 248, 0.12);
}

.sc-models-logo {
  display: inline-grid;
  gap: 9px;
  color: #1e1e1c;
  text-decoration: none;
  text-transform: uppercase;
}

.sc-models-logo span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1;
  letter-spacing: 0.42em;
  white-space: nowrap;
}

.sc-models-logo small {
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.5em;
}

.sc-models-page {
  background: #ffffff;
  padding: 0;
}

.sc-models-header {
  position: relative;
  z-index: 20;
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(18px, 4vw, 64px);
  padding: 18px clamp(20px, 3vw, 48px);
  border-bottom: 1px solid rgba(221, 214, 202, 0.78);
  background: rgba(250, 247, 241, 0.94);
  backdrop-filter: blur(18px);
}

.sc-models-nav {
  display: flex;
  gap: clamp(22px, 3.8vw, 58px);
  align-items: center;
}

.sc-models-nav a {
  position: relative;
  color: #1e1e1c;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 13px;
  font-weight: 720;
}

.sc-models-nav a:not(.sc-public-instagram)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 1px;
  transform: scaleX(0);
  transform-origin: left;
  background: currentColor;
  transition: transform 180ms ease;
}

.sc-models-nav a:hover::after,
.sc-models-nav a.active::after {
  transform: scaleX(1);
}

.sc-models-page .sc-models-nav a:not(.sc-public-instagram)::after {
  display: none;
}

.sc-public-instagram {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(30, 30, 28, 0.16);
  border-radius: 999px;
}

.sc-public-instagram svg,
.sc-footer-instagram svg,
.sc-mobile-menu svg {
  width: 19px;
  height: 19px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sc-models-main {
  width: 100%;
  margin: 0;
}

.sc-public-models-catalogue {
  position: relative;
  overflow: hidden;
  padding: clamp(18px, 2.2vw, 34px) 0 clamp(56px, 6vw, 96px);
  background: #ffffff;
}

.sc-models-watermark {
  display: none;
}

.sc-public-models-filters {
  position: relative;
  z-index: 1;
  width: min(1640px, calc(100% - 112px));
  margin: 0 auto clamp(88px, 7vw, 128px);
  display: grid;
  grid-template-columns:
    minmax(105px, 0.92fr)
    minmax(86px, 0.72fr)
    minmax(125px, 1fr)
    minmax(95px, 0.78fr)
    minmax(105px, 0.82fr)
    minmax(70px, 0.58fr)
    minmax(110px, 0.78fr);
  gap: clamp(28px, 4.2vw, 92px);
  align-items: center;
}

.sc-public-filter-row {
  display: contents;
}

.sc-public-filter-row-primary {
  grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.sc-public-filter-row-secondary {
  grid-template-columns: minmax(180px, 350px) minmax(180px, 330px) minmax(220px, 350px);
  justify-content: center;
}

.sc-public-select-filter,
.sc-public-search-filter {
  position: relative;
  min-height: 28px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 0;
  color: #050505;
}

.sc-public-select-filter span,
.sc-public-search-filter input {
  min-width: 0;
  color: #050505;
  font-size: clamp(11px, 0.68vw, 13px);
  font-weight: 450;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.sc-public-select-filter select {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.sc-public-select-filter button,
.sc-public-select-filter em {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #050505;
}

.sc-public-select-filter button {
  display: none;
}

.sc-public-select-filter em {
  width: 12px;
  height: 12px;
  font-style: normal;
  pointer-events: none;
}

.sc-public-select-filter .ui-icon,
.sc-public-search-filter .ui-icon {
  width: 13px;
  height: 13px;
  display: block;
  stroke-width: 2.35;
}

.sc-public-search-filter {
  padding-left: 0;
}

.sc-public-search-filter input {
  width: 100%;
  min-height: 28px;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0;
  letter-spacing: 0;
}

.sc-public-search-filter input::placeholder {
  color: #050505;
  opacity: 1;
}

.sc-public-models-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 2vw, 38px);
  padding: 0 clamp(20px, 1.45vw, 28px);
}

.sc-public-models-grid .brand-model-card {
  contain-intrinsic-size: 540px 720px;
  isolation: isolate;
}

.sc-public-models-grid .brand-model-media {
  aspect-ratio: 4 / 5;
  background: #f7f7f7;
}

.sc-public-models-grid .brand-model-media img {
  pointer-events: none;
}

.sc-public-models-grid .brand-model-add {
  display: grid;
  top: clamp(12px, 1.4vw, 22px);
  right: clamp(12px, 1.4vw, 22px);
  bottom: auto;
  width: clamp(42px, 3.2vw, 54px);
  height: clamp(42px, 3.2vw, 54px);
  background: rgba(255, 255, 255, 0.9);
  color: #d42b2b;
  font-size: clamp(27px, 2vw, 35px);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.16);
  z-index: 10;
}

.sc-public-models-grid .brand-model-card.selected .brand-model-add {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  background: #ffffff;
  color: #d42b2b;
}

.sc-public-models-grid .brand-model-body {
  min-height: auto;
  padding: 11px 2px 0;
}

.sc-public-models-grid .brand-model-head strong {
  font-size: 13px;
  letter-spacing: 0.08em;
}

.sc-public-models-grid .brand-model-head small {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sc-public-models-more {
  display: grid;
  place-items: center;
  margin-top: clamp(34px, 4vw, 62px);
}

.sc-public-models-more button {
  min-height: 42px;
  border: 0;
  border-bottom: 1px solid #111111;
  background: transparent;
  color: #050505;
  padding: 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.sc-public-casting-drawer {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 70;
  width: min(760px, calc(100vw - 32px));
  max-height: min(82vh, 760px);
  display: grid;
  gap: 14px;
  border: 1px solid rgba(20, 20, 20, 0.16);
  background: rgba(255, 255, 255, 0.96);
  color: #050505;
  padding: 14px;
  box-shadow: 0 28px 80px rgba(20, 20, 20, 0.22);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px);
  transition: opacity 180ms ease, transform 180ms ease, width 180ms ease;
  overflow: auto;
}

.sc-public-casting-drawer.has-models,
.sc-public-casting-drawer.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.sc-public-casting-drawer.is-open {
  width: min(980px, calc(100vw - 32px));
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.sc-public-casting-summary,
.sc-public-casting-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(20, 20, 20, 0.12);
  background: rgba(255, 255, 255, 0.98);
  padding-top: 12px;
  z-index: 2;
}

.sc-public-casting-summary strong {
  display: block;
  font-size: 15px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sc-public-casting-summary span,
.sc-public-casting-empty {
  color: #66645f;
  font-size: 12px;
  line-height: 1.35;
}

.sc-public-casting-summary button {
  min-height: 36px;
  border: 1px solid #111111;
  background: #111111;
  color: #ffffff;
  padding: 8px 14px;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 680;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.sc-public-casting-selected {
  display: flex;
  align-items: center;
  gap: 7px;
}

.sc-public-casting-selected span,
.sc-public-casting-selected img,
.sc-public-casting-selected em {
  width: 38px;
  height: 38px;
  border-radius: 50%;
}

.sc-public-casting-selected span {
  display: grid;
  place-items: center;
  border: 1px solid rgba(20, 20, 20, 0.12);
  background: #f5f2ed;
  overflow: hidden;
}

.sc-public-casting-selected img {
  object-fit: cover;
}

.sc-public-casting-selected em {
  display: grid;
  place-items: center;
  color: #050505;
  font-size: 11px;
  font-style: normal;
  font-weight: 720;
}

.sc-public-casting-selected .more {
  color: #5b5650;
  font-size: 12px;
  font-weight: 700;
}

.sc-public-casting-form {
  min-height: 0;
  display: grid;
  gap: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(20, 20, 20, 0.12);
  overflow: auto;
}

.sc-public-casting-models {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.sc-public-casting-model {
  min-width: 0;
  display: grid;
  gap: 9px;
  border: 1px solid rgba(20, 20, 20, 0.12);
  background: #fbfaf7;
  padding: 10px;
}

.sc-public-casting-model > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.sc-public-casting-model img,
.sc-public-casting-model em {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.sc-public-casting-model img {
  object-fit: cover;
}

.sc-public-casting-model em {
  display: grid;
  place-items: center;
  background: #f0ece4;
  color: #050505;
  font-size: 12px;
  font-style: normal;
  font-weight: 720;
}

.sc-public-casting-model strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sc-public-casting-contact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sc-public-casting-drawer .field {
  gap: 5px;
}

.sc-public-casting-drawer .field input,
.sc-public-casting-drawer .field textarea,
.sc-public-casting-drawer .model-comment textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(20, 20, 20, 0.16);
  border-radius: 0;
  background: #ffffff;
  color: #050505;
}

.sc-public-casting-drawer .field textarea,
.sc-public-casting-drawer .model-comment textarea {
  min-height: 76px;
}

.client-email-check {
  min-width: 0;
  display: grid;
  gap: 3px;
  border: 1px solid rgba(205, 164, 97, 0.26);
  background: rgba(205, 164, 97, 0.08);
  padding: 9px 10px;
  color: #4f412d;
  font-size: 12px;
  line-height: 1.35;
}

.client-email-check strong {
  color: #111111;
  font-size: 12px;
}

.client-email-check.tone-green {
  border-color: rgba(66, 142, 90, 0.26);
  background: rgba(66, 142, 90, 0.08);
  color: #2d5939;
}

.client-email-check.compact {
  margin: 8px 0;
}

.sc-public-email-check {
  grid-column: 1 / -1;
}

@media (max-width: 760px) {
  .sc-public-models-grid .brand-model-add {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }

  .sc-public-casting-drawer,
  .sc-public-casting-drawer.is-open {
    width: calc(100vw - 20px);
    bottom: max(10px, env(safe-area-inset-bottom));
    padding: 12px;
  }

  .sc-public-casting-contact {
    grid-template-columns: 1fr;
  }

  .sc-public-casting-summary,
  .sc-public-casting-actions {
    align-items: stretch;
  }
}

.sc-portfolio-page {
  background: #fffdf8;
  color: #1e1e1c;
}

.sc-portfolio-header {
  position: relative;
  min-height: clamp(220px, 29vw, 300px);
  padding: clamp(18px, 2vw, 26px) clamp(22px, 2vw, 28px) 0;
  background: #ffffff;
}

.sc-portfolio-wordmark {
  display: block;
  color: #e7e7e7;
  text-decoration: none;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(58px, 8.6vw, 128px);
  line-height: 0.82;
  letter-spacing: 0;
  white-space: nowrap;
}

.sc-portfolio-nav {
  position: absolute;
  top: clamp(62px, 6vw, 76px);
  right: clamp(18px, 2vw, 28px);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.sc-portfolio-nav a {
  color: #050505;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-size: 14px;
  line-height: 1;
  text-transform: uppercase;
}

.sc-portfolio-nav svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sc-portfolio-main {
  background: #ffffff;
}

.sc-portfolio-intro {
  width: min(1500px, calc(100% - clamp(36px, 5.2vw, 100px)));
  margin: 0 auto;
  display: grid;
  gap: 9px;
  padding: clamp(56px, 6vw, 92px) 0 0;
}

.sc-portfolio-intro h1 {
  margin: 0;
  color: #050505;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 3vw, 34px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
}

.sc-portfolio-intro p {
  margin: 0;
  max-width: min(1120px, 100%);
  color: #050505;
  font-size: 14px;
  line-height: 1.45;
  text-transform: uppercase;
}

.sc-portfolio-siblings {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 13px;
  align-items: center;
  margin-top: 10px;
  color: #050505;
  font-size: 12px;
  line-height: 1.2;
  text-transform: uppercase;
}

.sc-portfolio-siblings span {
  color: #777777;
}

.sc-portfolio-siblings a {
  color: #050505;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sc-portfolio-gallery {
  display: grid;
  gap: clamp(54px, 7vw, 112px);
  padding: clamp(70px, 8vw, 128px) clamp(18px, 2.6vw, 50px) clamp(72px, 7vw, 108px);
}

.sc-portfolio-section {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
}

.sc-portfolio-section.is-gallery,
.sc-portfolio-section.is-natural {
  display: grid;
  gap: var(--sc-gallery-gutter, clamp(24px, 2.5vw, 32px));
}

.sc-portfolio-section.is-gallery {
  grid-template-columns: repeat(var(--sc-gallery-columns, 2), minmax(0, 1fr));
}

.sc-portfolio-section.is-natural {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sc-portfolio-section.is-fluid {
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  grid-auto-rows: 24px;
  gap: 11px;
  align-items: stretch;
}

.sc-portfolio-media {
  position: relative;
  min-width: 0;
  margin: 0;
  background: #f5f5f5;
  overflow: hidden;
}

.sc-portfolio-section.is-gallery .sc-portfolio-media {
  aspect-ratio: var(--portfolio-ratio, var(--sc-gallery-aspect, 3 / 4));
}

.sc-portfolio-section.is-fluid .sc-portfolio-media {
  height: 100%;
  min-height: 0;
}

.sc-portfolio-media img,
.sc-portfolio-media video {
  display: block;
  width: 100%;
  height: auto;
}

.sc-portfolio-section.is-gallery .sc-portfolio-media img,
.sc-portfolio-section.is-gallery .sc-portfolio-media video,
.sc-portfolio-section.is-fluid .sc-portfolio-media img,
.sc-portfolio-section.is-fluid .sc-portfolio-media video {
  height: 100%;
  object-fit: cover;
}

.sc-portfolio-video video {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: #050505;
}

.sc-portfolio-media.is-admin-media {
  cursor: grab;
}

.sc-portfolio-media.is-admin-media:active {
  cursor: grabbing;
}

.sc-portfolio-media.is-admin-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 2px solid transparent;
  pointer-events: none;
  transition: border-color 160ms ease, background 160ms ease;
}

.sc-portfolio-media.is-admin-media:hover::after,
.sc-portfolio-media.is-admin-media.selected::after {
  border-color: rgba(216, 184, 122, 0.96);
  background: rgba(216, 184, 122, 0.08);
}

.sc-admin-portfolio-control {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 20px);
  pointer-events: none;
}

.sc-admin-portfolio-control span,
.sc-admin-portfolio-control strong {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid rgba(255, 253, 248, 0.22);
  border-radius: 999px;
  background: rgba(20, 20, 17, 0.68);
  color: #fffdf8;
  font-size: 11px;
  font-weight: 760;
  backdrop-filter: blur(10px);
}

.sc-admin-portfolio-control strong {
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.sc-portfolio-media.is-admin-media:hover .sc-admin-portfolio-control strong,
.sc-portfolio-media.is-admin-media.selected .sc-admin-portfolio-control strong {
  opacity: 1;
  transform: translateY(0);
}

.sc-public-header {
  min-height: 84px;
}

.sc-public-nav {
  justify-content: flex-end;
}

.sc-public-nav a {
  white-space: nowrap;
}

.sc-mobile-menu {
  display: none;
  position: relative;
}

.sc-editorial-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  width: min(1480px, calc(100% - clamp(32px, 7vw, 120px)));
  margin: 0 auto;
  padding: clamp(28px, 3.2vw, 48px) 0 clamp(36px, 5vw, 72px);
  background: #faf7f1;
  content-visibility: auto;
  contain-intrinsic-size: 260px;
}

.sc-editorial-card {
  display: grid;
  grid-template-columns: minmax(128px, 0.46fr) minmax(0, 1fr);
  gap: clamp(18px, 2vw, 28px);
  align-items: center;
  min-height: 150px;
  padding: 0 clamp(20px, 3vw, 36px);
  color: #1e1e1c;
  text-decoration: none;
  border-left: 1px solid rgba(221, 214, 202, 0.92);
}

.sc-editorial-card:first-child {
  border-left: 0;
}

.sc-editorial-card figure {
  width: 100%;
  aspect-ratio: 1.72 / 1;
  margin: 0;
  overflow: hidden;
  border-radius: 5px;
  background: #e7dfd4;
}

.sc-editorial-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms ease;
}

.sc-editorial-card:hover img {
  transform: scale(1.035);
}

.sc-editorial-card div {
  display: grid;
  gap: 10px;
  justify-items: start;
}

.sc-editorial-card span {
  color: #70675d;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 10px;
  font-weight: 720;
}

.sc-editorial-card h2 {
  margin: 0;
  font-family: "Cormorant Garamond", "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 2.3vw, 38px);
  font-weight: 400;
  line-height: 0.98;
}

.sc-editorial-card p {
  margin: 0;
  color: #4c453d;
  font-size: 15px;
  line-height: 1.45;
}

.sc-editorial-card em {
  display: inline-flex;
  margin-top: 2px;
  color: #1e1e1c;
  font-style: normal;
}

@media (prefers-reduced-motion: reduce) {
  .sc-home-tile img,
  .sc-editorial-card img,
  .brand-model-media img,
  .sc-models-nav a::after,
  .sc-home-button {
    transition: none;
  }

  .client-model-feature {
    animation: none;
  }

  .sc-home-button:hover,
  .sc-home-button:focus-visible,
  .brand-model-open:hover .brand-model-media img,
  .brand-model-card.profile-open .brand-model-media img,
  .client-model-sibling:hover,
  .client-model-sibling:focus-visible,
  .sc-editorial-card:hover img {
    transform: none;
  }
}

.sc-content-page {
  min-height: 100vh;
  padding: 0;
  background: #faf7f1;
  color: #1e1e1c;
}

.sc-content-main {
  width: min(1160px, calc(100% - 40px));
  margin: 28px auto 0;
  display: grid;
  gap: clamp(24px, 4vw, 48px);
}

.sc-content-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.34fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: end;
  padding: clamp(28px, 5vw, 72px) 0 clamp(18px, 3vw, 36px);
  border-top: 1px solid rgba(17, 17, 17, 0.12);
}

.sc-content-hero-solo {
  grid-template-columns: minmax(0, 1fr);
}

.sc-content-hero-copy {
  display: grid;
  gap: 14px;
}

.sc-contact-main .sc-content-hero-copy {
  max-width: 920px;
}

.sc-content-hero h1 {
  margin: 0;
  max-width: 980px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(48px, 8vw, 132px);
  line-height: 0.9;
  letter-spacing: 0;
}

.sc-content-hero p {
  max-width: 760px;
  margin: 0;
  color: #343434;
  font-size: clamp(17px, 2vw, 24px);
  line-height: 1.35;
}

.sc-content-facts {
  display: grid;
  gap: 8px;
  padding-bottom: 8px;
}

.sc-content-facts span {
  display: block;
  padding: 11px 0;
  border-top: 1px solid rgba(17, 17, 17, 0.13);
  color: #2a2a2a;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.sc-content-actions,
.sc-contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.sc-content-actions a,
.sc-contact-actions a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid #111111;
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 760;
  text-transform: uppercase;
}

.sc-apply-page {
  --sc-apply-serif: "Times New Roman", Times, serif;
  --sc-apply-sans: Arial, Helvetica, sans-serif;
  background: #ffffff;
  font-family: var(--sc-apply-sans);
}

.sc-apply-main {
  min-height: calc(100svh - 84px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(460px, 1fr);
  background: #ffffff;
}

.sc-apply-portrait {
  min-height: calc(100svh - 84px);
  margin: 0;
  overflow: hidden;
  background: #e8e6e2;
}

.sc-apply-portrait img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 52% 44%;
}

.sc-apply-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: clamp(42px, 6vw, 112px) clamp(28px, 7vw, 118px);
  color: #050505;
  font-family: var(--sc-apply-sans);
  text-align: center;
}

.sc-apply-copy h1 {
  margin: 0 0 clamp(44px, 5.5vw, 72px);
  font-family: var(--sc-apply-serif);
  font-size: clamp(26px, 1.82vw, 34px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0;
}

.sc-apply-text {
  width: min(100%, 720px);
  display: grid;
  gap: 24px;
  color: #050505;
  font-family: var(--sc-apply-sans);
  font-size: clamp(14px, 0.92vw, 16px);
  font-weight: 400;
  line-height: 1.28;
}

.sc-apply-text p {
  margin: 0;
}

.sc-apply-note {
  font-style: italic;
}

.sc-apply-page .sc-content-actions {
  justify-content: center;
  margin-top: clamp(54px, 6vw, 84px);
}

.sc-apply-page .sc-content-actions a {
  min-width: 216px;
  min-height: 36px;
  padding: 0 0 10px;
  border: 0;
  border-bottom: 1px solid currentColor;
  border-radius: 0;
  background: transparent;
  color: #050505;
  font-family: var(--sc-apply-sans);
  font-size: clamp(17px, 1.1vw, 20px);
  font-weight: 400;
  letter-spacing: 0.02em;
}

.sc-apply-page .sc-models-nav a,
.sc-apply-page .sc-mobile-menu nav a {
  font-family: var(--sc-apply-sans);
}

.sc-apply-page .sc-public-footer {
  background: #ffffff;
}

.sc-content-sections {
  display: grid;
  gap: 0;
}

.sc-content-section {
  display: grid;
  grid-template-columns: minmax(120px, 0.28fr) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 64px);
  padding: clamp(24px, 4vw, 46px) 0;
  border-top: 1px solid rgba(17, 17, 17, 0.13);
}

.sc-content-section-label,
.sc-content-meta {
  color: #6c645a;
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.sc-content-section-body {
  max-width: 850px;
}

.sc-content-section-body h2 {
  margin: 0 0 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 4vw, 54px);
  line-height: 1;
  letter-spacing: 0;
}

.sc-content-section-body p {
  margin: 0;
  color: #2a2a2a;
  font-size: 17px;
  line-height: 1.62;
}

.sc-content-section-body p + p {
  margin-top: 14px;
}

.sc-legal-main .sc-content-hero h1 {
  font-size: clamp(54px, 9vw, 146px);
}

.sc-legal-section .sc-content-section-body h2 {
  font-size: clamp(24px, 3vw, 38px);
}

.sc-legal-section .sc-content-section-body p {
  font-size: 15px;
  line-height: 1.7;
}

.sc-contact-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  padding: clamp(18px, 3vw, 30px) 0 clamp(6px, 2vw, 16px);
  border-top: 1px solid rgba(17, 17, 17, 0.13);
}

.sc-contact-panel > div {
  display: grid;
  gap: 6px;
  align-content: start;
}

.sc-contact-panel span {
  color: #6c645a;
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.sc-contact-panel strong,
.sc-contact-panel a {
  color: #111111;
  font-size: 18px;
  font-weight: 760;
  text-decoration: none;
}

.sc-contact-panel small {
  color: #4b4b4b;
  font-size: 14px;
}

.sc-contact-actions {
  margin-top: 0;
}

.sc-contact-panel .sc-contact-actions a {
  min-height: 46px;
  color: #fffdf8;
  font-size: 12px;
  letter-spacing: 0.1em;
}

.sc-contact-panel .sc-contact-actions a:hover,
.sc-contact-panel .sc-contact-actions a:focus-visible {
  background: #34342f;
  border-color: #34342f;
  outline-offset: 4px;
}

.sc-login-panel {
  display: grid;
  justify-items: start;
  padding: clamp(28px, 5vw, 60px) 0;
  border-top: 1px solid rgba(17, 17, 17, 0.13);
}

.sc-login-panel form {
  width: min(440px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  gap: 10px;
  align-items: end;
}

.sc-login-panel label {
  display: grid;
  gap: 8px;
}

.sc-login-panel label span {
  color: #6c645a;
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.sc-login-panel input {
  min-height: 52px;
  width: 100%;
  border: 1px solid rgba(17, 17, 17, 0.2);
  border-radius: 999px;
  padding: 0 18px;
  background: #ffffff;
  color: #111111;
  font: inherit;
}

.sc-login-panel button {
  min-height: 52px;
  border: 1px solid #111111;
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
  font-size: 22px;
}

.sc-public-footer {
  width: min(1480px, calc(100% - clamp(32px, 7vw, 120px)));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(280px, 1.35fr) minmax(220px, 0.8fr);
  gap: clamp(28px, 5vw, 74px);
  align-items: start;
  padding: clamp(30px, 5vw, 64px) 0 clamp(34px, 5vw, 68px);
  border-top: 1px solid rgba(221, 214, 202, 0.92);
  color: #403a33;
  font-size: 13px;
  line-height: 1.45;
}

.sc-footer-brand,
.sc-footer-contact {
  display: grid;
  gap: 14px;
}

.sc-footer-brand > a {
  display: inline-grid;
  gap: 9px;
  width: fit-content;
  color: #1e1e1c;
  text-decoration: none;
  text-transform: uppercase;
}

.sc-footer-brand span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1;
  letter-spacing: 0.36em;
}

.sc-footer-brand small {
  font-size: 10px;
  letter-spacing: 0.48em;
}

.sc-footer-brand p {
  max-width: 260px;
  margin: 0;
  color: #6c645a;
}

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

.sc-footer-link-group {
  display: grid;
  align-content: start;
  gap: 12px;
}

.sc-footer-link-group > span {
  color: #847a6d;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 10px;
  font-weight: 720;
}

.sc-footer-links a,
.sc-footer-contact a {
  width: fit-content;
  color: #1e1e1c;
  text-decoration: none;
}

.sc-footer-links a {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  font-weight: 720;
}

.sc-footer-links a:hover,
.sc-footer-contact a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.sc-footer-instagram {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sc-footer-contact {
  justify-items: start;
  color: #5a5147;
}

.sc-footer-contact small {
  margin-top: 8px;
  color: #847a6d;
}

.sc-public-footer svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.public-portal-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 70px;
  padding: 14px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid rgba(38, 47, 38, 0.12);
  background: rgba(255, 253, 248, 0.9);
  backdrop-filter: blur(14px);
}

.public-portal-brand {
  display: inline-grid;
  gap: 8px;
  color: #1d241f;
  text-decoration: none;
  text-transform: uppercase;
}

.public-portal-brand span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1;
  letter-spacing: 0.42em;
  white-space: nowrap;
}

.public-portal-brand small {
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.5em;
}

.public-portal-brand em {
  margin-top: 2px;
  color: #70675d;
  font-size: 10px;
  font-style: normal;
  font-weight: 720;
  letter-spacing: 0.14em;
}

.public-portal-nav {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  color: #596259;
  font-size: 12px;
  font-weight: 650;
  text-transform: uppercase;
}

.public-portal-nav a,
.public-portal-nav span,
.parent-settings-menu summary {
  color: #376f88;
  text-decoration: none;
}

.parent-settings-menu {
  position: relative;
}

.parent-settings-menu summary {
  cursor: pointer;
  list-style: none;
  outline-offset: 4px;
}

.parent-settings-menu summary::-webkit-details-marker {
  display: none;
}

.parent-settings-menu summary::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-left: 8px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.parent-settings-menu[open] summary::after {
  transform: translateY(1px) rotate(225deg);
}

.parent-settings-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 90;
  width: min(300px, calc(100vw - 32px));
  display: grid;
  gap: 10px;
  border: 1px solid rgba(38, 47, 38, 0.12);
  border-radius: var(--radius);
  background: #fffdf8;
  box-shadow: 0 18px 48px rgba(16, 17, 15, 0.18);
  padding: 12px;
  text-transform: none;
}

.public-portal-main {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(18px, 3vw, 34px) 0 52px;
}

.public-parent .public-portal-main {
  padding-top: 10px;
}

.public-portal-page .client-portal-intro,
.public-portal-page .parent-public-copy {
  min-height: 330px;
  background: linear-gradient(135deg, rgba(55, 111, 136, 0.12), rgba(63, 121, 69, 0.08));
}

.public-portal-page .client-portal-intro h2,
.public-portal-page .parent-public-copy h2 {
  font-size: clamp(32px, 5vw, 58px);
  letter-spacing: 0;
}


select:not([multiple]) {
  appearance: none;
  padding-right: 34px !important;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 17px) 50%,
    calc(100% - 12px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

select[multiple] {
  background-image: none;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  max-width: var(--sidebar-width);
  height: 100vh;
  padding: 18px 14px;
  background: linear-gradient(180deg, #151611, #10110f);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.brand {
  display: grid;
  gap: 12px;
  width: 100%;
  min-height: 88px;
  align-content: start;
  padding: 8px 8px 12px;
  border-bottom: 1px solid var(--line);
  border-top: 0;
  border-left: 0;
  border-right: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  appearance: none;
  text-transform: uppercase;
}

.brand:hover,
.brand:focus-visible {
  background: rgba(216, 154, 61, 0.08);
  outline: 0;
}

.brand-kicker,
.eyebrow,
.table-label {
  color: var(--faint);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.brand-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  line-height: 1.05;
}

.sc-admin-wordmark {
  display: grid;
  min-width: 0;
  max-width: 100%;
}

.sc-admin-wordmark span {
  display: block;
  max-width: 100%;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  line-height: 1.25;
  letter-spacing: 0.22em;
  color: var(--text);
  overflow-wrap: normal;
  white-space: nowrap;
}

.sc-admin-wordmark.studio span {
  font-size: 14px;
  letter-spacing: 0.22em;
}

.brand .brand-kicker {
  letter-spacing: 0.16em;
  font-weight: 720;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  overflow: visible;
}

.mode-switch button,
.tabs button,
.nav-item,
.chip,
.btn {
  border-radius: var(--radius);
  border: 1px solid transparent;
}

.mode-switch button,
.tabs button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  background: transparent;
  color: var(--muted);
}

.mode-switch button.active,
.tabs button.active {
  background: var(--cream);
  color: #15130f;
  border-color: var(--cream);
}

.nav {
  display: grid;
  gap: 6px;
}

.nav-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 10px;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(216, 154, 61, 0.12);
  border-color: rgba(216, 154, 61, 0.24);
  color: var(--text);
}

.nav-count {
  justify-self: end;
  color: var(--faint);
  font-size: 11px;
}

.nav-item span:nth-child(2),
.nav-count {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-bottom {
  margin-top: auto;
  display: grid;
  padding: 12px 8px 0;
  border-top: 1px solid var(--line);
}

.saved-view {
  display: grid;
  gap: 5px;
}

.saved-view span {
  color: var(--faint);
  font-size: 11px;
  text-transform: uppercase;
}

.saved-view select {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: rgba(255, 255, 255, 0.035);
  color: var(--text);
  padding: 7px 10px;
}

.main {
  min-width: 0;
  padding: 22px clamp(16px, 2vw, 30px) 42px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  margin-bottom: 18px;
}

.mini-control {
  display: grid;
  gap: 4px;
}

.mini-control span {
  color: var(--faint);
  font-size: 10px;
  text-transform: uppercase;
}

.mini-control select,
.command-input {
  min-height: 34px;
  min-width: 130px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background-color: #151611;
  padding: 7px 10px;
}

.command-shell {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: start center;
  padding-top: 8vh;
  background: rgba(6, 7, 6, 0.66);
  backdrop-filter: blur(8px);
}

.command-panel {
  width: min(760px, calc(100vw - 28px));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  box-shadow: var(--shadow);
  padding: 14px;
}

.command-input {
  width: 100%;
  min-height: 44px;
  margin-bottom: 10px;
  font-weight: 690;
}

.command-results {
  display: grid;
  gap: 7px;
  max-height: 56vh;
  overflow: auto;
}

.command-result {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 10px;
  align-items: center;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.026);
  color: var(--text);
  padding: 10px;
  text-align: left;
}

.command-result small {
  grid-column: 2;
  color: var(--muted);
}

.notification-button {
  position: relative;
  align-self: end;
}

.notification-button span {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  margin-left: 5px;
  border-radius: 999px;
  background: var(--red);
  color: white;
  font-size: 11px;
}

.notification-center {
  position: fixed;
  right: 20px;
  top: 92px;
  z-index: 68;
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100vh - 120px);
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  box-shadow: var(--shadow);
}

.role-grid,
.template-grid,
.status-legend,
.rate-card-form {
  display: grid;
  gap: 8px;
}

.role-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.role-card,
.template-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  padding: 10px;
  text-align: left;
}

.role-card {
  display: grid;
  gap: 5px;
}

.role-card span,
.template-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.role-card.active {
  border-color: rgba(237, 228, 210, 0.6);
  background: rgba(237, 228, 210, 0.1);
}

.template-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-top: 10px;
}

.template-card {
  display: grid;
  gap: 8px;
}

.client-portal-shell {
  display: grid;
  gap: 14px;
}

.client-portal-hero {
  display: none;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.8fr);
  gap: 12px;
  align-items: stretch;
}

.client-portal-bar {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 2px;
}

.client-portal-title {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.client-portal-title strong {
  font-size: 18px;
  font-weight: 760;
}

.client-portal-title span {
  color: var(--muted);
  font-size: 12px;
}

.client-casting-toggle {
  white-space: nowrap;
}

.client-casting-toggle span {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  margin-left: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 12px;
}

.client-portal-intro,
.client-portal-brief,
.wishlist-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.026);
  box-shadow: var(--shadow);
}

.client-portal-intro {
  min-height: 236px;
  display: grid;
  align-content: end;
  gap: 14px;
  padding: 22px;
  background: rgba(122, 164, 184, 0.08);
}

.client-portal-intro h2 {
  max-width: 760px;
  margin: 0;
  font-size: 30px;
  line-height: 1.08;
  font-weight: 760;
}

.client-portal-intro p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.client-portal-brief {
  padding: 14px;
}

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

.client-portal-toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 24px 20px;
  align-items: end;
}

.client-filter-field {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.client-filter-field > span {
  color: #050505;
  font-size: 15px;
  line-height: 1.1;
  font-weight: 500;
}

.client-range-inputs {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  align-items: end;
}

.client-range-inputs em {
  color: #8b8b8b;
  font-style: normal;
  line-height: 36px;
}

.client-portal-toolbar input,
.client-portal-toolbar select,
.model-comment textarea {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  color: var(--text);
  background: #151611;
  padding: 8px 10px;
}

.client-filter-submit,
.client-filter-clear {
  min-height: 36px;
  border: 0;
  border-radius: 0;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.client-filter-submit {
  background: #050505;
  color: #ffffff;
}

.client-filter-clear {
  border: 1px solid #111111;
  background: #ffffff;
  color: #111111;
}

.client-filter-submit:hover {
  background: #2a2a2a;
}

.client-filter-clear:hover {
  background: #f1f1f1;
}

.client-portal-public .client-portal-bar {
  align-items: flex-start;
}

.client-portal-public .client-portal-title strong {
  color: #050505;
  font-size: 19px;
}

.client-portal-public .client-portal-toolbar input,
.client-portal-public .client-portal-toolbar select {
  min-height: 36px;
  border: 0;
  border-bottom: 1px solid #111111;
  border-radius: 0;
  background: #ffffff;
  color: #050505;
  padding: 6px 3px;
  font-size: 15px;
}

.client-portal-public .client-portal-toolbar input:focus,
.client-portal-public .client-portal-toolbar select:focus {
  outline: 2px solid rgba(17, 17, 17, 0.18);
  outline-offset: 2px;
}

.client-portal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
}

.client-portal-shell.casting-list-open .client-portal-layout {
  grid-template-columns: minmax(0, 1fr) 430px;
}

.client-model-feature {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 34px);
  align-items: stretch;
  margin: 0 0 24px;
  scroll-margin-top: 18px;
  border-top: 1px solid rgba(30, 30, 28, 0.16);
  border-bottom: 1px solid rgba(30, 30, 28, 0.16);
  padding: clamp(18px, 3vw, 30px) 0;
  animation: modelFeatureReveal 560ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes modelFeatureReveal {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.client-model-feature-media {
  min-height: clamp(320px, 44vw, 540px);
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #e7dfd4;
}

.client-model-feature-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 34%;
}

.client-model-feature-media span {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(30, 30, 28, 0.18);
  border-radius: 50%;
  color: #8f8578;
  font: 700 34px/1 Georgia, "Times New Roman", serif;
}

.client-model-feature-copy {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: clamp(18px, 2.4vw, 30px);
}

.client-model-feature-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.client-model-feature-top span {
  color: #70675d;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 10px;
  font-weight: 760;
}

.client-model-feature-top h3 {
  margin: 8px 0 8px;
  color: #1e1e1c;
  font-family: "Cormorant Garamond", "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: clamp(54px, 7vw, 104px);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 0;
}

.client-model-feature-top p {
  margin: 0;
  color: #4c453d;
  font-size: 16px;
  line-height: 1.45;
}

.client-model-close {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(30, 30, 28, 0.16);
  border-radius: 50%;
  background: #fffdf8;
  color: #1e1e1c;
  font-size: 22px;
  line-height: 1;
}

.client-model-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(30, 30, 28, 0.14);
  border-bottom: 1px solid rgba(30, 30, 28, 0.14);
}

.client-model-facts div {
  min-width: 0;
  padding: 14px 16px 14px 0;
  border-right: 1px solid rgba(30, 30, 28, 0.14);
}

.client-model-facts div:nth-child(3n),
.client-model-facts div:last-child {
  border-right: 0;
}

.client-model-facts span,
.client-model-facts strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-model-facts span {
  color: #81786c;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 10px;
  font-weight: 760;
}

.client-model-facts strong {
  margin-top: 5px;
  color: #1e1e1c;
  font-size: 15px;
}

.client-model-story {
  display: grid;
  gap: 8px;
  max-width: 640px;
}

.client-model-story p {
  margin: 0;
  color: #4c453d;
  font-size: 15px;
  line-height: 1.55;
}

.client-model-siblings {
  display: grid;
  gap: 9px;
}

.client-model-siblings > span {
  color: #81786c;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 10px;
  font-weight: 760;
}

.client-model-siblings > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.client-model-sibling {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(30, 30, 28, 0.16);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.78);
  color: #1e1e1c;
  padding: 6px 13px 6px 6px;
  font: inherit;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.client-model-sibling:hover,
.client-model-sibling:focus-visible {
  border-color: rgba(30, 30, 28, 0.36);
  background: #fffdf8;
  outline: none;
  transform: translateY(-1px);
}

.client-model-sibling img,
.client-model-sibling em {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  background: #e7dfd4;
}

.client-model-sibling em {
  display: grid;
  place-items: center;
  color: #81786c;
  font-size: 12px;
  font-style: normal;
  font-weight: 760;
}

.client-model-sibling strong {
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
}

.client-model-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.brand-model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px 12px;
}

.brand-model-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  display: grid;
  gap: 8px;
  content-visibility: auto;
  contain-intrinsic-size: 260px 340px;
}

.brand-model-card.selected {
  box-shadow: none;
}

.brand-model-card.profile-open .brand-model-media {
  outline: 2px solid #1e1e1c;
  outline-offset: -2px;
}

.brand-model-open {
  min-width: 0;
  display: grid;
  gap: 8px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.brand-model-open:focus-visible {
  outline: 2px solid #1e1e1c;
  outline-offset: 4px;
}

.brand-model-media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: rgba(122, 164, 184, 0.13);
}

.brand-model-open:hover .brand-model-media img.primary-image,
.brand-model-card.profile-open .brand-model-media img.primary-image {
  transform: scale(1.035);
}

.brand-model-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 220ms ease, transform 650ms ease;
}

.brand-model-media img.primary-image {
  opacity: 1;
}

.brand-model-media img.hover-image {
  opacity: 0;
  transform: scale(1.12);
}

.brand-model-open:hover .brand-model-media.has-hover-image img.primary-image,
.brand-model-card:focus-within .brand-model-media.has-hover-image img.primary-image {
  opacity: 0;
}

.brand-model-open:hover .brand-model-media.has-hover-image img.hover-image,
.brand-model-card:focus-within .brand-model-media.has-hover-image img.hover-image {
  opacity: 1;
  transform: scale(1.035);
}

.brand-model-media span {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--cream);
  background: rgba(237, 228, 210, 0.08);
  font-size: 25px;
  font-weight: 760;
}

.brand-model-add {
  position: absolute;
  right: 8px;
  bottom: 54px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 253, 248, 0.92);
  color: #171811;
  font-size: 21px;
  line-height: 1;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.96);
  transition: opacity 160ms ease, transform 160ms ease, background 150ms ease, color 150ms ease;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.brand-model-card:hover .brand-model-add,
.brand-model-card:focus-within .brand-model-add {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-2px) scale(1);
}

.brand-model-card.selected .brand-model-add {
  background: #d89a3d;
  color: #201b12;
}

.brand-model-add span {
  transform: translateY(-1px);
}

@media (hover: none) {
  .brand-model-add {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }
}

.brand-model-body {
  display: grid;
  gap: 0;
  min-height: 42px;
  padding: 0 48px 2px 2px;
}

.brand-model-head {
  display: block;
}

.brand-model-head strong {
  display: block;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 650;
  text-transform: uppercase;
}

.brand-model-head small {
  display: block;
  margin-top: 3px;
  color: #6c645a;
  font-size: 12px;
  line-height: 1.35;
}

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

.model-measures span {
  min-width: 0;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px 7px;
  color: var(--muted);
  font-size: 12px;
}

.model-comment {
  display: grid;
  gap: 6px;
}

.model-comment textarea {
  min-height: 74px;
  resize: vertical;
}

.wishlist-panel {
  position: sticky;
  top: 16px;
  padding: 12px;
}

.casting-brief-form {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.casting-model-note textarea {
  min-height: 72px;
}

.wishlist-list {
  display: grid;
  gap: 8px;
}

.wishlist-item,
.client-request-model {
  min-width: 0;
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.022);
  padding: 9px;
}

.wishlist-actions {
  margin-top: 10px;
}

.client-request-inbox {
  margin-top: 2px;
}

.client-request-card {
  align-items: start;
}

.client-request-card > .pill-row {
  max-width: 250px;
  justify-content: flex-start;
}

.client-request-models {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.client-request-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.front-request-card {
  margin: 12px 0;
  border-color: rgba(216, 154, 61, 0.28);
}

.action-needed-card {
  border-color: rgba(216, 154, 61, 0.24);
}

.front-request-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 12px;
}

.front-request-grid.single-column {
  grid-template-columns: minmax(0, 1fr);
}

.front-request-column {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
}

.front-request-column-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.front-request-column-title strong {
  color: var(--text);
  font-size: 13px;
}

.front-request-item {
  align-items: start;
}

.front-request-item.website-source {
  position: relative;
  border-color: rgba(173, 103, 94, 0.38);
  box-shadow: inset 3px 0 0 var(--red);
}

.front-request-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.front-request-title > span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.request-notification-badge,
.nav-count.urgent,
.mode-notification-badge {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border: 1px solid rgba(135, 43, 35, 0.36);
  border-radius: 999px;
  background: #ad675e;
  color: #fffdfa;
  font-size: 11px;
  font-weight: 820;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(173, 103, 94, 0.26);
}

.request-notification-badge {
  flex: 0 0 auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
}

.mode-notification-badge {
  position: absolute;
  top: -9px;
  left: -9px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  z-index: 2;
}

.front-request-models {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.front-request-actions {
  justify-content: flex-end;
}

.manual-request-form {
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.024);
}

.manual-request-form select[multiple] {
  min-height: 190px;
}

.portal-landing-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin: 10px 0 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(122, 164, 184, 0.08);
}

.portal-landing-preview code {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  color: #c2dfe9;
  font-size: 12px;
}

.portal-card-url {
  display: block;
  margin-top: 7px;
  color: #c2dfe9;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.portal-preview-launcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
  margin-bottom: 12px;
}

.portal-preview-card {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.024);
  padding: 12px;
}

.portal-preview-card.active {
  border-color: rgba(216, 154, 61, 0.62);
  background: rgba(216, 154, 61, 0.08);
}

.portal-preview-card select {
  min-width: 170px;
  min-height: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  color: var(--text);
  background: #151611;
  padding: 8px 10px;
}

.portal-preview-card > .btn {
  grid-column: 2;
  justify-self: end;
}

.portal-preview-stage {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #0f100d;
  box-shadow: var(--shadow);
}

.portal-preview-bar {
  min-height: 44px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
}

.portal-window-dots {
  display: flex;
  gap: 6px;
}

.portal-window-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(237, 228, 210, 0.35);
}

.portal-url {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.18);
  color: var(--muted);
  padding: 7px 10px;
  font-size: 12px;
}

.portal-browser-frame {
  padding: 14px;
  background: linear-gradient(180deg, rgba(247, 242, 231, 0.04), rgba(122, 164, 184, 0.035));
}

.portal-editor-shell {
  display: grid;
  gap: 12px;
}

.portal-editor-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.7fr) auto;
  gap: 16px;
  align-items: center;
}

.portal-editor-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.portal-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.9fr);
  gap: 12px;
  align-items: start;
}

.portal-editor-grid.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.portal-editor-panel,
.portal-editor-section,
.portal-tile-list,
.portal-section-list,
.portal-media-list,
.portal-editor-cards {
  display: grid;
  gap: 12px;
}

.portal-editor-section {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.mini-title {
  font-size: 14px;
}

.portal-tile-editor,
.portal-media-row,
.portal-section-editor,
.portal-editor-card,
.portal-model-card-studio,
.portal-import-summary,
.portal-add-media {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.024);
  padding: 10px;
}

.portal-tile-editor,
.portal-media-row,
.portal-model-card-studio {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.portal-editor-card {
  display: grid;
  gap: 10px;
}

.portal-section-editor {
  display: grid;
  gap: 10px;
}

.portal-section-settings {
  grid-template-columns: minmax(180px, 1.2fr) minmax(120px, 0.75fr) minmax(100px, 0.55fr) minmax(130px, 0.7fr);
}

.portal-media-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(122, 164, 184, 0.12);
  color: var(--muted);
  font-weight: 760;
}

.portal-media-thumb img,
.portal-media-thumb video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.portal-media-thumb.is-video::after {
  content: "Video";
  position: absolute;
  left: 8px;
  bottom: 8px;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(5, 5, 5, 0.68);
  color: #fffdf8;
  font-size: 11px;
  font-weight: 700;
}

.portal-tile-fields,
.portal-media-row-body {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.portal-row-title {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.portal-row-title strong,
.portal-row-title span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-row-title span {
  color: var(--muted);
  font-size: 12px;
}

.portal-row-actions {
  align-items: center;
}

.small-file-btn {
  min-height: 30px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.small-file-btn:hover {
  border-color: var(--line-strong);
  background: var(--surface-3);
}

.small-file-btn.is-disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.small-file-btn.is-disabled input {
  pointer-events: none;
}

.model-documents-panel {
  display: grid;
  gap: 12px;
}

.model-document-upload {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.model-document-upload > span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.model-document-list {
  display: grid;
  gap: 8px;
}

.model-document-row {
  align-items: center;
  gap: 12px;
}

.model-document-row > div:first-child {
  min-width: 0;
}

.model-document-row .pill-row {
  flex-shrink: 0;
}

.portal-model-select {
  min-width: min(260px, 100%);
  min-height: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #151611;
  color: var(--text);
  padding: 8px 10px;
}

.portal-card-preview {
  min-width: 0;
}

.portal-preview-model-card {
  content-visibility: visible;
  contain-intrinsic-size: auto;
}

.portal-preview-model-card .brand-model-add {
  display: none;
}

.portal-import-summary {
  display: grid;
  gap: 10px;
}

.portal-import-summary strong,
.portal-import-summary span {
  display: block;
}

.portal-import-summary span {
  color: var(--muted);
  font-size: 13px;
}

.portal-import-strip {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
}

.portal-import-strip > span {
  min-width: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: rgba(122, 164, 184, 0.12);
}

.portal-import-strip img,
.portal-import-strip video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portal-live-shell {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf8;
  color: #1e1e1c;
  box-shadow: 0 18px 48px rgba(42, 37, 28, 0.08);
}

.portal-live-topbar {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(30, 30, 28, 0.08);
  background: rgba(255, 253, 248, 0.94);
  font-size: 11px;
  font-weight: 780;
  text-transform: uppercase;
}

.portal-live-topbar nav {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  color: rgba(30, 30, 28, 0.58);
  font-size: 10px;
}

.portal-live-mosaic {
  min-height: clamp(360px, 48vw, 620px);
  display: grid;
  grid-template-columns: 2fr repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(130px, 1fr);
  gap: 2px;
  background: #eee7dc;
}

.portal-live-tile,
.portal-live-media {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: stretch;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #e8e1d6;
  color: inherit;
  cursor: grab;
  text-align: left;
}

.portal-live-tile:active,
.portal-live-media:active {
  cursor: grabbing;
}

.portal-live-tile:hover,
.portal-live-media:hover {
  outline: 2px solid rgba(185, 140, 69, 0.62);
  outline-offset: -2px;
}

.portal-live-tile.selected,
.portal-live-media.selected {
  outline: 3px solid var(--accent-strong);
  outline-offset: -3px;
}

.portal-live-tile img,
.portal-live-tile video,
.portal-live-media img,
.portal-live-media video,
.portal-live-card img,
.portal-live-card video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: inherit;
}

.portal-live-tile > span:not(.portal-live-handle):not(.portal-live-meta),
.portal-live-media > span:not(.portal-live-handle),
.portal-live-card > span {
  width: 100%;
  height: 100%;
  display: block;
}

.portal-live-tile > span:not(.portal-live-handle):not(.portal-live-meta),
.portal-live-media > span:not(.portal-live-handle) {
  display: grid;
  place-items: center;
  color: rgba(30, 30, 28, 0.46);
  font-weight: 750;
}

.portal-live-tile.is-feature {
  grid-column: span 2;
  grid-row: span 2;
}

.portal-live-tile.is-wide,
.portal-live-tile.is-full {
  grid-column: span 2;
}

.portal-live-tile.is-tall {
  grid-row: span 2;
}

.portal-live-tile strong {
  position: absolute;
  left: clamp(16px, 4vw, 46px);
  bottom: clamp(18px, 4vw, 46px);
  max-width: min(78%, 440px);
  color: #fffdf8;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 4.8vw, 76px);
  font-weight: 500;
  line-height: 0.96;
  letter-spacing: 0;
  text-shadow: 0 12px 36px rgba(0, 0, 0, 0.38);
  pointer-events: none;
}

.portal-live-handle,
.portal-live-meta {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid rgba(255, 253, 248, 0.28);
  background: rgba(20, 20, 17, 0.62);
  color: #fffdf8;
  backdrop-filter: blur(10px);
}

.portal-live-handle {
  top: 8px;
  left: 8px;
  justify-content: center;
  min-width: 24px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.portal-live-meta {
  right: 8px;
  bottom: 8px;
  max-width: calc(100% - 16px);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 720;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-live-editorial {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border-top: 1px solid rgba(30, 30, 28, 0.08);
  background: rgba(30, 30, 28, 0.08);
}

.portal-live-card {
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(130px, 210px) auto auto;
  gap: 7px;
  padding: 12px;
  border: 0;
  border-radius: 0;
  background: #fffdf8;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.portal-live-card > span {
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #eee7dc;
}

.portal-live-card strong,
.portal-live-card em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-live-card strong {
  font-size: 15px;
}

.portal-live-card em {
  color: rgba(30, 30, 28, 0.58);
  font-size: 11px;
  font-style: normal;
  text-transform: uppercase;
}

.portal-live-portfolio {
  min-width: 0;
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf8;
  color: #1e1e1c;
}

.empty-live-portfolio {
  color: rgba(30, 30, 28, 0.68);
}

.empty-live-portfolio strong {
  color: #1e1e1c;
}

.portal-live-section {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.portal-live-section-head {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 0;
}

.portal-live-section-head strong,
.portal-live-section-head span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-live-section-head span {
  color: rgba(30, 30, 28, 0.56);
  font-size: 12px;
}

.portal-live-media-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(var(--portal-live-columns, 2), minmax(0, 1fr));
  gap: 2px;
  background: #eee7dc;
}

.portal-live-media {
  aspect-ratio: 4 / 5;
}

.portal-live-media.placement-wide {
  grid-column: span 2;
  aspect-ratio: 16 / 9;
}

.portal-live-media.placement-tall {
  aspect-ratio: 3 / 5;
}

.portal-live-media.placement-full {
  grid-column: 1 / -1;
  aspect-ratio: 21 / 9;
}

.portal-context-menu {
  position: fixed;
  z-index: 10000;
  width: min(230px, calc(100vw - 20px));
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid rgba(222, 215, 201, 0.98);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.98);
  color: #1e1e1c;
  box-shadow: 0 18px 52px rgba(20, 20, 17, 0.22);
}

.portal-context-menu strong {
  padding: 4px 7px 6px;
  font-size: 12px;
}

.portal-context-menu button {
  width: 100%;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 6px 8px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.portal-context-menu button:hover {
  background: var(--surface-3);
}

.portal-context-menu button.danger {
  color: var(--red);
}

@media (max-width: 980px) {
  .portal-live-mosaic {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-height: 520px;
  }

  .portal-live-editorial {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .portal-live-topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px;
  }

  .portal-live-topbar nav {
    justify-content: flex-start;
  }

  .portal-live-mosaic,
  .portal-live-media-grid {
    grid-template-columns: 1fr !important;
  }

  .portal-live-tile,
  .portal-live-media {
    grid-column: auto !important;
    grid-row: auto !important;
    min-height: 230px;
  }

  .portal-live-tile.is-feature {
    min-height: 340px;
  }

  .portal-live-media.placement-full,
  .portal-live-media.placement-wide,
  .portal-live-media.placement-tall {
    aspect-ratio: 4 / 5;
  }
}

.client-portal-public .client-portal-intro {
  background: linear-gradient(135deg, rgba(122, 164, 184, 0.16), rgba(113, 168, 107, 0.08));
}

.parent-public-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: 12px;
  align-items: start;
}

.parent-public-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 300px);
  gap: 12px;
  align-items: start;
}

.parent-public-copy {
  min-width: 0;
}

.parent-public-left-flow {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  gap: 12px;
  min-width: 0;
  align-content: start;
}

.parent-public-right-flow {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  gap: 12px;
  min-width: 0;
  align-content: start;
}

.parent-public-visual {
  min-width: 0;
  display: grid;
  gap: 10px;
  align-content: start;
}

.parent-public-right-flow .parent-public-visual {
  width: 100%;
  justify-self: stretch;
}

.parent-public-right-flow .parent-public-side {
  position: static;
  width: 100%;
  box-sizing: border-box;
}

.parent-public-copy,
.parent-public-photo,
.parent-profile-edit,
.parent-public-side,
.parent-side-block {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.026);
  box-shadow: var(--shadow);
}

.parent-public-copy {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  align-content: start;
  gap: 10px;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.public-portal-page.public-parent .parent-public-copy {
  min-height: 0;
}

.parent-public-copy-main {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 2px 4px 4px;
}

.parent-portal-settings {
  align-self: end;
  display: grid;
  gap: 8px;
  min-width: 0;
}

.parent-public-copy h2 {
  margin: 0;
  font-size: clamp(30px, 3.3vw, 42px);
  line-height: 1.05;
}

.public-portal-page.public-parent .parent-public-copy h2 {
  font-size: clamp(30px, 3.3vw, 42px);
}

.parent-public-copy p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

.parent-public-top-row {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(300px, 1fr);
  gap: 12px;
  align-items: stretch;
  min-width: 0;
}

.parent-public-top-row .parent-contact-card {
  align-self: stretch;
}

.parent-public-top-row .parent-child-section {
  position: relative;
  align-self: stretch;
  align-content: end;
  gap: 7px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.parent-public-top-row .parent-child-section .section-head {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.parent-public-top-row .parent-child-switcher {
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 6px;
  align-items: end;
}

.public-portal-page.public-parent .parent-public-top-row .parent-child-card {
  position: relative;
  grid-template-columns: 1fr;
  justify-items: center;
  align-content: end;
  gap: 5px;
  min-height: 80px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 5px 5px 7px;
  text-align: center;
}

.public-portal-page.public-parent .parent-public-top-row .parent-child-card:hover,
.public-portal-page.public-parent .parent-public-top-row .parent-child-card.active {
  border-bottom-color: rgba(216, 154, 61, 0.72);
  background: rgba(216, 154, 61, 0.08);
}

.public-portal-page.public-parent .parent-public-top-row .parent-child-card.needs-update::after {
  content: "";
  position: absolute;
  top: 9px;
  right: calc(50% - 25px);
  width: 8px;
  height: 8px;
  border: 2px solid #fffdf8;
  border-radius: 50%;
  background: #a64840;
}

.public-portal-page.public-parent .parent-public-top-row .parent-child-card img,
.public-portal-page.public-parent .parent-public-top-row .parent-child-avatar {
  grid-row: auto;
  width: 50px;
  height: 50px;
}

.public-portal-page.public-parent .parent-public-top-row .parent-child-copy {
  width: 100%;
  justify-items: center;
  gap: 0;
}

.public-portal-page.public-parent .parent-public-top-row .parent-child-card strong {
  max-width: 100%;
  font-size: 12px;
  line-height: 1.12;
  white-space: normal;
  overflow-wrap: anywhere;
}

.public-portal-page.public-parent .parent-public-top-row .parent-child-card small,
.public-portal-page.public-parent .parent-public-top-row .parent-child-status {
  display: none;
}

.public-portal-page.public-parent .parent-public-top-row .parent-child-add {
  border-bottom-color: transparent;
  color: #70675d;
  opacity: 0.66;
}

.public-portal-page.public-parent .parent-public-top-row .parent-child-add:hover,
.public-portal-page.public-parent .parent-public-top-row .parent-child-add.active {
  border-bottom-color: transparent;
  background: transparent;
  color: #4f574f;
  opacity: 0.9;
}

.public-portal-page.public-parent .parent-public-top-row .parent-child-add-icon {
  width: auto;
  height: 34px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #9a9187;
  font-size: 25px;
}

@media (max-width: 980px) {
  .parent-public-top-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .public-portal-header {
    gap: 10px;
    padding-right: calc(10px + env(safe-area-inset-right));
    padding-left: calc(10px + env(safe-area-inset-left));
  }

  .public-portal-brand {
    min-width: 0;
  }

  .public-portal-brand span {
    font-size: 14px;
    letter-spacing: 0.28em;
  }

  .public-portal-brand small {
    letter-spacing: 0.42em;
  }

  .public-portal-nav {
    min-width: 0;
    gap: 10px;
    font-size: 11px;
  }

  .parent-settings-menu summary {
    max-width: 106px;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
    white-space: nowrap;
  }

  .parent-public-top-row .parent-child-switcher {
    grid-template-columns: repeat(auto-fit, minmax(66px, 1fr));
    gap: 5px;
  }

  .public-portal-page.public-parent .parent-public-top-row .parent-child-card {
    min-height: 72px;
    padding: 4px 3px 6px;
  }

  .public-portal-page.public-parent .parent-public-top-row .parent-child-card img,
  .public-portal-page.public-parent .parent-public-top-row .parent-child-avatar {
    width: 44px;
    height: 44px;
  }

  .public-portal-page.public-parent .parent-public-top-row .parent-child-add-icon {
    width: 36px;
    height: 36px;
    font-size: 22px;
  }

  .public-portal-page.public-parent .parent-public-top-row .parent-child-card strong {
    font-size: 11px;
  }
}

.parent-active-profile {
  align-self: stretch;
  display: grid;
  align-content: center;
  gap: 4px;
  border: 1px solid rgba(216, 154, 61, 0.36);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(216, 154, 61, 0.18), rgba(122, 164, 184, 0.12));
  padding: 13px 14px;
  color: var(--text);
  text-align: left;
}

.parent-active-profile span,
.parent-active-profile small {
  color: var(--muted);
  font-size: 12px;
}

.parent-active-profile span {
  text-transform: uppercase;
  font-weight: 780;
}

.parent-active-profile strong {
  color: var(--text);
  font-size: 24px;
  line-height: 1.05;
}

.parent-active-profile em {
  width: fit-content;
  margin-top: 5px;
  border: 1px solid rgba(63, 121, 69, 0.28);
  border-radius: 999px;
  background: rgba(63, 121, 69, 0.1);
  color: #3f7945;
  padding: 4px 8px;
  font-size: 11px;
  font-style: normal;
  font-weight: 820;
  text-transform: uppercase;
}

.parent-active-profile.needs-update {
  border-color: rgba(166, 72, 64, 0.38);
  background: linear-gradient(135deg, rgba(166, 72, 64, 0.12), rgba(216, 154, 61, 0.1));
}

.parent-active-profile.needs-update em {
  border-color: rgba(166, 72, 64, 0.3);
  background: rgba(166, 72, 64, 0.09);
  color: #a64840;
}

.parent-language-setting {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.parent-language-setting span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
  text-transform: uppercase;
}

.parent-language-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(38, 47, 38, 0.1);
  border-radius: 12px;
  background: rgba(55, 111, 136, 0.055);
}

.parent-language-switch button {
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent;
  color: #376f88;
  padding: 8px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.parent-language-switch button:hover,
.parent-language-switch button:focus-visible {
  border-color: rgba(55, 111, 136, 0.36);
  background: rgba(55, 111, 136, 0.08);
}

.parent-language-switch button.active {
  border-color: rgba(216, 154, 61, 0.5);
  background: linear-gradient(135deg, rgba(216, 154, 61, 0.2), rgba(255, 253, 248, 0.92));
  color: #1e1e1c;
  box-shadow: 0 8px 22px rgba(30, 30, 28, 0.08);
}

.parent-contact-card {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 9px 12px;
}

.parent-contact-topline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.parent-contact-heading {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.parent-contact-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.parent-contact-summary span {
  min-width: 0;
  max-width: min(360px, 100%);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.parent-contact-toggle {
  justify-self: end;
}

.parent-contact-close {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
}

.parent-contact-card.is-open .parent-contact-heading {
  padding-right: 46px;
}

.parent-contact-card.is-open .parent-contact-close {
  position: absolute;
  top: 12px;
  right: 12px;
}

.parent-contact-form {
  align-items: end;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.parent-contact-actions {
  justify-content: flex-end;
  margin-top: 2px;
}

.parent-add-child {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.parent-add-child-form {
  align-items: end;
}

.parent-request-item {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.parent-address-popup {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(29, 36, 31, 0.28);
  backdrop-filter: blur(8px);
}

.parent-address-panel {
  width: min(620px, 100%);
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf8;
  box-shadow: var(--shadow);
  padding: 16px;
}

.parent-address-new {
  border: 1px solid rgba(216, 154, 61, 0.32);
  border-radius: var(--radius);
  background: rgba(216, 154, 61, 0.1);
  padding: 10px;
  font-weight: 760;
}

.parent-address-list {
  display: grid;
  gap: 8px;
}

.parent-address-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) minmax(210px, auto);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
}

.parent-address-row img,
.parent-address-row > span {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(122, 164, 184, 0.13);
}

.parent-address-row > span {
  display: grid;
  place-items: center;
  font-weight: 760;
}

.parent-address-row div {
  min-width: 0;
}

.parent-address-row small {
  display: block;
  color: var(--muted);
}

.parent-address-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.parent-address-choice button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffdf8;
  color: var(--muted);
  padding: 7px 9px;
  font-size: 12px;
  font-weight: 760;
}

.parent-address-choice button.active {
  border-color: rgba(216, 154, 61, 0.54);
  background: rgba(216, 154, 61, 0.16);
  color: var(--amber);
}

.parent-address-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.parent-public-photo {
  align-self: start;
  overflow: hidden;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 3 / 4;
  height: auto;
  min-height: 0;
  max-height: none;
  background: rgba(122, 164, 184, 0.11);
}

.parent-public-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.parent-public-photo span {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--cream);
  font-size: 30px;
  font-weight: 760;
  background: rgba(237, 228, 210, 0.08);
}

.parent-public-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 12px;
  align-items: start;
}

.parent-main-column,
.parent-calendar-list {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.parent-child-section {
  display: grid;
  gap: 9px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.026);
  box-shadow: var(--shadow);
  padding: 10px;
}

.parent-child-switcher {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.parent-child-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.58);
  color: var(--text);
  padding: 8px;
  text-align: left;
}

.parent-child-card:hover,
.parent-child-card.active,
.parent-child-mini.active {
  border-color: rgba(216, 154, 61, 0.62);
  background: linear-gradient(135deg, rgba(216, 154, 61, 0.16), rgba(122, 164, 184, 0.08));
}

.parent-child-card img,
.parent-child-avatar {
  grid-row: span 2;
  display: block;
  width: 58px;
  height: 58px;
  aspect-ratio: 1;
  border-radius: 50%;
  clip-path: circle(50%);
  object-fit: cover;
  background: rgba(122, 164, 184, 0.13);
}

.parent-child-avatar {
  display: grid;
  place-items: center;
  color: var(--cream);
  font-weight: 760;
}

.parent-child-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.parent-child-card strong,
.parent-child-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.parent-child-card strong {
  font-size: 15px;
  line-height: 1.15;
  white-space: nowrap;
}

.parent-child-card small {
  color: var(--muted);
  white-space: normal;
  line-height: 1.35;
}

.parent-child-status {
  grid-column: 2;
  justify-self: start;
  border-radius: 999px;
  border: 1px solid rgba(216, 154, 61, 0.34);
  background: rgba(216, 154, 61, 0.14);
  color: var(--amber);
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 760;
  text-transform: uppercase;
}

.parent-child-card:not(.active) .parent-child-status {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--faint);
}

.parent-child-card.pending {
  cursor: default;
  opacity: 0.58;
  filter: grayscale(0.75);
  background: rgba(255, 255, 255, 0.035);
}

.parent-child-card.pending .parent-child-status {
  border-color: rgba(102, 112, 104, 0.28);
  background: rgba(102, 112, 104, 0.12);
  color: var(--muted);
}

.parent-child-card.needs-update .parent-child-status {
  border-color: rgba(166, 72, 64, 0.28);
  background: rgba(166, 72, 64, 0.08);
  color: #a64840;
}

.parent-child-card.needs-update:not(.active) {
  border-color: rgba(166, 72, 64, 0.22);
}

.parent-child-add {
  border-style: dashed;
  color: var(--text);
}

.parent-child-add:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.parent-child-add-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid rgba(216, 154, 61, 0.42);
  background: rgba(216, 154, 61, 0.12);
  color: var(--amber);
  font-size: 28px;
  font-weight: 760;
  line-height: 1;
}

.modal-backdrop.parent-child-request-backdrop {
  z-index: 92;
  background: rgba(30, 30, 28, 0.28);
  backdrop-filter: blur(8px);
}

.modal-dialog.parent-child-request-panel {
  width: min(430px, calc(100vw - 28px));
  display: grid;
  gap: 12px;
  border: 1px solid rgba(221, 214, 202, 0.96);
  border-radius: 12px;
  background: #fffdf8;
  color: #1e1e1c;
  padding: 14px;
  box-shadow: 0 26px 90px rgba(30, 30, 28, 0.22);
}

.parent-child-request-panel .section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  margin-bottom: 0;
  flex-wrap: nowrap;
}

.parent-child-request-close {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
}

.parent-child-request-select select {
  min-height: 184px;
  overflow-y: auto;
  padding: 6px;
  background-image: none;
}

.parent-child-request-select option {
  padding: 9px 8px;
  border-radius: 8px;
}

.parent-child-request-actions {
  justify-content: flex-end;
}

.parent-child-mini {
  width: 100%;
  color: var(--text);
  text-align: left;
}

.parent-profile-edit {
  padding: 14px;
}

.parent-profile-card {
  display: grid;
  gap: 12px;
}

.parent-profile-modal-backdrop {
  z-index: 95;
  background: rgba(30, 30, 28, 0.34);
  backdrop-filter: blur(10px);
}

.parent-profile-dialog {
  width: min(760px, calc(100% - 28px));
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  display: grid;
  gap: 14px;
  border: 1px solid rgba(221, 214, 202, 0.96);
  border-radius: 12px;
  background: #fffdf8;
  color: #1e1e1c;
  padding: clamp(16px, 2.8vw, 24px);
  box-shadow: 0 26px 90px rgba(30, 30, 28, 0.22);
}

.parent-profile-dialog .section-title {
  color: #1e1e1c;
}

.parent-profile-dialog .section-sub,
.parent-profile-dialog .table-label {
  color: #70675d;
}

.parent-profile-dialog-actions {
  margin-top: 0;
}

.parent-profile-card.compact-mode {
  padding: 12px;
}

.parent-profile-status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.parent-profile-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid rgba(63, 121, 69, 0.28);
  border-radius: 999px;
  background: rgba(63, 121, 69, 0.09);
  color: #3f7945;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 820;
}

.parent-profile-status.needs-update {
  border-color: rgba(166, 72, 64, 0.3);
  background: rgba(166, 72, 64, 0.08);
  color: #a64840;
}

.parent-profile-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.parent-profile-summary-grid div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.46);
  padding: 8px 9px;
}

.parent-profile-summary-grid div.needs-update {
  border-color: rgba(166, 72, 64, 0.24);
  background: rgba(166, 72, 64, 0.055);
}

.parent-profile-summary-grid span,
.parent-profile-summary-grid strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.parent-profile-summary-grid span {
  color: var(--faint);
  font-size: 10px;
  font-weight: 760;
  text-transform: uppercase;
}

.parent-profile-summary-grid strong {
  margin-top: 4px;
  color: var(--text);
  font-size: 14px;
}

.parent-public-visual .parent-profile-card.compact-mode {
  padding: 11px;
}

.parent-public-visual .parent-profile-card .section-head {
  align-items: start;
  gap: 8px;
}

.parent-public-visual .parent-profile-status-actions {
  justify-content: flex-start;
}

.parent-public-visual .parent-profile-summary-grid {
  grid-template-columns: 1fr;
}

.parent-public-visual .parent-profile-summary-grid strong {
  white-space: normal;
}

.parent-profile-issue-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.parent-profile-issue-strip span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(216, 154, 61, 0.32);
  border-radius: 999px;
  background: rgba(216, 154, 61, 0.1);
  color: var(--text);
  padding: 5px 8px;
  font-size: 12px;
}

.parent-profile-issue-strip span.critical {
  border-color: rgba(166, 72, 64, 0.28);
  background: rgba(166, 72, 64, 0.08);
}

.parent-profile-issue-strip span.ready {
  border-color: rgba(63, 121, 69, 0.24);
  background: rgba(63, 121, 69, 0.08);
}

.parent-profile-issue-strip strong {
  font-weight: 840;
}

.parent-priority-panel,
.parent-model-calendar {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.026);
  box-shadow: var(--shadow);
}

.parent-priority-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-color: rgba(216, 154, 61, 0.36);
  background: linear-gradient(135deg, rgba(216, 154, 61, 0.13), rgba(63, 121, 69, 0.06));
}

.parent-priority-list {
  display: grid;
  gap: 10px;
}

.parent-model-calendar {
  display: grid;
  gap: 12px;
}

.parent-calendar-timeline {
  display: grid;
  gap: 8px;
}

.parent-calendar-row {
  display: grid;
  grid-template-columns: minmax(110px, 150px) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.5);
  padding: 9px;
}

.parent-calendar-row time,
.parent-calendar-row div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.parent-calendar-row time {
  color: var(--text);
  font-weight: 760;
}

.parent-calendar-row time span,
.parent-calendar-row div span {
  color: var(--muted);
  font-size: 12px;
}

.parent-photo-booking {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 390px);
  gap: 12px;
  align-items: end;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.parent-photo-booking strong,
.parent-photo-booking span {
  display: block;
}

.parent-photo-booking span {
  color: var(--muted);
  font-size: 12px;
}

.parent-photo-slot-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.parent-calendar-edit {
  display: grid;
  gap: 12px;
}

.parent-calendar-card,
.parent-availability-add,
.transport-estimate {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.022);
}

.parent-calendar-card,
.parent-availability-add {
  display: grid;
  gap: 12px;
  padding: 11px;
}

.parent-job-card {
  gap: 10px;
  padding: 10px;
}

.parent-job-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.parent-job-brand {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.parent-job-brand strong {
  color: var(--text);
  font-size: 20px;
  line-height: 1.08;
}

.parent-job-brand small {
  color: var(--muted);
  font-size: 12px;
}

.parent-job-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.parent-job-facts div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.028);
  padding: 8px 9px;
}

.parent-job-facts span,
.parent-transport-summary span,
.parent-transport-summary small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.parent-job-facts strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.25;
}

.parent-job-compact-grid {
  display: grid;
  gap: 8px;
}

.parent-job-compact-grid.has-transport {
  grid-template-columns: minmax(0, 1.08fr) minmax(220px, 0.92fr);
  align-items: stretch;
}

.parent-job-earnings,
.parent-booking-earnings {
  min-width: 0;
  border: 1px solid rgba(216, 154, 61, 0.34);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(216, 154, 61, 0.13), rgba(113, 168, 107, 0.08));
}

.parent-job-earnings {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px 9px;
}

.parent-job-earnings div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.parent-job-earnings span,
.parent-job-earnings small,
.parent-booking-earnings span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.parent-job-earnings strong {
  color: var(--text);
  font-size: clamp(22px, 2.5vw, 28px);
  line-height: 1;
}

.parent-job-earnings small {
  letter-spacing: 0;
  text-transform: none;
  font-weight: 520;
}

.parent-booking-earnings {
  display: grid;
  gap: 2px;
  padding: 8px;
}

.parent-booking-earnings strong {
  color: var(--text);
  font-size: 18px;
}

.parent-transport-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  border: 1px solid rgba(63, 121, 69, 0.28);
  border-radius: var(--radius);
  background: rgba(63, 121, 69, 0.08);
  padding: 8px 9px;
}

.parent-transport-summary div {
  min-width: 0;
}

.parent-transport-summary strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  line-height: 1.2;
}

.parent-job-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.parent-job-btn {
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: #fffdf8;
  padding: 10px 12px;
  font-size: 15px;
  font-weight: 800;
  text-align: center;
  line-height: 1.15;
}

.parent-job-btn.accept {
  background: #3f7945;
}

.parent-job-btn.decline {
  background: #a64840;
}

.parent-job-btn.active {
  box-shadow: 0 0 0 3px rgba(216, 154, 61, 0.18);
}

.parent-job-secondary {
  display: flex;
  justify-content: flex-end;
}

.transport-estimate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px;
}

.transport-estimate div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.transport-estimate span:not(.pill) {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.parent-public-form {
  margin-top: 12px;
}

.parent-public-side {
  display: grid;
  gap: 10px;
  padding: 12px;
  position: sticky;
  top: 16px;
}

.parent-side-block {
  display: grid;
  gap: 10px;
  padding: 11px;
  box-shadow: none;
}

.parent-booking-list {
  display: grid;
  gap: 8px;
}

.parent-booking-list.compact {
  gap: 6px;
}

.parent-booking-item {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px;
  background: rgba(255, 255, 255, 0.022);
}

.parent-booking-item span:not(.pill) {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.parent-booking-item small {
  color: var(--faint);
  font-size: 11px;
  line-height: 1.35;
}

.parent-consent-block {
  order: 20;
  opacity: 0.86;
}

.parent-consent-list {
  display: grid;
  gap: 8px;
}

.parent-consent-list .check-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.parent-consent-list .check-item div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.parent-consent-list .check-item strong {
  font-size: 14px;
}

.parent-consent-list .check-item small {
  color: var(--muted);
  font-size: 11px;
}

.public-time-row {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 10px;
  padding: 10px;
}

.public-time-row > div {
  min-width: 0;
}

.public-time-row .item-title {
  font-size: 15px;
  line-height: 1.2;
  overflow-wrap: normal;
}

.public-time-row .meta-line {
  margin-top: 3px;
  white-space: normal;
}

.public-time-row .parent-time-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  justify-content: stretch;
}

.public-time-row .parent-time-actions .btn {
  width: 100%;
  min-width: 0;
  justify-content: center;
  white-space: nowrap;
}

.parent-time-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.parent-time-inputs label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
}

.parent-time-inputs input {
  width: 100%;
  min-height: 34px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  color: var(--text);
  background: #151611;
  padding: 7px 9px;
}

.status-legend {
  grid-template-columns: repeat(auto-fit, minmax(98px, max-content));
  margin-top: 12px;
}

.rate-card-form {
  grid-template-columns: minmax(120px, 1fr) 100px 110px auto;
  margin: 10px 0 12px;
}

.rate-card-form input,
.rate-card-form select {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: #151611;
  padding: 7px 10px;
}

.call-sheet-preview {
  background: rgba(237, 228, 210, 0.045);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.check-item {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
}

.invoice-flow {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.invoice-builder {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(380px, 0.88fr);
  gap: 14px;
  align-items: start;
  margin: 12px 0;
  padding: 14px;
  border: 1px solid rgba(216, 154, 61, 0.22);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(216, 154, 61, 0.08), transparent 34%),
    linear-gradient(180deg, var(--surface), var(--bg-2));
  box-shadow: var(--shadow);
}

.invoice-builder-main,
.invoice-builder-preview {
  min-width: 0;
}

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

.invoice-builder-grid .wide {
  grid-column: span 3;
}

.invoice-model-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 240px) auto;
  gap: 10px;
  align-items: end;
  margin: 14px 0 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
}

.invoice-model-picker div {
  display: grid;
  gap: 3px;
}

.invoice-model-picker span {
  color: var(--muted);
  font-size: 12px;
}

.invoice-model-picker select,
.invoice-line-editor input,
.invoice-line-editor select {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: #151611;
  padding: 7px 9px;
}

.invoice-selected-models {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 8px 0 12px;
}

.invoice-model-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px 4px 4px;
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px;
}

.invoice-model-chip img,
.invoice-model-chip em {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
}

.invoice-model-chip em {
  display: grid;
  place-items: center;
  color: var(--cream);
  font-style: normal;
  font-size: 10px;
  font-weight: 760;
}

.invoice-line-editor {
  margin-top: 10px;
}

.invoice-line-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

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

.invoice-line-editor th,
.invoice-line-editor td {
  vertical-align: middle;
}

.invoice-builder-total-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.invoice-builder-total-strip span {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.028);
  color: var(--muted);
  font-size: 12px;
}

.invoice-builder-total-strip strong {
  color: var(--text);
  font-size: 15px;
}

.invoice-builder-total-strip em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.invoice-reverse-charge-note {
  padding-top: 8px;
  border-top: 1px solid rgba(34, 31, 25, 0.18);
  color: #4a4134;
  font-size: 11px;
  line-height: 1.35;
}

.invoice-document {
  display: grid;
  gap: 18px;
  color: #221f19;
  background: #fffdf8;
}

.invoice-document-preview {
  position: sticky;
  top: 14px;
  max-height: calc(100vh - 28px);
  overflow: auto;
}

.invoice-document-top,
.invoice-title-row,
.invoice-document-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.75fr);
  gap: 20px;
}

.invoice-party,
.invoice-meta-box,
.invoice-payment,
.invoice-total-box {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.invoice-party span,
.invoice-payment span,
.invoice-payment p,
.invoice-meta-box span,
.invoice-total-box span {
  color: #4f473d;
  font-size: 12px;
  line-height: 1.45;
}

.invoice-party.sender {
  text-align: right;
}

.invoice-title-row h2 {
  margin: 4px 0 0;
  color: #15130f;
  font-size: 28px;
}

.invoice-meta-box,
.invoice-total-box {
  padding: 10px;
  border: 1px solid #e5d9c5;
  border-radius: 8px;
  background: #fbf4e7;
}

.invoice-document-table th,
.invoice-document-table td {
  color: #28231b;
}

.invoice-document-table .meta-line {
  color: #7a7063;
}

.invoice-total-box .grand {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid #dfd0b9;
  color: #15130f;
  font-size: 14px;
}

.invoice-total-box .grand strong {
  display: block;
  margin-top: 3px;
  font-size: 20px;
}

@media (max-width: 1100px) {
  .invoice-builder,
  .invoice-document-top,
  .invoice-title-row,
  .invoice-document-bottom {
    grid-template-columns: 1fr;
  }

  .invoice-document-preview {
    position: static;
    max-height: none;
  }

  .invoice-party.sender {
    text-align: left;
  }
}

@media (max-width: 760px) {
  .invoice-builder-grid,
  .invoice-model-picker,
  .invoice-builder-total-strip {
    grid-template-columns: 1fr;
  }

  .invoice-builder-grid .wide {
    grid-column: auto;
  }
}

.invoice-clean-page {
  display: grid;
  gap: 14px;
}

.invoice-clean-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 2px 2px;
}

.invoice-clean-header h1 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.05;
  letter-spacing: 0;
}

.invoice-clean-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.invoice-clean-actions,
.invoice-builder-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.invoice-save-download,
button[data-action="exportInvoicePdf"] {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.invoice-save-download .ui-icon,
button[data-action="exportInvoicePdf"] .ui-icon {
  width: 16px;
  height: 16px;
}

.invoice-plus-button {
  min-width: 112px;
}

.invoice-history-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

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

.invoice-list-section {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.026);
}

.invoice-list-section .invoice-history-strip {
  grid-template-columns: 1fr;
}

.invoice-list-section-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.invoice-list-section-head div {
  display: grid;
  gap: 3px;
}

.invoice-list-section-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.invoice-list-section-head em {
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.invoice-economy-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.invoice-economy-card {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.032);
}

.invoice-economy-card.primary {
  border-color: rgba(216, 154, 61, 0.5);
  background: rgba(216, 154, 61, 0.1);
}

.invoice-economy-card.profit {
  border-color: rgba(61, 143, 92, 0.34);
  background: rgba(61, 143, 92, 0.085);
}

.invoice-economy-card.profit strong {
  color: #2f7f4f;
}

.invoice-economy-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  text-transform: uppercase;
}

.invoice-economy-card strong {
  overflow-wrap: normal;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-size: clamp(16px, 1.55vw, 21px);
  line-height: 1.05;
}

.invoice-economy-card em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
}

.invoice-history-item,
.invoice-empty-row,
.invoice-customer-pill {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  text-align: left;
}

.invoice-history-item {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 12px;
}

.invoice-history-item.active,
.invoice-history-item:hover,
.invoice-customer-pill:hover {
  border-color: rgba(216, 154, 61, 0.55);
  background: rgba(216, 154, 61, 0.09);
}

.invoice-history-item span,
.invoice-empty-row {
  display: grid;
  gap: 3px;
}

.invoice-history-main {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.invoice-row-controls {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
}

.invoice-phase-select {
  min-height: 34px;
  max-width: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 250, 0.86);
  color: var(--text);
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 680;
}

.invoice-sent-button {
  min-width: 74px;
  border-color: rgba(61, 143, 92, 0.32);
  background: rgba(61, 143, 92, 0.1);
  color: #2f7f4f;
}

.invoice-phase-select.status-green {
  border-color: rgba(61, 143, 92, 0.35);
  background: rgba(61, 143, 92, 0.09);
}

.invoice-phase-select.status-red {
  border-color: rgba(176, 76, 64, 0.35);
  background: rgba(176, 76, 64, 0.09);
}

.invoice-phase-select.status-amber {
  border-color: rgba(216, 154, 61, 0.38);
  background: rgba(216, 154, 61, 0.1);
}

.invoice-delete-button {
  width: 34px;
  height: 34px;
  color: #9a3e34;
}

.invoice-history-item em,
.invoice-empty-row span,
.invoice-customer-pill span {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.invoice-empty-row {
  padding: 12px;
}

.invoice-settings-panel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.app-shell .invoice-settings-backdrop,
:root[data-theme="light"] .invoice-settings-backdrop {
  z-index: 108;
  align-items: center;
  padding: 18px;
  background: rgba(38, 45, 37, 0.26);
  backdrop-filter: blur(12px);
}

.app-shell .invoice-settings-dialog {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(920px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 36px));
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 253, 250, 0.99), rgba(248, 245, 239, 0.97)),
    var(--surface);
  box-shadow: 0 26px 80px rgba(36, 32, 24, 0.18);
}

.invoice-settings-dialog .invoice-settings-panel {
  margin: 0;
  padding: 18px;
  border-color: var(--border-soft);
  background: rgba(255, 253, 250, 0.72);
  box-shadow: var(--shadow-card);
}

.invoice-settings-dialog .invoice-customer-form input,
.invoice-settings-dialog .invoice-sender-form input {
  background: rgba(255, 253, 250, 0.88);
  color: var(--text);
}

.invoice-settings-dialog .invoice-customer-pill {
  background: rgba(255, 253, 250, 0.78);
}

.invoice-settings-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
  gap: 12px;
}

.invoice-customer-list {
  display: grid;
  align-content: start;
  gap: 8px;
}

.invoice-customer-pill {
  display: grid;
  gap: 3px;
  padding: 10px;
  cursor: pointer;
}

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

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

.invoice-customer-form .wide,
.invoice-sender-form .wide {
  grid-column: span 2;
}

.invoice-settings-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 2px;
}

.invoice-builder {
  grid-template-columns: minmax(420px, 0.96fr) minmax(420px, 1.04fr);
  gap: 18px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.invoice-builder-main {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018)),
    var(--surface);
}

.invoice-builder-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.invoice-builder-actions select,
.invoice-builder-grid select,
.invoice-model-picker input,
.invoice-model-card input,
.invoice-customer-form input,
.invoice-sender-form input {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: #151611;
  padding: 8px 10px;
  font: inherit;
}

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

.invoice-customer-input-field small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.invoice-tax-region-field small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.invoice-vat-number-field small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.invoice-vat-number-field.is-missing input {
  border-color: rgba(176, 76, 64, 0.55);
  background: rgba(176, 76, 64, 0.08);
}

.invoice-model-picker {
  grid-template-columns: minmax(0, 0.85fr) minmax(180px, 1fr);
  margin: 0;
  padding: 12px;
  border-radius: 8px;
}

.invoice-model-stack {
  display: grid;
  gap: 10px;
}

.invoice-model-empty {
  display: grid;
  gap: 4px;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.invoice-model-empty strong {
  color: var(--text);
}

.invoice-model-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.14);
}

.invoice-model-card-head {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 34px;
  gap: 10px;
  align-items: center;
}

.invoice-model-card-head span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.invoice-model-avatar,
.invoice-model-avatar img,
.invoice-model-avatar span {
  width: 38px;
  height: 38px;
  border-radius: 50%;
}

.invoice-model-avatar img {
  object-fit: cover;
}

.invoice-model-avatar span {
  display: grid;
  place-items: center;
  background: rgba(216, 154, 61, 0.18);
  color: var(--cream);
  font-size: 12px;
  font-weight: 760;
}

.invoice-remove-model {
  width: 32px;
  height: 32px;
}

.invoice-model-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.invoice-transport-field {
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  transition: background 0.16s ease, border-color 0.16s ease, opacity 0.16s ease;
}

.invoice-transport-field.is-disabled {
  border-color: rgba(120, 120, 112, 0.18);
  background: rgba(120, 120, 112, 0.1);
  opacity: 0.58;
}

.invoice-transport-field.is-disabled span {
  color: var(--faint);
}

.invoice-transport-field.is-disabled input,
.invoice-model-card input:disabled {
  cursor: not-allowed;
  color: var(--faint);
  border-color: rgba(120, 120, 112, 0.16);
  background: rgba(120, 120, 112, 0.12);
}

.invoice-model-toggles {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.invoice-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 12px;
}

.invoice-toggle input {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
}

.invoice-builder-preview {
  min-width: 0;
}

.invoice-overview-preview {
  max-width: 980px;
}

.invoice-document {
  gap: 20px;
  min-height: 980px;
  padding: 42px 46px;
  color: #111;
  background: #fff;
  border: 1px solid #dedede;
  border-radius: 2px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

.invoice-document-compact {
  gap: 14px;
  min-height: 0;
  padding: 34px 42px;
}

.invoice-document-brand {
  text-align: center;
  color: #151515;
  font-size: 26px;
  font-weight: 780;
  line-height: 1.1;
}

.invoice-document .invoice-party strong,
.invoice-payment strong {
  color: #111;
}

.invoice-title-row h2 {
  margin: 0;
  color: #151515;
  font-size: 44px;
  font-weight: 320;
  letter-spacing: 0;
}

.invoice-meta-box,
.invoice-total-box {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.invoice-document-table {
  display: grid;
  width: 100%;
  color: #151515;
}

.invoice-document-table-header,
.invoice-document-table-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 80px 150px 150px;
  align-items: center;
  min-height: 48px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.18);
  line-height: 1.35;
}

.invoice-document-table-header {
  min-height: 44px;
  padding-top: 0;
  font-size: 12px;
  font-weight: 760;
}

.invoice-document-table-body {
  display: grid;
}

.invoice-document-cell {
  min-width: 0;
  color: #151515;
}

.invoice-line-description,
.invoice-line-unit {
  display: inline;
  line-height: 1.35;
}

.invoice-line-unit {
  margin-left: 6px;
  color: #6a6358;
  font-size: 0.92em;
}

.invoice-line-unit::before {
  content: "- ";
}

.invoice-document-compact .invoice-document-brand {
  font-size: 22px;
}

.invoice-document-compact .invoice-title-row h2 {
  font-size: 36px;
}

.invoice-document-compact .invoice-document-table th,
.invoice-document-compact .invoice-document-table td {
  padding: 12px 0;
  font-size: 12px;
  line-height: 1.35;
}

.invoice-document-compact .invoice-document-table-header,
.invoice-document-compact .invoice-document-table-row {
  min-height: 44px;
}

.invoice-document-compact .invoice-document-bottom {
  gap: 24px;
}

.invoice-document-table-header {
  font-size: 12px;
  font-weight: 760;
}

.invoice-document-number {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.invoice-total-box .grand {
  border-top: 1px solid #111;
}

@media (max-width: 1120px) {
  .invoice-builder,
  .invoice-settings-grid,
  .invoice-list-board {
    grid-template-columns: 1fr;
  }

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

  .invoice-document-preview {
    position: static;
    max-height: none;
  }
}

@media (max-width: 760px) {
  .invoice-clean-header,
  .invoice-builder-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .invoice-clean-actions,
  .invoice-builder-actions {
    justify-content: stretch;
  }

  .invoice-clean-actions > *,
  .invoice-builder-actions > * {
    flex: 1 1 auto;
  }

  .invoice-economy-grid {
    grid-template-columns: 1fr;
  }

  .invoice-builder-main,
  .invoice-document {
    padding: 14px;
  }

  .invoice-history-item,
  .invoice-history-main {
    align-items: stretch;
    flex-direction: column;
  }

  .invoice-row-controls {
    justify-content: space-between;
  }

  .invoice-phase-select {
    max-width: none;
    flex: 1 1 auto;
  }

  .app-shell .invoice-settings-backdrop,
  :root[data-theme="light"] .invoice-settings-backdrop {
    align-items: end;
    padding: 12px;
  }

  .app-shell .invoice-settings-dialog {
    width: 100%;
    max-height: calc(100vh - 24px);
    border-radius: 22px;
  }

  .invoice-customer-form,
  .invoice-sender-form,
  .invoice-model-fields {
    grid-template-columns: 1fr;
  }

  .invoice-customer-form .wide,
  .invoice-sender-form .wide {
    grid-column: auto;
  }

  .invoice-document {
    min-height: 0;
  }
}

.density-compact .main {
  padding-top: 16px;
}

.density-compact .card,
.density-compact .panel,
.density-compact .task-card,
.density-compact .list-item {
  padding: 9px;
}

.density-compact .section-sub,
.density-compact .meta-line {
  font-size: 12px;
}

.density-compact .stat-card {
  min-height: 86px;
}

.density-compact .stat-value {
  font-size: 24px;
}

.workflow-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin: 10px 0 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.024);
}

.workflow-steps {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.workflow-step {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--faint);
  background: rgba(255, 255, 255, 0.025);
  font-size: 12px;
  white-space: nowrap;
}

.workflow-step.done {
  color: #c9e5c4;
  border-color: rgba(113, 168, 107, 0.42);
  background: rgba(113, 168, 107, 0.13);
}

.workflow-step.active {
  color: #15130f;
  border-color: var(--cream);
  background: var(--cream);
}

.data-alert {
  display: grid;
  gap: 6px;
  margin: 10px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.024);
}

.data-alert span {
  color: var(--muted);
  font-size: 13px;
}

.red-alert {
  border-color: rgba(199, 102, 89, 0.42);
  background: rgba(199, 102, 89, 0.11);
}

.page-title {
  margin: 0;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1;
  font-weight: 720;
}

.page-subtitle {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.btn {
  min-height: 36px;
  padding: 8px 12px;
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--line);
}

.btn:hover {
  border-color: var(--line-strong);
  background: var(--surface-3);
}

.btn.primary {
  background: var(--cream);
  color: #15130f;
  border-color: var(--cream);
}

.btn.warn {
  background: rgba(199, 102, 89, 0.14);
  color: #ffbeb6;
  border-color: rgba(199, 102, 89, 0.3);
}

.btn.small {
  min-height: 30px;
  padding: 6px 9px;
  font-size: 12px;
}

.icon-btn {
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
  font-size: 21px;
  line-height: 1;
  font-weight: 760;
}

.icon-btn:hover {
  border-color: var(--line-strong);
  background: var(--surface-3);
}

.icon-btn.add-button {
  background: var(--cream);
  color: #15130f;
  border-color: var(--cream);
}

.icon-btn.add-button.agency {
  box-shadow: inset 0 0 0 1px rgba(122, 164, 184, 0.36);
}

.icon-btn.add-button.studio {
  box-shadow: inset 0 0 0 1px rgba(113, 168, 107, 0.42);
}

.icon-btn.subtle {
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
}

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

.stats {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
}

.dashboard-stats {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.control-stats {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  gap: 12px;
}

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

.card,
.panel {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card {
  padding: 14px;
}

.stat-card {
  display: grid;
  gap: 7px;
  min-height: 104px;
}

.stat-value {
  font-size: 28px;
  font-weight: 760;
}

.stat-label {
  color: var(--muted);
  font-size: 13px;
}

.stat-foot {
  color: var(--faint);
  font-size: 12px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.section-head .btn {
  white-space: nowrap;
}

.section-title {
  font-size: 17px;
  font-weight: 720;
}

.section-sub {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 12px;
}

.toolbar input,
.toolbar select,
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  color: var(--text);
  background: #151611;
  padding: 8px 10px;
}

.measure-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  min-height: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  color: var(--text);
  background: #151611;
}

.measure-input input {
  min-height: 34px;
  border: 0;
  background: transparent;
}

.measure-input input:focus {
  outline: none;
}

.measure-input:focus-within {
  border-color: rgba(216, 154, 61, 0.55);
}

.measure-input span {
  padding: 0 10px 0 6px;
  color: var(--faint);
  font-size: 12px;
  font-weight: 700;
}

.toolbar input {
  max-width: 320px;
}

.field textarea {
  min-height: 90px;
  resize: vertical;
}

.field {
  position: relative;
  display: grid;
  gap: 6px;
}

.address-field input[aria-expanded="true"] {
  border-color: rgba(216, 154, 61, 0.62);
  box-shadow: 0 0 0 3px rgba(216, 154, 61, 0.12);
}

.address-field-hint {
  color: var(--faint);
  font-size: 11px;
  line-height: 1.35;
}

.address-field.address-verified input {
  border-color: rgba(63, 121, 69, 0.48);
  box-shadow: 0 0 0 3px rgba(63, 121, 69, 0.1);
}

.address-field.address-verified .address-field-hint {
  color: #3f7945;
  font-weight: 700;
}

.address-suggestions {
  position: absolute;
  z-index: 130;
  top: calc(100% - 2px);
  left: 0;
  right: 0;
  display: grid;
  gap: 4px;
  max-height: min(320px, 46vh);
  overflow: auto;
  border: 1px solid rgba(216, 154, 61, 0.32);
  border-radius: calc(var(--radius) + 2px);
  background: #fffdf8;
  box-shadow: 0 18px 48px rgba(16, 17, 15, 0.28);
  padding: 6px;
}

.address-suggestions[hidden] {
  display: none;
}

.address-suggestion,
.address-suggestion-status {
  width: 100%;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: #1e1e1c;
  padding: 9px 10px;
  text-align: left;
}

.address-suggestion {
  display: grid;
  gap: 3px;
  cursor: pointer;
}

.address-suggestion:hover,
.address-suggestion:focus-visible,
.address-suggestion.active {
  background: #efe5d4;
  outline: none;
}

.address-suggestion strong,
.address-suggestion span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.address-suggestion strong {
  font-size: 13px;
  font-weight: 760;
}

.address-suggestion span,
.address-suggestion-status {
  color: #6f675d;
  font-size: 12px;
}

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

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

.model-package-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(420px, 0.75fr);
  gap: 16px;
  align-items: start;
}

.model-package-builder,
.model-package-preview-panel {
  min-width: 0;
}

.model-package-form-grid textarea[data-field="modelPackageNameInput"] {
  min-height: 160px;
  font-family: inherit;
}

.model-package-selector,
.model-package-manual-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.model-package-manual-list {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.model-package-manual-list summary {
  cursor: pointer;
  color: var(--text);
  font-size: 13px;
  font-weight: 720;
}

.model-package-roster {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: min(560px, 58vh);
  overflow: auto;
  padding-right: 4px;
}

.model-package-result,
.model-package-choice,
.model-package-selected-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: var(--radius);
  padding: 8px;
  text-align: left;
}

.model-package-choice,
.model-package-selected-card,
.model-package-preview-section {
  content-visibility: auto;
  contain-intrinsic-size: 96px;
}

.model-package-result {
  cursor: pointer;
}

.model-package-choice {
  grid-template-columns: 20px 46px minmax(0, 1fr);
  cursor: pointer;
}

.model-package-choice input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent-strong);
}

.model-package-filter-panel {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.model-package-filter-row {
  display: grid;
  gap: 6px;
}

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

.model-package-filter-chips .filter-chip {
  min-height: 30px;
  padding: 5px 8px;
}

.model-package-bulk-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.model-package-bulk-actions span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.model-package-result:hover,
.model-package-choice:hover,
.model-package-choice.is-selected {
  border-color: rgba(216, 154, 61, 0.55);
}

.model-package-choice.is-suggested {
  border-color: rgba(190, 125, 34, 0.82);
  background: rgba(190, 125, 34, 0.08);
  box-shadow: 0 0 0 2px rgba(190, 125, 34, 0.16), 0 14px 30px rgba(31, 25, 17, 0.08);
}

.model-package-choice.is-suggested input {
  outline: 2px solid rgba(190, 125, 34, 0.35);
  outline-offset: 2px;
}

.model-package-choice.is-confirming {
  border-color: rgba(74, 145, 92, 0.85);
  background: rgba(74, 145, 92, 0.1);
  transform: translateY(-1px);
}

input.model-search-ready-flash {
  box-shadow: 0 0 0 3px rgba(74, 145, 92, 0.18), 0 0 0 1px rgba(74, 145, 92, 0.42) inset;
  transition: box-shadow 180ms ease;
}

.model-package-result img,
.model-package-result em,
.model-package-choice img,
.model-package-choice em,
.model-package-selected-card img,
.model-package-selected-card em {
  width: 46px;
  height: 58px;
  object-fit: cover;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.model-package-result span,
.model-package-choice > span,
.model-package-selected-card div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.model-package-result strong,
.model-package-choice strong,
.model-package-selected-card strong {
  font-size: 13px;
  line-height: 1.25;
}

.model-package-result small,
.model-package-choice small,
.model-package-selected-card span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.model-package-selected {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.model-package-selected-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.model-package-selected-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.model-package-group {
  display: grid;
  gap: 9px;
}

.model-package-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.model-package-group-title strong {
  color: var(--text);
  font-size: 14px;
}

.model-package-selected-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.model-package-selected-card {
  grid-template-columns: 46px minmax(0, 1fr) auto auto auto;
}

.model-package-card-order {
  display: flex;
  gap: 4px;
}

.model-package-card-order .icon-btn {
  width: 28px;
  height: 28px;
}

.model-package-card-link {
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 760;
  text-decoration: none;
  white-space: nowrap;
}

.model-package-issues {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(216, 154, 61, 0.42);
  border-radius: var(--radius);
  background: rgba(216, 154, 61, 0.09);
  color: var(--muted);
  font-size: 12px;
}

.model-package-issues strong {
  color: var(--text);
}

.model-package-preview-panel {
  position: sticky;
  top: clamp(12px, 2vw, 22px);
  display: grid;
  gap: 12px;
  max-height: calc(100vh - clamp(24px, 4vw, 44px));
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.model-package-actions {
  gap: 8px;
}

.model-package-email-preview {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f3efe8;
  overflow: hidden;
  color: #171717;
}

.model-package-email-hero {
  background: #151515;
  color: #f8f4ec;
  padding: 28px 30px;
}

.model-package-email-hero span,
.model-package-email-hero small,
.model-package-preview-section > span {
  display: block;
  color: #cbbfae;
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.model-package-email-hero h2 {
  margin: 14px 0 12px;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  line-height: 1.05;
  font-weight: 400;
  letter-spacing: 0;
}

.model-package-email-hero p {
  max-width: 560px;
  margin: 0 0 18px;
  color: #e7dfd2;
  font-size: 13px;
  line-height: 1.55;
}

.model-package-preview-section {
  padding: 24px 22px 6px;
  contain-intrinsic-size: 560px;
}

.model-package-preview-section > span {
  color: #7c7063;
}

.model-package-preview-section h3 {
  margin: 4px 0 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 400;
  letter-spacing: 0;
}

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

.model-package-preview-card {
  display: grid;
  background: #fff;
  color: #171717;
  text-align: center;
  text-decoration: none;
}

.model-package-preview-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #ded8cf;
}

.model-package-preview-card strong {
  padding: 12px 6px 14px;
  font-size: 11px;
  line-height: 1.25;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}

.model-package-preview-more {
  display: grid;
  gap: 4px;
  margin: 20px 22px 24px;
  padding: 14px;
  border: 1px dashed rgba(124, 112, 99, 0.34);
  background: rgba(255, 255, 255, 0.48);
  color: #171717;
}

.model-package-preview-more strong {
  font-size: 13px;
  line-height: 1.3;
}

.model-package-preview-more span {
  color: #7c7063;
  font-size: 12px;
  line-height: 1.45;
}

.model-package-saved {
  display: grid;
  gap: 8px;
}

.model-package-saved[hidden] {
  display: none !important;
}

.model-package-saved-stack {
  display: grid;
  gap: 8px;
}

.model-package-saved-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.model-package-saved-item summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
}

.model-package-saved-item summary::-webkit-details-marker {
  display: none;
}

.model-package-saved-item summary span:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.model-package-saved-item summary strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-package-saved-item summary small,
.model-package-saved-body p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.model-package-saved-body {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
}

.model-package-saved-body p {
  margin: 4px 0 0;
}

.small-title {
  font-size: 13px;
}

@media (max-width: 1360px) {
  .model-package-layout {
    grid-template-columns: 1fr;
  }

  .model-package-preview-panel {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 720px) {
  .model-package-roster,
  .model-package-selected-grid {
    grid-template-columns: 1fr;
  }

  .model-package-preview-grid {
    grid-template-columns: 1fr;
  }

  .model-package-selected-card {
    grid-template-columns: 46px minmax(0, 1fr) auto;
  }

  .model-package-card-order {
    grid-column: 2 / -1;
  }
}

.bank-account-fields {
  min-width: 0;
}

.bank-account-grid {
  display: grid;
  grid-template-columns: minmax(88px, 116px) minmax(0, 1fr);
  gap: 8px;
}

.bank-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.bank-field span {
  color: var(--faint);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.bank-field input {
  font-variant-numeric: tabular-nums;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

th {
  color: var(--faint);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0;
  background: rgba(255, 255, 255, 0.025);
}

tr:last-child td {
  border-bottom: 0;
}

.name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #37392e;
  color: var(--cream);
  border: 1px solid var(--line);
  font-weight: 760;
  overflow: hidden;
  flex: 0 0 auto;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.muted {
  color: var(--muted);
}

.faint {
  color: var(--faint);
}

.pill-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
}

.pill.green {
  color: #c9e5c4;
  border-color: rgba(113, 168, 107, 0.35);
  background: rgba(113, 168, 107, 0.13);
}

.autosave-hint {
  color: #d8e8cf;
  border-color: rgba(113, 168, 107, 0.36);
  background: rgba(113, 168, 107, 0.12);
}

.pill.blue {
  color: #c2dfe9;
  border-color: rgba(122, 164, 184, 0.38);
  background: rgba(122, 164, 184, 0.13);
}

.pill.red {
  color: #ffc0b8;
  border-color: rgba(199, 102, 89, 0.4);
  background: rgba(199, 102, 89, 0.14);
}

.pill.amber {
  color: #f1d4a7;
  border-color: rgba(216, 154, 61, 0.4);
  background: rgba(216, 154, 61, 0.13);
}

.bank-stats {
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  margin-bottom: 12px;
}

.finance-hub {
  margin-bottom: 12px;
}

.finance-tabs {
  margin-bottom: 0;
}

.finance-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.finance-tab-count {
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 760;
  color: var(--text);
  background: rgba(216, 154, 61, 0.18);
  border: 1px solid rgba(216, 154, 61, 0.28);
}

.ops-preview {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin: 0 0 12px;
  padding: 14px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(255, 253, 250, 0.88), rgba(247, 244, 236, 0.74)),
    var(--surface);
}

.ops-preview-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.ops-preview-kicker {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ops-preview h2 {
  margin: 2px 0 0;
  color: var(--text);
  font: 760 18px/1.15 var(--font, inherit);
  letter-spacing: 0;
}

.ops-preview-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(70px, 1fr));
  gap: 6px;
  min-width: 0;
}

.ops-preview-stat {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.58);
}

.ops-preview-stat span,
.ops-preview-brand-main span,
.ops-preview-money span,
.ops-preview-date span {
  min-width: 0;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 900;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.ops-preview-stat strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-preview-timeline,
.ops-preview-board {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.ops-preview-row,
.ops-preview-brand-row {
  display: grid;
  min-width: 0;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border-soft);
  border-left: 3px solid rgba(122, 164, 184, 0.72);
  border-radius: 12px;
  background: rgba(255, 253, 250, 0.72);
}

.ops-preview-row {
  grid-template-columns: minmax(92px, 0.34fr) minmax(0, 1fr) auto;
}

.ops-preview-brand-row {
  grid-template-columns: minmax(170px, 0.85fr) minmax(0, 1.35fr) minmax(116px, 0.36fr) auto;
}

.ops-preview-row.amber,
.ops-preview-brand-row.amber {
  border-left-color: rgba(216, 154, 61, 0.82);
}

.ops-preview-row.critical,
.ops-preview-brand-row.critical {
  border-left-color: rgba(199, 102, 89, 0.88);
  background: rgba(255, 248, 245, 0.82);
}

.ops-preview-date,
.ops-preview-body,
.ops-preview-brand-main,
.ops-preview-money {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.ops-preview-date strong,
.ops-preview-brand-main strong,
.ops-preview-money strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-preview-date em,
.ops-preview-brand-main em,
.ops-preview-meta {
  min-width: 0;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-preview-titleline {
  display: flex;
  min-width: 0;
  gap: 8px;
  align-items: baseline;
}

.ops-preview-titleline strong,
.ops-preview-titleline span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-preview-titleline strong {
  flex: 0 1 auto;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.ops-preview-titleline span {
  flex: 1 1 auto;
  color: var(--text-muted);
  font-size: 12px;
}

.ops-preview-badges,
.ops-preview-actions {
  display: flex;
  min-width: 0;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.ops-preview-brand-row > .ops-preview-badges {
  align-content: center;
}

.ops-preview-pill {
  display: inline-flex;
  max-width: 180px;
  min-height: 22px;
  align-items: center;
  padding: 3px 8px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-preview-pill.green,
.ops-preview-stat.green {
  color: #4f6a47;
  border-color: rgba(85, 122, 88, 0.24);
  background: rgba(217, 229, 210, 0.42);
}

.ops-preview-pill.blue,
.ops-preview-pill.agency,
.ops-preview-pill.studio,
.ops-preview-stat.blue {
  color: #536170;
  border-color: rgba(122, 164, 184, 0.24);
  background: rgba(222, 235, 242, 0.44);
}

.ops-preview-pill.amber,
.ops-preview-stat.amber {
  color: #7e571b;
  border-color: rgba(216, 154, 61, 0.26);
  background: rgba(242, 213, 156, 0.4);
}

.ops-preview-pill.critical,
.ops-preview-stat.critical {
  color: #8f4b43;
  border-color: rgba(199, 102, 89, 0.28);
  background: rgba(244, 218, 214, 0.44);
}

.ops-preview-note,
.ops-preview-empty {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.ops-preview-empty {
  padding: 12px;
  border: 1px dashed var(--border-soft);
  border-radius: 10px;
  text-align: center;
}

.bank-import-layout,
.payout-layout {
  align-items: start;
}

.bank-import-panel,
.money-in-group {
  min-width: 0;
}

.bank-drop-zone {
  display: grid;
  place-items: center;
  gap: 7px;
  min-height: 154px;
  border: 1px dashed rgba(216, 154, 61, 0.45);
  border-radius: var(--radius);
  background: rgba(216, 154, 61, 0.07);
  color: var(--text);
  text-align: center;
  cursor: pointer;
  padding: 18px;
}

.bank-drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.bank-drop-zone span {
  font-weight: 760;
}

.bank-drop-zone small {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.4;
}

.bank-drop-zone.is-busy {
  opacity: 0.72;
  cursor: wait;
}

.bank-alert {
  margin-top: 10px;
  border: 1px solid rgba(122, 164, 184, 0.3);
  border-radius: var(--radius);
  background: rgba(122, 164, 184, 0.1);
  color: var(--muted);
  padding: 10px;
  font-size: 12px;
  line-height: 1.4;
}

.bank-alert.compact {
  padding: 7px 8px;
  margin-top: 7px;
}

.bank-alert.red {
  color: #ffc0b8;
  border-color: rgba(199, 102, 89, 0.4);
  background: rgba(199, 102, 89, 0.13);
}

.bank-alert.amber {
  color: #f1d4a7;
  border-color: rgba(216, 154, 61, 0.4);
  background: rgba(216, 154, 61, 0.12);
}

.money-in-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  gap: 12px;
  align-items: start;
}

.money-in-columns {
  display: grid;
  gap: 12px;
}

.bank-match-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.55fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.bank-match-row.is-unmatched {
  border-style: dashed;
}

.bank-match-actions {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.bank-match-actions select,
.payout-batch-head select {
  width: 100%;
  min-height: 34px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  color: var(--text);
  background: #151611;
  padding: 7px 9px;
}

.bank-invoice-row .pill-row,
.bank-file-row .pill-row,
.payout-batch-row .pill-row {
  justify-content: flex-end;
}

.payout-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1.1fr);
  gap: 12px;
}

.payout-form {
  margin-bottom: 10px;
}

.payout-actions,
.payout-batch-head {
  margin: 10px 0 12px;
}

.payout-table-wrap {
  margin-top: 10px;
}

.payout-table-wrap table {
  min-width: 680px;
}

.payroll-group-row td {
  background: rgba(216, 154, 61, 0.055);
  border-bottom-color: rgba(216, 154, 61, 0.18);
  vertical-align: middle;
}

.payroll-group-toggle {
  width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  padding: 0;
  color: var(--text);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.payroll-group-toggle .ui-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--gold);
}

.payroll-group-toggle span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.payroll-group-toggle strong {
  font-size: 14px;
}

.payroll-group-toggle em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.35;
}

.payroll-model-row td {
  background: rgba(255, 255, 255, 0.018);
}

.payout-batches-card {
  margin-top: 12px;
}

.list {
  display: grid;
  gap: 8px;
}

.list-item,
.booking-row,
.invoice-row,
.task-card,
.model-profile {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
  padding: 11px;
}

.list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  min-width: 0;
  align-items: start;
}

.list-item > * {
  min-width: 0;
}

.list-item .item-title,
.list-item .meta-line {
  overflow-wrap: anywhere;
}

.booking-row,
.invoice-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.item-title {
  font-weight: 720;
  margin-bottom: 4px;
}

.meta-line {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(205px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.kanban-col {
  min-width: 0;
  min-height: 460px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.022);
  padding: 10px;
}

.kanban-head {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.task-card {
  margin-bottom: 8px;
  min-width: 0;
  overflow: hidden;
}

.task-title {
  font-weight: 690;
}

.task-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 9px;
}

.task-card-summary {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.task-summary-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.compact-actions .btn {
  min-height: 28px;
  padding: 5px 8px;
}

.task-composer {
  display: grid;
  grid-template-columns: minmax(260px, 1.45fr) minmax(190px, 0.9fr) minmax(180px, 0.85fr) 148px 42px;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.026);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.task-composer input,
.task-composer select {
  width: 100%;
  min-width: 0;
  height: 42px;
  border-radius: var(--radius);
  border: 1px solid rgba(242, 235, 219, 0.1);
  color: var(--text);
  background: rgba(10, 11, 9, 0.76);
  padding: 0 12px;
  outline: 0;
}

.task-composer input::placeholder {
  color: var(--faint);
}

.task-composer input:focus,
.task-composer select:focus {
  border-color: rgba(237, 228, 210, 0.38);
  background: rgba(12, 13, 11, 0.94);
  box-shadow: 0 0 0 3px rgba(237, 228, 210, 0.07);
}

.task-composer-title {
  font-weight: 690;
}

.task-composer-submit {
  width: 42px;
  height: 42px;
  min-width: 42px;
  justify-self: end;
}

.quick-filter-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}

.filter-chip {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
}

.filter-chip.active {
  background: rgba(237, 228, 210, 0.12);
  color: var(--text);
  border-color: var(--line-strong);
}

.filter-chip span {
  color: var(--faint);
  margin-left: 5px;
}

.task-edit-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 110px 140px 82px;
  gap: 8px;
  align-items: start;
}

.task-edit-grid input,
.task-edit-grid select,
.task-edit-grid textarea {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  color: var(--text);
  background: #151611;
  padding: 7px 9px;
}

.task-edit-grid textarea {
  grid-column: 1 / -1;
  min-height: 56px;
  resize: vertical;
}

.board-task-edit {
  grid-template-columns: minmax(0, 1fr) 84px;
  margin-bottom: 8px;
}

.board-task-edit input:first-child,
.board-task-edit textarea {
  grid-column: 1 / -1;
}

.board-task-edit input[type="date"] {
  grid-column: 1 / -1;
}

.board-task-edit input[type="number"] {
  grid-column: 2;
  grid-row: 2;
}

.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.tabs button {
  padding: 7px 10px;
  border-color: var(--line);
}

.segmented {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.segmented button {
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 5px 10px;
}

.segmented button.active {
  background: var(--cream);
  color: #15130f;
}

.small-segmented {
  justify-self: end;
}

.calendar-scope-tabs {
  align-items: center;
}

.calendar-scope-note {
  color: var(--faint);
  font-size: 12px;
  margin-left: 4px;
}

.calendar-event.agency {
  border-color: rgba(122, 164, 184, 0.28);
}

.calendar-event.studio,
.studio-row {
  border-color: rgba(113, 168, 107, 0.28);
}

.calendar-workspace {
  display: block;
}

.calendar-card {
  width: 100%;
}

.calendar-toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.calendar-month-title {
  text-transform: capitalize;
  font-size: 22px;
  font-weight: 760;
}

.calendar-month {
  display: grid;
  grid-template-columns: repeat(7, minmax(108px, 1fr));
  gap: 1px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.calendar-weekday {
  min-height: 34px;
  padding: 9px 10px;
  color: var(--faint);
  background: rgba(255, 255, 255, 0.03);
  font-size: 11px;
  text-transform: uppercase;
}

.calendar-day {
  min-height: 132px;
  padding: 9px;
  background: #1b1d18;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  cursor: pointer;
}

.calendar-day:hover,
.calendar-day.selected-day {
  outline: 1px solid rgba(237, 228, 210, 0.42);
  outline-offset: -1px;
}

.calendar-day.today {
  background: rgba(216, 154, 61, 0.08);
}

.calendar-day.muted-day {
  opacity: 0.5;
}

.calendar-day-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.calendar-day-head strong {
  color: var(--text);
  font-size: 15px;
}

.calendar-day-badges {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-left: auto;
}

.calendar-day-events {
  display: grid;
  gap: 5px;
  align-content: start;
}

.calendar-holiday-marker {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid rgba(116, 132, 104, 0.18);
  border-radius: 999px;
  background: rgba(207, 216, 198, 0.45);
  color: #62705a;
}

.calendar-holiday-marker .ui-icon {
  width: 12px;
  height: 12px;
}

.calendar-birthday-marker {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-width: 25px;
  height: 22px;
  justify-content: center;
  padding: 0 6px 0 5px;
  border: 1px solid rgba(185, 140, 69, 0.22);
  border-radius: 999px;
  background: rgba(239, 227, 202, 0.55);
  color: #765b2d;
  font-size: 11px;
  font-weight: 720;
}

.calendar-birthday-marker .ui-icon {
  width: 12px;
  height: 12px;
  color: #9a7535;
}

.calendar-birthday-marker span {
  min-width: 6px;
  color: #765b2d;
  font-size: 10px;
  line-height: 1;
}

.calendar-holiday-note {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 24px;
  padding: 4px 7px;
  border: 1px solid rgba(185, 140, 69, 0.18);
  border-radius: 999px;
  background: rgba(239, 227, 202, 0.35);
  color: #6b5935;
  font-size: 11px;
  font-weight: 650;
  border-color: rgba(116, 132, 104, 0.17);
  background: rgba(207, 216, 198, 0.28);
  color: #596550;
}

.calendar-holiday-note .ui-icon {
  width: 14px;
  height: 14px;
  color: #6b785f;
}

.calendar-holiday-note span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-event-pill {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px;
  width: 100%;
  min-height: 30px;
  padding: 6px 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  text-align: left;
}

.calendar-event-pill.detailed {
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
}

.calendar-event-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.calendar-event-models {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-width: 0;
  max-width: 82px;
}

.calendar-event-avatar {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-left: -6px;
  overflow: hidden;
  border: 1px solid rgba(237, 228, 210, 0.72);
  border-radius: 50%;
  background: #23251f;
  color: var(--text);
  font-size: 9px;
  font-weight: 760;
  line-height: 1;
}

.calendar-event-avatar:first-child {
  margin-left: 0;
}

.calendar-event-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.calendar-event-avatar span {
  color: inherit;
  font-size: inherit;
}

.calendar-event-avatar.more {
  background: rgba(122, 164, 184, 0.18);
  color: var(--text);
}

.calendar-event-pill span {
  color: var(--muted);
  font-size: 11px;
}

.calendar-event-pill small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--faint);
  font-size: 11px;
}

.calendar-month .calendar-event-pill small {
  display: none;
}

.calendar-event-pill strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.calendar-event-pill.agency {
  border-color: rgba(122, 164, 184, 0.34);
}

.calendar-event-pill.studio {
  border-color: rgba(113, 168, 107, 0.34);
}

.calendar-event-pill.photo {
  border-color: rgba(216, 154, 61, 0.4);
  background: rgba(216, 154, 61, 0.08);
}

.calendar-more {
  color: var(--faint);
  font-size: 12px;
}

.calendar-week,
.calendar-day-list {
  display: grid;
  grid-template-columns: repeat(7, minmax(170px, 1fr));
  gap: 10px;
  overflow-x: auto;
}

.calendar-day-list {
  grid-template-columns: minmax(260px, 1fr);
}

.agenda-day {
  min-height: 280px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.024);
  padding: 10px;
}

.agenda-day.today {
  border-color: rgba(216, 154, 61, 0.34);
  background: rgba(216, 154, 61, 0.06);
}

.agenda-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.agenda-head span {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 11px;
}

.agenda-head strong {
  color: var(--text);
  font-size: 13px;
}

.agenda-head .icon-btn {
  width: 30px;
  min-width: 30px;
  height: 30px;
  font-size: 17px;
}

.agenda-list {
  display: grid;
  gap: 7px;
}

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

.calendar-editor select[multiple] {
  min-height: 220px;
}

.calendar-model-picker {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.calendar-model-picker .model-package-roster {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  max-height: min(430px, 46vh);
}

.calendar-model-choice small:last-child {
  color: var(--accent-strong);
  font-weight: 720;
}

.calendar-editor-actions {
  margin-top: 12px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(6, 7, 6, 0.72);
  backdrop-filter: blur(10px);
}

.modal-scrim {
  position: absolute;
  inset: 0;
  border: 0;
  background: transparent;
  padding: 0;
}

.modal-dialog {
  position: relative;
  z-index: 1;
  width: min(980px, calc(100vw - 32px));
  max-height: calc(100vh - 36px);
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.52);
  padding: 16px;
}

.agreement-modal {
  display: grid;
  gap: 10px;
}

.modal-dialog.agreement-modal {
  width: min(920px, calc(100vw - 36px));
  padding: 20px;
}

.agreement-tabs {
  margin: 0 0 2px;
  padding-bottom: 0;
  border-bottom: 0;
}

.agreement-business-switch {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 40px;
  padding: 3px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: rgba(248, 245, 239, 0.74);
}

.agreement-business-switch button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.agreement-business-switch button.active {
  background: #fffdf8;
  color: var(--text);
  box-shadow: 0 8px 18px rgba(36, 32, 24, 0.08);
}

.agreement-business-switch .ui-icon {
  width: 15px;
  height: 15px;
}

.agreement-block {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.agreement-basics-panel,
.shoot-days-panel {
  margin-top: 10px;
  padding: 14px;
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 253, 250, 0.98), rgba(250, 247, 241, 0.94)),
    var(--surface);
  box-shadow: 0 10px 28px rgba(36, 32, 24, 0.055);
}

.agreement-basics-panel {
  border-top: 1px solid var(--border-soft);
}

.agreement-summary-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.agreement-summary-item {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(222, 215, 201, 0.72);
  border-radius: 12px;
  background: rgba(255, 253, 250, 0.74);
}

.agreement-summary-item span,
.agreement-summary-item strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agreement-summary-item span {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.agreement-summary-item strong {
  margin-top: 4px;
  color: var(--text);
  font-size: 13px;
  font-weight: 720;
}

.agreement-basics-grid {
  margin-top: 12px;
  gap: 10px;
}

.agreement-basics-grid textarea {
  min-height: 68px;
}

.agreement-footer-actions {
  justify-content: space-between;
}

.match-grid,
.integration-grid,
.doc-grid,
.casting-grid {
  display: grid;
  gap: 10px;
}

.match-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.integration-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.doc-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.casting-grid {
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  margin-top: 14px;
}

.match-card,
.integration-card,
.casting-card,
.doc-tile {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.match-card,
.integration-card {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.match-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.doc-tile {
  display: grid;
  gap: 5px;
  min-height: 92px;
  padding: 12px;
  color: var(--text);
  text-align: left;
}

.doc-tile:hover {
  border-color: var(--line-strong);
  background: rgba(237, 228, 210, 0.06);
}

.doc-tile span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.casting-card {
  display: grid;
  gap: 7px;
  justify-items: center;
  text-align: center;
  padding: 10px;
}

.casting-card img,
.avatar.large {
  width: 74px;
  height: 74px;
  border-radius: 50%;
}

.casting-card img {
  object-fit: cover;
  border: 1px solid var(--line);
  background: #37392e;
}

.casting-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.inline-preview {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.inline-preview summary {
  cursor: pointer;
  color: var(--cream);
}

.inline-preview p {
  margin: 7px 0 0;
  line-height: 1.45;
}

.compact-head {
  margin-bottom: 8px;
}

.agreement-task-add {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 112px 150px minmax(180px, 0.55fr) auto;
  gap: 8px;
  margin-bottom: 10px;
}

.agreement-task-add input,
.agreement-task-add select,
.agreement-link-existing select {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  color: var(--text);
  background: #151611;
  padding: 8px 10px;
}

.agreement-link-existing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-bottom: 10px;
}

.agreement-task-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: rgba(255, 255, 255, 0.022);
}

.request-automation-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.model-request-list {
  display: grid;
  gap: 8px;
}

.parent-time-list {
  display: grid;
  gap: 8px;
}

.parent-time-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 124px 124px minmax(260px, auto);
  gap: 10px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: rgba(255, 255, 255, 0.022);
}

.shoot-day-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
}

.shoot-days-panel .compact-head {
  align-items: center;
  margin-bottom: 10px;
}

.shoot-day-add-date {
  display: grid;
  gap: 4px;
  min-width: 154px;
}

.shoot-day-add-date > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.shoot-day-add-date span,
.shoot-day-model-row label span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.shoot-day-add-date input,
.shoot-day-defaults input,
.shoot-day-model-row input[type="time"] {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  padding: 8px 10px;
}

.shoot-day-list {
  display: grid;
  gap: 10px;
}

.shoot-day-card {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(222, 215, 201, 0.78);
  border-radius: 14px;
  background: rgba(255, 253, 250, 0.72);
  padding: 12px;
  box-shadow: none;
}

.shoot-day-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.shoot-day-defaults {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 120px 120px;
  gap: 10px;
}

.shoot-day-model-grid {
  display: grid;
  gap: 8px;
}

.shoot-day-model-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 112px 112px auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(222, 215, 201, 0.68);
  border-radius: 12px;
  background: rgba(255, 253, 250, 0.58);
  padding: 8px;
}

.shoot-day-model-row.is-off {
  opacity: 0.62;
}

.shoot-day-model-toggle {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.shoot-day-model-toggle strong,
.shoot-day-model-toggle small {
  display: block;
}

.shoot-day-model-toggle small {
  color: var(--muted);
  font-size: 12px;
}

.studio-extra-services {
  display: grid;
  gap: 12px;
}

.studio-extra-service-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.studio-extra-service-list {
  display: grid;
  gap: 8px;
}

.studio-extra-service-labels,
.studio-extra-service-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 86px 120px minmax(150px, 0.65fr) auto 42px;
  gap: 8px;
  align-items: center;
}

.studio-extra-service-labels {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0 10px;
}

.studio-extra-service-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
  padding: 8px;
}

.studio-extra-service-row input,
.studio-extra-service-row select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  padding: 8px 10px;
}

.studio-extra-service-row .pill {
  justify-content: center;
  white-space: nowrap;
}

.avatar.tiny {
  width: 30px;
  height: 30px;
  font-size: 11px;
}

.parent-time-actions {
  justify-content: flex-end;
}

.parent-time-row.public-time-row {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 10px;
}

.parent-time-row.public-time-row .parent-time-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-content: stretch;
}

.parent-time-row.public-time-row .parent-time-actions .btn {
  width: 100%;
  min-width: 0;
}

.model-request-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, auto);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: rgba(255, 255, 255, 0.022);
}

.approval-queue,
.message-preview,
.invoice-readiness,
.backup-suggestions {
  margin: 10px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.024);
  padding: 10px;
}

.approval-queue {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.approval-queue strong,
.approval-queue span {
  display: block;
}

.approval-queue span {
  color: var(--muted);
  font-size: 13px;
}

.message-preview summary {
  cursor: pointer;
  color: var(--text);
}

.message-preview pre {
  margin: 10px 0 0;
  white-space: pre-wrap;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
}

.check-list,
.timeline,
.mini-stack {
  display: grid;
  gap: 8px;
}

.check-item {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
}

.check-item.done {
  color: var(--text);
}

.check-item span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--muted);
}

.check-item.done span {
  border-color: rgba(113, 168, 107, 0.42);
  background: rgba(113, 168, 107, 0.16);
  color: var(--green);
}

.timeline-item {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.timeline-item span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(237, 228, 210, 0.1);
  color: var(--muted);
  font-size: 12px;
}

.timeline-item p {
  margin: 2px 0 0;
  color: var(--muted);
}

.model-request-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.model-request-controls select {
  min-width: 184px;
  min-height: 30px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  color: var(--text);
  background: #151611;
  padding: 5px 8px;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.project-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.42fr) minmax(0, 0.58fr);
  gap: 12px;
  align-items: start;
}

.project-layout > .card {
  min-width: 0;
}

.project-filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(128px, auto);
  gap: 8px;
  margin-bottom: 12px;
}

.project-filter-bar input,
.project-filter-bar select {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background-color: #151611;
  padding: 8px 10px;
}

.customer-layout {
  display: grid;
  grid-template-columns: minmax(270px, 360px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.customer-layout > .card,
.customer-list-card,
.customer-detail-card {
  min-width: 0;
}

.customer-filter-bar {
  grid-template-columns: 1fr;
}

.customer-list,
.customer-row-stack {
  display: grid;
  gap: 9px;
}

.customer-list {
  max-height: calc(100vh - 272px);
  overflow: auto;
  padding-right: 3px;
}

.customer-card {
  width: 100%;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  text-align: left;
  contain: layout paint;
}

.customer-card:hover,
.customer-card.active {
  border-color: rgba(216, 154, 61, 0.34);
  background: rgba(216, 154, 61, 0.08);
}

.customer-card strong,
.customer-card small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-card small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.customer-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(216, 154, 61, 0.28);
  border-radius: 12px;
  background: rgba(216, 154, 61, 0.12);
  color: var(--text);
  font-size: 12px;
  font-weight: 780;
}

.customer-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 12px;
}

.customer-identity-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 12px;
}

.customer-detail-actions {
  align-items: center;
  justify-content: flex-end;
}

.customer-editor-panel {
  display: grid;
  gap: 12px;
  margin: 0 0 12px;
  padding: 13px;
  border: 1px solid rgba(216, 154, 61, 0.28);
  border-radius: var(--radius);
  background: rgba(216, 154, 61, 0.07);
}

.customer-editor-grid {
  align-items: end;
}

.customer-editor-grid input,
.customer-editor-grid select,
.customer-editor-grid textarea {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background-color: #151611;
  padding: 8px 10px;
  font: inherit;
}

.customer-editor-grid textarea {
  min-height: 72px;
  resize: vertical;
}

.customer-editor-actions {
  justify-content: flex-end;
}

.customer-panel {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
  content-visibility: auto;
  contain-intrinsic-size: auto 180px;
}

.customer-record-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
  content-visibility: auto;
  contain-intrinsic-size: auto 72px;
}

.customer-record-row.compact {
  align-items: center;
}

.customer-record-row .pill-row {
  justify-content: flex-end;
}

.customer-id-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.customer-id-strip.full {
  margin-top: 0;
}

.model-id-chip {
  gap: 4px;
}

.model-id-chip code {
  color: inherit;
  font: inherit;
}

@media (max-width: 980px) {
  .customer-layout {
    grid-template-columns: 1fr;
  }

  .customer-list {
    max-height: none;
  }

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

@media (max-width: 620px) {
  .customer-stats,
  .customer-identity-grid,
  .customer-record-row,
  .customer-record-row.compact {
    grid-template-columns: 1fr;
  }

  .customer-record-row .pill-row {
    justify-content: flex-start;
  }

  .customer-detail-actions,
  .customer-editor-actions {
    justify-content: flex-start;
  }
}

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

.project-card {
  width: 100%;
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  text-align: left;
}

.project-card:hover,
.project-card.active {
  border-color: rgba(216, 154, 61, 0.34);
  background: rgba(216, 154, 61, 0.08);
}

.project-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 12px;
}

.project-metric {
  display: grid;
  gap: 7px;
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.project-context-panel {
  display: grid;
  gap: 10px;
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid rgba(216, 154, 61, 0.2);
  border-radius: var(--radius);
  background: rgba(216, 154, 61, 0.06);
}

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

.project-model-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.project-task-add {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 112px 150px 82px auto;
  gap: 8px;
  margin: 12px 0;
  align-items: stretch;
}

.project-task-add input,
.project-task-add select {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  color: var(--text);
  background: #151611;
  padding: 8px 10px;
}

.project-task-add input:first-child {
  grid-column: 1 / -1;
}

.project-task-add .btn {
  white-space: nowrap;
}

.project-section {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
  padding: 10px;
}

.project-section-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.project-task-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: rgba(255, 255, 255, 0.02);
  min-width: 0;
}

.project-task-edit {
  grid-template-columns: minmax(180px, 1fr) minmax(96px, 0.34fr) minmax(132px, 0.44fr) 74px;
  min-width: 0;
}

.project-task-row > .pill-row {
  grid-column: 2;
  justify-content: flex-start;
}

.project-task-row > .pill-row .btn {
  white-space: nowrap;
}

.project-task-row.done {
  opacity: 0.64;
}

.project-task-row.done .task-title {
  text-decoration: line-through;
}

.project-task-row.done .task-edit-grid input:first-child {
  text-decoration: line-through;
  color: var(--muted);
}

.check-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: transparent;
  margin-top: 1px;
}

.check-dot.done {
  background: var(--green);
  border-color: var(--green);
  box-shadow: inset 0 0 0 4px #1b1d18;
}

.model-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 12px;
  align-items: start;
}

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

.model-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(150px, 1fr) auto;
  align-items: center;
}

.model-toolbar input,
.model-toolbar select {
  max-width: none;
}

.model-toolbar .model-add-trigger {
  justify-self: end;
}

.model-table {
  min-width: 700px;
  border-collapse: separate;
  border-spacing: 0;
}

.model-table-row {
  cursor: pointer;
  outline: 0;
}

.model-table-row td {
  transition:
    background 0.16s ease,
    box-shadow 0.16s ease,
    color 0.16s ease;
}

.model-table-row td:first-child {
  border-left: 3px solid transparent;
}

.model-table-row td:last-child {
  position: relative;
  padding-right: 38px;
}

.model-table-row td:last-child::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 16px;
  width: 7px;
  height: 7px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  color: #ad7c38;
  opacity: 0;
  transform: translate(-4px, -50%) rotate(45deg);
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
}

.model-table-row:hover td,
.model-table-row:focus td,
.model-table-row.selected td {
  background: rgba(248, 245, 239, 0.72);
}

.model-table-row:hover td:first-child,
.model-table-row:focus td:first-child,
.model-table-row.selected td:first-child {
  border-left-color: rgba(185, 140, 69, 0.52);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.model-table-row:hover td:last-child::after,
.model-table-row:focus td:last-child::after,
.model-table-row.selected td:last-child::after {
  opacity: 0.78;
  transform: translate(0, -50%) rotate(45deg);
}

.model-table-row:hover .name-cell,
.model-table-row:focus .name-cell {
  transform: translateX(2px);
}

.model-table-row .name-cell {
  transition: transform 0.16s ease;
}

.model-add-dialog {
  width: min(640px, calc(100vw - 32px));
}

.model-add-actions {
  justify-content: flex-end;
  margin-top: 14px;
}

.former-model-history-backdrop {
  z-index: 96;
}

.former-model-history-dialog {
  width: min(760px, calc(100vw - 32px));
  display: grid;
  gap: 14px;
}

.former-model-archive-facts {
  margin-top: 0;
}

.former-model-history-content {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.former-model-history-content .section-head.compact {
  margin-bottom: 0;
}

.former-model-history-content .list {
  max-height: min(330px, 38vh);
  overflow: auto;
  padding-right: 4px;
}

.former-model-history-actions {
  justify-content: flex-end;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.profile-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.profile-field {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px;
}

.today-panel {
  margin-bottom: 12px;
}

.birthday-dashboard-card {
  width: min(640px, 100%);
  margin-bottom: 12px;
  padding: 11px 13px !important;
}

.birthday-dashboard-card .section-head {
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.birthday-dashboard-card .section-title {
  font-size: 15px;
}

.birthday-dashboard-card .section-sub {
  max-width: 430px;
  font-size: 12px;
}

.birthday-dashboard-card.has-today {
  border-color: rgba(185, 140, 69, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 253, 250, 0.98), rgba(250, 246, 237, 0.95)),
    var(--surface);
}

.birthday-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(190px, 0.46fr) minmax(0, 1fr);
  gap: 8px;
}

.birthday-dashboard-grid.upcoming-only {
  grid-template-columns: 1fr;
}

.birthday-today-panel,
.birthday-upcoming-panel {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: rgba(248, 245, 239, 0.46);
}

.birthday-today-panel.is-empty {
  display: none;
}

.birthday-dashboard-card .table-label {
  font-size: 10px;
  letter-spacing: 0.12em;
}

.birthday-person-list {
  display: grid;
  gap: 7px;
}

.birthday-dashboard-card .birthday-person-list {
  gap: 5px;
}

.birthday-person-list.compact {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.birthday-dashboard-card .birthday-person-list.compact {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.birthday-person {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 7px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 250, 0.74);
  color: var(--text);
  text-align: left;
}

.birthday-dashboard-card .birthday-person {
  grid-template-columns: 28px minmax(0, 1fr);
  min-height: 38px;
  padding: 5px 7px;
  border-radius: 12px;
}

.birthday-person:hover {
  border-color: rgba(185, 140, 69, 0.28);
  background: var(--surface);
}

.birthday-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(185, 140, 69, 0.22);
  border-radius: 999px;
  background: var(--accent-soft);
  color: #6e542b;
  font-size: 11px;
  font-weight: 720;
}

.birthday-dashboard-card .birthday-avatar {
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.birthday-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.birthday-person strong,
.birthday-person small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.birthday-person small {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 12px;
}

.birthday-dashboard-card .birthday-person strong {
  font-size: 13px;
}

.birthday-dashboard-card .birthday-person small {
  margin-top: 0;
  font-size: 11px;
}

.birthday-empty {
  padding: 10px 0;
  color: var(--text-muted);
  font-size: 13px;
}

.birthday-dashboard-card .birthday-empty {
  padding: 2px 0;
  font-size: 12px;
}

@media (max-width: 820px) {
  .birthday-dashboard-grid,
  .birthday-person-list.compact {
    grid-template-columns: 1fr;
  }
}

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

.today-grid.two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.today-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.022);
  padding: 11px;
}

.today-link,
.mini-inbox-item {
  width: 100%;
  display: grid;
  gap: 3px;
  min-height: 46px;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: left;
}

.today-link:last-child,
.mini-inbox-item:last-child {
  border-bottom: 0;
}

.today-link span,
.mini-inbox-item span {
  color: var(--muted);
  font-size: 12px;
}

.file-btn {
  position: relative;
  overflow: hidden;
  display: inline-grid;
  place-items: center;
}

.file-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.profile-field span {
  display: block;
  color: var(--faint);
  font-size: 11px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.profile-field strong {
  font-size: 14px;
}

.family-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.024);
}

.family-editor .meta-line {
  grid-column: 1 / -1;
}

.family-chip-row {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.family-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px;
  color: var(--text);
}

.family-remove {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  cursor: pointer;
}

.family-remove:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.16);
}

.progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
  margin-top: 8px;
}

.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--amber));
}

.calendar-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(150px, 1fr));
  gap: 8px;
  overflow-x: auto;
}

.day-card {
  min-height: 160px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: rgba(255, 255, 255, 0.022);
}

.day-name {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.empty-state {
  min-height: 180px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 20px;
}

.empty-action {
  gap: 8px;
  min-height: 118px;
}

.empty-state.compact {
  min-height: 260px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(420px, calc(100vw - 36px));
  background: var(--cream);
  color: #17140e;
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow);
  z-index: 50;
}

.toast span {
  min-width: 0;
}

.toast-undo {
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid rgba(23, 20, 14, 0.18);
  border-radius: var(--radius);
  background: rgba(23, 20, 14, 0.08);
  color: #17140e;
  white-space: nowrap;
}

.print-invoice {
  background: #f7f2e7;
  color: #15130f;
  border-radius: var(--radius);
  padding: 18px;
  display: grid;
  gap: 12px;
}

.print-invoice table {
  color: #15130f;
  min-width: 0;
}

.print-invoice th,
.print-invoice td {
  border-color: rgba(0, 0, 0, 0.15);
}

.print-invoice.invoice-document {
  gap: 20px;
  min-height: 980px;
  padding: 42px 46px;
  color: #111;
  background: #fff;
  border: 1px solid #dedede;
  border-radius: 2px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

.print-invoice.invoice-document table {
  color: #151515;
}

@media (max-width: 760px) {
  .print-invoice.invoice-document {
    min-height: 0;
    padding: 14px;
  }
}

@media print {
  body {
    background: white;
    color: black;
  }

  .sidebar,
  .topbar,
  .toolbar,
  .tabs,
  .btn,
  .no-print {
    display: none !important;
  }

  .app-shell,
  .main {
    display: block;
    padding: 0;
  }

  .card,
  .panel,
  .print-invoice {
    box-shadow: none;
    border: 0;
  }
}

@media (max-width: 1180px) {
  .sc-home-mosaic {
    grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
  }

  .sc-home-feature-tile {
    grid-row: 1 / span 3;
  }

  .sc-home-video-tile {
    grid-column: 2 / span 2;
    grid-row: 1;
  }

  .sc-home-tile-3 {
    grid-column: 4;
    grid-row: 1;
  }

  .sc-home-tile-4 {
    grid-column: 2;
    grid-row: 2;
  }

  .sc-home-tile-5 {
    grid-column: 3;
    grid-row: 2;
  }

  .sc-home-tile-6 {
    grid-column: 4;
    grid-row: 2;
  }

  .sc-home-tile-7 {
    grid-column: 2 / span 2;
    grid-row: 3;
  }

  .sc-home-tile-8 {
    grid-column: 4;
    grid-row: 3;
  }

  .sc-editorial-cards {
    width: min(900px, calc(100% - 40px));
    grid-template-columns: 1fr;
  }

  .sc-editorial-card {
    border-left: 0;
    border-top: 1px solid rgba(221, 214, 202, 0.92);
    padding: 24px 0;
  }

  .sc-editorial-card:first-child {
    border-top: 0;
  }

  .sc-content-hero,
  .sc-contact-panel {
    grid-template-columns: 1fr;
  }

  .sc-apply-main {
    grid-template-columns: minmax(0, 0.92fr) minmax(390px, 1.08fr);
  }

  .sc-apply-copy {
    padding-right: clamp(32px, 5vw, 72px);
    padding-left: clamp(32px, 5vw, 72px);
  }

  .sc-public-nav {
    max-width: none;
  }

  .mini-control select {
    min-width: 150px;
  }

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

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

  .split,
  .model-layout,
  .calendar-workspace,
  .project-layout,
  .client-portal-hero,
  .client-portal-layout,
  .client-model-feature,
  .portal-editor-hero,
  .portal-editor-grid,
  .portal-preview-launcher,
  .parent-public-hero,
  .parent-public-shell,
  .parent-public-layout {
    grid-template-columns: 1fr;
  }

  .parent-public-copy,
  .parent-public-left-flow,
  .parent-public-right-flow {
    grid-column: 1;
    grid-row: auto;
  }

  .parent-public-right-flow {
    width: min(360px, 100%);
    justify-self: start;
  }

  .client-model-feature-media {
    min-height: clamp(360px, 72vw, 560px);
  }

  .parent-public-photo {
    width: min(320px, 100%);
    min-height: 0;
    max-height: none;
  }

  .parent-public-visual {
    width: 100%;
  }

  .parent-public-right-flow .parent-public-visual {
    width: 100%;
    justify-self: stretch;
  }

  .parent-public-side {
    position: static;
  }

  .today-grid {
    grid-template-columns: 1fr;
  }

  .task-composer {
    grid-template-columns: minmax(240px, 1fr) minmax(180px, 0.8fr) 148px 42px;
  }

  .task-composer-title {
    grid-column: 1 / -1;
  }

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

  .workflow-panel {
    grid-template-columns: 1fr;
  }

  .calendar-week {
    grid-template-columns: repeat(7, minmax(190px, 1fr));
  }
}

@media (max-width: 820px) {
  .modal-dialog.agreement-modal {
    width: min(640px, calc(100vw - 24px));
    padding: 14px;
  }

  .agreement-summary-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .agreement-basics-grid {
    grid-template-columns: 1fr;
  }

  .shoot-day-card-head,
  .shoot-day-defaults,
  .shoot-day-model-row,
  .studio-extra-service-row {
    grid-template-columns: 1fr;
  }

  .shoot-day-actions {
    justify-content: flex-start;
  }

  .shoot-day-add-date,
  .shoot-day-actions .btn {
    width: 100%;
  }

  .shoot-day-card-head .pill-row,
  .shoot-day-model-row .pill,
  .studio-extra-service-row .pill {
    justify-content: flex-start;
    justify-self: start;
  }

  .studio-extra-service-labels {
    display: none;
  }

  .sc-models-header {
    min-height: 68px;
    padding-top: calc(10px + env(safe-area-inset-top));
    padding-right: calc(18px + env(safe-area-inset-right));
    padding-bottom: 10px;
    padding-left: calc(18px + env(safe-area-inset-left));
  }

  .sc-models-logo {
    gap: 7px;
  }

  .sc-models-logo span {
    font-size: 13px;
    letter-spacing: 0.28em;
  }

  .sc-models-logo small {
    font-size: 9px;
    letter-spacing: 0.42em;
  }

  .sc-models-nav {
    display: none;
  }

  .sc-mobile-menu {
    display: block;
  }

  .sc-mobile-menu summary {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    gap: 5px;
    border: 1px solid rgba(30, 30, 28, 0.16);
    border-radius: 999px;
    color: #1e1e1c;
    cursor: pointer;
    list-style: none;
  }

  .sc-mobile-menu summary:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
  }

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

  .sc-mobile-menu summary span {
    width: 17px;
    height: 1px;
    display: block;
    background: currentColor;
  }

  .sc-mobile-menu nav {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    z-index: 30;
    min-width: min(272px, calc(100vw - 36px - env(safe-area-inset-left) - env(safe-area-inset-right)));
    display: grid;
    gap: 4px;
    padding: 14px;
    border: 1px solid rgba(221, 214, 202, 0.92);
    border-radius: 8px;
    background: #fffdf8;
    box-shadow: 0 18px 48px rgba(37, 31, 25, 0.16);
  }

  .sc-mobile-menu nav a {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1e1e1c;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 12px;
    font-weight: 720;
  }

  .sc-apply-main {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .sc-apply-portrait {
    min-height: 0;
    aspect-ratio: 4 / 5;
  }

  .sc-apply-copy {
    justify-content: flex-start;
    padding: 38px calc(22px + env(safe-area-inset-right)) 54px calc(22px + env(safe-area-inset-left));
  }

  .sc-apply-copy h1 {
    margin-bottom: 28px;
    font-size: clamp(25px, 6.8vw, 30px);
  }

  .sc-apply-text {
    gap: 18px;
    font-size: 14px;
    line-height: 1.32;
  }

  .sc-apply-page .sc-content-actions {
    margin-top: 34px;
  }

  .sc-home-hero,
  .sc-home-mosaic {
    min-height: clamp(560px, 82svh, 760px);
    height: clamp(560px, 82svh, 760px);
  }

  .sc-home-mosaic {
    display: block;
  }

  .sc-home-tile {
    display: none;
  }

  .sc-home-feature-tile {
    display: grid;
    width: 100%;
    height: 100%;
  }

  .sc-home-feature-tile > img:not(.sc-home-mobile-media) {
    display: none;
  }

  .sc-home-feature-tile .sc-home-desktop-media {
    display: none;
  }

  .sc-home-feature-tile .sc-home-mobile-media {
    display: block;
  }

  .sc-home-feature-tile::after {
    background:
      linear-gradient(90deg, rgba(44, 35, 28, 0.58), rgba(44, 35, 28, 0.12) 66%, rgba(44, 35, 28, 0.04)),
      linear-gradient(180deg, rgba(44, 35, 28, 0.02), rgba(44, 35, 28, 0.46) 72%, rgba(44, 35, 28, 0.62));
  }

  .sc-home-feature-content {
    top: calc(28px + env(safe-area-inset-top));
    left: calc(22px + env(safe-area-inset-left));
    right: calc(22px + env(safe-area-inset-right));
    bottom: calc(24px + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .sc-home-feature-content h1 {
    max-width: 17ch;
    font-size: clamp(40px, 10.8vw, 50px);
    line-height: 1;
  }

  .sc-home-cta {
    gap: 18px;
    margin-top: auto;
  }

  .sc-home-cta-buttons {
    width: 100%;
    display: grid;
    gap: 12px;
  }

  .sc-home-button {
    width: 100%;
    min-height: 54px;
  }

  .sc-home-apply-link {
    min-height: 44px;
    align-items: center;
  }

  .sc-home-dots {
    display: flex;
  }

  .sc-editorial-cards {
    width: calc(100% - 40px - env(safe-area-inset-left) - env(safe-area-inset-right));
    padding: 28px 0 46px;
  }

  .sc-editorial-card {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 24px 0;
  }

  .sc-editorial-card figure {
    aspect-ratio: 1.62 / 1;
  }

  .sc-public-footer {
    width: calc(100% - 40px - env(safe-area-inset-left) - env(safe-area-inset-right));
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .sc-footer-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
}

@media (max-width: 760px) {
  .sc-models-header {
    min-height: 68px;
  }

  .sc-models-logo {
    gap: 7px;
  }

  .sc-models-logo span {
    font-size: 13px;
    letter-spacing: 0.28em;
  }

  .sc-models-logo small {
    font-size: 9px;
    letter-spacing: 0.42em;
  }

  .sc-models-nav {
    display: none;
  }

  .sc-mobile-menu {
    display: block;
  }

  .sc-mobile-menu summary {
    width: 44px;
    height: 44px;
  }

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

  .sc-mobile-menu summary span {
    width: 17px;
    height: 1px;
    display: block;
    background: currentColor;
  }

  .sc-mobile-menu nav {
    min-width: min(272px, calc(100vw - 36px - env(safe-area-inset-left) - env(safe-area-inset-right)));
  }

  .sc-mobile-menu nav a {
    min-height: 44px;
  }

  .sc-home-hero,
  .sc-home-mosaic {
    min-height: clamp(560px, 82svh, 760px);
    height: clamp(560px, 82svh, 760px);
  }

  .sc-home-mosaic {
    display: block;
  }

  .sc-home-tile {
    display: none;
  }

  .sc-home-feature-tile {
    display: grid;
    width: 100%;
    height: 100%;
  }

  .sc-home-feature-tile .sc-home-desktop-media {
    display: none;
  }

  .sc-home-feature-tile::after {
    background:
      linear-gradient(90deg, rgba(44, 35, 28, 0.58), rgba(44, 35, 28, 0.12) 66%, rgba(44, 35, 28, 0.04)),
      linear-gradient(180deg, rgba(44, 35, 28, 0.02), rgba(44, 35, 28, 0.46) 72%, rgba(44, 35, 28, 0.62));
  }

  .sc-home-feature-content {
    top: calc(28px + env(safe-area-inset-top));
    left: calc(22px + env(safe-area-inset-left));
    right: calc(22px + env(safe-area-inset-right));
    bottom: calc(24px + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .sc-home-feature-content h1 {
    max-width: 17ch;
    font-size: clamp(40px, 10.8vw, 50px);
    line-height: 1;
  }

  .sc-home-cta-buttons {
    gap: 12px;
  }

  .sc-home-button {
    width: 100%;
    min-height: 54px;
  }

  .sc-home-dots {
    display: flex;
  }

  .sc-editorial-cards {
    width: calc(100% - 40px - env(safe-area-inset-left) - env(safe-area-inset-right));
    padding: 28px 0 46px;
  }

  .sc-editorial-card {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .sc-editorial-card figure {
    aspect-ratio: 1.7 / 1;
  }

  .sc-models-page {
    padding: 0 0 36px;
  }

  .sc-models-main {
    width: calc(100% - 24px);
  }

  .sc-portfolio-header {
    min-height: 178px;
    padding: 18px 12px 0;
    overflow: hidden;
  }

  .sc-portfolio-wordmark {
    font-size: clamp(48px, 18vw, 88px);
    white-space: normal;
  }

  .sc-portfolio-nav {
    top: 22px;
    right: 12px;
  }

  .sc-portfolio-intro {
    padding: 16px 12px 0;
  }

  .sc-portfolio-intro p {
    font-size: 12px;
  }

  .sc-portfolio-gallery {
    gap: 24px;
    padding: 48px 12px 52px;
  }

  .sc-portfolio-intro {
    width: calc(100% - 24px);
    padding: 34px 0 0;
  }

  .sc-portfolio-section.is-gallery,
  .sc-portfolio-section.is-natural,
  .sc-portfolio-section.is-fluid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    gap: 24px;
  }

  .sc-portfolio-section.is-fluid .sc-portfolio-media {
    grid-column: auto !important;
    grid-row: auto !important;
    height: auto;
    aspect-ratio: var(--portfolio-ratio, 3 / 4);
  }

  .sc-portfolio-section.is-gallery .sc-portfolio-media {
    grid-column: auto !important;
  }

  .sc-portfolio-section.is-fluid .sc-portfolio-media img,
  .sc-portfolio-section.is-fluid .sc-portfolio-media video {
    height: 100%;
  }

  .sc-content-page {
    padding: 0;
  }

  .sc-content-main {
    width: calc(100% - 24px);
    gap: 18px;
  }

  .sc-content-hero {
    gap: 20px;
    padding: 28px 0 18px;
  }

  .sc-content-hero h1 {
    font-size: clamp(40px, 15vw, 72px);
  }

  .sc-content-hero p {
    font-size: 16px;
  }

  .sc-content-section {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 24px 0;
  }

  .sc-content-section-body p,
  .sc-legal-section .sc-content-section-body p {
    font-size: 15px;
    line-height: 1.62;
  }

  .sc-login-panel form,
  .sc-public-footer {
    grid-template-columns: 1fr;
  }

  .sc-public-footer {
    width: calc(100% - 40px);
    gap: 28px;
  }

  .sc-footer-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 60;
    height: auto;
    padding: 10px;
    gap: 9px;
  }

  .nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav-item {
    min-width: 44px;
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 8px;
  }

  .nav-item span:nth-child(2),
  .nav-count {
    display: none;
  }

  .nav-item.active {
    min-width: 132px;
    grid-template-columns: 24px minmax(0, 1fr);
    justify-items: start;
  }

  .nav-item.active span:nth-child(2) {
    display: block;
  }

  .brand {
    padding: 6px 4px;
    border-bottom: 0;
  }

  .brand-kicker {
    display: none;
  }

  .sidebar-bottom {
    margin-top: 0;
    padding: 0;
    border-top: 0;
  }

  .stats,
  .three,
  .form-grid,
  .front-request-grid,
  .model-toolbar,
  .model-add-grid,
  .client-brief-grid,
  .client-portal-toolbar,
  .brand-model-grid,
  .client-model-facts,
  .model-measures,
  .profile-fields,
  .today-grid,
  .project-filter-bar,
  .project-stats,
  .project-context-grid,
  .task-composer,
  .project-task-add,
  .task-edit-grid,
  .project-task-row,
  .agreement-task-add,
  .agreement-link-existing,
  .agreement-task-row,
  .parent-request-item,
  .parent-time-row,
  .model-request-row,
  .family-editor,
  .portal-preview-card,
  .portal-preview-bar,
  .portal-editor-hero,
  .portal-editor-grid,
  .portal-tile-editor,
  .portal-media-row,
  .portal-model-card-studio,
  .portal-section-settings,
  .portal-editor-metrics,
  .portal-import-strip,
  .bank-account-grid,
  .parent-profile-summary-grid,
  .parent-calendar-row,
  .parent-photo-booking,
  .parent-photo-slot-controls,
  .parent-time-inputs {
    grid-template-columns: 1fr;
  }

  .client-model-feature {
    gap: 16px;
    margin-bottom: 18px;
    padding: 16px 0 22px;
    scroll-margin-top: 14px;
  }

  .client-model-feature-media {
    min-height: 430px;
  }

  .client-model-feature-top {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .client-model-feature-top h3 {
    font-size: clamp(48px, 15vw, 76px);
  }

  .client-model-facts div {
    border-right: 0;
    border-bottom: 1px solid rgba(30, 30, 28, 0.12);
    padding: 11px 0;
  }

  .client-model-facts div:last-child {
    border-bottom: 0;
  }

  .client-model-actions .btn {
    width: 100%;
    min-height: 48px;
  }

  .public-parent .public-portal-main {
    width: min(100% - 20px, 1320px);
    padding-top: 8px;
  }

  .parent-public-copy {
    grid-template-columns: 1fr;
    align-items: start;
    min-height: 0;
    padding: 14px;
  }

  .public-portal-page.public-parent .parent-public-copy {
    min-height: 0;
  }

  .parent-public-photo {
    width: 100%;
    min-height: 0;
    max-height: none;
  }

  .parent-public-visual {
    width: 100%;
  }

  .parent-contact-topline {
    grid-template-columns: 1fr;
  }

  .parent-contact-topline .btn {
    justify-self: start;
  }

  .parent-child-switcher {
    grid-template-columns: 1fr;
  }

  .parent-child-card {
    grid-template-columns: 76px minmax(0, 1fr);
    min-height: 102px;
  }

  .parent-child-card img,
  .parent-child-avatar {
    width: 76px;
    height: 76px;
  }

  .parent-child-status {
    justify-self: start;
    grid-column: 2;
  }

  .parent-child-add-icon {
    width: 64px;
    height: 64px;
  }

  .parent-job-head,
  .parent-job-facts,
  .parent-job-compact-grid.has-transport,
  .parent-job-earnings,
  .parent-job-actions,
  .parent-transport-summary,
  .parent-address-row {
    grid-template-columns: 1fr;
  }

  .parent-job-secondary,
  .parent-address-actions {
    justify-content: stretch;
  }

  .parent-job-secondary .btn,
  .parent-address-actions .btn {
    width: 100%;
  }

  .parent-address-choice {
    grid-template-columns: 1fr 1fr;
  }

  .portal-preview-card > .btn {
    grid-column: 1;
    justify-self: start;
  }

  .mini-control select,
  .notification-button {
    width: 100%;
    min-width: 0;
  }

  .notification-center {
    inset: auto 10px 10px 10px;
    width: auto;
    max-height: 68vh;
  }

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

  .command-shell {
    padding-top: 68px;
    place-items: start center;
  }

  .command-result {
    grid-template-columns: 1fr;
  }

  .command-result small {
    grid-column: 1;
  }

  .section-head {
    display: grid;
    grid-template-columns: 1fr;
  }

  .list-item,
  .booking-row,
  .invoice-row {
    grid-template-columns: 1fr;
  }

  .list-item > .pill-row,
  .booking-row > .pill-row,
  .invoice-row > .pill-row {
    justify-content: flex-start;
  }

  .portal-tabs {
    display: flex;
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .portal-tabs button {
    white-space: nowrap;
  }

  .client-portal-intro {
    min-height: 0;
    padding: 16px;
  }

  .client-portal-intro h2 {
    font-size: 24px;
  }

  .client-portal-bar {
    align-items: stretch;
    display: grid;
  }

  .client-casting-toggle {
    width: 100%;
  }

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

  .wishlist-panel {
    position: static;
  }

  .portal-browser-frame {
    padding: 8px;
  }

  .parent-public-copy {
    min-height: 0;
    padding: 16px;
  }

  .parent-public-copy h2 {
    font-size: 26px;
  }

  .model-request-controls {
    justify-content: flex-start;
  }

  .task-composer-submit {
    justify-self: start;
  }

  .project-task-row > .pill-row {
    grid-column: 1;
  }

  .kanban {
    grid-template-columns: repeat(4, 86vw);
  }

  .calendar-month {
    grid-template-columns: repeat(7, minmax(132px, 1fr));
  }

  .calendar-toolbar {
    grid-template-columns: 1fr;
  }

  .small-segmented {
    justify-self: start;
  }

  .approval-queue,
  .task-summary-main {
    grid-template-columns: 1fr;
  }
}

:root[data-theme="light"] .sidebar {
  background: linear-gradient(180deg, #fffdf8, #ecefe7);
}

:root[data-theme="light"] .brand:hover,
:root[data-theme="light"] .brand:focus-visible,
:root[data-theme="light"] .nav-item:hover,
:root[data-theme="light"] .nav-item.active,
:root[data-theme="light"] .customer-card:hover,
:root[data-theme="light"] .customer-card.active,
:root[data-theme="light"] .project-card:hover,
:root[data-theme="light"] .project-card.active {
  background: rgba(152, 98, 31, 0.08);
  border-color: rgba(152, 98, 31, 0.24);
}

:root[data-theme="light"] .mini-control select,
:root[data-theme="light"] .saved-view select,
:root[data-theme="light"] .rate-card-form input,
:root[data-theme="light"] .rate-card-form select,
:root[data-theme="light"] .toolbar input,
:root[data-theme="light"] .toolbar select,
:root[data-theme="light"] .measure-input,
:root[data-theme="light"] .field input,
:root[data-theme="light"] .field select,
:root[data-theme="light"] .field textarea,
:root[data-theme="light"] .task-composer input,
:root[data-theme="light"] .task-composer select,
:root[data-theme="light"] .task-edit-grid input,
:root[data-theme="light"] .task-edit-grid select,
:root[data-theme="light"] .task-edit-grid textarea,
:root[data-theme="light"] .agreement-task-add input,
:root[data-theme="light"] .agreement-task-add select,
:root[data-theme="light"] .agreement-link-existing select,
:root[data-theme="light"] .model-request-controls select,
:root[data-theme="light"] .project-filter-bar input,
:root[data-theme="light"] .project-filter-bar select,
:root[data-theme="light"] .customer-filter-bar input,
:root[data-theme="light"] .customer-editor-grid input,
:root[data-theme="light"] .customer-editor-grid select,
:root[data-theme="light"] .customer-editor-grid textarea,
:root[data-theme="light"] .project-task-add input,
:root[data-theme="light"] .project-task-add select,
:root[data-theme="light"] .client-portal-toolbar input,
:root[data-theme="light"] .client-portal-toolbar select,
:root[data-theme="light"] .model-comment textarea,
:root[data-theme="light"] .portal-preview-card select,
:root[data-theme="light"] .parent-time-inputs input {
  background: #fffdf8;
  color: var(--text);
  border-color: var(--line);
}

:root[data-theme="light"] .task-composer input:focus,
:root[data-theme="light"] .task-composer select:focus {
  background: #ffffff;
  border-color: rgba(152, 98, 31, 0.38);
  box-shadow: 0 0 0 3px rgba(152, 98, 31, 0.1);
}

:root[data-theme="light"] .mode-switch,
:root[data-theme="light"] .workflow-panel,
:root[data-theme="light"] .workflow-step,
:root[data-theme="light"] .data-alert,
:root[data-theme="light"] .role-card,
:root[data-theme="light"] .template-card,
:root[data-theme="light"] .portal-landing-preview,
:root[data-theme="light"] .call-sheet-preview,
:root[data-theme="light"] th,
:root[data-theme="light"] .pill,
:root[data-theme="light"] .list-item,
:root[data-theme="light"] .booking-row,
:root[data-theme="light"] .invoice-row,
:root[data-theme="light"] .task-card,
:root[data-theme="light"] .model-profile,
:root[data-theme="light"] .kanban-col,
:root[data-theme="light"] .task-card-summary,
:root[data-theme="light"] .task-composer,
:root[data-theme="light"] .filter-chip,
:root[data-theme="light"] .segmented,
:root[data-theme="light"] .calendar-weekday,
:root[data-theme="light"] .calendar-event-pill,
:root[data-theme="light"] .agenda-day,
:root[data-theme="light"] .match-card,
:root[data-theme="light"] .integration-card,
:root[data-theme="light"] .casting-card,
:root[data-theme="light"] .doc-tile,
:root[data-theme="light"] .agreement-task-row,
:root[data-theme="light"] .parent-time-row,
:root[data-theme="light"] .model-request-row,
:root[data-theme="light"] .approval-queue,
:root[data-theme="light"] .message-preview,
:root[data-theme="light"] .invoice-readiness,
:root[data-theme="light"] .backup-suggestions,
:root[data-theme="light"] .project-card,
:root[data-theme="light"] .project-metric,
:root[data-theme="light"] .project-context-panel,
:root[data-theme="light"] .project-section,
:root[data-theme="light"] .project-task-row,
:root[data-theme="light"] .customer-card,
:root[data-theme="light"] .customer-editor-panel,
:root[data-theme="light"] .customer-panel,
:root[data-theme="light"] .customer-record-row,
:root[data-theme="light"] .profile-field,
:root[data-theme="light"] .client-portal-intro,
:root[data-theme="light"] .client-portal-brief,
:root[data-theme="light"] .manual-request-form,
:root[data-theme="light"] .wishlist-panel,
:root[data-theme="light"] .brand-model-card,
:root[data-theme="light"] .model-measures span,
:root[data-theme="light"] .wishlist-item,
:root[data-theme="light"] .client-request-model,
:root[data-theme="light"] .portal-preview-card,
:root[data-theme="light"] .portal-preview-stage,
:root[data-theme="light"] .parent-public-copy,
:root[data-theme="light"] .parent-public-photo,
:root[data-theme="light"] .parent-profile-edit,
:root[data-theme="light"] .parent-public-side,
:root[data-theme="light"] .parent-side-block,
:root[data-theme="light"] .parent-booking-item,
:root[data-theme="light"] .parent-child-card,
:root[data-theme="light"] .parent-calendar-card,
:root[data-theme="light"] .parent-availability-add,
:root[data-theme="light"] .transport-estimate,
:root[data-theme="light"] .today-card,
:root[data-theme="light"] .day-card {
  background: rgba(63, 79, 56, 0.045);
}

:root[data-theme="light"] .brand-model-media,
:root[data-theme="light"] .brand-model-media span,
:root[data-theme="light"] .parent-public-photo,
:root[data-theme="light"] .parent-public-photo span {
  background: rgba(55, 111, 136, 0.08);
}

:root[data-theme="light"] .brand-model-card {
  background: transparent;
}

:root[data-theme="light"] .brand-model-add {
  background: rgba(255, 253, 248, 0.94);
  color: #171811;
}

:root[data-theme="light"] .brand-model-card.selected .brand-model-add {
  background: #d89a3d;
  color: #201b12;
}

:root[data-theme="light"] .portal-browser-frame {
  background: #fffdf8;
}

:root[data-theme="light"] .portal-url {
  background: #fffdf8;
}

:root[data-theme="light"] .calendar-day {
  background: #fbfaf5;
}

:root[data-theme="light"] .calendar-day.today,
:root[data-theme="light"] .agenda-day.today {
  background: rgba(152, 98, 31, 0.1);
}

:root[data-theme="light"] .command-shell,
:root[data-theme="light"] .modal-backdrop {
  background: rgba(38, 45, 37, 0.3);
}

:root[data-theme="light"] .modal-dialog,
:root[data-theme="light"] .notification-center,
:root[data-theme="light"] .command-panel,
:root[data-theme="light"] .card,
:root[data-theme="light"] .panel {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
}

:root[data-theme="light"] .avatar,
:root[data-theme="light"] .casting-card img {
  background: #e6e1d5;
  color: #263026;
}

:root[data-theme="light"] .mode-switch button.active,
:root[data-theme="light"] .tabs button.active,
:root[data-theme="light"] .segmented button.active,
:root[data-theme="light"] .btn.primary,
:root[data-theme="light"] .icon-btn.add-button,
:root[data-theme="light"] .workflow-step.active {
  color: #201b12;
}

:root[data-theme="light"] .pill.green,
:root[data-theme="light"] .workflow-step.done {
  color: #2d6635;
  border-color: rgba(63, 121, 69, 0.34);
  background: rgba(63, 121, 69, 0.11);
}

:root[data-theme="light"] .pill.blue {
  color: #245e76;
  border-color: rgba(55, 111, 136, 0.34);
  background: rgba(55, 111, 136, 0.1);
}

:root[data-theme="light"] .pill.red,
:root[data-theme="light"] .btn.warn {
  color: #8f302a;
  border-color: rgba(166, 72, 64, 0.34);
  background: rgba(166, 72, 64, 0.1);
}

:root[data-theme="light"] .pill.amber {
  color: #805015;
  border-color: rgba(152, 98, 31, 0.34);
  background: rgba(152, 98, 31, 0.11);
}

:root[data-theme="light"] .portal-landing-preview code,
:root[data-theme="light"] .portal-card-url,
:root[data-theme="light"] .inline-preview summary {
  color: var(--blue);
}

:root[data-theme="light"] .check-dot.done {
  box-shadow: inset 0 0 0 4px #fbfaf5;
}

:root[data-theme="light"] .toast {
  color: #201b12;
}

:root[data-theme="light"] .toast-undo {
  color: #201b12;
}

@media (max-width: 360px) {
  .sc-models-header {
    padding-right: calc(14px + env(safe-area-inset-right));
    padding-left: calc(14px + env(safe-area-inset-left));
  }

  .public-portal-header {
    padding-right: calc(14px + env(safe-area-inset-right));
    padding-left: calc(14px + env(safe-area-inset-left));
  }

  .sc-models-logo span {
    font-size: 12px;
    letter-spacing: 0.22em;
  }

  .public-portal-brand span {
    font-size: 12px;
    letter-spacing: 0.22em;
  }

  .sc-models-logo small {
    font-size: 8px;
    letter-spacing: 0.38em;
  }

  .public-portal-brand small {
    font-size: 8px;
    letter-spacing: 0.38em;
  }

  .public-portal-brand em {
    font-size: 9px;
    letter-spacing: 0.1em;
  }

  .sc-home-feature-content {
    left: calc(18px + env(safe-area-inset-left));
    right: calc(18px + env(safe-area-inset-right));
    gap: 18px;
  }

  .sc-home-feature-content h1 {
    font-size: clamp(40px, 12vw, 48px);
  }

  .sc-home-button {
    min-height: 54px;
    font-size: 11px;
  }

  .sc-footer-links a {
    letter-spacing: 0.06em;
    font-size: 10px;
  }
}

/* Agency calendar cockpit redesign */
.ui-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.ui-icon-fallback {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  font-size: 11px;
  font-weight: 760;
}

.nav-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: currentColor;
}

.nav-count {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  font-size: 11px;
}

.calendar-cockpit-page {
  --bg: #f6f3ec;
  --bg-2: #f0ece2;
  --surface: #fffdfa;
  --surface-2: #f6f1e8;
  --surface-3: #eee7da;
  --surface-muted: #f0ece2;
  --line: #ebe6dc;
  --line-strong: #ded7c9;
  --border: #ded7c9;
  --border-soft: #ebe6dc;
  --text: #171814;
  --muted: #707568;
  --faint: #9a9a8f;
  --accent: #d8b87a;
  --accent-strong: #b98c45;
  --sage: #cfd8c6;
  --blue-soft: #dbe4ea;
  --rose-soft: #ead8d4;
  --amber: #b98c45;
  --green: #6d8464;
  --blue: #6f8ea0;
  --red: #ad675e;
  --cream: #eadcc2;
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius: 12px;
  --shadow: 0 18px 50px rgba(36, 32, 24, 0.08);
  --shadow-soft: 0 18px 50px rgba(36, 32, 24, 0.08);
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

.calendar-cockpit-page .main {
  background:
    radial-gradient(circle at 16% 12%, rgba(216, 184, 122, 0.13), transparent 26%),
    linear-gradient(180deg, #faf8f2 0%, var(--bg) 52%);
  padding: clamp(16px, 2.2vw, 26px);
}

.calendar-cockpit-page .topbar {
  display: none;
}

.calendar-cockpit-page .sidebar {
  gap: 10px;
  padding: 16px 18px;
  border-right: 1px solid var(--border-soft);
  background:
    linear-gradient(180deg, rgba(255, 253, 250, 0.94), rgba(246, 243, 236, 0.96)),
    var(--bg);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.6);
}

.calendar-cockpit-page .brand {
  gap: 7px;
  min-height: 66px;
  padding: 7px 6px 10px;
  border-bottom-color: var(--border-soft);
}

.calendar-cockpit-page .brand:hover,
.calendar-cockpit-page .brand:focus-visible {
  background: rgba(216, 184, 122, 0.12);
}

.calendar-cockpit-page .brand-kicker {
  color: var(--muted);
  letter-spacing: 0.18em;
}

.calendar-cockpit-page .mode-switch {
  gap: 3px;
  padding: 4px;
  border-color: var(--border-soft);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 250, 0.72);
}

.calendar-cockpit-page .mode-switch button,
.calendar-cockpit-page .tabs button {
  min-height: 36px;
  border-radius: 11px;
  color: var(--muted);
}

.calendar-cockpit-page .mode-switch button.active,
.calendar-cockpit-page .tabs button.active {
  border-color: transparent;
  background: #eadcc2;
  color: var(--text);
  box-shadow: 0 8px 18px rgba(85, 67, 37, 0.08);
}

.calendar-cockpit-page .nav {
  gap: 8px;
}

.calendar-cockpit-page .nav-item {
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 16px;
  color: #505548;
}

.calendar-cockpit-page .nav-item:hover,
.calendar-cockpit-page .nav-item.active {
  border-color: rgba(216, 184, 122, 0.34);
  background: rgba(234, 220, 194, 0.76);
  color: var(--text);
}

.calendar-cockpit-page .nav-count {
  color: #6f6b5d;
  border-color: rgba(222, 215, 201, 0.84);
  background: rgba(255, 253, 250, 0.7);
}

.calendar-cockpit-page .sidebar-bottom {
  border-top-color: var(--border-soft);
}

.calendar-cockpit-page .calendar-workspace {
  display: block;
}

.calendar-cockpit-page .calendar-card,
.calendar-cockpit-page .calendar-list-card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 253, 250, 0.96), rgba(255, 253, 250, 0.9)),
    var(--surface);
  box-shadow: var(--shadow-soft);
}

.calendar-cockpit-page .calendar-card {
  padding: clamp(18px, 2.2vw, 30px);
}

.calendar-cockpit-page .calendar-list-card {
  margin-top: 14px;
}

.calendar-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.calendar-card-head .section-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(26px, 2.6vw, 34px);
  line-height: 1.08;
  font-weight: 560;
  color: #13140f;
}

.calendar-card-head .section-sub {
  margin-top: 6px;
  max-width: 760px;
  color: var(--muted);
  font-size: 14px;
}

.calendar-commandbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.calendar-nav-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.calendar-cockpit-page .calendar-nav-controls .btn,
.calendar-cockpit-page .calendar-nav-button,
.calendar-cockpit-page .calendar-new-booking {
  min-height: 44px;
  border-color: var(--border-soft);
  border-radius: 12px;
  background: rgba(255, 253, 250, 0.82);
  color: var(--text);
  box-shadow: 0 8px 20px rgba(36, 32, 24, 0.035);
}

.calendar-cockpit-page .calendar-nav-button {
  width: 44px;
  min-width: 44px;
  height: 44px;
}

.calendar-cockpit-page .calendar-nav-controls .btn:hover,
.calendar-cockpit-page .calendar-nav-button:hover {
  border-color: var(--border);
  background: #fffdfa;
}

.calendar-month-title {
  flex: 1 1 auto;
  justify-self: start;
  min-width: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(26px, 2.4vw, 32px);
  font-weight: 560;
  text-transform: capitalize;
  color: #12130f;
}

.calendar-cockpit-page .calendar-view-toggle {
  flex: 0 0 auto;
  justify-self: end;
  gap: 0;
  padding: 4px;
  border-color: var(--border-soft);
  border-radius: 13px;
  background: rgba(255, 253, 250, 0.82);
}

.calendar-cockpit-page .calendar-view-toggle button {
  min-width: 74px;
  min-height: 36px;
  border-radius: 10px;
  color: var(--text);
  font-size: 13px;
}

.calendar-cockpit-page .calendar-view-toggle button.active {
  background: #eadcc2;
  box-shadow: 0 8px 18px rgba(85, 67, 37, 0.08);
}

.calendar-cockpit-page .calendar-new-booking {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  min-width: 152px;
  border-color: rgba(185, 140, 69, 0.42);
  background: linear-gradient(180deg, #cda461, #ad7c38);
  color: #fffdf8;
  font-weight: 760;
}

.calendar-cockpit-page .calendar-new-booking:hover {
  background: linear-gradient(180deg, #d4ad6d, #a97532);
}

.calendar-cockpit-page .calendar-new-booking .ui-icon {
  width: 17px;
  height: 17px;
}

.calendar-cockpit-page .calendar-scope-row {
  display: flex;
  max-width: 100%;
  gap: 0;
  align-items: center;
  margin: 0;
}

.calendar-cockpit-page .calendar-scope-tabs {
  display: flex;
  width: fit-content;
  max-width: 100%;
  gap: 0;
  margin-bottom: 0;
  padding: 4px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: rgba(255, 253, 250, 0.7);
}

.calendar-cockpit-page .calendar-scope-tabs button {
  min-width: 88px;
  border-radius: 10px;
}

.calendar-cockpit-page .calendar-scope-note {
  color: var(--muted);
  font-size: 12px;
}

.calendar-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.calendar-stage-main {
  min-width: 0;
}

.calendar-cockpit-page .calendar-month {
  grid-template-columns: repeat(7, minmax(104px, 1fr));
  gap: 1px;
  overflow: hidden;
  border-color: var(--border);
  border-radius: 18px;
  background: var(--border-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.calendar-cockpit-page .calendar-weekday {
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: 8px;
  color: #52564d;
  background: linear-gradient(180deg, #fbf9f4, #f4efe6);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.04em;
}

.calendar-cockpit-page .calendar-weekday.weekend-weekday {
  background: #f6efe3;
}

.calendar-cockpit-page .calendar-day {
  min-height: 132px;
  padding: 10px;
  border: 0;
  background: rgba(255, 253, 250, 0.94);
  transition: background 160ms ease, box-shadow 160ms ease, outline-color 160ms ease, transform 160ms ease;
}

.calendar-cockpit-page .calendar-day.weekend-day {
  background: #fbf6ec;
}

.calendar-cockpit-page .calendar-day:hover {
  outline: 1px solid rgba(185, 140, 69, 0.36);
  outline-offset: -1px;
  background: #fffdfa;
  box-shadow: inset 0 0 0 999px rgba(216, 184, 122, 0.045);
}

.calendar-cockpit-page .calendar-day.selected-day {
  outline: 2px solid rgba(185, 140, 69, 0.88);
  outline-offset: -2px;
  background: #fffdfa;
}

.calendar-cockpit-page .calendar-day.today {
  background: rgba(255, 253, 250, 0.98);
}

.calendar-cockpit-page .calendar-day.muted-day {
  opacity: 1;
  background: #f4f0e7;
}

.calendar-cockpit-page .calendar-day.muted-day .calendar-day-number,
.calendar-cockpit-page .calendar-day.muted-day .calendar-event-pill {
  opacity: 0.42;
}

.calendar-cockpit-page .calendar-day-head {
  justify-content: space-between;
  min-height: 30px;
}

.calendar-cockpit-page .calendar-day-number {
  display: inline-grid;
  min-width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  color: #22231e;
  font-size: 14px;
  font-weight: 650;
}

.calendar-cockpit-page .calendar-day.today .calendar-day-number {
  border: 1px solid rgba(185, 140, 69, 0.55);
  background: #b98c45;
  color: #fffdfa;
  box-shadow: 0 8px 18px rgba(185, 140, 69, 0.22);
}

.calendar-cockpit-page .calendar-day.selected-day:not(.today) .calendar-day-number {
  border: 1px solid rgba(185, 140, 69, 0.38);
  color: #7b5d2c;
}

.calendar-cockpit-page .calendar-day-events {
  gap: 7px;
}

.calendar-cockpit-page .calendar-event-pill {
  position: relative;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  min-height: 0;
  padding: 8px 8px 8px 10px;
  overflow: hidden;
  border: 1px solid rgba(222, 215, 201, 0.92);
  border-left: 3px solid #9fb4bf;
  border-radius: 14px;
  background: rgba(255, 253, 250, 0.94);
  color: var(--text);
  box-shadow: 0 8px 18px rgba(36, 32, 24, 0.045);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.calendar-cockpit-page .calendar-event-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(185, 140, 69, 0.28);
  box-shadow: 0 12px 26px rgba(36, 32, 24, 0.09);
}

.calendar-cockpit-page .calendar-event-pill.status-inquiry {
  border-left-color: #9fb3bf;
}

.calendar-cockpit-page .calendar-event-pill.status-confirmed {
  border-left-color: #83a078;
}

.calendar-cockpit-page .calendar-event-pill.status-completed {
  border-left-color: #d8b87a;
}

.calendar-cockpit-page .calendar-event-pill.status-payment {
  border-left-color: #c99648;
}

.calendar-cockpit-page .calendar-event-pill.status-issue {
  border-left-color: #bd746b;
}

.calendar-event-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}

.calendar-event-topline time {
  color: #575b50;
  font-size: 11px;
  font-weight: 720;
  white-space: nowrap;
}

.calendar-status-chip {
  display: inline-flex;
  max-width: 76px;
  min-height: 20px;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  overflow: hidden;
  border-radius: 999px;
  color: #536170;
  background: var(--blue-soft);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-status-chip.status-confirmed {
  color: #4f6a47;
  background: var(--sage);
}

.calendar-status-chip.status-completed {
  color: #765a2c;
  background: #eee2cb;
}

.calendar-status-chip.status-payment {
  color: #7e571b;
  background: #f2d59c;
}

.calendar-status-chip.status-issue {
  color: #8f4b43;
  background: var(--rose-soft);
}

.calendar-cockpit-page .calendar-event-main {
  gap: 8px;
}

.calendar-cockpit-page .calendar-event-main strong {
  min-width: 0;
  overflow: hidden;
  color: #171814;
  font-size: 12px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-cockpit-page .calendar-event-pill small {
  color: #5d6158;
  font-size: 11px;
}

.calendar-event-meta {
  display: flex;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
}

.calendar-event-meta span {
  display: inline-flex;
  max-width: 74px;
  min-height: 18px;
  align-items: center;
  padding: 2px 6px;
  overflow: hidden;
  border: 1px solid rgba(222, 215, 201, 0.86);
  border-radius: 999px;
  color: #74786f;
  background: rgba(246, 241, 232, 0.82);
  font-size: 9px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-cockpit-page .calendar-event-models {
  max-width: 88px;
}

.calendar-cockpit-page .calendar-event-avatar {
  width: 22px;
  height: 22px;
  border-color: rgba(255, 253, 250, 0.9);
  background: #e6ddd0;
  color: #171814;
  box-shadow: 0 3px 8px rgba(36, 32, 24, 0.12);
}

.calendar-cockpit-page .calendar-more {
  color: #7b7f74;
  font-size: 11px;
}

.calendar-cockpit-page .calendar-month .calendar-event-topline {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.calendar-cockpit-page .calendar-month .calendar-status-chip {
  max-width: 68px;
}

.calendar-cockpit-page .calendar-month .calendar-event-models,
.calendar-cockpit-page .calendar-month .calendar-event-meta {
  display: none;
}

.calendar-cockpit-page .calendar-month .calendar-event-main {
  display: block;
}

.calendar-cockpit-page .calendar-month .calendar-event-main strong {
  display: block;
}

.calendar-day-drawer {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 18px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--border-soft);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 253, 250, 0.96), rgba(250, 247, 240, 0.94)),
    var(--surface);
  box-shadow: 0 16px 38px rgba(36, 32, 24, 0.07);
}

.calendar-drawer-head {
  display: grid;
  gap: 4px;
}

.calendar-drawer-head span,
.calendar-drawer-label {
  color: #767a70;
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.calendar-drawer-head strong {
  font-family: Georgia, "Times New Roman", serif;
  color: #151612;
  font-size: 24px;
  font-weight: 560;
  line-height: 1.1;
}

.calendar-drawer-section {
  display: grid;
  gap: 10px;
}

.calendar-drawer-empty {
  display: grid;
  min-height: 116px;
  place-items: center;
  padding: 16px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: rgba(246, 241, 232, 0.6);
  color: var(--muted);
  text-align: center;
}

.calendar-drawer-empty .ui-icon {
  width: 25px;
  height: 25px;
  margin-bottom: 4px;
  color: #7f8378;
}

.calendar-drawer-empty strong {
  color: var(--text);
  font-size: 13px;
}

.calendar-drawer-empty span {
  color: var(--muted);
  font-size: 12px;
}

.holiday-drawer-list {
  display: grid;
  gap: 7px;
}

.holiday-drawer-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 50px;
  padding: 10px;
  border: 1px solid rgba(116, 132, 104, 0.16);
  border-radius: 14px;
  background: rgba(207, 216, 198, 0.2);
  color: #22231e;
}

.holiday-drawer-item > .ui-icon {
  width: 18px;
  height: 18px;
  justify-self: center;
  color: #66745c;
}

.holiday-drawer-item span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.holiday-drawer-item strong,
.holiday-drawer-item small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.holiday-drawer-item strong {
  color: var(--text);
  font-size: 13px;
}

.holiday-drawer-item small {
  color: var(--muted);
  font-size: 11px;
}

.calendar-drawer-event {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--border-soft);
  border-left: 3px solid #9fb3bf;
  border-radius: 14px;
  background: rgba(255, 253, 250, 0.86);
  color: var(--text);
  text-align: left;
}

.calendar-drawer-event.status-confirmed {
  border-left-color: #83a078;
}

.calendar-drawer-event.status-completed {
  border-left-color: #d8b87a;
}

.calendar-drawer-event.status-payment {
  border-left-color: #c99648;
}

.calendar-drawer-event.status-issue {
  border-left-color: #bd746b;
}

.calendar-drawer-event-time {
  color: #575b50;
  font-size: 11px;
  font-weight: 760;
}

.calendar-drawer-event-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.calendar-drawer-event-body strong,
.calendar-drawer-event-body small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-drawer-event-body small {
  color: var(--muted);
  font-size: 11px;
}

.calendar-quick-actions {
  display: grid;
  gap: 6px;
}

.calendar-quick-action {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 16px;
  gap: 9px;
  align-items: center;
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: rgba(255, 253, 250, 0.86);
  color: #22231e;
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.calendar-quick-action:hover {
  transform: translateY(-1px);
  border-color: rgba(185, 140, 69, 0.34);
  background: #fffdfa;
}

.calendar-quick-action span {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 660;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-quick-action .ui-icon:last-child {
  width: 15px;
  height: 15px;
  color: #85897d;
}

.calendar-day-summary {
  display: grid;
  gap: 8px;
}

.calendar-summary-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.calendar-summary-row .ui-icon {
  width: 16px;
  height: 16px;
  color: #74786f;
}

.calendar-summary-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-summary-row strong {
  color: #575b50;
  font-size: 12px;
  font-weight: 650;
}

.calendar-cockpit-page .calendar-week,
.calendar-cockpit-page .calendar-day-list {
  gap: 12px;
}

.calendar-cockpit-page .agenda-day {
  min-height: 320px;
  border-color: var(--border-soft);
  border-radius: 18px;
  background: rgba(255, 253, 250, 0.88);
}

.calendar-cockpit-page .agenda-day.today {
  border-color: rgba(185, 140, 69, 0.42);
  background: #fffdfa;
}

.calendar-cockpit-page .agenda-day.selected-day {
  outline: 2px solid rgba(185, 140, 69, 0.72);
  outline-offset: -2px;
}

.calendar-cockpit-page .agenda-head span {
  color: var(--muted);
  letter-spacing: 0.08em;
}

.calendar-cockpit-page .agenda-head strong {
  color: var(--text);
}

.calendar-cockpit-page .agenda-head .calendar-day-badges {
  justify-self: end;
}

.calendar-cockpit-page .agenda-head .calendar-holiday-marker,
.calendar-cockpit-page .agenda-head .calendar-birthday-marker {
  letter-spacing: 0;
  text-transform: none;
  font-size: 11px;
}

.calendar-cockpit-page .agenda-head .calendar-holiday-marker {
  color: #62705a;
}

.calendar-cockpit-page .agenda-head .calendar-holiday-marker .ui-icon {
  color: currentColor;
}

.calendar-cockpit-page .agenda-head .calendar-birthday-marker {
  color: #765b2d;
}

.calendar-cockpit-page .agenda-head .calendar-birthday-marker .ui-icon {
  color: #9a7535;
}

.calendar-cockpit-page .agenda-head .calendar-birthday-marker span {
  color: #765b2d;
}

@media (max-width: 1180px) {
  .calendar-stage {
    grid-template-columns: 1fr;
  }

  .calendar-day-drawer {
    position: static;
    order: -1;
  }
}

@media (max-width: 920px) {
  .calendar-cockpit-page .main {
    padding: 14px;
  }

  .calendar-commandbar {
    flex-wrap: wrap;
    gap: 8px;
  }

  .calendar-month-title,
  .calendar-cockpit-page .calendar-view-toggle,
  .calendar-cockpit-page .calendar-new-booking {
    justify-self: stretch;
  }

  .calendar-cockpit-page .calendar-view-toggle {
    width: 100%;
  }

  .calendar-cockpit-page .calendar-view-toggle button {
    flex: 1 1 0;
    min-width: 0;
  }

  .calendar-cockpit-page .calendar-scope-row {
    flex-wrap: wrap;
  }

  .calendar-cockpit-page .calendar-scope-tabs {
    width: auto;
    overflow-x: auto;
  }

  .calendar-cockpit-page .calendar-scope-note {
    min-width: 220px;
  }
}

@media (max-width: 760px) {
  .calendar-cockpit-page {
    grid-template-columns: 1fr;
    width: 100%;
    overflow-x: hidden;
  }

  .calendar-cockpit-page .sidebar {
    position: sticky;
    top: 0;
    z-index: 60;
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    height: auto;
    padding: 10px;
    overflow: hidden;
  }

  .calendar-cockpit-page .brand {
    width: 100%;
    min-width: 0;
    padding: 6px 4px;
  }

  .calendar-cockpit-page .sc-admin-wordmark span {
    max-width: calc(100vw - 28px);
    font-size: 12px;
    letter-spacing: 0.18em;
    white-space: normal;
  }

  .calendar-cockpit-page .mode-switch {
    width: 100%;
    max-width: 320px;
  }

  .calendar-cockpit-page .nav {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
  }

  .calendar-cockpit-page .nav-item {
    min-width: 46px;
    border-radius: 14px;
  }

  .calendar-cockpit-page .nav-item.active {
    min-width: 138px;
  }

  .calendar-cockpit-page .calendar-card {
    padding: 14px;
    border-radius: 20px;
  }

  .calendar-cockpit-page .calendar-month {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .calendar-cockpit-page .calendar-weekday {
    display: none;
  }

  .calendar-cockpit-page .calendar-day {
    min-height: 86px;
    grid-template-columns: 46px minmax(0, 1fr);
    grid-template-rows: auto;
    gap: 10px;
    align-items: start;
    padding: 10px;
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    background: rgba(255, 253, 250, 0.92);
  }

  .calendar-cockpit-page .calendar-day.muted-day {
    display: none;
  }

  .calendar-cockpit-page .calendar-day-head {
    min-height: 0;
  }

  .calendar-cockpit-page .calendar-day-events {
    min-width: 0;
  }

  .calendar-cockpit-page .calendar-day-events:empty::after {
    content: "Ingen aftaler";
    display: block;
    padding: 8px 0;
    color: var(--faint);
    font-size: 12px;
  }

  .calendar-cockpit-page .calendar-week {
    grid-template-columns: repeat(7, minmax(76vw, 1fr));
  }
}

/* Shared premium September Child admin system */
.app-shell {
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  background:
    radial-gradient(circle at 14% 8%, rgba(216, 184, 122, 0.12), transparent 28%),
    linear-gradient(180deg, #faf8f2 0%, var(--bg) 48%);
  color: var(--text);
}

.app-shell .sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  max-width: var(--sidebar-width);
  gap: 8px;
  padding: 14px 16px;
  border-right: 1px solid var(--border-soft);
  background:
    linear-gradient(180deg, rgba(255, 253, 250, 0.92), rgba(246, 243, 236, 0.96)),
    var(--bg);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.62);
}

.app-shell .sidebar-head {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.app-shell .sidebar-head-controls {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.app-shell .mobile-settings-button {
  display: none;
}

.app-shell .brand {
  gap: 5px;
  min-height: 56px;
  padding: 5px 5px 8px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text);
}

.app-shell .brand:hover,
.app-shell .brand:focus-visible {
  border-radius: var(--radius-lg);
  background: rgba(216, 184, 122, 0.12);
}

.app-shell .brand-kicker,
.app-shell .eyebrow,
.app-shell .table-label {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 720;
  letter-spacing: 0.12em;
}

.app-shell .sc-admin-wordmark span {
  color: var(--text);
  font-size: 14px;
  letter-spacing: 0.22em;
  white-space: nowrap;
}

.app-shell .mode-switch,
.app-shell .segmented,
.app-shell .tabs {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 250, 0.72);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
}

.app-shell .mode-switch {
  gap: 3px;
  padding: 4px;
}

.app-shell .tabs {
  width: fit-content;
  max-width: 100%;
  gap: 3px;
  padding: 4px;
}

.app-shell .segmented {
  gap: 2px;
  padding: 4px;
}

.app-shell .mode-switch button,
.app-shell .tabs button,
.app-shell .segmented button {
  min-height: 36px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 580;
}

.app-shell .mode-switch button:hover,
.app-shell .tabs button:hover,
.app-shell .segmented button:hover {
  background: rgba(239, 227, 202, 0.42);
  color: var(--text);
}

.app-shell .mode-switch button.active,
.app-shell .tabs button.active,
.app-shell .segmented button.active {
  border-color: transparent;
  background: var(--accent-soft);
  color: var(--text);
  box-shadow: 0 8px 18px rgba(85, 67, 37, 0.08);
}

.app-shell .nav {
  gap: 5px;
}

.app-shell .nav-item {
  grid-template-columns: 22px minmax(0, 1fr) 30px;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  background: transparent;
  color: #555a50;
  font-size: 13px;
  font-weight: 520;
}

.app-shell .nav-item span:nth-child(2) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell .nav-icon {
  width: 22px;
  height: 22px;
  color: currentColor;
  opacity: 0.82;
}

.app-shell .nav-item:hover {
  border-color: rgba(216, 184, 122, 0.24);
  background: rgba(239, 227, 202, 0.38);
  color: var(--text);
}

.app-shell .nav-item.active {
  border-color: rgba(216, 184, 122, 0.38);
  background: rgba(239, 227, 202, 0.82);
  color: var(--text);
  box-shadow: var(--shadow-card);
}

.app-shell .nav-item.active .nav-icon {
  opacity: 1;
  color: #5f4c2d;
}

.app-shell .nav-count {
  justify-self: end;
  min-width: 19px;
  height: 19px;
  padding: 0 6px;
  border: 1px solid rgba(222, 215, 201, 0.9);
  border-radius: 999px;
  background: rgba(255, 253, 250, 0.78);
  color: #676a61;
  font-size: 10px;
  font-weight: 650;
}

.app-shell .nav-count.urgent {
  border-color: rgba(135, 43, 35, 0.34);
  background: #ad675e;
  color: #fffdfa;
  font-weight: 820;
  box-shadow: 0 8px 18px rgba(173, 103, 94, 0.24);
}

.app-shell .sidebar-bottom {
  padding: 10px 0 0;
  border-top: 1px solid var(--border-soft);
}

.app-shell .main {
  min-width: 0;
  padding: clamp(22px, 3vw, 38px);
}

.app-shell .topbar {
  margin-bottom: 22px;
}

.app-shell .page-title {
  margin: 0;
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 3.2vw, 44px);
  font-weight: 560;
  line-height: 1.02;
}

.app-shell .page-subtitle {
  max-width: 840px;
  margin-top: 9px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
}

.app-shell .section-title {
  color: var(--text);
  font-size: 18px;
  font-weight: 720;
}

.app-shell .section-sub,
.app-shell .meta-line,
.app-shell .faint,
.app-shell .muted {
  color: var(--text-muted);
}

.app-shell .card,
.app-shell .panel,
.app-shell .list-item,
.app-shell .booking-row,
.app-shell .invoice-row,
.app-shell .task-card,
.app-shell .model-profile,
.app-shell .kanban-col,
.app-shell .task-card-summary,
.app-shell .task-composer,
.app-shell .filter-chip,
.app-shell .workflow-panel,
.app-shell .workflow-step,
.app-shell .data-alert,
.app-shell .role-card,
.app-shell .template-card,
.app-shell .integration-card,
.app-shell .casting-card,
.app-shell .doc-tile,
.app-shell .agreement-task-row,
.app-shell .parent-time-row,
.app-shell .model-request-row,
.app-shell .approval-queue,
.app-shell .message-preview,
.app-shell .invoice-readiness,
.app-shell .backup-suggestions,
.app-shell .project-card,
.app-shell .project-metric,
.app-shell .project-section,
.app-shell .project-task-row,
.app-shell .customer-card,
.app-shell .customer-editor-panel,
.app-shell .customer-panel,
.app-shell .customer-record-row,
.app-shell .profile-field,
.app-shell .manual-request-form,
.app-shell .wishlist-panel,
.app-shell .client-request-model,
.app-shell .portal-preview-card,
.app-shell .portal-preview-stage,
.app-shell .portal-tile-editor,
.app-shell .portal-media-row,
.app-shell .portal-section-editor,
.app-shell .portal-editor-card,
.app-shell .portal-model-card-studio,
.app-shell .portal-import-summary,
.app-shell .portal-add-media,
.app-shell .transport-estimate,
.app-shell .today-card,
.app-shell .day-card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 253, 250, 0.96), rgba(255, 253, 250, 0.9)),
    var(--surface);
  box-shadow: var(--shadow-card);
  color: var(--text);
}

.app-shell .card,
.app-shell .panel {
  padding: clamp(15px, 1.6vw, 20px);
}

.app-shell .card:hover,
.app-shell .project-card:hover,
.app-shell .task-card:hover,
.app-shell .booking-row:hover,
.app-shell .invoice-row:hover {
  border-color: rgba(216, 184, 122, 0.36);
}

.app-shell .btn,
.app-shell .icon-btn,
.app-shell .file-btn,
.app-shell .filter-chip {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 250, 0.78);
  color: var(--text);
  box-shadow: 0 4px 12px rgba(36, 32, 24, 0.035);
}

.app-shell .btn {
  min-height: 38px;
  padding: 8px 13px;
  font-size: 13px;
  font-weight: 650;
}

.app-shell .btn:hover,
.app-shell .icon-btn:hover,
.app-shell .filter-chip:hover {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}

.app-shell .btn.primary,
.app-shell .icon-btn.add-button,
.app-shell .workflow-step.active,
.app-shell .brand-model-add {
  border-color: rgba(185, 140, 69, 0.42);
  background: linear-gradient(180deg, #cda461, #ad7c38);
  color: #fffdfa;
  box-shadow: 0 10px 22px rgba(185, 140, 69, 0.16);
}

.app-shell .btn.primary:hover,
.app-shell .icon-btn.add-button:hover {
  background: linear-gradient(180deg, #d4ad6d, #a97532);
}

.app-shell .btn.warn,
.app-shell .btn.danger-soft,
.app-shell .pill.red {
  border-color: rgba(173, 103, 94, 0.28);
  background: rgba(234, 216, 212, 0.68);
  color: #8d4c45;
}

.app-shell .btn.danger-soft:hover {
  border-color: rgba(173, 103, 94, 0.42);
  background: rgba(234, 216, 212, 0.86);
  color: #733d37;
}

.app-shell .invoice-sent-button {
  border-color: rgba(61, 143, 92, 0.32);
  background: rgba(61, 143, 92, 0.1);
  color: #2f7f4f;
}

.app-shell .invoice-sent-button:hover {
  border-color: rgba(61, 143, 92, 0.48);
  background: rgba(61, 143, 92, 0.15);
  color: #276f43;
}

.app-shell .icon-btn {
  width: 38px;
  min-width: 38px;
  height: 38px;
  font-size: 18px;
}

.app-shell .icon-btn.subtle {
  background: rgba(255, 253, 250, 0.62);
  color: var(--text-muted);
}

.app-shell input,
.app-shell select,
.app-shell textarea,
.app-shell .command-input,
.app-shell .measure-input {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 250, 0.92);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.app-shell input:focus,
.app-shell select:focus,
.app-shell textarea:focus,
.app-shell .command-input:focus,
.app-shell .measure-input:focus-within {
  outline: 0;
  border-color: rgba(185, 140, 69, 0.52);
  box-shadow: 0 0 0 3px rgba(216, 184, 122, 0.16);
}

.app-shell input::placeholder,
.app-shell textarea::placeholder {
  color: var(--text-soft);
}

.app-shell .pill {
  min-height: 24px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: rgba(248, 245, 239, 0.82);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 620;
}

.app-shell .pill.green {
  border-color: rgba(109, 132, 100, 0.22);
  background: var(--success);
  color: #4f6749;
}

.app-shell .pill.blue {
  border-color: rgba(111, 142, 160, 0.22);
  background: var(--blue-soft);
  color: #536170;
}

.app-shell .pill.amber {
  border-color: rgba(185, 140, 69, 0.24);
  background: var(--warning);
  color: #7c5b25;
}

.app-shell .empty-state {
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  background: rgba(248, 245, 239, 0.62);
  color: var(--text-muted);
}

.app-shell .modal-backdrop,
:root[data-theme="light"] .modal-backdrop {
  background: rgba(38, 45, 37, 0.26);
  backdrop-filter: blur(10px);
}

.app-shell .modal-dialog,
.app-shell .command-panel,
.app-shell .notification-center {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 253, 250, 0.98), rgba(248, 245, 239, 0.96)),
    var(--surface);
  box-shadow: var(--shadow-soft);
}

.app-shell table,
.app-shell th,
.app-shell td {
  border-color: var(--border-soft);
}

.app-shell th {
  color: var(--text-muted);
  background: var(--surface-soft);
}

@media (max-width: 760px) {
  .app-shell {
    grid-template-columns: 1fr;
    width: 100%;
    overflow-x: hidden;
  }

  .app-shell .sidebar {
    position: sticky;
    top: 0;
    z-index: 60;
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    height: auto;
    padding: 10px;
    overflow: hidden;
  }

  .app-shell .sidebar-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
  }

  .app-shell .sidebar-head-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    min-width: 0;
  }

  .app-shell .brand {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 7px 5px;
    border-bottom: 0;
  }

  .app-shell .brand-kicker {
    display: none;
  }

  .app-shell .sc-admin-wordmark span {
    max-width: calc(100vw - 28px);
    font-size: 12px;
    letter-spacing: 0.18em;
    white-space: normal;
  }

  .app-shell .mode-switch {
    width: auto;
    max-width: none;
    grid-template-columns: repeat(2, minmax(54px, 1fr));
    gap: 2px;
    padding: 3px;
    border-radius: 14px;
  }

  .app-shell .mode-switch button {
    min-height: 32px;
    padding: 0 8px;
    font-size: 12px;
  }

  .app-shell .mobile-settings-button {
    display: inline-grid;
    width: 36px;
    min-width: 36px;
    height: 36px;
  }

  .app-shell .nav {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .app-shell .nav-item {
    min-width: 48px;
    border-radius: var(--radius-md);
    padding: 9px;
  }

  .app-shell .nav-item.active {
    min-width: 138px;
  }

  .app-shell .sidebar-bottom {
    margin-top: 0;
    padding: 0;
    border-top: 0;
    display: none;
  }

  .app-shell .main {
    padding: 16px 14px 34px;
  }

  .app-shell .page-title {
    font-size: 30px;
  }

  .app-shell .card,
  .app-shell .panel {
    border-radius: 20px;
  }
}

.app-shell .calendar-card {
  border-radius: var(--radius-xl);
  padding: clamp(18px, 2.2vw, 30px);
}

.app-shell .calendar-card-head {
  margin-bottom: 18px;
}

.app-shell .calendar-card-head .section-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 560;
  line-height: 1.08;
  letter-spacing: 0;
}

.app-shell .calendar-card-head .section-sub {
  margin-top: 6px;
  max-width: 760px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.45;
}

/* Calendar screenshot alignment */
.app-shell.calendar-cockpit-page {
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.app-shell.calendar-cockpit-page .main {
  padding: 14px 14px 24px 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(216, 184, 122, 0.1), transparent 24%),
    linear-gradient(180deg, #faf8f2 0%, var(--bg) 54%);
}

.app-shell.calendar-cockpit-page .calendar-card {
  min-height: calc(100vh - 28px);
  padding: 20px 24px 20px;
  border-radius: 24px;
}

.app-shell.calendar-cockpit-page .calendar-card-head {
  margin-bottom: 14px;
}

.app-shell.calendar-cockpit-page .calendar-card-head .section-title {
  font-size: 24px;
  line-height: 1.1;
}

.app-shell.calendar-cockpit-page .calendar-card-head .section-sub {
  margin-top: 4px;
  font-size: 14px;
}

.app-shell.calendar-cockpit-page .calendar-commandbar {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  min-width: 0;
  margin-bottom: 10px;
}

.app-shell.calendar-cockpit-page .calendar-nav-controls {
  flex: 0 0 auto;
  gap: 6px;
}

.app-shell.calendar-cockpit-page .calendar-nav-controls .btn,
.app-shell.calendar-cockpit-page .calendar-nav-button,
.app-shell.calendar-cockpit-page .calendar-new-booking {
  min-height: 40px;
  border-radius: 11px;
}

.app-shell.calendar-cockpit-page .calendar-nav-button {
  width: 42px;
  min-width: 42px;
  height: 40px;
}

.app-shell.calendar-cockpit-page .calendar-nav-controls .btn {
  min-width: 72px;
}

.app-shell.calendar-cockpit-page .calendar-month-title {
  display: inline-flex;
  flex: 1 1 auto;
  gap: 8px;
  align-items: center;
  min-width: 146px;
  font-size: 28px;
  line-height: 1;
}

.app-shell.calendar-cockpit-page .calendar-month-title .ui-icon {
  width: 17px;
  height: 17px;
  color: var(--text-muted);
}

.app-shell.calendar-cockpit-page .calendar-view-toggle {
  flex: 0 0 auto;
  border-radius: 14px;
}

.app-shell.calendar-cockpit-page .calendar-view-toggle button {
  min-width: 64px;
  min-height: 34px;
}

.app-shell.calendar-cockpit-page .calendar-new-booking {
  flex: 0 0 auto;
  min-width: 136px;
  color: #fffdfa;
}

.app-shell.calendar-cockpit-page .calendar-new-booking .ui-icon {
  color: #fffdfa;
}

:root[data-theme="light"] .app-shell.calendar-cockpit-page .calendar-new-booking,
:root[data-theme="light"] .app-shell.calendar-cockpit-page .calendar-new-booking span,
:root[data-theme="light"] .app-shell.calendar-cockpit-page .calendar-new-booking .ui-icon {
  color: #fffdfa;
}

.app-shell.calendar-cockpit-page .calendar-scope-row {
  flex: 0 0 auto;
  gap: 0;
  margin: 0;
}

.app-shell.calendar-cockpit-page .calendar-viewbar {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 3px;
  border: 1px solid rgba(222, 215, 201, 0.92);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 253, 250, 0.88), rgba(248, 244, 236, 0.74)),
    var(--surface);
}

.app-shell.calendar-cockpit-page .calendar-viewbar-label {
  color: #777b70;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-shell.calendar-cockpit-page .calendar-scope-tabs {
  gap: 2px;
  padding: 2px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 253, 250, 0.62);
  box-shadow: inset 0 0 0 1px rgba(222, 215, 201, 0.68);
}

.app-shell.calendar-cockpit-page .calendar-scope-tabs button {
  min-width: 62px;
  min-height: 30px;
  padding: 0 11px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #62675c;
  font-size: 12px;
  font-weight: 720;
  box-shadow: none;
}

.app-shell.calendar-cockpit-page .calendar-scope-tabs button:hover {
  background: rgba(234, 220, 194, 0.42);
  color: #22231e;
}

.app-shell.calendar-cockpit-page .calendar-scope-tabs button.active {
  background: #ffffff;
  color: #171814;
  box-shadow: 0 5px 14px rgba(36, 32, 24, 0.08);
}

.app-shell.calendar-cockpit-page .calendar-scope-note {
  margin-left: 4px;
  color: #777b70;
  font-size: 11px;
  white-space: nowrap;
}

.app-shell.calendar-cockpit-page .calendar-stage {
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: stretch;
}

.app-shell.calendar-cockpit-page .calendar-month {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: 44px;
  grid-auto-rows: 128px;
  border: 1px solid rgba(222, 215, 201, 0.92);
  border-radius: 16px;
  background: #e9e3d8;
}

.app-shell.calendar-cockpit-page .calendar-weekday {
  min-height: 44px;
  background: linear-gradient(180deg, #fffdf9, #f7f2e9);
  color: #6b6f64;
  font-size: 10px;
  letter-spacing: 0.09em;
}

.app-shell.calendar-cockpit-page .calendar-weekday.weekend-weekday {
  background: #fbf5eb;
}

.app-shell.calendar-cockpit-page .calendar-day {
  position: relative;
  min-height: 0;
  height: 128px;
  grid-template-rows: 18px minmax(0, 1fr);
  gap: 5px;
  padding: 7px 8px 8px;
  overflow: hidden;
  background: rgba(255, 253, 250, 0.96);
  box-shadow: inset 0 0 0 1px rgba(255, 253, 250, 0.36);
}

.app-shell.calendar-cockpit-page .calendar-day.weekend-day {
  background: #fdf7ed;
}

.app-shell.calendar-cockpit-page .calendar-day.muted-day {
  background: #f8f4ec;
}

.app-shell.calendar-cockpit-page .calendar-day:hover {
  background: #fffdfa;
  box-shadow:
    inset 0 0 0 1px rgba(185, 140, 69, 0.24),
    inset 0 0 0 999px rgba(216, 184, 122, 0.028);
}

.app-shell.calendar-cockpit-page .calendar-day.selected-day {
  outline: 1px solid rgba(185, 140, 69, 0.88);
  outline-offset: -1px;
  background: rgba(255, 253, 250, 0.98);
  box-shadow: none;
}

.app-shell.calendar-cockpit-page .calendar-day.today {
  background: rgba(255, 253, 250, 0.98);
}

.app-shell.calendar-cockpit-page .calendar-day:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.app-shell.calendar-cockpit-page .calendar-day::after {
  content: "+";
  position: absolute;
  right: 8px;
  bottom: 7px;
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  border: 1px solid rgba(185, 140, 69, 0.32);
  border-radius: 999px;
  background: rgba(255, 253, 250, 0.88);
  color: #8a672f;
  font-size: 13px;
  font-weight: 720;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translateY(2px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.app-shell.calendar-cockpit-page .calendar-day-head {
  position: relative;
  justify-content: flex-end;
  min-height: 18px;
  gap: 4px;
  pointer-events: none;
}

.app-shell.calendar-cockpit-page .calendar-day-number {
  width: 18px;
  min-width: 18px;
  height: 18px;
  color: #686c61;
  font-size: 11px;
  font-weight: 760;
}

.app-shell.calendar-cockpit-page .calendar-day.today .calendar-day-number {
  border: 0;
  background: #b98c45;
  color: #fffdfa;
  box-shadow: 0 5px 12px rgba(185, 140, 69, 0.2);
}

.app-shell.calendar-cockpit-page .calendar-day.selected-day:not(.today) .calendar-day-number {
  border: 0;
  background: rgba(234, 220, 194, 0.7);
  color: #7b5d2c;
}

.app-shell.calendar-cockpit-page .calendar-day-badges {
  position: absolute;
  top: 7px;
  left: 8px;
  gap: 3px;
  margin-left: 0;
}

.app-shell.calendar-cockpit-page .calendar-holiday-marker,
.app-shell.calendar-cockpit-page .calendar-birthday-marker {
  width: 18px;
  height: 18px;
  min-height: 18px;
  border-color: rgba(116, 132, 104, 0.15);
  box-shadow: none;
}

.app-shell.calendar-cockpit-page .calendar-holiday-marker .ui-icon,
.app-shell.calendar-cockpit-page .calendar-birthday-marker .ui-icon {
  width: 10px;
  height: 10px;
}

.app-shell.calendar-cockpit-page .calendar-birthday-marker span {
  font-size: 9px;
}

.app-shell.calendar-cockpit-page .calendar-day-events {
  gap: 4px;
  min-height: 0;
  overflow: hidden;
}

.app-shell.calendar-cockpit-page .calendar-event-pill {
  min-height: 34px;
  gap: 1px;
  padding: 5px 7px;
  border-left-width: 2px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 253, 250, 0.98), rgba(250, 247, 240, 0.94));
  box-shadow: none;
}

.app-shell.calendar-cockpit-page .calendar-event-topline {
  gap: 4px;
}

.app-shell.calendar-cockpit-page .calendar-event-topline time {
  font-size: 10px;
  font-weight: 760;
}

.app-shell.calendar-cockpit-page .calendar-status-chip {
  min-height: 15px;
  padding: 1px 5px;
  max-width: 58px;
  font-size: 9px;
}

.app-shell.calendar-cockpit-page .calendar-month .calendar-event-main {
  display: grid;
  gap: 2px;
}

.app-shell.calendar-cockpit-page .calendar-month .calendar-event-main strong {
  font-size: 11px;
  line-height: 1.1;
}

.app-shell.calendar-cockpit-page .calendar-month .calendar-event-models {
  display: none;
}

.app-shell.calendar-cockpit-page .calendar-month .calendar-event-meta {
  display: none;
}

.app-shell.calendar-cockpit-page .calendar-month .calendar-event-pill small {
  display: none;
}

.app-shell.calendar-cockpit-page .calendar-event-avatar {
  width: 17px;
  height: 17px;
}

.app-shell.calendar-cockpit-page .calendar-more {
  padding-left: 2px;
  color: #777b70;
  font-size: 10px;
  line-height: 1.1;
}

.app-shell.calendar-cockpit-page .calendar-day-drawer {
  top: 18px;
  gap: 18px;
  min-height: 100%;
  padding: 21px;
  border-radius: 16px;
}

.app-shell.calendar-cockpit-page .calendar-drawer-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.app-shell.calendar-cockpit-page .calendar-drawer-head > div {
  display: grid;
  gap: 4px;
}

.app-shell.calendar-cockpit-page .calendar-drawer-head strong {
  font-size: 24px;
}

.app-shell.calendar-cockpit-page .calendar-drawer-close {
  width: 30px;
  min-width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.app-shell.calendar-cockpit-page .calendar-drawer-empty {
  min-height: 112px;
}

.app-shell.calendar-cockpit-page .calendar-quick-action {
  min-height: 46px;
  border-radius: 10px;
}

@media (max-width: 1180px) {
  .app-shell.calendar-cockpit-page {
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  }

  .app-shell.calendar-cockpit-page .main {
    padding-left: 14px;
  }

  .app-shell.calendar-cockpit-page .calendar-commandbar {
    flex-wrap: wrap;
  }

  .app-shell.calendar-cockpit-page .calendar-month-title {
    flex: 1 1 220px;
  }

  .app-shell.calendar-cockpit-page .calendar-stage {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .app-shell.calendar-cockpit-page {
    grid-template-columns: 1fr;
  }

  .app-shell.calendar-cockpit-page .main {
    padding: 14px;
  }

  .app-shell.calendar-cockpit-page .calendar-card {
    min-height: auto;
    padding: 14px;
  }

  .app-shell.calendar-cockpit-page .calendar-commandbar {
    gap: 8px;
  }

  .app-shell.calendar-cockpit-page .calendar-month-title {
    flex: 1 1 100%;
    min-width: 0;
    font-size: 24px;
  }

  .app-shell.calendar-cockpit-page .calendar-scope-row,
  .app-shell.calendar-cockpit-page .calendar-view-toggle,
  .app-shell.calendar-cockpit-page .calendar-new-booking {
    flex: 1 1 auto;
  }

  .app-shell.calendar-cockpit-page .calendar-viewbar {
    padding: 3px;
  }

  .app-shell.calendar-cockpit-page .calendar-scope-tabs {
    width: 100%;
  }

  .app-shell.calendar-cockpit-page .calendar-scope-tabs button {
    min-width: 0;
    flex: 1 1 0;
  }

  .app-shell.calendar-cockpit-page .calendar-scope-note {
    display: none;
  }

  .app-shell.calendar-cockpit-page .calendar-month {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-auto-rows: auto;
    gap: 10px;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .app-shell.calendar-cockpit-page .calendar-weekday {
    display: none;
  }

  .app-shell.calendar-cockpit-page .calendar-day {
    grid-template-columns: 42px minmax(0, 1fr);
    grid-template-rows: auto;
    height: auto;
    min-height: 86px;
    gap: 10px;
    align-items: start;
    padding: 10px;
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    overflow: visible;
  }

  .app-shell.calendar-cockpit-page .calendar-day.muted-day {
    display: none;
  }

  .app-shell.calendar-cockpit-page .calendar-day::after {
    top: 10px;
    right: 10px;
    bottom: auto;
    opacity: 0.55;
    transform: none;
  }

  .app-shell.calendar-cockpit-page .calendar-day-head {
    position: static;
    justify-content: flex-start;
    min-height: 0;
  }

  .app-shell.calendar-cockpit-page .calendar-day-number {
    width: 24px;
    min-width: 24px;
    height: 24px;
    font-size: 12px;
  }

  .app-shell.calendar-cockpit-page .calendar-day-badges {
    position: static;
    margin-left: 4px;
  }

  .app-shell.calendar-cockpit-page .calendar-day-events {
    min-width: 0;
  }

  .app-shell.calendar-cockpit-page .calendar-day-events:empty::after {
    content: "Ingen aftaler";
    display: block;
    padding: 4px 28px 4px 0;
    color: var(--faint);
    font-size: 12px;
  }
}

/* Cleaner modern task board */
.page-tasks .main {
  max-width: 100%;
}

.page-tasks .task-board-card {
  padding: clamp(16px, 1.8vw, 24px);
  border-radius: var(--radius-xl);
}

.page-tasks .task-board-head {
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.page-tasks .task-board-head .section-title {
  font-size: 22px;
}

.page-tasks .task-board-metrics {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.page-tasks .task-board-metrics span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: rgba(248, 245, 239, 0.72);
  color: var(--text-muted);
  font-size: 12px;
}

.page-tasks .task-board-metrics strong {
  color: var(--text);
  font-size: 14px;
}

.page-tasks .task-composer {
  grid-template-columns: minmax(220px, 1.4fr) minmax(170px, 0.9fr) minmax(150px, 0.8fr) 142px 42px;
  gap: 8px;
  margin-bottom: 14px;
  padding: 8px;
  border-radius: 18px;
  background: rgba(248, 245, 239, 0.78);
  box-shadow: none;
}

.page-tasks .task-composer input,
.page-tasks .task-composer select {
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 253, 250, 0.96);
  font-size: 13px;
}

.page-tasks .task-composer-title {
  font-weight: 650;
}

.page-tasks .quick-filter-row {
  gap: 8px;
  margin-bottom: 14px;
}

.page-tasks .filter-chip {
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 253, 250, 0.62);
  color: var(--text-muted);
  box-shadow: none;
}

.page-tasks .filter-chip.active {
  border-color: rgba(216, 184, 122, 0.42);
  background: var(--accent-soft);
  color: var(--text);
}

.page-tasks .kanban {
  grid-template-columns: repeat(4, minmax(230px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding: 0 0 6px;
}

.page-tasks .kanban-col {
  min-height: 500px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(248, 245, 239, 0.52);
  box-shadow: none;
}

.page-tasks .kanban-head {
  margin-bottom: 12px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 720;
  letter-spacing: 0.08em;
}

.page-tasks .task-card-clean {
  position: relative;
  cursor: pointer;
  margin-bottom: 12px;
  padding: 13px 13px 12px;
  border: 1px solid rgba(188, 158, 112, 0.2);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 253, 250, 0.98), rgba(248, 245, 239, 0.9)),
    var(--surface);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.82) inset,
    0 14px 28px rgba(36, 32, 24, 0.055);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease,
    background 0.18s ease;
}

.page-tasks .task-card-clean:hover,
.page-tasks .task-card-clean:focus-within {
  border-color: rgba(190, 145, 73, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 253, 250, 1), rgba(248, 245, 239, 0.95)),
    var(--surface);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 18px 34px rgba(36, 32, 24, 0.085);
  transform: translateY(-1px);
}

.page-tasks .task-card-clean:focus-visible {
  outline: 2px solid rgba(185, 140, 69, 0.36);
  outline-offset: 2px;
}

.page-tasks .task-card-top {
  display: block;
  align-items: start;
}

.page-tasks .task-card-top > div:first-child {
  padding-right: 42px;
}

.page-tasks .task-title {
  color: var(--text);
  font-size: 15px;
  font-weight: 720;
  line-height: 1.2;
}

.page-tasks .task-meta {
  margin-top: 4px;
  font-size: 12px;
}

.page-tasks .task-card-tools {
  position: absolute;
  top: 9px;
  right: 9px;
  display: inline-flex;
  gap: 4px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-2px) scale(0.98);
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
}

.page-tasks .task-card-clean:hover .task-card-tools,
.page-tasks .task-card-clean:focus-within .task-card-tools {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.page-tasks .task-icon-action {
  width: 28px;
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 253, 250, 0.88);
  box-shadow: 0 8px 18px rgba(36, 32, 24, 0.08);
}

.page-tasks .task-icon-action .ui-icon {
  width: 14px;
  height: 14px;
}

.page-tasks .task-icon-action.danger {
  color: #8d4c45;
}

.page-tasks .task-delete-action {
  color: #7c514b;
}

.page-tasks .task-icon-action.danger:hover {
  border-color: rgba(173, 103, 94, 0.28);
  background: rgba(234, 216, 212, 0.5);
}

@media (hover: none) {
  .page-tasks .task-card-tools {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
}

.page-tasks .task-card-meta-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.page-tasks .task-card-meta-row .pill {
  min-height: 22px;
  padding: 3px 8px;
  font-size: 11px;
}

.page-tasks .task-actions {
  gap: 6px;
  margin-top: 10px;
}

.page-tasks .compact-actions .btn {
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 10px;
  background: rgba(255, 253, 250, 0.76);
  box-shadow: none;
}

.page-tasks .task-card:not(.task-card-clean) {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 253, 250, 0.92);
}

.page-tasks .board-task-edit {
  gap: 8px;
}

.page-tasks .task-edit-grid input,
.page-tasks .task-edit-grid select,
.page-tasks .task-edit-grid textarea {
  border-radius: 11px;
  background: rgba(255, 253, 250, 0.96);
}

.app-shell .task-edit-backdrop,
:root[data-theme="light"] .task-edit-backdrop {
  z-index: 112;
  align-items: start;
  padding: clamp(18px, 6vh, 54px) 18px 18px;
  background: rgba(38, 45, 37, 0.28);
  backdrop-filter: blur(12px);
}

.app-shell .task-edit-dialog {
  display: grid;
  gap: 16px;
  width: min(680px, calc(100vw - 32px));
  max-height: min(780px, calc(100vh - 36px));
  overflow: auto;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 253, 250, 0.99), rgba(248, 245, 239, 0.96)),
    var(--surface);
  box-shadow: 0 26px 80px rgba(36, 32, 24, 0.18);
}

.task-edit-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 22px 0;
}

.task-edit-hero h2 {
  margin: 4px 0 6px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 560;
  line-height: 0.98;
  letter-spacing: 0;
}

.task-edit-hero p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.app-shell .task-edit-close {
  flex: 0 0 auto;
  width: 40px;
  min-width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(255, 253, 250, 0.74);
}

.task-modal-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 22px;
}

.task-modal-fields .wide {
  grid-column: 1 / -1;
}

.task-modal-fields textarea {
  min-height: 118px;
  resize: vertical;
}

.task-edit-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 22px 22px;
  border-top: 1px solid var(--border-soft);
}

@media (max-width: 640px) {
  .task-modal-fields {
    grid-template-columns: 1fr;
  }

  .task-edit-footer {
    display: grid;
  }

  .task-edit-footer .pill-row {
    justify-content: stretch;
  }
}

@media (max-width: 980px) {
  .page-tasks .task-composer {
    grid-template-columns: 1fr 1fr 42px;
  }

  .page-tasks .task-composer-title {
    grid-column: 1 / -1;
  }

  .page-tasks #new-task-project,
  .page-tasks #new-task-date {
    grid-column: auto;
  }
}

@media (max-width: 760px) {
  .page-tasks .task-board-head {
    grid-template-columns: 1fr;
  }

  .page-tasks .task-board-metrics {
    justify-content: flex-start;
  }

  .page-tasks .task-composer {
    grid-template-columns: 1fr;
  }

  .page-tasks .task-composer-submit {
    width: 100%;
    justify-self: stretch;
  }

  .page-tasks .kanban {
    grid-template-columns: repeat(4, minmax(76vw, 1fr));
  }
}

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

.page-tasks .task-simple-card {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.page-tasks .task-simple-card .task-board-head {
  margin-bottom: 12px;
}

.page-tasks .task-simple-card .task-board-head .section-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 3.2vw, 44px);
  font-weight: 560;
  line-height: 1.02;
}

.page-tasks .task-simple-card .section-sub {
  margin-top: 3px;
  font-size: 13px;
}

.page-tasks .task-simple-composer {
  grid-template-columns: minmax(0, 1fr) 42px;
  margin-bottom: 12px;
}

.page-tasks .task-simple-list {
  display: grid;
  gap: 8px;
}

.page-tasks .task-simple-kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.page-tasks .task-simple-column {
  min-height: 430px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(248, 245, 239, 0.54);
}

.page-tasks .task-simple-column-head {
  margin-bottom: 10px;
}

.page-tasks .task-simple-empty {
  display: grid;
  min-height: 54px;
  place-items: center;
  border: 1px dashed rgba(141, 111, 70, 0.22);
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 12px;
}

.page-tasks .task-simple-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-height: 54px;
  margin: 0;
  padding: 11px 12px 11px 10px;
  border-radius: 12px;
}

.page-tasks .task-simple-content {
  min-width: 0;
}

.page-tasks .task-simple-item .task-title {
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.page-tasks .task-simple-item .task-meta {
  display: -webkit-box;
  max-width: 100%;
  margin-top: 3px;
  overflow: hidden;
  color: var(--text-muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.page-tasks .task-simple-item.is-done .task-title {
  color: var(--text-muted);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.page-tasks .task-check {
  display: inline-flex;
  width: 26px;
  min-width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(141, 111, 70, 0.28);
  border-radius: 999px;
  background: rgba(255, 253, 250, 0.84);
  color: var(--accent-strong);
  cursor: pointer;
}

.page-tasks .task-check .ui-icon {
  width: 14px;
  height: 14px;
}

.app-shell .task-simple-dialog {
  width: min(520px, calc(100vw - 32px));
  gap: 10px;
}

.task-edit-simple-head {
  display: flex;
  justify-content: flex-end;
  padding: 14px 14px 0;
}

.task-simple-fields {
  grid-template-columns: 1fr;
  padding: 0 22px;
}

.task-simple-fields textarea {
  min-height: 132px;
}

.task-simple-footer {
  padding-top: 14px;
}

@media (max-width: 640px) {
  .page-tasks .task-simple-kanban {
    grid-template-columns: repeat(4, minmax(78vw, 1fr));
  }

  .task-simple-footer {
    gap: 10px;
  }

  .task-simple-footer .btn {
    width: 100%;
  }
}

/* Integrated settings drawer */
.app-shell .settings-backdrop,
:root[data-theme="light"] .settings-backdrop {
  z-index: 106;
  align-items: start;
  padding: clamp(18px, 5vh, 46px) 18px 18px;
  background: rgba(38, 45, 37, 0.24);
  backdrop-filter: blur(12px);
}

.app-shell .settings-dialog {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(880px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 36px));
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 253, 250, 0.99), rgba(248, 245, 239, 0.97)),
    var(--surface);
  box-shadow: 0 26px 80px rgba(36, 32, 24, 0.16);
}

.settings-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 24px 18px;
  border-bottom: 1px solid var(--border-soft);
}

.settings-dialog-head h2 {
  margin: 3px 0 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 0.95;
  letter-spacing: 0;
}

.settings-dialog-head p {
  max-width: 560px;
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.45;
}

.app-shell .settings-close {
  flex: 0 0 auto;
  width: 42px;
  min-width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(255, 253, 250, 0.74);
}

.settings-dialog-body {
  display: grid;
  gap: 14px;
  min-height: 0;
  overflow: auto;
  padding: 18px 24px 24px;
}

.settings-dialog-body .settings-section {
  margin: 0;
  padding: 18px;
  border-color: var(--border-soft);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 250, 0.72);
  box-shadow: var(--shadow-card);
}

.settings-dialog-body .section-head {
  margin-bottom: 14px;
}

.settings-dialog-body .section-title {
  font-size: 20px;
}

.settings-dialog-body .section-sub {
  max-width: 640px;
  color: var(--text-muted);
}

.settings-dialog-body .form-grid {
  gap: 12px;
}

.settings-dialog-body input,
.settings-dialog-body select {
  background: rgba(255, 253, 250, 0.88);
}

@media (max-width: 760px) {
  .app-shell .settings-backdrop,
  :root[data-theme="light"] .settings-backdrop {
    align-items: end;
    padding: 12px;
  }

  .app-shell .settings-dialog {
    width: 100%;
    max-height: calc(100vh - 24px);
    border-radius: 22px;
  }

  .settings-dialog-head {
    padding: 20px 18px 16px;
  }

  .settings-dialog-body {
    padding: 14px 18px 18px;
  }

  .settings-dialog-body .form-grid {
    grid-template-columns: 1fr;
  }
}

/* Integrated app confirmation modal */
.app-shell .app-confirm-backdrop,
:root[data-theme="light"] .app-confirm-backdrop {
  z-index: 120;
  padding: 18px;
  background: rgba(38, 45, 37, 0.28);
  backdrop-filter: blur(12px);
}

.app-shell .app-confirm-dialog {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  width: min(430px, calc(100vw - 32px));
  padding: 18px;
  overflow: visible;
  border: 1px solid var(--border);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 253, 250, 0.98), rgba(248, 245, 239, 0.96)),
    var(--surface);
  box-shadow: 0 24px 70px rgba(36, 32, 24, 0.18);
}

.app-confirm-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(173, 103, 94, 0.22);
  border-radius: 14px;
  background: rgba(234, 216, 212, 0.48);
  color: #8d4c45;
}

.app-confirm-dialog.tone-info .app-confirm-mark {
  border-color: rgba(111, 142, 160, 0.22);
  background: rgba(219, 228, 234, 0.62);
  color: #536170;
}

.app-confirm-mark .ui-icon {
  width: 19px;
  height: 19px;
}

.app-confirm-copy {
  min-width: 0;
}

.app-confirm-copy .section-title {
  font-size: 18px;
  line-height: 1.2;
}

.app-confirm-copy p {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-line;
}

.app-confirm-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding-top: 4px;
}

.app-confirm-actions .btn {
  min-width: 104px;
}

.app-confirm-actions .btn:focus-visible {
  outline: 0;
  border-color: rgba(185, 140, 69, 0.68);
  box-shadow:
    0 0 0 3px rgba(216, 184, 122, 0.22),
    0 10px 24px rgba(36, 32, 24, 0.12);
}

.app-shell .app-confirm-actions .danger-confirm,
:root[data-theme="light"] .app-shell .app-confirm-actions .danger-confirm {
  border-color: rgba(173, 103, 94, 0.36);
  background: linear-gradient(180deg, #b96f66, #955149);
  color: #fffdfa;
  box-shadow: 0 10px 22px rgba(149, 81, 73, 0.16);
}

.app-shell .app-confirm-actions .danger-confirm:hover,
:root[data-theme="light"] .app-shell .app-confirm-actions .danger-confirm:hover {
  background: linear-gradient(180deg, #c37870, #8e4b44);
}

.app-shell .calendar-create-choice-backdrop,
:root[data-theme="light"] .calendar-create-choice-backdrop {
  z-index: 118;
  padding: 18px;
  background: rgba(38, 45, 37, 0.28);
  backdrop-filter: blur(12px);
}

.app-shell .calendar-create-choice-dialog {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  width: min(560px, calc(100vw - 32px));
  padding: 18px;
  overflow: visible;
  border: 1px solid var(--border);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 253, 250, 0.98), rgba(248, 245, 239, 0.96)),
    var(--surface);
  box-shadow: 0 24px 70px rgba(36, 32, 24, 0.18);
}

.calendar-create-choice-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.calendar-create-choice-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 4px 10px;
  align-items: center;
  min-height: 104px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 253, 250, 0.74);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.calendar-create-choice-card:hover,
.calendar-create-choice-card:focus-visible {
  outline: 0;
  border-color: rgba(185, 140, 69, 0.48);
  box-shadow: 0 12px 28px rgba(36, 32, 24, 0.12);
}

.calendar-create-choice-card > span {
  grid-row: span 2;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  background: rgba(216, 184, 122, 0.22);
  color: #7c5b25;
}

.calendar-create-choice-card.studio > span {
  background: rgba(210, 225, 208, 0.7);
  color: #4f6749;
}

.calendar-create-choice-card .ui-icon {
  width: 18px;
  height: 18px;
}

.calendar-create-choice-card strong {
  font-size: 15px;
  line-height: 1.2;
}

.calendar-create-choice-card small {
  align-self: start;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.35;
}

@media (max-width: 520px) {
  .app-shell .app-confirm-dialog {
    grid-template-columns: 1fr;
  }

  .app-confirm-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .app-shell .calendar-create-choice-dialog {
    grid-template-columns: 1fr;
  }

  .calendar-create-choice-actions {
    grid-template-columns: 1fr;
  }
}
.bank-import-layout,
.money-in-layout,
.payout-layout {
  min-width: 0;
}

.expense-receipts-page {
  display: grid;
  gap: 14px;
}

.expense-upload-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.expense-upload-tab {
  display: grid;
  gap: 2px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.64);
  color: var(--text-muted);
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.expense-upload-tab span {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.expense-upload-tab small {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.25;
}

.expense-upload-tab.active {
  border-color: rgba(169, 113, 33, 0.48);
  background: rgba(255, 249, 236, 0.88);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.62);
}

.expense-capture-card {
  display: grid;
  gap: 14px;
}

.expense-capture-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1.28fr);
  gap: 14px;
  align-items: stretch;
}

.expense-capture-pickers {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
  min-width: 0;
}

.expense-upload-panel,
.expense-review-panel {
  display: grid;
  gap: 12px;
}

.expense-quick-pickers {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: none;
}

.expense-quick-pickers .receipt-camera-drop {
  min-height: 168px;
}

.expense-upload-panel .expense-processing-queue {
  order: -1;
}

.expense-upload-options {
  padding: 10px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.56);
}

.expense-upload-options summary {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 850;
}

.expense-upload-options .expense-capture-fields {
  margin-top: 10px;
}

.expense-upload-note {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.expense-upload-note span {
  padding: 5px 8px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.expense-scan-workflow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.expense-scan-step {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 4px 8px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
}

.expense-scan-step.done {
  border-color: rgba(85, 122, 88, 0.24);
  background: rgba(217, 229, 210, 0.28);
}

.expense-scan-step.active,
.expense-scan-step.amber {
  border-color: rgba(216, 154, 61, 0.28);
  background: rgba(242, 213, 156, 0.2);
}

.expense-scan-step-index,
.expense-scan-step-icon {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 999px;
}

.expense-scan-step-index {
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 900;
}

.expense-scan-step-icon {
  color: var(--accent-strong);
}

.expense-scan-step-icon .ui-icon {
  width: 16px;
  height: 16px;
}

.expense-scan-step strong,
.expense-scan-step small {
  grid-column: 2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expense-scan-step strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.expense-scan-step small {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.3;
}

.receipt-camera-drop {
  position: relative;
  display: grid;
  min-height: 136px;
  place-items: center;
  align-content: center;
  gap: 10px;
  overflow: hidden;
  border: 1px dashed rgba(211, 161, 63, 0.58);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(211, 161, 63, 0.12), rgba(85, 122, 88, 0.08)),
    var(--surface-2);
  color: var(--text);
  text-align: center;
  cursor: pointer;
}

.receipt-camera-drop input {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  touch-action: manipulation;
}

.receipt-camera-drop > :not(input) {
  pointer-events: none;
}

.receipt-camera-drop strong,
.receipt-camera-drop small {
  display: block;
  max-width: 260px;
}

.receipt-camera-drop small {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
}

.receipt-camera-drop.is-busy {
  opacity: 0.72;
}

.receipt-camera-drop.has-queue {
  border-color: rgba(216, 154, 61, 0.42);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.64), 0 14px 32px rgba(45, 42, 32, 0.08);
}

.receipt-camera-icon {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border: 1px solid rgba(211, 161, 63, 0.34);
  border-radius: 18px;
  background: var(--surface);
  color: var(--accent-strong);
  box-shadow: var(--shadow-card);
}

.receipt-camera-icon .ui-icon {
  width: 24px;
  height: 24px;
}

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

.expense-capture-fields .wide,
.expense-capture-actions,
.expense-safety-strip {
  grid-column: 1 / -1;
}

.expense-scan-review-panel {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 253, 250, 0.88), rgba(247, 244, 236, 0.72)),
    var(--surface-2);
}

.expense-scan-review-panel span {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.expense-scan-review-panel strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.25;
}

.expense-scan-review-panel small {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.35;
}

.expense-capture-fields textarea {
  min-height: 116px;
  resize: vertical;
}

.expense-capture-actions,
.expense-safety-strip,
.expense-receipt-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.expense-capture-actions {
  justify-content: flex-end;
}

.expense-safety-strip {
  padding: 10px 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.35;
}

.expense-processing-queue {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, auto);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(216, 154, 61, 0.3);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(242, 213, 156, 0.18)),
    var(--surface-2);
}

.expense-processing-queue span {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.expense-processing-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.expense-processing-spinner {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border: 2px solid rgba(216, 154, 61, 0.22);
  border-top-color: #b9852f;
  border-radius: 999px;
  animation: expense-processing-spin 0.82s linear infinite;
}

@keyframes expense-processing-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .expense-processing-spinner {
    animation: none;
    border-style: dotted;
  }
}

.expense-processing-queue strong,
.expense-processing-queue small {
  display: block;
}

.expense-processing-queue strong {
  margin-top: 2px;
  color: var(--text);
  font-size: 14px;
}

.expense-processing-queue small {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.35;
}

.expense-processing-items {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.expense-processing-items span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 180px;
  min-height: 28px;
  padding: 0 9px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expense-processing-items .ui-icon {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

.expense-receipt-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin: -4px 0 10px;
}

.expense-receipt-filters .btn {
  min-height: 30px;
  padding: 0 12px;
}

.expense-receipt-filters .btn span {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  margin-left: 4px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  font-size: 11px;
}

.expense-receipt-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.expense-receipt-main {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  align-items: start;
}

.expense-receipt-thumb {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-muted);
}

.expense-receipt-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.expense-receipt-thumb .ui-icon {
  width: 20px;
  height: 20px;
}

.expense-rule-notes {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.expense-rule-notes span {
  padding: 5px 8px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.3;
}

.receipt-camera-drop {
  min-height: 142px;
  border-style: solid;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(246, 244, 236, 0.72)),
    var(--surface-2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.58), var(--shadow-soft);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.receipt-camera-drop:hover {
  border-color: rgba(169, 113, 33, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72), 0 18px 44px rgba(45, 42, 32, 0.12);
}

.receipt-camera-drop strong {
  font-size: 19px;
  line-height: 1.1;
}

.receipt-library-drop {
  border-color: rgba(85, 122, 88, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(232, 239, 230, 0.6)),
    var(--surface-2);
}

.receipt-camera-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(169, 113, 33, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.receipt-camera-cta.is-processing {
  border-color: rgba(169, 113, 33, 0.4);
  background: rgba(255, 249, 236, 0.9);
}

.receipt-camera-inline-spinner {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border: 2px solid rgba(169, 113, 33, 0.22);
  border-top-color: currentColor;
  border-radius: 999px;
  animation: expense-processing-spin 0.82s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .receipt-camera-inline-spinner {
    animation: none;
    border-style: dotted;
  }
}

.expense-manual-text {
  padding: 10px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
}

.expense-manual-text summary {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 800;
}

.expense-manual-text .field {
  margin-top: 10px;
}

.expense-receipt-row {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border-color: rgba(211, 161, 63, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(246, 247, 243, 0.78)),
    var(--surface);
}

.expense-receipt-row.is-ready {
  border-color: rgba(85, 122, 88, 0.26);
}

.expense-receipt-main {
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
}

.expense-receipt-thumb {
  width: 58px;
  height: 72px;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(40, 35, 24, 0.08);
}

.expense-receipt-editor {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.expense-receipt-editor-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.expense-receipt-editor-head > div:first-child {
  min-width: 0;
}

.expense-receipt-editor-head .meta-line {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expense-receipt-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.expense-receipt-actions .btn.small {
  min-height: 30px;
  padding: 0 11px;
}

.expense-receipt-actions .icon-btn.danger-soft {
  width: 30px;
  height: 30px;
  border-color: rgba(166, 75, 63, 0.28);
  background: rgba(237, 218, 216, 0.72);
  color: #8f463d;
}

.expense-receipt-status-note {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  padding: 6px 8px;
  border: 1px solid rgba(216, 154, 61, 0.24);
  border-radius: 8px;
  background: rgba(255, 249, 236, 0.6);
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.25;
}

.expense-receipt-status-note strong {
  color: var(--text);
  font-size: 11px;
}

.expense-review-rail {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.expense-review-rail span {
  display: inline-flex;
  max-width: 180px;
  min-height: 26px;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expense-review-rail span.done {
  color: #4f6a47;
  border-color: rgba(85, 122, 88, 0.24);
  background: rgba(217, 229, 210, 0.36);
}

.expense-review-rail span.active {
  color: #7e571b;
  border-color: rgba(216, 154, 61, 0.26);
  background: rgba(242, 213, 156, 0.28);
}

.expense-review-rail .ui-icon {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

.expense-edit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.expense-priority-grid,
.expense-secondary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.expense-secondary-fields {
  padding: 7px 9px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
}

.expense-secondary-fields summary {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 850;
}

.expense-secondary-fields[open] .expense-secondary-grid {
  margin-top: 8px;
}

.receipt-edit-field {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.receipt-edit-field.wide {
  grid-column: span 2;
}

.receipt-edit-field span {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.receipt-edit-field small {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.2;
}

.receipt-priority-field {
  padding: 7px;
  border: 1px solid rgba(216, 154, 61, 0.2);
  border-radius: 8px;
  background: rgba(255, 249, 236, 0.62);
}

.receipt-priority-field.needs-attention {
  border-color: rgba(183, 103, 31, 0.48);
  background: rgba(249, 230, 190, 0.5);
}

.receipt-edit-field input,
.receipt-edit-field select,
.expense-line-row input,
.expense-line-row select {
  width: 100%;
  min-width: 0;
  height: 32px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font: inherit;
  font-size: 12px;
}

.expense-line-items {
  display: grid;
  gap: 5px;
  padding: 8px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.48);
}

.expense-line-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.expense-line-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.expense-line-head span:first-child {
  font-weight: 900;
}

.expense-line-head span:nth-child(2) {
  min-width: 0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
  overflow-wrap: anywhere;
}

.expense-line-head .btn.small {
  min-height: 28px;
  padding: 0 10px;
}

.expense-line-labels,
.expense-line-row {
  display: grid;
  grid-template-columns: 24px 42px minmax(128px, 1fr) 54px 84px minmax(86px, 0.58fr) minmax(104px, 0.68fr) 30px;
  gap: 5px;
  align-items: center;
}

.expense-line-labels {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.expense-line-index {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 900;
}

.expense-line-include {
  display: grid;
  gap: 2px;
  place-items: center;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.expense-line-include input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-strong);
}

.expense-line-description {
  font-weight: 700;
}

.expense-line-amount {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.expense-line-amount input {
  height: 30px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.expense-line-amount span {
  padding: 0 8px 0 4px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.expense-line-row.is-excluded {
  opacity: 0.68;
}

.expense-line-row.is-excluded .expense-line-description {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(78, 73, 63, 0.42);
}

.expense-line-target,
.expense-line-project {
  font-size: 12px;
}

.expense-line-modifiers {
  grid-column: 3 / -1;
  min-width: 0;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 750;
}

.expense-line-modifiers summary {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  cursor: pointer;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--text);
  font-size: 11px;
  font-weight: 850;
}

.expense-line-modifiers div {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding-top: 5px;
}

.expense-line-modifiers span {
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--surface-2);
}

.expense-line-project.needs-project {
  border-color: rgba(183, 103, 31, 0.55);
  background: rgba(249, 230, 190, 0.46);
}

.expense-line-empty {
  padding: 12px;
  border: 1px dashed var(--border-soft);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

.expense-receipt-row > .expense-receipt-pills {
  max-width: 220px;
  justify-content: flex-end;
  align-items: flex-start;
}

.expense-receipt-row > .expense-receipt-pills .btn {
  width: 100%;
  justify-content: center;
}

@media (max-width: 980px) {
  .bank-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ops-preview-head,
  .ops-preview-row,
  .ops-preview-brand-row {
    grid-template-columns: 1fr;
  }

  .ops-preview-stats {
    width: 100%;
  }

  .ops-preview-actions {
    justify-content: flex-start;
  }

  .money-in-layout,
  .payout-layout {
    grid-template-columns: 1fr;
  }

  .expense-capture-grid,
  .expense-receipt-row {
    grid-template-columns: 1fr;
  }

  .expense-capture-pickers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
  }

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

  .expense-receipt-row > .expense-receipt-pills {
    max-width: none;
    justify-content: flex-start;
  }

  .expense-receipt-row > .expense-receipt-pills .btn {
    width: auto;
  }

  .bank-match-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .bank-stats {
    grid-template-columns: 1fr;
  }

  .ops-preview {
    padding: 11px;
  }

  .ops-preview-stats,
  .expense-scan-workflow {
    grid-template-columns: 1fr;
  }

  .ops-preview-titleline {
    display: grid;
    gap: 2px;
  }

  .bank-invoice-row,
  .bank-file-row,
  .expense-receipt-row,
  .payout-batch-row {
    grid-template-columns: 1fr;
  }

  .bank-invoice-row .pill-row,
  .bank-file-row .pill-row,
  .expense-receipt-pills,
  .payout-batch-row .pill-row {
    justify-content: flex-start;
  }

  .expense-capture-fields {
    grid-template-columns: 1fr;
  }

  .expense-capture-pickers {
    grid-template-columns: 1fr;
  }

  .expense-quick-pickers .receipt-camera-drop {
    min-height: 118px;
  }

  .expense-processing-queue {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
  }

  .expense-processing-items {
    justify-content: flex-start;
  }

  .expense-edit-grid {
    grid-template-columns: 1fr;
  }

  .expense-priority-grid,
  .expense-secondary-grid {
    grid-template-columns: 1fr;
  }

  .receipt-edit-field.wide {
    grid-column: auto;
  }

  .expense-receipt-main {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 10px;
  }

  .expense-receipt-thumb {
    grid-column: 1;
    grid-row: 1;
    width: 54px;
    height: 68px;
  }

  .expense-receipt-editor {
    display: contents;
  }

  .expense-receipt-editor-head {
    grid-column: 2;
    grid-row: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: flex-start;
  }

  .expense-receipt-status-note,
  .expense-priority-grid,
  .expense-secondary-fields,
  .expense-line-items {
    grid-column: 1 / -1;
  }

  .expense-receipt-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .expense-receipt-actions .pill {
    display: none;
  }

  .expense-line-labels {
    display: none;
  }

  .expense-line-items {
    padding: 9px;
  }

  .expense-line-head,
  .expense-line-actions {
    align-items: flex-start;
    gap: 3px;
  }

  .expense-line-head {
    grid-template-columns: 1fr auto;
  }

  .expense-line-head span:nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 2;
    text-align: left;
  }

  .expense-line-head .btn.small {
    grid-column: 2;
    grid-row: 1;
  }

  .expense-line-head span:last-child,
  .expense-line-actions span {
    line-height: 1.25;
  }

  .expense-line-row {
    grid-template-columns: 30px minmax(0, 1fr) 64px 26px;
    align-items: center;
    gap: 4px;
    padding: 5px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.58);
  }

  .expense-line-row .expense-line-index {
    display: none;
  }

  .expense-line-row .expense-line-description {
    grid-column: 2 / 3;
  }

  .expense-line-row input[data-field="quantity"] {
    display: none;
  }

  .expense-line-row .expense-line-amount {
    grid-column: 3 / 4;
  }

  .expense-line-row .expense-line-target {
    grid-column: 2 / 3;
  }

  .expense-line-row .expense-line-project {
    grid-column: 3 / -1;
  }

  .expense-line-row .icon-btn {
    grid-column: 4;
    grid-row: 1;
  }

  .expense-line-row .expense-line-description,
  .expense-line-row .expense-line-target,
  .expense-line-row .expense-line-project,
  .expense-line-row .expense-line-amount input {
    height: 30px;
    font-size: 11px;
  }

  .expense-line-modifiers {
    grid-column: 2 / -1;
  }

  .expense-quick-pickers {
    gap: 8px;
  }

  .expense-quick-pickers .receipt-camera-drop {
    min-height: 112px;
    gap: 6px;
    padding: 10px;
  }

  .expense-quick-pickers .receipt-camera-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .expense-quick-pickers .receipt-camera-icon .ui-icon {
    width: 19px;
    height: 19px;
  }

  .expense-quick-pickers .receipt-camera-drop strong {
    font-size: 16px;
  }

  .expense-quick-pickers .receipt-camera-drop small {
    max-width: 230px;
    font-size: 11px;
    line-height: 1.25;
  }

  .expense-quick-pickers .receipt-camera-cta {
    min-height: 30px;
    padding: 0 11px;
    font-size: 11px;
  }
}

/* QA modernization tranche: faster scanning, clearer mobile nav, safer finance flow. */
:root[data-theme="light"],
:root:not([data-theme]) {
  --bg: #f7f7f2;
  --bg-2: #eef2ec;
  --surface: #fffefb;
  --surface-2: #f7f8f4;
  --surface-3: #edf2ea;
  --line: #e1e5dc;
  --line-strong: #cbd5c6;
  --accent: #d3a13f;
  --accent-strong: #9d6b1f;
  --accent-soft: #f2e3bf;
  --blue: #477f9e;
  --blue-soft: #d8e8ef;
  --green: #557a58;
  --success: #d8e8dc;
  --rose-soft: #ecd9dc;
  --shadow-card: 0 10px 28px rgba(32, 38, 28, 0.07);
}

.app-shell .main {
  background:
    linear-gradient(180deg, rgba(71, 127, 158, 0.05), transparent 260px),
    linear-gradient(180deg, var(--surface), var(--bg));
}

.load-more-row {
  display: flex;
  justify-content: center;
  padding: 18px 0 4px;
}

.load-more-row .btn {
  min-width: min(100%, 280px);
}

.payout-flow-card {
  margin-bottom: 14px;
}

.payout-flow-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.payout-flow-step {
  min-height: 96px;
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}

.payout-flow-step > span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--green);
  background: var(--surface);
}

.payout-flow-step.done {
  border-color: rgba(85, 122, 88, 0.45);
  background: var(--success);
}

.payout-flow-step strong,
.payout-flow-step small {
  display: block;
}

.payout-flow-step small {
  margin-top: 4px;
  color: var(--text-muted);
  line-height: 1.35;
}

.data-safety-card .profile-field {
  min-height: 100%;
}

.data-safety-actions,
.database-backup-list {
  grid-column: 1 / -1;
}

.data-safety-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}

.data-safety-button-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.file-btn {
  position: relative;
  overflow: hidden;
}

.file-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.data-safety-actions strong,
.data-safety-actions span,
.database-backup-row strong,
.database-backup-row span {
  display: block;
}

.data-safety-actions span,
.database-backup-row span,
.database-sync-note {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
}

.database-backup-list {
  display: grid;
  gap: 8px;
}

.database-backup-row,
.database-sync-note {
  padding: 10px 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.database-backup-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

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

.system-status-item {
  min-height: 108px;
  padding: 13px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  display: grid;
  align-content: start;
  gap: 7px;
}

.system-status-item strong,
.system-status-item small {
  display: block;
}

.system-status-item small {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.settings-dialog-body .section-head.compact {
  margin-bottom: 8px;
}

.settings-audit-card {
  padding-bottom: 14px;
}

.settings-audit-list {
  display: grid;
  gap: 6px;
}

.settings-audit-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 42px;
  padding: 7px 9px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.settings-audit-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--text-muted);
  background: var(--surface);
}

.settings-audit-icon .ui-icon {
  width: 14px;
  height: 14px;
}

.settings-audit-row strong,
.settings-audit-row small {
  display: block;
}

.settings-audit-row strong {
  font-size: 13px;
  line-height: 1.25;
}

.settings-audit-row small,
.settings-audit-empty {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.settings-audit-empty {
  padding: 8px 9px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.audit-page {
  display: grid;
  gap: 18px;
}

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

.audit-summary-card,
.audit-log-row,
.audit-empty {
  border: 1px solid var(--border-soft);
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.audit-summary-card {
  padding: 16px;
  display: grid;
  gap: 6px;
  min-height: 118px;
}

.audit-summary-card span,
.audit-log-body small,
.audit-empty span {
  color: var(--text-muted);
  font-size: 0.83rem;
}

.audit-summary-card strong {
  font-size: clamp(1.1rem, 2vw, 1.8rem);
  line-height: 1;
}

.audit-summary-card em {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-style: normal;
}

.audit-summary-card.action-card .btn {
  justify-self: start;
  margin-top: auto;
}

.audit-log-list {
  display: grid;
  gap: 10px;
}

.audit-log-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
}

.audit-log-mark {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent-strong);
}

.audit-log-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.audit-log-head time {
  color: var(--text-muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

.audit-log-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.audit-log-body p,
.audit-log-body small {
  margin: 0;
  overflow-wrap: anywhere;
}

.audit-empty {
  padding: 28px;
  display: grid;
  gap: 4px;
}

.parent-auth-shell {
  max-width: 780px;
  margin: 0 auto;
}

.parent-auth-card {
  display: grid;
  gap: 16px;
}

.parent-auth-form {
  max-width: 520px;
}

@media (max-width: 900px) {
  .audit-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .audit-summary-grid {
    grid-template-columns: 1fr;
  }

  .audit-log-head {
    display: grid;
  }
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.92), rgba(239, 232, 220, 0.92)),
    var(--bg);
}

.auth-panel {
  width: min(520px, 100%);
  padding: 28px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.auth-brand {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding-bottom: 18px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--border-soft);
  letter-spacing: 0.18em;
  font-family: Georgia, "Times New Roman", serif;
}

.auth-brand span {
  font-size: 18px;
}

.auth-brand strong {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.auth-copy h1 {
  margin: 4px 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 8vw, 58px);
  line-height: 0.95;
}

.auth-copy p:last-child {
  margin: 0 0 22px;
  color: var(--text-muted);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-actions,
.auth-settings-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.auth-message {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  color: var(--text);
  background: var(--surface-2);
}

.auth-message.success {
  border-color: rgba(85, 122, 88, 0.34);
  background: var(--success);
}

.auth-message.error {
  border-color: rgba(173, 103, 94, 0.34);
  background: #f4ded9;
}

.auth-invite-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 14px;
}

.auth-settings-card .form-grid {
  margin-bottom: 0;
}

.parent-access-denied .parent-hero-card {
  max-width: 720px;
}

@media (max-width: 980px) {
  .payout-flow-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .app-shell .sidebar {
    padding-bottom: 8px;
  }

  .app-shell .nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 120;
    display: flex;
    gap: 5px;
    padding: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    background: rgba(255, 254, 251, 0.96);
    box-shadow: 0 18px 50px rgba(32, 38, 28, 0.18);
    backdrop-filter: blur(14px);
  }

  .app-shell .nav::-webkit-scrollbar {
    display: none;
  }

  .app-shell .nav-item,
  .app-shell .nav-item.active {
    position: relative;
    flex: 0 0 68px;
    min-width: 68px;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 3px;
    padding: 7px 4px;
    border-radius: 12px;
  }

  .app-shell .nav-item span:nth-child(2),
  .app-shell .nav-item.active span:nth-child(2) {
    display: block;
    max-width: 100%;
    font-size: 10px;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .app-shell .nav-count {
    position: absolute;
    top: 2px;
    right: 4px;
    display: grid;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    place-items: center;
    font-size: 10px;
  }

  .app-shell .main {
    padding-bottom: 126px;
  }

  .app-shell .sidebar-bottom {
    align-self: flex-start;
  }

  .payout-flow-steps {
    grid-template-columns: 1fr;
  }

  .auth-invite-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .sc-admin-editing .sc-home-hero,
  .sc-admin-editing .sc-home-mosaic {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .sc-admin-editing .sc-home-mosaic {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-rows: minmax(164px, 31svh);
    gap: 2px;
  }

  .sc-admin-editing .sc-home-tile,
  .sc-admin-editing .sc-home-feature-tile {
    display: grid;
    grid-column: auto !important;
    grid-row: auto !important;
    width: 100%;
    height: auto;
    min-height: 164px;
  }

  .sc-admin-editing .sc-home-feature-tile {
    grid-column: 1 / -1 !important;
    grid-row: span 2 !important;
    min-height: min(460px, 62svh);
  }

  .sc-admin-editing .sc-home-size-wide,
  .sc-admin-editing .sc-home-size-full,
  .sc-admin-editing .sc-home-video-tile {
    grid-column: span 2 !important;
  }

  .sc-admin-editing .sc-home-size-tall {
    grid-row: span 2 !important;
  }

  .sc-admin-editing .sc-home-feature-tile .sc-home-desktop-media {
    display: block;
  }

  .sc-admin-editing .sc-home-feature-tile .sc-home-mobile-media {
    display: none;
  }
}

/* Public homepage media wall */
.sc-home-media-wall {
  padding:
    clamp(10px, 1.35vw, 18px)
    0
    clamp(34px, 4vw, 58px);
  background: #f6f3ec;
  overflow: hidden;
}

.sc-home-media-grid {
  width: 100%;
  max-width: none;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(var(--sc-home-media-count, 5), minmax(0, 1fr));
  gap: clamp(5px, 0.55vw, 8px);
}

.sc-home-media-tile {
  position: relative;
  min-width: 0;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 0;
  background: #e8e2d8;
}

.sc-home-media-tile img,
.sc-home-media-tile video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: brightness(1.07) contrast(1.1) saturate(1.03);
  transform: scale(1.018);
}

.sc-home-media-tile > span {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #bdb4a8;
  font: 700 42px/1 Georgia, "Times New Roman", serif;
}

.sc-home-legacy-showcase {
  background: #ffffff;
  color: #050505;
  padding: 0 0 clamp(78px, 8vw, 132px);
}

.sc-home-legacy-intro {
  width: min(1560px, calc(100% - clamp(34px, 7vw, 128px)));
  margin: 0 auto;
  display: grid;
  gap: clamp(36px, 4vw, 58px);
  justify-items: center;
  padding: clamp(62px, 7vw, 118px) 0 clamp(58px, 7vw, 108px);
  text-align: center;
}

.sc-home-legacy-intro p {
  max-width: 1390px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(25px, 2.45vw, 42px);
  font-weight: 400;
  line-height: 1.32;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sc-home-legacy-intro a {
  color: #050505;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(25px, 2.35vw, 38px);
  line-height: 1;
  letter-spacing: 0;
  text-decoration: none;
  text-transform: uppercase;
}

.sc-home-legacy-intro a:hover,
.sc-home-legacy-intro a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 6px;
}

.sc-home-legacy-feed {
  display: grid;
  gap: clamp(86px, 10vw, 176px);
}

.sc-home-legacy-case {
  width: 100%;
  display: grid;
  gap: clamp(17px, 1.9vw, 28px);
  justify-items: center;
  content-visibility: auto;
  contain-intrinsic-size: 820px;
}

.sc-home-legacy-media-grid {
  width: calc(100% - clamp(28px, 4vw, 54px));
  max-width: var(--legacy-max, 1500px);
  display: grid;
  grid-template-columns: repeat(var(--legacy-columns, 1), minmax(0, 1fr));
  gap: clamp(16px, 1.6vw, 28px);
  align-items: stretch;
}

.sc-home-legacy-case.is-single .sc-home-legacy-media-grid {
  width: calc(100% - clamp(40px, 12vw, 520px));
  max-width: var(--legacy-max, 880px);
  grid-template-columns: minmax(0, 1fr);
}

.sc-home-legacy-case.is-wide .sc-home-legacy-media-grid {
  width: calc(100% - clamp(36px, 18vw, 420px));
  max-width: var(--legacy-max, 1120px);
}

.sc-home-legacy-case.is-portrait .sc-home-legacy-media-grid {
  width: calc(100% - clamp(42px, 22vw, 640px));
  max-width: var(--legacy-max, 820px);
}

.sc-home-legacy-case.is-video .sc-home-legacy-media-grid {
  width: calc(100% - clamp(54px, 28vw, 700px));
  max-width: var(--legacy-max, 760px);
}

.sc-home-legacy-media {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  background: #f4f4f4;
}

.sc-home-legacy-case.is-grid .sc-home-legacy-media {
  aspect-ratio: var(--legacy-ratio, 4 / 5);
}

.sc-home-legacy-media img,
.sc-home-legacy-media video {
  width: 100%;
  height: auto;
  display: block;
}

.sc-home-legacy-case.is-grid .sc-home-legacy-media img,
.sc-home-legacy-case.is-grid .sc-home-legacy-media video {
  height: 100%;
  object-fit: cover;
}

.sc-home-legacy-media video {
  background: #050505;
}

.sc-home-legacy-caption {
  display: grid;
  gap: 8px;
  justify-items: center;
  text-align: center;
}

.sc-home-legacy-caption h2,
.sc-home-legacy-caption p {
  margin: 0;
  color: #050505;
  letter-spacing: 0;
}

.sc-home-legacy-caption h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(25px, 2.3vw, 38px);
  font-weight: 400;
  line-height: 1.05;
  text-transform: uppercase;
}

.sc-home-legacy-caption h2 span {
  border-bottom: 1px solid currentColor;
}

.sc-home-legacy-caption p {
  font-size: clamp(16px, 1.45vw, 22px);
  line-height: 1.35;
}

@media (max-width: 1180px) {
  .sc-home-legacy-showcase {
    overflow: hidden;
  }

  .sc-home-legacy-media-grid,
  .sc-home-legacy-case.is-single .sc-home-legacy-media-grid,
  .sc-home-legacy-case.is-wide .sc-home-legacy-media-grid,
  .sc-home-legacy-case.is-portrait .sc-home-legacy-media-grid,
  .sc-home-legacy-case.is-video .sc-home-legacy-media-grid {
    width: calc(100% - 28px - env(safe-area-inset-left) - env(safe-area-inset-right)) !important;
    max-width: none !important;
    grid-template-columns: 1fr !important;
    gap: 14px;
  }

  .sc-home-legacy-case.is-grid .sc-home-legacy-media {
    aspect-ratio: 4 / 5;
  }

  .sc-home-legacy-case.is-grid .sc-home-legacy-media img,
  .sc-home-legacy-case.is-grid .sc-home-legacy-media video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  .sc-home-legacy-case:first-child .sc-home-legacy-media:first-child img {
    object-position: 100% 50% !important;
  }

  .sc-home-legacy-caption {
    width: calc(100% - 28px - env(safe-area-inset-left) - env(safe-area-inset-right));
  }
}

@media (max-width: 820px) {
  .sc-home-media-wall {
    padding:
      10px
      0
      36px
      0;
    overflow: hidden;
  }

  .sc-home-media-grid {
    width: auto;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-right: 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .sc-home-legacy-showcase {
    overflow: hidden;
  }

  .sc-home-legacy-intro {
    width: calc(100% - 28px - env(safe-area-inset-left) - env(safe-area-inset-right));
    gap: 32px;
    padding: 64px 0 54px;
  }

  .sc-home-legacy-intro p {
    font-size: clamp(23px, 7.1vw, 28px);
    line-height: 1.22;
  }

  .sc-home-legacy-intro a {
    font-size: clamp(23px, 6.8vw, 28px);
  }

  .sc-home-legacy-feed {
    gap: 74px;
  }

  .sc-home-legacy-media-grid,
  .sc-home-legacy-case.is-single .sc-home-legacy-media-grid,
  .sc-home-legacy-case.is-wide .sc-home-legacy-media-grid,
  .sc-home-legacy-case.is-portrait .sc-home-legacy-media-grid,
  .sc-home-legacy-case.is-video .sc-home-legacy-media-grid {
    width: calc(100% - 28px - env(safe-area-inset-left) - env(safe-area-inset-right)) !important;
    max-width: none !important;
    grid-template-columns: 1fr !important;
    gap: 14px;
  }

  .sc-home-legacy-case.is-grid .sc-home-legacy-media {
    aspect-ratio: 4 / 5;
  }

  .sc-home-legacy-case.is-grid .sc-home-legacy-media img,
  .sc-home-legacy-case.is-grid .sc-home-legacy-media video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  .sc-home-legacy-case:first-child .sc-home-legacy-media:first-child img {
    object-position: 100% 50% !important;
  }

  .sc-home-legacy-caption {
    width: calc(100% - 28px - env(safe-area-inset-left) - env(safe-area-inset-right));
  }

  .sc-home-legacy-caption h2 {
    font-size: clamp(24px, 7vw, 30px);
  }

  .sc-home-legacy-caption p {
    font-size: 17px;
  }

  .sc-home-media-grid::-webkit-scrollbar {
    display: none;
  }

  .sc-home-media-tile {
    flex: 0 0 min(36vw, 156px);
    scroll-snap-align: start;
  }
}

@media (max-width: 980px) {
  .sc-public-models-catalogue {
    padding-top: clamp(58px, 12vw, 92px);
  }

  .sc-models-watermark {
    top: -34px;
    font-size: clamp(58px, 14vw, 112px);
  }

  .sc-public-models-filters {
    width: calc(100% - 32px);
    grid-template-columns: 1fr;
    margin-bottom: 34px;
    gap: 18px;
  }

  .sc-public-filter-row {
    display: grid;
  }

  .sc-public-filter-row-primary,
  .sc-public-filter-row-secondary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 22px;
    justify-content: stretch;
  }

  .sc-public-search-filter {
    grid-column: 1 / -1;
  }

  .sc-public-models-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 14px;
    padding: 0 16px;
  }

  .sc-public-models-grid .brand-model-media {
    aspect-ratio: 3 / 4;
  }
}

@media (max-width: 560px) {
  .sc-public-filter-row-primary,
  .sc-public-filter-row-secondary {
    grid-template-columns: 1fr;
  }

  .sc-public-models-grid {
    grid-template-columns: 1fr;
  }
}

/* Profile-scoped appearance settings */
.appearance-settings-card .section-head {
  align-items: center;
}

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

.theme-option {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 24px;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 112px;
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.theme-option:hover,
.theme-option:focus-visible {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 54%, var(--border));
  outline: 0;
  box-shadow: var(--shadow-card);
}

.theme-option.active {
  border-color: color-mix(in srgb, var(--accent) 72%, var(--border));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent-soft) 62%, transparent), transparent),
    var(--surface);
}

.theme-option-preview {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 5px;
  height: 76px;
  overflow: hidden;
  padding: 7px;
  border-radius: 14px;
  border: 1px solid currentColor;
}

.theme-option.light .theme-option-preview {
  color: rgba(45, 44, 38, 0.16);
  background: #faf7ef;
}

.theme-option.dark .theme-option-preview {
  color: rgba(255, 248, 236, 0.18);
  background: #11130f;
}

.theme-option-preview span {
  display: block;
  border-radius: 6px;
  background: currentColor;
}

.theme-option-preview span:first-child {
  grid-row: 1 / -1;
  opacity: 0.72;
}

.theme-option.light .theme-option-preview span:nth-child(2) {
  background: #d6b574;
}

.theme-option.dark .theme-option-preview span:nth-child(2) {
  background: #d7ad67;
}

.theme-option-preview span:nth-child(3) {
  opacity: 0.46;
}

.theme-option-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.theme-option-copy strong,
.theme-option-copy small {
  display: block;
  min-width: 0;
}

.theme-option-copy strong {
  font-size: 15px;
  font-weight: 760;
}

.theme-option-copy small {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.35;
}

.theme-option-check {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  color: var(--accent-strong);
}

.theme-option-check .ui-icon {
  width: 17px;
  height: 17px;
}

.theme-profile-note {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.35;
}

.theme-profile-note .ui-icon {
  width: 16px;
  height: 16px;
  color: var(--accent-strong);
}

.theme-profile-note strong {
  color: var(--text);
}

.appearance-secondary-grid {
  margin-top: 12px;
}

@media (max-width: 760px) {
  .theme-mode-grid {
    grid-template-columns: 1fr;
  }

  .theme-option {
    grid-template-columns: 74px minmax(0, 1fr) 24px;
    min-height: 98px;
  }
}

/* Premium dark mode for the admin app. Public pages intentionally stay light. */
:root[data-theme="dark"] body {
  background: var(--bg);
  color: var(--text);
}

:root[data-theme="dark"] .app-shell {
  background:
    radial-gradient(circle at 12% 8%, rgba(215, 173, 103, 0.14), transparent 30%),
    radial-gradient(circle at 94% 2%, rgba(143, 184, 202, 0.1), transparent 26%),
    linear-gradient(180deg, #11130f 0%, #0d0f0d 54%, #0f110e 100%);
  color: var(--text);
}

:root[data-theme="dark"] .app-shell .main {
  background:
    linear-gradient(180deg, rgba(143, 184, 202, 0.06), transparent 280px),
    linear-gradient(180deg, #12140f, var(--bg));
}

:root[data-theme="dark"] .app-shell .sidebar {
  border-right-color: rgba(246, 240, 229, 0.08);
  background:
    linear-gradient(180deg, rgba(28, 31, 25, 0.94), rgba(16, 18, 15, 0.98)),
    var(--bg);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.03);
}

:root[data-theme="dark"] .app-shell .brand {
  border-bottom-color: var(--border-soft);
  color: var(--text);
}

:root[data-theme="dark"] .app-shell .brand:hover,
:root[data-theme="dark"] .app-shell .brand:focus-visible,
:root[data-theme="dark"] .app-shell .nav-item:hover,
:root[data-theme="dark"] .app-shell .nav-item.active {
  border-color: rgba(215, 173, 103, 0.32);
  background: rgba(215, 173, 103, 0.12);
  color: var(--text);
}

:root[data-theme="dark"] .app-shell .nav-item {
  color: #cad2bf;
}

:root[data-theme="dark"] .app-shell .nav-item.active .nav-icon {
  color: var(--accent-strong);
}

:root[data-theme="dark"] .app-shell .nav-count {
  border-color: rgba(246, 240, 229, 0.12);
  background: rgba(246, 240, 229, 0.07);
  color: var(--text-muted);
}

:root[data-theme="dark"] .app-shell .mode-switch,
:root[data-theme="dark"] .app-shell .segmented,
:root[data-theme="dark"] .app-shell .tabs,
:root[data-theme="dark"] .agreement-business-switch,
:root[data-theme="dark"] .calendar-cockpit-page .calendar-view-toggle,
:root[data-theme="dark"] .calendar-cockpit-page .calendar-scope-tabs {
  border-color: var(--border-soft);
  background: rgba(246, 240, 229, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

:root[data-theme="dark"] .app-shell .mode-switch button,
:root[data-theme="dark"] .app-shell .tabs button,
:root[data-theme="dark"] .app-shell .segmented button,
:root[data-theme="dark"] .agreement-business-switch button {
  color: var(--text-muted);
}

:root[data-theme="dark"] .app-shell .mode-switch button:hover,
:root[data-theme="dark"] .app-shell .tabs button:hover,
:root[data-theme="dark"] .app-shell .segmented button:hover,
:root[data-theme="dark"] .agreement-business-switch button:hover {
  background: rgba(215, 173, 103, 0.11);
  color: var(--text);
}

:root[data-theme="dark"] .app-shell .mode-switch button.active,
:root[data-theme="dark"] .app-shell .tabs button.active,
:root[data-theme="dark"] .app-shell .segmented button.active,
:root[data-theme="dark"] .agreement-business-switch button.active {
  background: rgba(215, 173, 103, 0.2);
  color: #fff7e8;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

:root[data-theme="dark"] .app-shell .card,
:root[data-theme="dark"] .app-shell .panel,
:root[data-theme="dark"] .app-shell .list-item,
:root[data-theme="dark"] .app-shell .booking-row,
:root[data-theme="dark"] .app-shell .invoice-row,
:root[data-theme="dark"] .app-shell .task-card,
:root[data-theme="dark"] .app-shell .model-profile,
:root[data-theme="dark"] .app-shell .kanban-col,
:root[data-theme="dark"] .app-shell .task-card-summary,
:root[data-theme="dark"] .app-shell .task-composer,
:root[data-theme="dark"] .app-shell .filter-chip,
:root[data-theme="dark"] .app-shell .workflow-panel,
:root[data-theme="dark"] .app-shell .workflow-step,
:root[data-theme="dark"] .app-shell .data-alert,
:root[data-theme="dark"] .app-shell .role-card,
:root[data-theme="dark"] .app-shell .template-card,
:root[data-theme="dark"] .app-shell .integration-card,
:root[data-theme="dark"] .app-shell .casting-card,
:root[data-theme="dark"] .app-shell .doc-tile,
:root[data-theme="dark"] .app-shell .agreement-task-row,
:root[data-theme="dark"] .app-shell .parent-time-row,
:root[data-theme="dark"] .app-shell .model-request-row,
:root[data-theme="dark"] .app-shell .approval-queue,
:root[data-theme="dark"] .app-shell .message-preview,
:root[data-theme="dark"] .app-shell .invoice-readiness,
:root[data-theme="dark"] .app-shell .backup-suggestions,
:root[data-theme="dark"] .app-shell .project-card,
:root[data-theme="dark"] .app-shell .project-metric,
:root[data-theme="dark"] .app-shell .project-section,
:root[data-theme="dark"] .app-shell .project-task-row,
:root[data-theme="dark"] .app-shell .customer-card,
:root[data-theme="dark"] .app-shell .customer-editor-panel,
:root[data-theme="dark"] .app-shell .customer-panel,
:root[data-theme="dark"] .app-shell .customer-record-row,
:root[data-theme="dark"] .app-shell .profile-field,
:root[data-theme="dark"] .app-shell .manual-request-form,
:root[data-theme="dark"] .app-shell .wishlist-panel,
:root[data-theme="dark"] .app-shell .client-request-model,
:root[data-theme="dark"] .app-shell .portal-preview-card,
:root[data-theme="dark"] .app-shell .portal-preview-stage,
:root[data-theme="dark"] .app-shell .portal-tile-editor,
:root[data-theme="dark"] .app-shell .portal-media-row,
:root[data-theme="dark"] .app-shell .portal-section-editor,
:root[data-theme="dark"] .app-shell .portal-editor-card,
:root[data-theme="dark"] .app-shell .portal-model-card-studio,
:root[data-theme="dark"] .app-shell .portal-import-summary,
:root[data-theme="dark"] .app-shell .portal-add-media,
:root[data-theme="dark"] .app-shell .transport-estimate,
:root[data-theme="dark"] .app-shell .today-card,
:root[data-theme="dark"] .app-shell .day-card,
:root[data-theme="dark"] .data-safety-actions,
:root[data-theme="dark"] .database-backup-row,
:root[data-theme="dark"] .database-sync-note,
:root[data-theme="dark"] .system-status-item,
:root[data-theme="dark"] .settings-audit-row,
:root[data-theme="dark"] .settings-audit-empty,
:root[data-theme="dark"] .payout-flow-step,
:root[data-theme="dark"] .theme-profile-note {
  border-color: var(--border-soft);
  background:
    linear-gradient(180deg, rgba(31, 34, 28, 0.96), rgba(23, 25, 21, 0.92)),
    var(--surface);
  box-shadow: var(--shadow-card);
  color: var(--text);
}

:root[data-theme="dark"] .app-shell .card:hover,
:root[data-theme="dark"] .app-shell .project-card:hover,
:root[data-theme="dark"] .app-shell .task-card:hover,
:root[data-theme="dark"] .app-shell .booking-row:hover,
:root[data-theme="dark"] .app-shell .invoice-row:hover {
  border-color: rgba(215, 173, 103, 0.42);
}

:root[data-theme="dark"] .app-shell .btn,
:root[data-theme="dark"] .app-shell .icon-btn,
:root[data-theme="dark"] .app-shell .file-btn,
:root[data-theme="dark"] .app-shell .filter-chip,
:root[data-theme="dark"] .calendar-cockpit-page .calendar-nav-controls .btn,
:root[data-theme="dark"] .calendar-cockpit-page .calendar-nav-button {
  border-color: var(--border-soft);
  background: rgba(246, 240, 229, 0.07);
  color: var(--text);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

:root[data-theme="dark"] .app-shell .btn:hover,
:root[data-theme="dark"] .app-shell .icon-btn:hover,
:root[data-theme="dark"] .app-shell .file-btn:hover,
:root[data-theme="dark"] .app-shell .filter-chip:hover,
:root[data-theme="dark"] .calendar-cockpit-page .calendar-nav-controls .btn:hover,
:root[data-theme="dark"] .calendar-cockpit-page .calendar-nav-button:hover {
  border-color: var(--border);
  background: rgba(246, 240, 229, 0.11);
  color: #fff7e8;
}

:root[data-theme="dark"] .app-shell .btn.primary,
:root[data-theme="dark"] .app-shell .icon-btn.add-button,
:root[data-theme="dark"] .app-shell .workflow-step.active,
:root[data-theme="dark"] .app-shell .brand-model-add,
:root[data-theme="dark"] .calendar-cockpit-page .calendar-new-booking {
  border-color: rgba(215, 173, 103, 0.54);
  background: linear-gradient(180deg, #d8b36f, #a97734);
  color: #15130f;
  box-shadow: 0 16px 32px rgba(215, 173, 103, 0.16);
}

:root[data-theme="dark"] .app-shell .btn.primary:hover,
:root[data-theme="dark"] .app-shell .icon-btn.add-button:hover,
:root[data-theme="dark"] .calendar-cockpit-page .calendar-new-booking:hover {
  background: linear-gradient(180deg, #e1c07e, #b98239);
  color: #11100d;
}

:root[data-theme="dark"] .app-shell .btn.warn,
:root[data-theme="dark"] .app-shell .btn.danger-soft,
:root[data-theme="dark"] .app-shell .pill.red {
  border-color: rgba(220, 139, 129, 0.34);
  background: rgba(220, 139, 129, 0.13);
  color: #f2aaa2;
}

:root[data-theme="dark"] .app-shell input,
:root[data-theme="dark"] .app-shell select,
:root[data-theme="dark"] .app-shell textarea,
:root[data-theme="dark"] .app-shell .command-input,
:root[data-theme="dark"] .app-shell .measure-input,
:root[data-theme="dark"] .toolbar input,
:root[data-theme="dark"] .toolbar select,
:root[data-theme="dark"] .field input,
:root[data-theme="dark"] .field select,
:root[data-theme="dark"] .field textarea {
  border-color: var(--border-soft);
  background: rgba(9, 11, 9, 0.54);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

:root[data-theme="dark"] .app-shell input:focus,
:root[data-theme="dark"] .app-shell select:focus,
:root[data-theme="dark"] .app-shell textarea:focus,
:root[data-theme="dark"] .app-shell .command-input:focus,
:root[data-theme="dark"] .app-shell .measure-input:focus-within {
  border-color: rgba(215, 173, 103, 0.62);
  box-shadow: 0 0 0 3px rgba(215, 173, 103, 0.16);
}

:root[data-theme="dark"] .address-suggestions {
  border-color: rgba(215, 173, 103, 0.3);
  background: #181a16;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
}

:root[data-theme="dark"] .app-shell .pill {
  border-color: var(--border-soft);
  background: rgba(246, 240, 229, 0.07);
  color: var(--text-muted);
}

:root[data-theme="dark"] .app-shell .pill.green,
:root[data-theme="dark"] .app-shell .workflow-step.done,
:root[data-theme="dark"] .payout-flow-step.done {
  border-color: rgba(150, 173, 134, 0.34);
  background: rgba(150, 173, 134, 0.15);
  color: #b9d2aa;
}

:root[data-theme="dark"] .app-shell .pill.blue {
  border-color: rgba(143, 184, 202, 0.34);
  background: rgba(143, 184, 202, 0.13);
  color: #b8d8e7;
}

:root[data-theme="dark"] .app-shell .pill.amber {
  border-color: rgba(215, 173, 103, 0.34);
  background: rgba(215, 173, 103, 0.15);
  color: #ead19b;
}

:root[data-theme="dark"] .app-shell .empty-state,
:root[data-theme="dark"] .settings-audit-icon,
:root[data-theme="dark"] .payout-flow-step > span {
  border-color: var(--border-soft);
  background: rgba(246, 240, 229, 0.055);
  color: var(--text-muted);
}

:root[data-theme="dark"] .app-shell .modal-backdrop,
:root[data-theme="dark"] .app-shell .settings-backdrop,
:root[data-theme="dark"] .app-shell .invoice-settings-backdrop,
:root[data-theme="dark"] .app-shell .app-confirm-backdrop,
:root[data-theme="dark"] .app-shell .calendar-create-choice-backdrop,
:root[data-theme="dark"] .app-shell .task-edit-backdrop {
  background: rgba(4, 5, 4, 0.66);
  backdrop-filter: blur(14px);
}

:root[data-theme="dark"] .app-shell .modal-dialog,
:root[data-theme="dark"] .app-shell .command-panel,
:root[data-theme="dark"] .app-shell .notification-center,
:root[data-theme="dark"] .app-shell .settings-dialog,
:root[data-theme="dark"] .app-shell .invoice-settings-dialog,
:root[data-theme="dark"] .app-shell .app-confirm-dialog,
:root[data-theme="dark"] .app-shell .calendar-create-choice-dialog,
:root[data-theme="dark"] .app-shell .task-edit-dialog {
  border-color: var(--border);
  background:
    linear-gradient(180deg, rgba(31, 34, 28, 0.99), rgba(18, 20, 17, 0.98)),
    var(--surface);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.56);
}

:root[data-theme="dark"] .settings-dialog-head,
:root[data-theme="dark"] .app-shell .sidebar-bottom {
  border-color: var(--border-soft);
}

:root[data-theme="dark"] .settings-dialog-body .settings-section,
:root[data-theme="dark"] .invoice-settings-dialog .invoice-settings-panel,
:root[data-theme="dark"] .agreement-basics-panel,
:root[data-theme="dark"] .shoot-days-panel,
:root[data-theme="dark"] .agreement-summary-item {
  border-color: var(--border-soft);
  background: rgba(246, 240, 229, 0.055);
  box-shadow: none;
}

:root[data-theme="dark"] .app-shell table,
:root[data-theme="dark"] .app-shell th,
:root[data-theme="dark"] .app-shell td {
  border-color: var(--border-soft);
}

:root[data-theme="dark"] .app-shell th {
  background: rgba(246, 240, 229, 0.06);
  color: var(--text-muted);
}

:root[data-theme="dark"] .toast {
  border-color: rgba(215, 173, 103, 0.28);
  background: rgba(20, 22, 18, 0.96);
  color: var(--text);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42);
}

:root[data-theme="dark"] .toast-undo {
  color: #f0cf96;
}

:root[data-theme="dark"] .theme-option {
  border-color: var(--border-soft);
  background: rgba(246, 240, 229, 0.055);
}

:root[data-theme="dark"] .theme-option.active {
  border-color: rgba(215, 173, 103, 0.58);
  background:
    linear-gradient(180deg, rgba(215, 173, 103, 0.16), rgba(215, 173, 103, 0.04)),
    rgba(246, 240, 229, 0.06);
}

:root[data-theme="dark"] .auth-page {
  background:
    radial-gradient(circle at 18% 12%, rgba(215, 173, 103, 0.14), transparent 30%),
    linear-gradient(180deg, #11130f, #0d0f0d);
}

:root[data-theme="dark"] .auth-panel {
  border-color: var(--border-soft);
  background:
    linear-gradient(180deg, rgba(31, 34, 28, 0.97), rgba(18, 20, 17, 0.96)),
    var(--surface);
  box-shadow: var(--shadow-soft);
}

:root[data-theme="dark"] .calendar-cockpit-page {
  --bg: #10110f;
  --bg-2: #151713;
  --surface: #1b1d18;
  --surface-2: #20231d;
  --surface-3: #282b23;
  --surface-muted: #23261f;
  --line: #31362c;
  --line-strong: #49503f;
  --border: #404637;
  --border-soft: #2d3229;
  --text: #f6f0e5;
  --muted: #b4bca7;
  --faint: #858d7c;
  --accent: #d7ad67;
  --accent-strong: #e5c987;
  --sage: #8ea07d;
  --blue-soft: rgba(112, 149, 166, 0.2);
  --rose-soft: rgba(190, 112, 102, 0.19);
  --amber: #e0b66f;
  --green: #96ad86;
  --blue: #8fb8ca;
  --red: #dc8b81;
  --cream: #d7ad67;
  --shadow: var(--shadow-soft);
  --shadow-soft: 0 22px 70px rgba(0, 0, 0, 0.34);
}

:root[data-theme="dark"] .calendar-cockpit-page .main {
  background:
    radial-gradient(circle at 16% 12%, rgba(215, 173, 103, 0.14), transparent 28%),
    linear-gradient(180deg, #12140f 0%, var(--bg) 54%);
}

:root[data-theme="dark"] .calendar-cockpit-page .sidebar,
:root[data-theme="dark"] .calendar-cockpit-page .calendar-card,
:root[data-theme="dark"] .calendar-cockpit-page .calendar-list-card,
:root[data-theme="dark"] .calendar-day-drawer {
  border-color: var(--border-soft);
  background:
    linear-gradient(180deg, rgba(31, 34, 28, 0.96), rgba(18, 20, 17, 0.94)),
    var(--surface);
  box-shadow: var(--shadow-card);
}

:root[data-theme="dark"] .calendar-card-head .section-title,
:root[data-theme="dark"] .calendar-month-title,
:root[data-theme="dark"] .calendar-drawer-head strong,
:root[data-theme="dark"] .calendar-cockpit-page .agenda-head strong,
:root[data-theme="dark"] .calendar-cockpit-page .calendar-event-main strong,
:root[data-theme="dark"] .calendar-drawer-event-body strong {
  color: var(--text);
}

:root[data-theme="dark"] .calendar-cockpit-page .calendar-weekday,
:root[data-theme="dark"] .calendar-cockpit-page .calendar-day,
:root[data-theme="dark"] .calendar-cockpit-page .agenda-day,
:root[data-theme="dark"] .calendar-cockpit-page .calendar-event-pill,
:root[data-theme="dark"] .calendar-drawer-event,
:root[data-theme="dark"] .calendar-quick-action,
:root[data-theme="dark"] .calendar-drawer-empty,
:root[data-theme="dark"] .holiday-drawer-item {
  border-color: var(--border-soft);
  background: rgba(246, 240, 229, 0.055);
  color: var(--text);
  box-shadow: none;
}

:root[data-theme="dark"] .calendar-cockpit-page .calendar-day.weekend-day,
:root[data-theme="dark"] .calendar-cockpit-page .calendar-day.muted-day,
:root[data-theme="dark"] .calendar-cockpit-page .calendar-weekday.weekend-weekday {
  background: rgba(246, 240, 229, 0.035);
}

:root[data-theme="dark"] .calendar-cockpit-page .calendar-day:hover,
:root[data-theme="dark"] .calendar-cockpit-page .calendar-day.selected-day,
:root[data-theme="dark"] .calendar-cockpit-page .calendar-day.today,
:root[data-theme="dark"] .calendar-cockpit-page .agenda-day.today,
:root[data-theme="dark"] .calendar-cockpit-page .agenda-day.selected-day,
:root[data-theme="dark"] .calendar-quick-action:hover {
  background: rgba(215, 173, 103, 0.1);
}

:root[data-theme="dark"] .calendar-cockpit-page .calendar-month {
  border-color: var(--border-soft);
  background: var(--border-soft);
  box-shadow: none;
}

:root[data-theme="dark"] .calendar-cockpit-page .calendar-day-number {
  color: var(--text);
}

:root[data-theme="dark"] .calendar-cockpit-page .calendar-day.today .calendar-day-number {
  border-color: rgba(215, 173, 103, 0.58);
  background: #d7ad67;
  color: #15130f;
}

:root[data-theme="dark"] .calendar-event-topline time,
:root[data-theme="dark"] .calendar-cockpit-page .calendar-event-pill small,
:root[data-theme="dark"] .calendar-drawer-head span,
:root[data-theme="dark"] .calendar-drawer-label,
:root[data-theme="dark"] .calendar-drawer-event-time,
:root[data-theme="dark"] .calendar-summary-row,
:root[data-theme="dark"] .calendar-summary-row strong,
:root[data-theme="dark"] .calendar-event-meta span {
  color: var(--text-muted);
}

:root[data-theme="dark"] .calendar-status-chip,
:root[data-theme="dark"] .calendar-event-meta span {
  border-color: rgba(143, 184, 202, 0.26);
  background: rgba(143, 184, 202, 0.14);
  color: #b8d8e7;
}
