:root {
  --bg: #f4f2ee;
  --surface: #ffffff;
  --surface-2: #f8f7f3;
  --ink: #1f2328;
  --muted: #687078;
  --line: #dedbd2;
  --line-strong: #c8c3b8;
  --black: #151515;
  --green: #668c4a;
  --green-soft: #dfead6;
  --gold: #c59a38;
  --gold-soft: #f2dfaa;
  --rose: #a83c62;
  --rose-soft: #f4d9e2;
  --blue: #426b9f;
  --blue-soft: #dce7f4;
  --teal: #347f7a;
  --teal-soft: #d9eeeb;
  --shadow: 0 18px 42px rgba(38, 35, 28, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
  width: 100%;
  max-width: 100%;
}

html {
  scrollbar-gutter: auto;
}

body {
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--bg);
  color: var(--ink);
  font-family: "Poppins", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

@media (min-width: 681px) {
  html {
    scrollbar-gutter: stable;
  }

  body {
    overflow-y: scroll;
  }
}

body:not([data-auth="signed-in"]) {
  overflow: hidden;
  background: #f7f5ef;
}

body:not([data-auth="signed-in"]) .app-shell {
  display: none;
}

body[data-auth="signed-in"]:not([data-auth-mode="recovery"]) .auth-modal {
  display: none !important;
}

body[data-auth-mode="recovery"] .auth-modal {
  display: grid !important;
}

body[data-role="artist"] [data-internal-only] {
  display: none !important;
}

body[data-role="internal"] .artist-preview-only {
  display: none !important;
}

body[data-profile-role="artist"] #roleSelect,
body[data-profile-role="artist"] .artist-preview-only {
  display: none !important;
}

body[data-role="artist"] .nav-list,
body[data-role="artist"] .side-summary,
body[data-role="artist"] .view-subtitle,
body[data-role="artist"] .save-state,
body[data-role="artist"] #resetDataBtn,
body[data-role="artist"] #openAuthBtn,
body[data-role="artist"] [data-admin-dashboard] {
  display: none !important;
}

body[data-role="artist"] .drawer-actions {
  display: none !important;
}

body[data-role="artist"] .drawer-save-button,
body[data-role="artist"] .drawer-edit-button {
  display: none !important;
}

body[data-role="artist"] .app-shell {
  align-content: start;
  grid-template-columns: minmax(0, 1fr);
}

body[data-role="artist"] .sidebar {
  height: auto;
  max-height: none;
}

body[data-role="artist"] .workspace {
  padding-top: 18px;
}

body[data-profile-role="artist"] .sidebar,
body[data-profile-role="internal"][data-role="artist"] .sidebar {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: auto;
  max-height: none;
  border-right: 0;
  border-bottom: 1px solid var(--line);
  background: #191919;
  color: #f8f7f3;
  padding: 14px 22px;
}

body[data-profile-role="artist"] .brand-block,
body[data-profile-role="internal"][data-role="artist"] .brand-block {
  display: grid !important;
  padding: 0;
}

body[data-profile-role="artist"] .brand-logo-frame,
body[data-profile-role="internal"][data-role="artist"] .brand-logo-frame {
  width: 116px;
}

body[data-profile-role="artist"] .account-panel,
body[data-profile-role="internal"][data-role="artist"] .account-panel {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin: 0;
  border-top: 0;
  padding: 0;
}

body[data-profile-role="artist"] .account-panel .auth-status,
body[data-profile-role="internal"][data-role="artist"] .account-panel .auth-status {
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 700;
}

body[data-profile-role="artist"] .account-panel .account-meta-row,
body[data-profile-role="artist"] .account-panel .account-button-row,
body[data-profile-role="internal"][data-role="artist"] .account-panel .account-meta-row,
body[data-profile-role="internal"][data-role="artist"] .account-panel .account-button-row {
  width: auto;
}

body[data-profile-role="artist"] .account-panel .secondary-button,
body[data-profile-role="internal"][data-role="artist"] .account-panel .secondary-button {
  width: auto;
  min-height: 31px;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.86);
}

body[data-role="artist"] .controls-bar {
  grid-template-columns: minmax(260px, 1fr);
}

body[data-role="artist"] .table-scroll {
  max-height: calc(100vh - 210px);
}

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

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  width: 100%;
  max-width: 100vw;
  min-width: 0;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  min-width: 0;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: #191919;
  color: #f8f7f3;
  padding: 22px 16px;
}

.brand-block {
  flex: 0 0 auto;
  display: grid;
  justify-items: start;
  padding: 6px 6px 16px;
  text-align: left;
}

.brand-logo-frame {
  display: grid;
  place-items: center;
  width: 132px;
  height: auto;
  padding: 0;
}

.brand-logo {
  display: block;
  width: 100%;
  height: auto;
  filter: invert(1);
  opacity: 0.9;
}

.brand-title {
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand-subtitle {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  text-transform: uppercase;
}

.nav-list {
  display: grid;
  flex: 1 1 auto;
  align-content: start;
  gap: 4px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.24) transparent;
}

.nav-list::-webkit-scrollbar {
  width: 6px;
}

.nav-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  padding: 10px 10px;
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-weight: 800;
}

.nav-icon svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.side-summary {
  flex: 0 0 auto;
  display: grid;
  gap: 10px;
  margin-top: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 18px 6px 0;
}

.summary-label {
  color: rgba(255, 255, 255, 0.54);
  font-size: 12px;
  text-transform: uppercase;
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.72);
}

.summary-row strong {
  color: #ffffff;
}

.workspace {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding: 24px 28px 34px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

h1,
h2,
h3 {
  margin: 0;
}

h1 {
  font-size: 24px;
  line-height: 1.15;
}

.view-subtitle,
.drawer-subtitle {
  color: var(--muted);
  margin-top: 4px;
}

.topbar-actions,
.button-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.account-panel {
  flex: 0 0 auto;
  display: grid;
  gap: 9px;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 14px 6px 0;
}

.account-control-row,
.account-meta-row,
.account-button-row {
  display: flex;
  min-width: 0;
  gap: 6px;
  flex-wrap: wrap;
}

.account-control-row {
  align-items: stretch;
}

.account-meta-row {
  display: grid;
  gap: 1px;
  align-items: start;
  line-height: 1.25;
}

.account-button-row {
  align-items: center;
  width: 100%;
}

.account-panel .role-select,
.account-panel .secondary-button {
  width: 100%;
}

.account-panel .icon-button {
  flex: 0 0 30px;
  width: 30px;
  min-height: 30px;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.76);
}

.account-panel .icon-button svg {
  width: 15px;
  height: 15px;
}

.account-panel .save-state,
.account-panel .auth-status {
  max-width: 100%;
  color: rgba(255, 255, 255, 0.62);
}

.account-panel .auth-status {
  color: rgba(255, 255, 255, 0.82);
}

.account-panel .role-select {
  min-height: 31px;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.88);
  padding: 0 8px;
  font-size: 12px;
  font-weight: 600;
}

.account-panel .role-select option {
  color: var(--ink);
}

.account-panel .secondary-button {
  min-height: 30px;
  border-color: rgba(255, 255, 255, 0.16);
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  padding: 0 9px;
  font-size: 12px;
  font-weight: 600;
}

.account-panel #signOutBtn,
.account-panel #openAuthBtn {
  flex: 0 1 86px;
  width: auto;
}

.button-cluster {
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.controls-bar .button-cluster {
  justify-content: flex-start;
}

.save-state {
  color: var(--muted);
  font-size: 12px;
  transition: color 180ms ease;
}

.role-select {
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 10px;
  font-weight: 700;
}

.save-state.pulse {
  color: var(--green);
}

.auth-status {
  max-width: 220px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-hidden {
  display: none !important;
}

.icon-button,
.primary-button,
.secondary-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  padding: 0 12px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
}

.icon-button {
  width: 36px;
  padding: 0;
  font-size: 18px;
}

.icon-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.primary-button {
  border-color: var(--black);
  background: var(--black);
  color: #ffffff;
}

.secondary-button:hover,
.icon-button:hover {
  border-color: var(--black);
}

.danger-button {
  border-color: #b94a48;
  background: #fff7f6;
  color: #8d2725;
}

.danger-button:hover {
  border-color: #8d2725;
  background: #f8dfdc;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(112px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.metric {
  display: grid;
  grid-template-rows: minmax(62px, 1fr) auto;
  min-height: 96px;
  overflow: hidden;
  border: 0;
  border-radius: 7px;
  background: #050505;
  color: #ffffff;
  padding: 0;
  box-shadow: 0 8px 18px rgba(31, 28, 23, 0.16);
}

.metric span {
  order: 2;
  display: grid;
  place-items: center;
  min-height: 30px;
  background: #f2dfaa;
  color: #111111;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.12;
  padding: 5px 6px;
  text-align: center;
  text-transform: uppercase;
}

.metric strong {
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}

.tile-upcoming span,
.tile-booked span {
  background: #b7d99f;
}

.tile-inquiries span,
.tile-leads span {
  background: #e4ded4;
}

.controls-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(auto-fit, minmax(140px, 180px));
  gap: 10px;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  margin-bottom: 10px;
}

.search-wrap {
  min-width: 0;
  position: relative;
}

.search-wrap input,
.controls-bar select,
.date-filter input,
.lead-form input,
.lead-form select,
.lead-form textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  padding: 8px 10px;
  outline: none;
}

.search-wrap input {
  padding-left: 34px;
}

.date-filter {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.date-filter-unlabeled {
  gap: 0;
}

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

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  color: var(--muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.search-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.view-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-bottom: 8px;
  padding-bottom: 2px;
}

.view-chip {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  padding: 0 13px;
  font-weight: 700;
  white-space: nowrap;
}

.view-chip.active,
.view-chip:hover {
  border-color: var(--black);
  color: var(--black);
}

.table-panel {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  padding: 11px 14px;
}

.table-header > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.table-header span {
  color: var(--muted);
}

.table-add-lead {
  flex: 0 0 auto;
  color: #ffffff;
}

.table-add-lead span {
  color: #ffffff;
}

.table-scroll {
  width: 100%;
  max-width: 100%;
  overflow: auto;
  max-height: calc(100vh - 350px);
  min-height: 360px;
  -webkit-overflow-scrolling: touch;
}

.users-scroll {
  max-height: calc(100vh - 260px);
}

.admin-tools-panel {
  margin-bottom: 12px;
}

.admin-tools-panel .button-cluster {
  grid-column: auto;
  justify-content: flex-end;
}

.artist-ops-layout {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.artist-ops-list-panel,
.artist-ops-editor-panel,
.artist-ops-section {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.artist-ops-list-panel {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.artist-ops-search {
  display: grid;
  gap: 6px;
}

.artist-ops-mobile-field {
  display: none;
}

.artist-ops-add {
  display: flex;
}

.artist-ops-mobile-field,
.artist-ops-pricing-row label {
  min-width: 0;
}

.artist-ops-search label,
.artist-ops-field span,
.artist-ops-mobile-field span,
.artist-ops-pricing-row label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.artist-ops-search input,
.artist-ops-mobile-field select,
.artist-ops-field input,
.artist-ops-field select,
.artist-ops-field textarea,
.artist-ops-pricing-row input,
.artist-ops-gallery-row input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  padding: 9px 10px;
}

.artist-ops-coded-select.choice-neutral {
  background: #eceff1;
  border-color: #d5d9dc;
}

.artist-ops-coded-select.choice-good {
  background: #dfead6;
  border-color: #c4d8b5;
}

.artist-ops-coded-select.choice-warning {
  background: #f4d9e2;
  border-color: #e7b9c8;
}

.artist-ops-coded-select.choice-alert {
  background: #b80f18;
  border-color: #9e1016;
  color: #ffffff;
  font-weight: 700;
}

.artist-ops-coded-select.choice-alert option {
  color: var(--ink);
}

.artist-ops-add .secondary-button {
  min-height: 40px;
  width: 100%;
  padding: 0 13px;
}

.artist-ops-status-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.artist-ops-status-tabs .view-chip {
  min-height: 30px;
  padding: 0 10px;
  font-size: 11px;
}

.artist-ops-list {
  display: grid;
  gap: 6px;
  max-height: calc(100vh - 260px);
  overflow: auto;
}

.artist-ops-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink);
  padding: 10px;
  text-align: left;
}

.artist-ops-list-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.artist-ops-list-item strong {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.artist-ops-list-item.active {
  border-color: var(--black);
  background: #111111;
  color: #ffffff;
}

.artist-ops-list-item.active strong {
  color: rgba(255, 255, 255, 0.66);
}

.artist-ops-editor-panel {
  overflow: hidden;
}

.artist-ops-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  padding: 14px;
}

.artist-ops-editor-header div {
  display: grid;
  gap: 2px;
}

.artist-ops-editor-header .artist-ops-identity {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.artist-ops-editor-header strong {
  font-size: 18px;
}

.artist-ops-editor-header span {
  color: var(--muted);
}

.artist-ops-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.artist-ops-form {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.artist-ops-section {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.artist-ops-section h3 {
  font-size: 14px;
  text-transform: uppercase;
}

.artist-ops-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.artist-ops-section-header strong {
  color: var(--green);
}

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

.artist-ops-field {
  display: grid;
  gap: 5px;
}

.artist-ops-read-field {
  display: grid;
  gap: 5px;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
}

.artist-ops-read-section .artist-ops-field-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 14px 18px;
}

.artist-ops-read-field > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.artist-ops-read-field > div {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink);
  padding: 9px 10px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.artist-ops-field-wide {
  grid-column: 1 / -1;
}

.artist-ops-read-field.artist-ops-field-wide {
  flex-basis: 100%;
  width: 100%;
}

.artist-ops-field-wide.artist-ops-read-field > div {
  display: block;
  width: 100%;
}

.artist-ops-field textarea {
  resize: vertical;
}

.artist-photo-edit-row {
  display: block;
  width: fit-content;
  max-width: 100%;
}

.artist-photo-control-stack {
  display: grid;
  justify-items: start;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
}

.artist-photo-edit-row input[type="file"] {
  max-width: 270px;
}

.artist-photo-crop-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 12px;
}

.artist-photo-crop-preview {
  width: 154px;
  height: 154px;
  overflow: hidden;
  border: 2px solid var(--surface);
  border-radius: 999px;
  background: #eeeeee;
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.artist-photo-crop-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate(var(--photo-x, 0), var(--photo-y, 0)) scale(var(--photo-zoom, 1.25));
  transform-origin: center;
}

.artist-photo-crop-controls {
  display: grid;
  gap: 8px;
}

.artist-photo-crop-controls label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.artist-photo-crop-controls input {
  min-height: auto;
  padding: 0;
}

.artist-photo-crop-panel p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.artist-photo-delete {
  justify-self: start;
}

.artist-avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--artist-color, #434343) 52%, #ffffff);
  border-radius: 999px;
  background: color-mix(in srgb, var(--artist-color, #434343) 18%, #ffffff);
  color: color-mix(in srgb, var(--artist-color, #434343) 76%, #111111);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.artist-avatar.large {
  width: 58px;
  height: 58px;
  font-size: 16px;
}

.artist-avatar.upload-preview {
  width: 54px;
  height: 54px;
}

.artist-avatar.list {
  width: 34px;
  height: 34px;
  font-size: 10px;
}

.artist-avatar.marked-delete {
  opacity: 0.42;
  filter: grayscale(1);
}

.artist-avatar img,
.artist-profile-photo-read {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.artist-profile-photo-read {
  width: 76px;
  height: 76px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.artist-ops-pricing-actions {
  display: flex;
  justify-content: flex-end;
  margin: 4px 0 -2px;
}

.artist-ops-pricing-table,
.artist-ops-gallery-list,
.artist-ops-login-list,
.artist-ops-login-read-list {
  display: grid;
  gap: 6px;
}

.artist-ops-pricing-head,
.artist-ops-pricing-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.8fr) minmax(110px, 1fr) minmax(95px, 0.9fr) minmax(86px, 0.8fr) 34px;
  gap: 6px;
  align-items: center;
}

.artist-ops-pricing-head {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.artist-ops-pricing-row strong {
  color: var(--ink);
  text-align: right;
}

.artist-ops-pricing-row label {
  display: grid;
  gap: 4px;
}

.artist-ops-pricing-row label span {
  display: none;
}

.artist-ops-gallery-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) minmax(150px, 1fr) minmax(180px, 1.3fr) minmax(130px, 1fr) 34px;
  gap: 6px;
  align-items: center;
}

.artist-ops-login-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.9fr) minmax(120px, 0.9fr) minmax(150px, 1fr) minmax(170px, 1fr) 34px;
  gap: 6px;
  align-items: center;
}

.artist-ops-login-read-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(100px, 0.8fr) minmax(130px, 1fr) minmax(90px, auto) auto auto;
  gap: 6px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  padding: 10px;
}

.artist-ops-login-read-row code {
  color: var(--ink);
  font-family: inherit;
  font-weight: 800;
}

.password-input-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.password-toggle-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.artist-ops-gallery-read-list {
  display: grid;
  gap: 8px;
}

.artist-ops-gallery-read-row {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  padding: 10px;
}

.artist-ops-gallery-read-row p {
  color: var(--muted);
  font-size: 12px;
}

.artist-color-input-row {
  display: grid;
  grid-template-columns: 48px 156px;
  gap: 8px;
  align-items: start;
  width: fit-content;
  max-width: 100%;
}

.artist-color-input-row input[type="color"] {
  height: 40px;
  padding: 3px;
}

.artist-color-input-row input[name="artistColorHex"] {
  max-width: 156px;
}

.artist-color-swatch {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 8px;
  border: 1px solid color-mix(in srgb, var(--artist-color) 55%, #000000);
  border-radius: 999px;
  background: var(--artist-color);
  vertical-align: middle;
}

.artist-ops-choice {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 800;
}

.artist-ops-choice.choice-neutral {
  background: #eceff1;
  color: #41474d;
}

.artist-ops-choice.choice-good {
  background: #dfead6;
  color: #315720;
}

.artist-ops-choice.choice-warning {
  background: #f4d9e2;
  color: #7b344b;
}

.artist-ops-choice.choice-alert {
  background: #b80f18;
  color: #ffffff;
}

.muted-icon-button {
  min-height: 34px;
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--muted);
}

@media (max-width: 1200px) {
  .artist-ops-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .artist-ops-list-panel {
    position: static;
    padding: 10px;
  }

  .artist-ops-mobile-field {
    display: grid;
    gap: 6px;
  }

  .artist-ops-search,
  .artist-ops-list {
    display: none;
  }

  .artist-ops-field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .artist-ops-pricing-head {
    display: none;
  }

  .artist-ops-pricing-row,
  .artist-ops-gallery-row,
  .artist-ops-login-row {
    grid-template-columns: minmax(0, 1.5fr) minmax(130px, 0.8fr) minmax(120px, 0.8fr) auto 34px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 8px;
    background: var(--surface-2);
  }

  .artist-ops-login-read-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) auto auto;
  }

  .artist-ops-pricing-row label span {
    display: block;
  }

  .artist-ops-pricing-row strong {
    align-self: end;
    min-height: 38px;
    display: grid;
    place-items: center end;
    padding: 0 4px;
  }
}

table {
  width: 100%;
  min-width: 1060px;
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #111111;
  color: #ffffff;
  font-size: 11px;
  text-transform: uppercase;
}

.table-sort-button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font: inherit;
  font-weight: 900;
  letter-spacing: inherit;
  text-align: left;
  text-transform: inherit;
  cursor: pointer;
}

.table-sort-button:hover,
.table-sort-button.active {
  color: #ffffff;
}

.sort-indicator {
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.82);
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
  padding: 3px 5px;
}

td {
  max-width: 220px;
  color: #252525;
}

th:first-child,
td:first-child {
  min-width: 128px;
  white-space: nowrap;
}

.artist-cell {
  max-width: 260px;
}

.assignment-status-cell {
  min-width: 260px;
  max-width: 360px;
}

.users-table select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  padding: 7px 9px;
}

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

.user-actions button {
  min-height: 34px;
  white-space: nowrap;
}

.user-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.cell-muted {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  word-break: break-all;
}

tbody tr {
  transition: background 120ms ease;
}

tbody tr:hover {
  background: #fbfaf6;
}

tbody tr.is-booked {
  background: color-mix(in srgb, var(--green-soft) 54%, #ffffff);
}

tbody tr.is-booked:hover {
  background: color-mix(in srgb, var(--green-soft) 72%, #ffffff);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.status-open {
  background: var(--green-soft);
  color: #315720;
}

.status-under-contract,
.outcome-pending {
  background: var(--gold-soft);
  color: #6c4f0f;
}

.status-closed,
.status-muted {
  background: #ece9e2;
  color: #68645d;
}

.outcome-booked {
  background: var(--green-soft);
  color: #315720;
}

.booked-text {
  color: #315720;
  font-weight: 900;
}

.artist-name-chip {
  --artist-color: #434343;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border: 1px solid color-mix(in srgb, var(--artist-color) 36%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--artist-color) 13%, #ffffff);
  color: color-mix(in srgb, var(--artist-color) 82%, #111111);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  padding: 3px 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.artist-name-chip.large {
  font-size: 16px;
  padding: 5px 10px;
}

.artist-name-chip.no-color {
  border-color: var(--line);
  background: #f3f2f0;
  color: var(--ink);
}

.artist-status-stack {
  display: grid;
  gap: 5px;
  font-size: 12px;
}

.artist-status-line {
  display: grid;
  grid-template-columns: minmax(0, max-content) minmax(max-content, 1fr);
  align-items: start;
  gap: 6px;
  min-width: 0;
}

.artist-status-line .artist-name-chip {
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.artist-status-value {
  justify-self: end;
  color: var(--muted);
  font-weight: 700;
  text-align: right;
}

.artist-status-line.is-booked .artist-status-value {
  color: #315720;
  font-weight: 900;
}

.external-link {
  color: #1b5ca8;
  font-weight: 700;
  text-decoration: none;
}

.external-link:hover {
  text-decoration: underline;
}

.outcome-not-booked {
  background: var(--rose-soft);
  color: #85304d;
}

.lane-grid,
.payment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.payment-tracker {
  display: grid;
  gap: 12px;
}

.payment-tracker-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.payment-tracker-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.payment-filter-chip {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 800;
}

.payment-filter-chip strong {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  min-height: 22px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
}

.payment-filter-chip.active {
  border-color: var(--black);
  background: var(--black);
  color: #fff;
}

.payment-filter-chip.active strong {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.payment-filter-chip.compact {
  min-height: 32px;
}

.payment-sort-control {
  display: inline-flex;
  grid-auto-flow: column;
  gap: 8px;
  align-items: center;
  min-width: 220px;
}

.payment-tracker-panel {
  max-width: 100%;
  overflow: auto;
  max-height: calc(100vh - 360px);
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.payment-tracker-header,
.payment-tracker-row {
  display: grid;
  grid-template-columns: 44px minmax(112px, 0.75fr) minmax(118px, 0.85fr) minmax(150px, 1.15fr) minmax(160px, 1.2fr) minmax(96px, 0.75fr) minmax(108px, 0.8fr) minmax(110px, 0.8fr) minmax(132px, 1fr) minmax(118px, 0.9fr) minmax(190px, 1.1fr);
  gap: 10px;
  align-items: center;
  width: max(100%, 1470px);
}

.payment-tracker-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--black);
  color: #fff;
  padding: 10px 12px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.payment-tracker-row {
  cursor: pointer;
  border-top: 1px solid var(--line);
  padding: 10px 12px;
}

.payment-tracker-row:hover {
  background: var(--surface-2);
}

.payment-tracker-row.paidComplete {
  background: color-mix(in srgb, var(--green-soft) 34%, #fff);
}

.payment-tracker-row.late {
  background: #fff0dc;
}

.payment-tracker-row.is-flagged {
  box-shadow: inset 4px 0 0 #d59b00;
}

.payment-tracker-cell {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.payment-tracker-cell strong,
.payment-tracker-cell.clients-cell {
  color: var(--ink);
}

.payment-tracker-cell.artist-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.payment-tracker-cell.flag-cell {
  justify-content: center;
}

.payment-star-button,
.payment-star-static {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: #a7a29a;
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
}

.payment-star-button {
  cursor: pointer;
}

.payment-star-button.active,
.payment-star-static {
  border-color: #d59b00;
  background: #fff1bd;
  color: #a56b00;
}

.payment-status-pill {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.payment-status-pill.clientBalanceDue,
.payment-status-pill.due {
  background: var(--gold-soft);
  color: #7a5a00;
}

.payment-status-pill.formaInvoiceNeeded,
.payment-status-pill.needed {
  background: #ffe6bf;
  color: #8a4b00;
}

.payment-status-pill.artistPaymentDue {
  background: var(--rose-soft);
  color: #85304d;
}

.payment-status-pill.late {
  background: #ffc681;
  color: #7a3e00;
}

.payment-status-pill.paidComplete,
.payment-status-pill.complete {
  background: var(--green-soft);
  color: #1f6a43;
}

@media (max-width: 760px) {
  .payment-tracker-header {
    display: none;
  }

  .payment-tracker-panel {
    display: grid;
    gap: 10px;
    max-width: none;
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .payment-tracker-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    min-width: 0;
  }

  .payment-tracker-cell {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
  }

  .payment-tracker-cell::before {
    content: attr(data-label);
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .payment-tracker-cell.artist-cell {
    align-items: flex-start;
    justify-content: space-between;
  }
}

.lane {
  min-height: 320px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 12px;
}

.lane-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.lane-title > div:first-child {
  display: flex;
  gap: 8px;
  align-items: center;
}

.lane-helper {
  margin: -4px 0 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.lane-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.lane-filter-button,
.lane-sort-select {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 800;
}

.lane-filter-button {
  padding-inline: 10px;
}

.lane-filter-button.active {
  border-color: var(--black);
  background: var(--black);
  color: #fff;
}

.mini-card,
.timeline-item,
.payment-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
  margin-bottom: 10px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}

.mini-card:hover {
  border-color: var(--black);
}

.payment-card.is-late {
  border-color: #e0a152;
  background: #fff0dc;
}

.mini-card.is-booked {
  border-color: color-mix(in srgb, var(--green) 46%, var(--line));
  background: color-mix(in srgb, var(--green-soft) 48%, #ffffff);
  box-shadow:
    inset 4px 0 0 var(--green),
    0 1px 0 rgba(0, 0, 0, 0.02);
}

.mini-card.is-open-pending:not(.is-booked) {
  border-color: color-mix(in srgb, var(--gold) 42%, var(--line));
  background: color-mix(in srgb, var(--gold-soft) 42%, #ffffff);
  box-shadow:
    inset 4px 0 0 var(--gold),
    0 1px 0 rgba(0, 0, 0, 0.02);
}

.mini-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.mini-meta,
.mini-action {
  color: var(--muted);
  margin-top: 6px;
}

.mini-action {
  color: var(--ink);
  font-weight: 700;
}

.followup-date-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.followup-age {
  color: var(--ink);
  font-weight: 900;
  text-align: right;
  white-space: nowrap;
}

.money-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
  margin-top: 8px;
}

.payment-track-title {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.timeline {
  display: grid;
  gap: 10px;
  max-width: 900px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 14px;
}

.date-block {
  display: grid;
  place-items: center;
  align-self: stretch;
  border-radius: 6px;
  background: var(--black);
  color: #ffffff;
  min-height: 72px;
}

.date-block span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  text-transform: uppercase;
}

.date-block em {
  color: rgba(255, 255, 255, 0.64);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.date-block strong {
  font-size: 26px;
  line-height: 1;
}

.date-block-range {
  gap: 3px;
  padding: 8px 4px;
}

.date-block-range span {
  font-size: 10px;
  line-height: 1.1;
}

.date-block-range strong {
  font-size: 20px;
  line-height: 1.05;
  text-align: center;
}

.date-block-range em {
  font-size: 10px;
  text-align: center;
}

.empty-state {
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  padding: 18px;
  text-align: center;
}

.empty-state.compact {
  padding: 12px;
  text-align: left;
}

.loading-state {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 560px;
  margin: 48px auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(38, 35, 28, 0.08);
  color: var(--muted);
  padding: 18px;
}

.loading-state > div:last-child {
  display: grid;
  gap: 3px;
}

.loading-state strong,
.sync-error-state strong {
  color: var(--ink);
}

.loading-spinner {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border: 3px solid var(--line);
  border-top-color: var(--green);
  border-radius: 999px;
  animation: spin 850ms linear infinite;
}

.sync-error-state {
  display: grid;
  gap: 8px;
  max-width: 620px;
  margin: 48px auto;
}

.sync-error-state .secondary-button {
  justify-self: center;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.pending-setup {
  display: grid;
  gap: 6px;
  max-width: 560px;
  margin: 42px auto;
}

.pending-setup strong {
  color: var(--ink);
  font-size: 18px;
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  justify-content: flex-end;
  background: rgba(0, 0, 0, 0.34);
}

.drawer.open {
  display: flex;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(247, 245, 239, 0.98)),
    var(--bg);
  padding: 28px;
}

.auth-modal.open {
  display: grid;
}

.import-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  background: rgba(20, 20, 20, 0.36);
  padding: 20px;
}

.import-modal.open {
  display: grid;
}

.import-panel {
  width: min(720px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 18px;
}

.unsaved-panel {
  display: grid;
  gap: 14px;
  width: min(430px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 20px;
}

.artist-delete-panel {
  display: grid;
  gap: 16px;
  width: min(560px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
  padding: 20px;
}

.artist-add-panel {
  display: grid;
  gap: 16px;
  width: min(430px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
  padding: 20px;
}

.unsaved-panel h2,
.unsaved-panel p,
.artist-add-panel h2,
.artist-add-panel p,
.artist-delete-panel h2,
.artist-delete-panel p {
  margin: 0;
}

.unsaved-panel p,
.artist-add-panel p,
.artist-delete-panel p {
  color: var(--muted);
  line-height: 1.45;
}

.artist-delete-counts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.artist-delete-counts div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 12px;
}

.artist-delete-counts strong {
  font-size: 24px;
  line-height: 1;
}

.artist-delete-counts span,
.artist-delete-note {
  color: var(--muted);
  font-size: 12px;
}

.artist-delete-replacement {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.artist-add-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.artist-add-field input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  padding: 10px 11px;
  text-transform: none;
}

.artist-delete-replacement select {
  color: var(--text);
  font-size: 14px;
  text-transform: none;
}

.unsaved-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.import-header,
.import-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.import-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 12px;
}

.import-summary div {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 12px;
}

.import-summary strong {
  font-size: 24px;
  line-height: 1;
}

.import-summary span,
.import-warnings {
  color: var(--muted);
}

.import-warnings ul {
  margin: 0;
  padding-left: 20px;
}

.import-actions {
  align-items: center;
  margin-top: 18px;
}

.auth-panel {
  width: min(390px, 100%);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 22px 54px rgba(38, 35, 28, 0.12);
}

.login-panel {
  display: grid;
  gap: 8px;
  padding: 28px 28px 24px;
}

.login-brand {
  display: grid;
  justify-items: center;
  padding: 6px 0 2px;
}

.login-logo {
  display: block;
  width: min(180px, 76vw);
  height: auto;
}

.login-title {
  margin: 8px 0 2px;
  font-size: 18px;
  text-align: center;
}

.auth-form {
  display: grid;
  gap: 14px;
  padding: 0;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 2px 0 0;
  font-weight: 800;
  text-decoration: underline;
}

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

.auth-message {
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.auth-message.error {
  color: var(--rose);
}

.auth-message.success {
  color: var(--green);
}

.login-actions {
  display: grid;
  gap: 8px;
}

.login-actions .primary-button,
.login-actions .secondary-button {
  width: 100%;
}

.drawer-panel {
  width: min(760px, 100vw);
  height: 100vh;
  overflow: auto;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.drawer-header {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto auto;
  align-items: start;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  padding: 20px 22px;
}

.drawer-edit-button {
  align-self: end;
  min-height: 38px;
  padding-inline: 14px;
}

.drawer-save-button {
  align-self: end;
  min-height: 38px;
  padding-inline: 16px;
}

.lead-read-summary {
  display: grid;
  gap: 18px;
  padding: 20px 22px 28px;
}

.lead-read-summary[hidden],
.lead-form[hidden] {
  display: none;
}

.lead-form {
  display: grid;
  gap: 18px;
  padding: 20px 22px 28px;
}

.form-section,
.lead-read-section {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.form-section:first-child,
.lead-read-section:first-child {
  border-top: 0;
  padding-top: 0;
}

.form-section h3,
.lead-read-section h3 {
  font-size: 13px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.form-subsection,
.lead-read-subsection {
  display: grid;
  gap: 10px;
}

.form-subsection + .form-subsection,
.lead-read-subsection + .lead-read-subsection {
  margin-top: 4px;
}

.form-subsection h4,
.lead-read-subsection h4 {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.field-grid,
.lead-read-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.lead-read-field {
  display: grid;
  gap: 5px;
}

.lead-read-field-wide {
  grid-column: 1 / -1;
}

.lead-read-field > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.lead-read-field > div {
  min-height: 39px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  padding: 9px 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.lead-read-field .assignment-status-list {
  border: 0;
  background: transparent;
  padding: 0;
}

.event-date-row {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(150px, 0.55fr);
  gap: 12px;
  align-items: end;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  align-self: end;
}

.checkbox-label input {
  width: auto;
  min-height: auto;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

label input,
label select,
label textarea {
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  text-transform: none;
}

.master-status-control {
  align-self: start;
  min-width: 176px;
}

.master-status-select {
  border-color: #e0c75c;
  background: #fff4b8;
  color: #3f370b;
  font-weight: 900;
}

.master-status-select.is-closed {
  border-color: #c8ced3;
  background: #e8ecef;
  color: #3a4147;
}

.invoice-status-select {
  --invoice-status-color: #dfe3e6;
  background-image:
    radial-gradient(circle at 18px center, var(--invoice-status-color) 0 9px, transparent 10px),
    linear-gradient(to right, color-mix(in srgb, var(--invoice-status-color) 28%, #ffffff), #ffffff 64%);
  background-repeat: no-repeat;
  padding-left: 38px;
}

.invoice-status-select.has-status-color {
  border-color: color-mix(in srgb, var(--invoice-status-color) 70%, #8f948c);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--invoice-status-color) 48%, transparent);
}

select.has-reason-color {
  border-color: color-mix(in srgb, var(--reason-status-bg) 74%, #8f948c);
  background: var(--reason-status-bg);
  color: var(--reason-status-fg);
  font-weight: 800;
}

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

.assignment-row,
.artist-lead-box {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 10px;
}

.artist-lead-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
}

.artist-lead-header > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.assignment-row strong,
.artist-lead-header strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assignment-row span,
.artist-lead-header > div > span,
.assignment-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.artist-lead-toggle {
  display: inline-grid;
  place-items: center;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 900;
}

.artist-lead-box.is-collapsed {
  gap: 0;
}

.artist-lead-remove-row {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  padding-top: 2px;
}

.assignment-empty {
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  padding: 12px;
}

.read-only-link-field {
  display: grid;
  gap: 5px;
}

.read-only-link-field > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.read-only-link-field > div {
  min-height: 39px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  padding: 9px 10px;
}

.wide-label {
  display: grid;
}

.other-pitched-control {
  display: grid;
  gap: 6px;
}

.field-clear-button {
  justify-self: start;
  min-height: 0;
  padding: 0;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.field-clear-button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

textarea {
  resize: vertical;
}

.drawer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

@media (max-width: 1040px) {
  .app-shell {
    align-content: start;
    grid-template-columns: 1fr;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, auto);
    gap: 10px 12px;
    align-items: start;
    width: 100%;
    max-width: 100vw;
    height: auto;
    max-height: none;
    overflow: hidden;
    padding: 12px;
  }

  .brand-block {
    grid-column: 1;
    align-self: center;
    padding: 0;
    margin-bottom: 0;
  }

  .brand-logo-frame {
    width: 112px;
  }

  .nav-list {
    grid-column: 1 / -1;
    display: flex;
    flex: none;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .nav-item {
    flex: 0 0 auto;
    width: auto;
    min-width: 126px;
  }

  .side-summary {
    display: none;
  }

  .account-panel {
    grid-column: 2;
    grid-row: 1;
    width: 220px;
    justify-items: end;
    margin-top: 0;
    border-top: 0;
    padding: 0;
  }

  .account-control-row,
  .account-meta-row,
  .account-button-row {
    width: 100%;
    justify-content: flex-end;
  }

  .account-meta-row {
    justify-items: end;
    text-align: right;
  }

  .account-panel .role-select {
    width: auto;
    max-width: 100%;
  }

  .account-panel .secondary-button {
    width: auto;
  }

  body[data-profile-role="internal"][data-role="artist"] .sidebar {
    grid-template-columns: minmax(0, 1fr) 220px;
    align-items: center;
  }

  body[data-profile-role="internal"][data-role="artist"] .brand-block,
  body[data-profile-role="internal"][data-role="artist"] .account-panel {
    grid-row: 1;
    align-self: center;
  }

  body[data-profile-role="artist"] .sidebar {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 12px 16px;
  }

  body[data-profile-role="artist"] .brand-block,
  body[data-profile-role="artist"] .account-panel {
    grid-row: auto;
  }

  body[data-profile-role="artist"] .account-panel {
    width: auto;
    justify-items: end;
  }

  .workspace {
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
    padding: 18px;
  }

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

  .controls-bar {
    grid-template-columns: 1fr 1fr;
  }

  .search-wrap,
  .button-cluster {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  html,
  body {
    width: 100%;
    max-width: 100dvw;
    overflow-x: hidden;
    overflow-x: clip;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  .topbar {
    flex-direction: column;
  }

  .workspace {
    padding: 14px 12px 24px;
  }

  .brand-title {
    font-size: 12px;
  }

  .brand-block {
    min-width: 0;
    overflow: hidden;
  }

  .brand-block > div:last-child {
    min-width: 0;
    overflow: hidden;
  }

  .brand-title,
  .brand-subtitle {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand-subtitle {
    font-size: 11px;
  }

  .account-panel {
    max-width: min(172px, 48vw);
    width: min(172px, 48vw);
    gap: 5px;
  }

  .account-control-row,
  .account-meta-row,
  .account-button-row {
    gap: 6px;
  }

  .account-meta-row {
    font-size: 11px;
    line-height: 1.25;
  }

  .account-panel .role-select {
    max-width: 142px;
    min-height: 29px;
    font-size: 13px;
  }

  .account-panel .secondary-button,
  .account-panel .icon-button {
    min-height: 29px;
  }

  .account-panel .secondary-button {
    padding: 0 8px;
    font-size: 11px;
  }

  .account-panel .icon-button {
    flex-basis: 29px;
    width: 29px;
  }

  .account-button-row {
    flex-wrap: nowrap;
  }

  .account-panel #signOutBtn,
  .account-panel #openAuthBtn {
    flex: 0 1 76px;
  }

  body[data-profile-role="artist"] .sidebar {
    gap: 10px;
    padding: 10px 12px;
  }

  body[data-profile-role="artist"] .brand-logo-frame {
    width: 96px;
  }

  body[data-profile-role="artist"] .account-panel {
    max-width: none;
    width: auto;
    gap: 8px;
  }

  body[data-profile-role="artist"] .account-panel .auth-status {
    max-width: 42vw;
    overflow: hidden;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-profile-role="artist"] .account-panel #signOutBtn {
    flex: 0 0 auto;
  }

  .topbar,
  .metric-grid,
  .controls-bar,
  .view-tabs,
  .content-mount {
    width: 100%;
    max-width: 100%;
  }

  .artist-ops-editor-header,
  .artist-ops-section-header {
    align-items: stretch;
    flex-direction: column;
  }

  .artist-ops-header-actions {
    justify-content: stretch;
  }

  .artist-ops-header-actions button {
    flex: 1 1 140px;
  }

  .artist-ops-field-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .artist-ops-pricing-row,
  .artist-ops-gallery-row,
  .artist-ops-login-row,
  .artist-ops-login-read-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .artist-ops-pricing-row strong {
    place-items: center start;
  }

  .nav-list,
  .table-scroll {
    contain: inline-size;
    overscroll-behavior-inline: contain;
  }

  .nav-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    overflow: visible;
  }

  .nav-item {
    min-width: 0;
    width: 100%;
    min-height: 58px;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 6px 4px;
    font-size: 11px;
    line-height: 1.15;
    text-align: center;
  }

  .nav-item span:last-child {
    overflow-wrap: anywhere;
  }

  .nav-icon {
    width: 18px;
    height: 18px;
    font-size: 11px;
  }

  .nav-icon svg {
    width: 13px;
    height: 13px;
  }

  .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 10px;
  }

  .metric {
    grid-template-rows: minmax(42px, 1fr) auto;
    min-height: 68px;
  }

  .metric span {
    font-size: 10px;
    line-height: 1.1;
    min-height: 25px;
    padding: 4px;
  }

  .metric strong {
    font-size: 22px;
  }

  .controls-bar,
  .import-summary,
  .artist-delete-counts,
  .field-grid,
  .lead-read-grid,
  .event-date-row,
  .assignment-row {
    grid-template-columns: 1fr;
  }

  .controls-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 8px;
  }

  .controls-bar select,
  .controls-bar .secondary-button {
    min-height: 34px;
    padding-top: 5px;
    padding-bottom: 5px;
  }

  .artist-photo-crop-panel {
    grid-template-columns: 1fr;
  }

  .artist-photo-crop-preview {
    justify-self: center;
  }

  .artist-photo-delete {
    margin-left: 0;
  }

  .controls-bar .button-cluster {
    grid-column: auto;
  }

  #clearFiltersBtn {
    font-size: 0;
  }

  #clearFiltersBtn::after {
    content: "Reset";
    font-size: 12px;
  }

  .drawer-header {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  .master-status-control {
    grid-column: 1;
    grid-row: 2;
  }

  .drawer-edit-button {
    grid-column: 2;
    grid-row: 2;
  }

  .drawer-save-button {
    grid-column: 2;
    grid-row: 2;
  }

  #closeDrawerBtn {
    grid-column: 2;
    grid-row: 1;
  }

  .button-cluster {
    justify-content: stretch;
  }

  .button-cluster button {
    flex: 1;
  }

  .auth-status {
    max-width: 100%;
  }

  .table-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .table-add-lead {
    align-self: flex-end;
  }

  table {
    min-width: 620px;
  }

  .table-scroll {
    max-height: 520px;
  }
}
