﻿/* Page-specific styles (Task 13: roster, artist detail, artist dialog) plus
   the shared select/combobox/table/sheet component skins they introduced. */

/* ---------- Shared bits ---------- */

.btn-sm {
  height: 2rem;
  padding: 0 0.75rem;
  font-size: 0.8125rem;
}

.icon-btn.danger {
  color: var(--destructive);
}

.icon-btn.danger:hover {
  background: color-mix(in oklch, var(--destructive) 12%, transparent);
  color: var(--destructive);
}

.record-count {
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--muted-foreground);
}

/* Small "limited functionality" tag appended to page banner titles while
   the Demo site switch is on. */
.demo-site-tag {
  display: inline-block;
  margin-inline-start: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
  vertical-align: middle;
  color: var(--muted-foreground);
}

/* Export buttons: extend the hit area without moving the visible button. */
.roster-export-actions .btn {
  position: relative;
}

.roster-export-actions .btn::after {
  content: "";
  position: absolute;
  inset: -6px -2px;
}

/* Administrator console */
.admin-card {
  max-width: 40rem;
  padding: 1.25rem 1.5rem;
}

/* Inside the operator console the cards span the full console width, like
   the other tabs' tables. */
.operator-card .admin-card {
  max-width: 100%;
}

/* Cards stack (Demo site, Users): give them breathing room. */
.admin-card + .admin-card {
  margin-top: 1.25rem;
}

.admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.admin-row-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.admin-row-hint {
  color: var(--muted-foreground);
  font-size: 0.8125rem;
  margin-top: 0.25rem;
}

/* Organization user list + invite form (Administrator page). */
.admin-users-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  border-top: 1px solid var(--border);
}

.admin-users-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.admin-users-name {
  font-weight: 600;
}

.admin-users-email {
  color: var(--muted-foreground);
  font-size: 0.8125rem;
}

.admin-users-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted-foreground);
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.admin-users-form {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.admin-users-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 40rem) {
  .admin-users-fields {
    grid-template-columns: 1fr;
  }
}

/* Users tab: search + invite share one row above the list. */
.admin-users-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.admin-users-toolbar .input {
  flex: 1 1 14rem;
}

.admin-invite {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.admin-invite .input,
.admin-invite .select {
  min-width: 10rem;
}

.admin-users-actions {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.admin-users-role {
  min-width: 8.5rem;
}

/* Permission matrix: role rows x resource groups x actions. */
.perm-scroll {
  overflow-x: auto;
}

.perm-matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.perm-matrix th,
.perm-matrix td {
  border: 1px solid var(--border);
  padding: 0.375rem 0.5rem;
  text-align: center;
}

.perm-matrix .perm-role-col {
  text-align: left;
  white-space: nowrap;
  min-width: 12rem;
}

.perm-matrix .perm-resource-col {
  font-weight: 600;
  border-bottom: none;
}

.perm-matrix .perm-action-col {
  font-weight: 600;
  border-top: none;
  width: 2.5rem;
}

.perm-matrix .perm-cell input {
  accent-color: var(--primary);
}

/* Demo site switch: a pill with a sliding knob. */
.demo-switch {
  flex: 0 0 auto;
  position: relative;
  width: 3.25rem;
  height: 1.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--muted);
  transition: background 150ms ease-out;
}

.demo-switch .demo-switch-knob {
  position: absolute;
  top: 0.125rem;
  left: 0.125rem;
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow-card);
  transition: translate 150ms cubic-bezier(0.2, 0, 0, 1);
}

.demo-switch.on {
  background: var(--brand-navy);
}

.demo-switch.on .demo-switch-knob {
  translate: 1.5rem 0;
}

.empty-state-title {
  font-weight: 500;
  color: var(--foreground);
}

.empty-state-hint {
  font-size: 0.875rem;
}

.table-sort {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font: inherit;
  color: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
}

.table-sort.active {
  color: var(--foreground);
}

.table-sort-arrow {
  font-size: 0.625rem;
}

.table-empty-cell {
  text-align: center;
  color: var(--muted-foreground);
  padding: 2rem 0.75rem;
}
/* ---------- Roster ---------- */

/* All workspace pages share one content width (76rem via .page). */
.shell main#outlet > .roster-page {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* Artist directory tabs: the embedded (bannerless) list pages fill the
   active tab panel; explicit [hidden] guards beat the flex display. */
.directory-tab-panel {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.directory-tab-panel[hidden],
.directory-panel-page[hidden] {
  display: none;
}

.directory-panel-page {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.directory-panel-page > section {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.roster-page > section {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.list-page-content {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.roster-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  /* One themed banner color for every page (--banner-bg per palette). */
  background: var(--banner-bg, var(--brand-deep));
  color: var(--brand-ink);
}

/* The per-event PDF button sits beside the status badge â€” sized a step
   above the standard icon button. */
.reports-overview-side .icon-btn {
  height: 2.5rem;
  width: 2.5rem;
}

.roster-banner-title {
  margin-top: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.5vw, 1.625rem);
  letter-spacing: -0.01em;
  text-wrap: balance;
  color: var(--brand-ink);
}

.roster-banner-description {
  margin-top: 0.375rem;
  max-width: fit-content;
  font-size: 0.875rem;
  color: color-mix(in oklch, var(--brand-ink) 72%, transparent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* The description clips, so its wrapper must be allowed to shrink inside the
   flex banner; otherwise the ellipsis never engages. */
.roster-banner-copy {
  margin-right: auto;
  min-width: 0;
}

.roster-banner-action {
  height: 2.5rem;
  padding: 0 1.125rem;
  background: var(--brand-mist);
  color: var(--brand-ink);
}

.roster-banner-action:hover {
  background: color-mix(in oklch, var(--brand-mist) 88%, var(--brand-ink) 12%);
}

.roster-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.roster-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border: 1px solid color-mix(in oklch, var(--brand-navy) 22%, var(--border));
  border-radius: 999px;
  background: color-mix(in oklch, var(--accent) 30%, transparent);
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--brand-navy);
}

.roster-filters {
  margin-top: 1.25rem;
  padding: 1rem;
  background: color-mix(in oklch, var(--muted) 70%, var(--card));
}

.roster-filters-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.roster-filters-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted-foreground);
}

.roster-filters-actions {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.roster-filter-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}

.roster-bulk {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid color-mix(in oklch, var(--primary) 25%, transparent);
  border-radius: var(--radius);
  background: color-mix(in oklch, var(--primary) 6%, var(--card));
}

.roster-bulk-summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.roster-bulk-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.roster-bulk-select {
  width: min(16rem, 100%);
}

.roster-export-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  flex-shrink: 0;
}
/* Events + to-do list + invitations: the from/to date fields stay compact next to the search. */
.category-toolbar .input[data-event-from],
.category-toolbar .input[data-event-to],
.category-toolbar .input[data-assignment-from],
.category-toolbar .input[data-assignment-to],
.category-toolbar .input[data-invitation-from],
.category-toolbar .input[data-invitation-to] {
  width: auto;
  flex: 0 0 auto;
  height: 2.25rem;
}

.roster-table-card {
  margin-top: 1.5rem;
  overflow: auto;
  flex: 1 1 auto;
  min-height: 0;
  padding-bottom: 0.75rem;
}

/* Group header row on the Activities tab: capitalized category name. */
.templates-group-row td {
  padding-top: 0.9rem;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

/* Activity rows indent under their group header. */
.templates-activity-row td:first-child {
  padding-left: 1.5rem;
}

/* Guest-facing flag on the Activities tab: check chip when yes, muted
   dash otherwise. */
.templates-guest-facing {
  color: var(--muted-foreground);
}

.templates-guest-facing.yes {
  color: var(--primary);
  font-weight: 500;
}

/* Activities dialog: the guest-facing switch row. */
.template-switch-row {
  padding: 0.35rem 0;
}

/* Every list table caps at the window and scrolls its own records, with the
   column headers pinned while rows move under them. */
.roster-table-card .table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--card);
  box-shadow: inset 0 -1px 0 var(--border);
}

/* Events/proposals rows navigate on click - show the affordance. */
[data-events-table] .table tbody tr,
[data-proposals-table] .table tbody tr {
  cursor: pointer;
}

/* Money columns read right-aligned (tabular digits come from .table). */
[data-events-table] .table td[data-column="budget"],
[data-proposals-table] .table td[data-column="budget"] {
  text-align: right;
}

.roster-select-box {
  width: 1rem;
  height: 1rem;
  accent-color: var(--primary);
  cursor: pointer;
}

.roster-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: calc(var(--radius) - 2px);
  object-fit: cover;
}

.roster-avatar-initials {
  background: color-mix(in oklch, var(--accent) 55%, var(--card));
  color: var(--accent-foreground);
  font-family: var(--font-serif);
  font-size: 1rem;
}

.cell-artist {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 12rem;
}

.cell-artist-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cell-artist-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.cell-artist-sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

.cell-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  min-height: 1.5rem;
}

.cell-muted {
  color: var(--muted-foreground);
}

/* Event/proposal reference keys: quiet mono digits, distinct from names. */
.cell-key {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--muted-foreground);
}

.cell-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.25rem;
  }

/* Grid row-action icons: sized between the original glyphs and the reports
   overview card's PDF icon. CSS overrides the SVG width/height attributes
   set by icon(name, size). */
.cell-actions .icon-btn svg {
  width: 16px;
  height: 16px;
  }

[data-empty-state] {
  margin-top: 1.5rem;
  padding: 4rem 1.5rem;
}
/* ---------- Artist detail ---------- */

.detail-page {
  max-width: 76rem;
}

.detail-back {
  display: flex;
  align-items: center;
  height: 3.5rem;
}

.detail-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
}

.detail-back-link:hover {
  color: var(--foreground);
}

.detail-card {
  overflow: hidden;
}

.detail-hero {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.75rem 1.5rem;
  background: var(--brand-deep);
  color: var(--brand-ink);
}

.detail-hero-main {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.detail-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 4rem;
  height: 4rem;
  border-radius: calc(var(--radius) + 2px);
  object-fit: cover;
}

.detail-avatar-initials {
  background: color-mix(in oklch, var(--brand-mist) 40%, var(--card));
  color: var(--brand-ink);
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
}

.detail-eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: color-mix(in oklch, var(--brand-mist) 45%, var(--brand-ink));
}

.detail-name {
  margin-top: 0.25rem;
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2.125rem);
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--brand-ink);
}

.detail-subname {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: color-mix(in oklch, var(--brand-ink) 70%, transparent);
}

.detail-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.icon-btn.hero {
  height: 2.25rem;
  width: 2.25rem;
  background: var(--card);
  color: var(--foreground);
  border: 1px solid var(--border);
}

.icon-btn.hero:hover {
  background: color-mix(in oklch, var(--card) 85%, var(--foreground) 15%);
  border-color: color-mix(in oklch, var(--brand-ink) 30%, var(--border));
}

.icon-btn.hero svg {
  width: 16px;
  height: 16px;
}

.icon-btn.hero.danger {
  color: var(--destructive);
}

.dnh-banner {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid color-mix(in oklch, var(--destructive) 30%, transparent);
  background: color-mix(in oklch, var(--destructive) 8%, var(--card));
  color: color-mix(in oklch, var(--destructive) 70%, var(--foreground));
}

.dnh-banner > svg {
  color: var(--destructive);
}

.dnh-banner-title {
  font-weight: 600;
}

.dnh-banner-text {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
}

/* The proposal record keeps the same detail layout but with its overview
   (aside) column half as wide as the default share, and its main column
   sections stacked without the default spacing. */
.proposal-record-page .detail-grid {
  grid-template-columns: minmax(0, 0.43fr) minmax(0, 1.57fr);
}

.proposal-record-page .detail-main {
  gap: 0.5rem;
}

/* The presenter row sits on top of the hero, centered across the card. */
.proposal-presenter-row {
  display: flex;
  justify-content: center;
  padding: 1.25rem 1.5rem 0;
}

/* Report layout for the public artist / crew record: aside sections
   need explicit rhythm since .detail-section-label resets margins. */
.public-artist-record .detail-aside .detail-section-label {
  margin-top: 1.5rem;
}

.public-artist-record .detail-aside .detail-section-label:first-child {
  margin-top: 0;
}

.public-artist-record .detail-aside .public-badges,
.public-artist-record .detail-aside .public-social-list {
  margin-top: 0.75rem;
}

/* Social pills match the contact pill width. */
.public-artist-record .detail-aside .public-social-list {
  max-width: 75%;
}

/* The brand pill rides at the bottom right of the proposal card with
   breathing room on every side so it never touches the card edge. */
.proposal-record-page .public-banner {
  padding: 1rem 1.5rem 1rem 0;
}

/* Template dialog: 25% wider than the default (40rem vs 32rem) so the
   clause text breathes; fields stack Name over Content full-width. */
.template-dialog {
  max-width: min(40rem, calc(100vw - 2rem));
}

/* Proposal record rows read as one compact line: label on the left,
   value in its fixed column, pictures and toggle/decision after it. */
.proposal-record-page .detail-main .detail-row {
  align-items: center;
}

/* Event share record: the name is the row's primary content (there is
   no money column like the proposal rows have), so its label reads as
   an emphasized value on the left while the headshot strip keeps the
   fixed right column from the proposal layout. */
.public-artist-record.proposal-record-page .detail-main .proposal-record-person .detail-row-label,
.public-artist-record.proposal-record-page .detail-main .proposal-record-expense .detail-row-label {
  font-size: inherit;
  color: inherit;
  font-weight: 500;
}

.proposal-record-page .detail-main .detail-row > div {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.375rem 1rem;
}

.proposal-record-page .detail-main .detail-row-label {
  margin: 0;
  font-size: inherit;
}

.proposal-record-page .detail-main .detail-row-value {
  margin-top: 0;
  margin-left: auto;
  text-align: right;
  line-height: 1.2;
}

.proposal-record-page .detail-main .proposal-record-person .detail-row-label,
.proposal-record-page .detail-main .proposal-record-expense .detail-row-label {
  flex: 1;
}

.proposal-record-page .detail-main .proposal-record-person .detail-row-value,
.proposal-record-page .detail-main .proposal-record-expense .detail-row-value {
  flex: 0 0 8rem;
  margin: 0;
  /* Right-aligned so amounts with different digit counts keep their
     edges (and decimals) lined up in the shared column. */
  text-align: right;
}

.proposal-record-page .detail-main .proposal-record-pictures {
  margin-top: 0;
  flex: 0 0 7.5rem;
  justify-content: flex-start;
}

.proposal-record-page .detail-main .proposal-record-person .detail-row-value,
.proposal-record-page .detail-main .proposal-record-expense .detail-row-value {
  flex: 0 0 8rem;
  margin: 0;
  /* Right-aligned so amounts with different digit counts keep their
     edges (and decimals) lined up in the shared column. */
  text-align: right;
}

/* "Approve proposal" (totals row, share link) and its confirmation state. */
.proposal-approve-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.proposal-approve-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

.proposal-approved-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3125rem 0.75rem;
  border-radius: 999px;
  background: var(--success);
  color: var(--background);
  font-size: 0.6875rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Convert to Event (proposal record, approved proposals) + the
   "Converted to {key}" badge that replaces it. */
.proposal-convert-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.proposal-converted-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3125rem 0.75rem;
  border-radius: 999px;
  background: var(--brand-navy);
  color: var(--card);
  font-size: 0.6875rem;
  font-weight: 700;
  white-space: nowrap;
}

.proposal-converted-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3125rem 0.75rem;
  border-radius: 999px;
  background: var(--brand-navy);
  color: var(--card);
  font-size: 0.6875rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Company contact block on the proposal records: icon + value rows read
   left-aligned (labels are dropped, the heading carries the name). */
.proposal-record-page .detail-main .proposal-record-sender .detail-row-value {
  margin-left: 0;
  text-align: left;
}

/* Accounting total under the people lists: a rule above the amount column,
   then the sum of every Book-ed person. The ghost icon / pictures / toggle
   spans reuse the person-row geometry so the columns line up. */
.proposal-record-total {
  margin-top: 0.25rem;
}

.proposal-record-total-icon {
  width: 0.9375rem;
}

/* The total line: the value sits right after the Total title with a
   small gap. The .proposal-record-page .detail-main prefixes out-rank
   the generic detail-row rules (margin-left:auto, wide gap) above. */
.proposal-record-total-line {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.proposal-record-page .detail-main .detail-row > .proposal-record-total-line {
  gap: 0.5rem;
}

.proposal-record-total-line .detail-row-value {
  margin: 0;
  font-weight: 600;
  white-space: nowrap;
}

.proposal-record-page .detail-main .proposal-record-total-line .detail-row-value {
  margin: 0;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}

.proposal-record-total .proposal-record-pictures {
  margin: 0;
}

.proposal-record-page .detail-main .detail-rows {
  gap: 0.75rem;
}

.proposal-record-divider {
  margin: 1.25rem 0;
  border: 0;
  border-top: 1px solid var(--border);
}

/* Logistics schedule at the bottom of the public event record: one block
   per day - date heading with the day's time window, then the run-of-show
   lines (time - activity - notes). */
.public-logistics-day {
  margin-top: 1rem;
}

.public-logistics-day:first-of-type {
  margin-top: 0;
}

.public-logistics-date {
  margin: 0 0 0.375rem;
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
}

.public-logistics-window {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--muted-foreground);
}

.public-logistics-row {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.public-logistics-row:last-child {
  border-bottom: 0;
}

.public-logistics-time {
  flex: 0 0 7rem;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--foreground);
}

.public-logistics-activity {
  flex: 1.2 1 0;
  min-width: 0;
}

.public-logistics-notes {
  flex: 1 1 0;
  min-width: 0;
  color: var(--muted-foreground);
}

/* Logistics plan at the end of the internal event record: a divider, the
   section label, then one block per day reusing the share-record's
   schedule rows. */
.event-logistics-record {
  border-top: 1px solid var(--border);
  padding: 1.5rem;
}

.event-logistics-record .detail-rows {
  margin-top: 0.5rem;
}

.public-logistics-schedule {
  margin-top: 0.75rem;
}


/* ---------- Event record as a coordination document ----------
   Document layout: the logistics heading with the company name on top,
   the event as the title, then INFOS / CONTACTS / LOGISTICS / SCHEDULE /
   SOCIAL MEDIA sections in a two-column label grid (tinted label column),
   closing with the company banner. */
.event-doc {
  max-width: 64rem;
  margin-inline: auto;
  padding: 2rem 2.5rem 2rem;
}

.event-doc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

/* Letterhead hierarchy: the masthead is a small eyebrow hugging the
   serif title - the event name is the dominant element. */
.event-doc-heading .logistics-title {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
}

.event-doc-heading .detail-name {
  margin: 0 0 0.25rem;
}

.event-doc-sub {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.event-doc-header .detail-hero-actions {
  flex: 0 0 auto;
  margin-top: 0;
}

.doc-section {
  margin-top: 2rem;
}

.doc-section-title {
  margin: 0 0 0.625rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-navy);
}

.doc-rows {
  display: grid;
  grid-template-columns: minmax(10rem, 14rem) 1fr;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.doc-row {
  display: contents;
}

.doc-row-label {
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid color-mix(in oklch, var(--border) 70%, transparent);
  background: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.doc-row-value {
  padding: 0.625rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9375rem;
}

.doc-row:last-child .doc-row-label,
.doc-row:last-child .doc-row-value {
  border-bottom: 0;
}

.doc-day {
  margin-top: 1.75rem;
}

.doc-day .public-logistics-date {
  margin-bottom: 0.5rem;
}

.doc-schedule {
  display: flex;
  flex-direction: column;
}

.event-doc .logistics-banner {
  margin-top: 2rem;
}

/* Document marks, not dashboard chips: the banner's social icons drop
   their card chrome on the record. */
.event-doc .logistics-banner .social-links-item {
  height: 1.875rem;
  width: 1.875rem;
  border-color: transparent;
  background: transparent;
}

.event-doc .logistics-banner .social-links-item:hover {
  border-color: var(--border);
}

@media (max-width: 40rem) {
  .event-doc {
    padding: 1.5rem 1.25rem 1.25rem;
  }

  .event-doc-header {
    flex-wrap: wrap;
  }

  .doc-rows {
    grid-template-columns: 1fr;
  }

  .doc-row-label {
    padding-bottom: 0.25rem;
    border-right: 0;
  }

  .doc-row-value {
    padding-top: 0;
  }

  .public-logistics-row {
    flex-wrap: wrap;
    gap: 0.25rem 0.75rem;
  }

  .public-logistics-time {
    flex: 0 0 4.5rem;
  }

  .public-logistics-notes {
    flex-basis: 100%;
  }
}

/* Print fallback: the browser's print dialog produces a clean sheet -
   chrome hidden, shadows off, hairlines print-safe. */
@media print {
  .detail-back,
  .event-doc-header .detail-hero-actions,
  .logistics-banner .social-links-item {
    display: none;
  }

  .detail-card {
    box-shadow: none;
  }

  .doc-rows,
  .doc-row-label,
  .doc-row-value,
  .public-logistics-row {
    border-color: #c4c4c4;
  }

  .doc-row-label {
    background: #f5f5f4;
  }
}

.detail-aside {
  padding: 1.5rem;
  border-right: 1px solid var(--border);
  background: color-mix(in oklch, var(--muted) 70%, var(--card));
}

.detail-main {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 1.5rem;
}

@media (max-width: 56rem) {
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-aside {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}

.detail-section-label {
  /* Rendered as an <h2> for the document outline; the class pins the
     small-caps label look over the UA heading styles. */
  margin: 0;
  font-size: var(--label-size);
  font-weight: 600;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: var(--label-tracking);
  color: var(--brand-navy);
}

/* The row immediately below a section label (or below a label+actions head)
   sits 0.75rem away on both sides, on every record page. */
.detail-section-label + * {
  margin: 0.75rem 0 0.75rem;
}

.detail-section-head + * {
  margin: 0.75rem 0 0.75rem;
}

.detail-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.detail-rows {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.25rem;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.detail-row {
  display: flex;
  gap: 0.75rem;
}

.detail-row-icon {
  color: var(--brand-navy);
}

.detail-row-label {
  font-size: 0.6875rem;
  color: var(--muted-foreground);
}

.detail-row-value {
  margin-top: 0.125rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}
/* Secondary line inside a detail row (support staff availability note). */
.detail-row-sub {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--muted-foreground);
}

.detail-link {
  color: var(--ring);
}

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

.detail-social {
  margin-top: 1.75rem;
}

.social-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.social-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  background: var(--card);
}

.social-card-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: calc(var(--radius) - 4px);
  background: var(--muted);
  color: var(--muted-foreground);
}

.social-card-platform {
  font-weight: 500;
}

.social-card-handle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

.detail-empty {
  margin-top: 1.25rem;
  padding: 2rem 1.25rem;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: calc(var(--radius) - 2px);
  color: var(--muted-foreground);
}

.detail-empty-title {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
}

.detail-empty-hint {
  margin-top: 0.25rem;
  font-size: 0.8125rem;
}

.detail-categories {
  margin-top: 1.75rem;
}

.detail-categories .cell-badges {
  margin-top: 0.75rem;
}

.detail-none {
  font-size: 0.875rem;
  font-style: italic;
  color: var(--muted-foreground);
}

.detail-bio {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.75;
  white-space: pre-wrap;
  color: color-mix(in oklch, var(--foreground) 85%, var(--muted-foreground));
}

.availability-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.availability-card {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.375rem 0.75rem;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
}

.availability-dates {
  font-weight: 500;
}

.availability-note {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

.detail-media-placeholder {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 1.25rem;
  border: 1px dashed var(--border);
  border-radius: calc(var(--radius) - 2px);
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.detail-fallback {
  padding: 4rem 0;
}
/* ---------- Artist dialog ---------- */

.dialog-wide {
  max-width: min(54rem, calc(100vw - 2rem));
}

/* Edit Event proposal: tall working surface (90% of the window). The inner
   panel must fill the element so the hoisted footer pins to the bottom. */
.proposal-dialog-tall {
  height: 90vh;
  max-height: 90vh;
}

.proposal-dialog-tall .dialog-panel {
  height: 100%;
}

/* The Contacts button sits on the same line as the contact Name. */
.proposal-dialog-tall .address-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.proposal-dialog-tall .address-row .input {
  flex: 1 1 auto;
  min-width: 0;
}

.selector-crew-heading {
  margin: 0.75rem 0 0.25rem;
}

/* Proposal dialog panels: an entry with pictures spans two subgrid rows -
   the info fields on the first line, the picture strip across the full
   width on the second. */
.selector-team-row.has-pics {
  grid-row: span 2;
  grid-template-rows: auto auto;
}

.selector-team-row .proposal-pics {
  grid-column: 1 / -1;
  margin-top: 0.25rem;
}

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

/* Documents / contracts manager dialogs: narrower than the event dialog,
   with a scrollable browse tall enough for ~12 rows. */
.dialog-narrow {
  max-width: 40rem;
  width: calc(100vw - 2rem);
}

/* Change-budget dialog: sized to the money inputs - the two fields keep
   their 8.5rem width with minimal padding between them (0.5rem), and the
   reason field plus the window shrink to match (20.5rem - 2 × 1.5rem body
   padding = 17.5rem = exactly the field pair). */
.dialog-budget-change {
  max-width: 20.5rem;
  width: calc(100vw - 2rem);
}

.dialog-budget-change .field-row-2 {
  grid-template-columns: repeat(2, auto);
  justify-content: start;
  gap: 0.5rem;
}

.attachments-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.attachments-browse {
  max-height: 27.5rem;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
}

.attachments-name {
  color: var(--card-foreground);
  text-decoration: none;
}

.attachments-name:hover {
  text-decoration: underline;
}

.form-grid .span-2 {
  grid-column: 1 / -1;
}

/* Full-width rows of labeled fields inside a form-grid. */
.field-row-4 {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.125rem 1.25rem;
}

.field-row-3 {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.125rem 1.25rem;
}

.field-row-2 {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.125rem 1.25rem;
}

@media (max-width: 56rem) {
  .field-row-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 40rem) {
  .field-row-4,
  .field-row-3,
  .field-row-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 40rem) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.field-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.field-hint {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

.form-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 0.25rem;
}

/* Form footers are hoisted out of the scrolling dialog body by dialog.js -
   the .dialog-panel > .form-footer rule pins them below the scrollbar. */

/* Address control: input-look summary with the map-pin button trailing
   INSIDE it - always visible and clickable, never clipped by the row. */
.address-row {
  position: relative;
  display: block;
}

/* Contact counter chip inside the Contacts button (company profile). */
.contacts-count {
  display: inline-grid;
  place-items: center;
  min-width: 1.25rem;
  padding: 0 0.375rem;
  border-radius: 999px;
  background: color-mix(in oklch, currentColor 14%, transparent);
  font-size: 0.75rem;
  font-weight: 600;
}

/* The display rule above overrides the UA [hidden] rule - needed so the
   chip actually disappears at 0/1 contacts. */
.contacts-count[hidden] {
  display: none;
}

.address-summary {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  height: 2.25rem;
  padding: 0 2.5rem 0 0.75rem;
  border: 1px solid var(--input);
  border-radius: calc(var(--radius) - 2px);
  background: var(--muted);
  font-size: 0.875rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.address-btn {
  position: absolute;
  top: 50%;
  right: 0.375rem;
  transform: translateY(-50%);
  height: 1.75rem;
  width: 1.75rem;
  border-radius: calc(var(--radius) - 4px);
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--border);
  z-index: 1;
}

.address-btn:hover {
  background: color-mix(in oklch, var(--brand-ink) 8%, var(--card));
}

.empty-categories {
  padding: 1rem;
  border: 1px dashed var(--border);
  border-radius: calc(var(--radius) - 2px);
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.social-rows,
.availability-rows {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.social-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.4fr) auto;
  gap: 0.25rem;
  align-items: center;
}

.availability-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr) auto;
  gap: 0.25rem;
  align-items: center;
}
/* Icon-only social profile links on record pages. */
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
}

.social-links-item {
  display: grid;
  place-items: center;
  height: 2.25rem;
  width: 2.25rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  background: var(--card);
  color: var(--muted-foreground);
  transition: color var(--dur-fast) ease-out,
    border-color var(--dur-fast) ease-out,
    transform var(--dur-fast) var(--ease-out-soft);
}

a.social-links-item:hover {
  color: var(--foreground);
  border-color: color-mix(in oklch, var(--brand-ink) 30%, var(--border));
  transform: translateY(-1px);
}

.social-links-item.is-static {
  cursor: default;
}

/* Client contacts sheet field (Task 16, port of ClientContactsSheetField). */
.contact-rows {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  }

.contact-row {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  background: var(--muted);
}

.contact-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.contact-row-title {
  font-size: 0.875rem;
  font-weight: 600;
}

.contact-row-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Company contact cards: no row title - the move/remove actions alone sit
   right-aligned in the head. */
.contact-row-head-end {
  justify-content: flex-end;
  }

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

/* Company contact cards: contact name on its own row, email + phone share
   the second row. */
.contact-fields {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  }

.contact-row-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  }

/* The email / phone / ext row: email keeps the wide column, the phone
   gives a bit of room back, and the 5-digit ext rides beside it in the
   same row (fixed narrow column). */
.contact-row-detail.contact-row-channels {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 4.25rem;
  gap: 0.75rem;
  }

.contact-rows-empty {
  display: grid;
  justify-items: center;
  gap: 0.25rem;
  padding: 1.25rem;
  border: 1px dashed var(--border);
  border-radius: calc(var(--radius) - 2px);
  color: var(--muted-foreground);
  text-align: center;
}
/* Client activity timeline (Task 16). */
.activity-form {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: center;
  margin: 0.75rem 0 1rem;
}

@media (max-width: 48rem) {
  .activity-form {
    grid-template-columns: 1fr 1fr;
  }
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.activity-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--border);
  border-left: 2px solid color-mix(in oklch, var(--primary) 35%, transparent);
  border-radius: calc(var(--radius) - 2px);
  background: var(--card);
}

.activity-title {
  font-weight: 600;
  font-size: 0.9375rem;
}

.activity-detail {
  margin-top: 0.125rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.activity-date {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.dnh-block {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  background: var(--muted);
}

.dnh-block.flagged {
  border-color: color-mix(in oklch, var(--destructive) 35%, transparent);
  background: color-mix(in oklch, var(--destructive) 7%, var(--card));
}

.dnh-toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
}

.dnh-toggle input {
  width: 1rem;
  height: 1rem;
  margin-top: 0.125rem;
  accent-color: var(--destructive);
  cursor: pointer;
}

.dnh-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.dnh-title .icon {
  color: var(--destructive);
}

.dnh-hint {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--muted-foreground);
}

.dnh-block .field {
  margin-top: 1rem;
}
/* ---------- Combobox ---------- */

.combobox {
  position: relative;
}

.combobox-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 2.625rem;
  padding: 0.375rem 0.625rem;
  border: 1px solid var(--input);
  border-radius: calc(var(--radius) - 2px);
  background: var(--card);
  text-align: left;
  cursor: pointer;
}

.combobox-trigger:hover {
  background: var(--muted);
}

.combobox-badges {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 0.375rem;
  min-width: 0;
}

.combobox-placeholder {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.combobox-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.375rem;
  border-radius: calc(var(--radius) - 6px);
  background: color-mix(in oklch, var(--accent) 45%, var(--card));
  color: var(--accent-foreground);
  font-size: 0.75rem;
  font-weight: 500;
}

.combobox-badge-remove {
  display: grid;
  place-items: center;
  border-radius: 9999px;
}

.combobox-badge-remove:hover {
  background: color-mix(in oklch, var(--foreground) 12%, transparent);
}

.combobox-arrow {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--muted-foreground);
}

.combobox-popover {
  top: calc(100% + 0.25rem);
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  max-height: 20rem;
}

/* The flex display above overrides the UA [hidden] rule, so close() needs
   this to actually collapse the popover. */
.combobox-popover[hidden] {
  display: none;
}

.combobox-search {
  height: 2rem;
  font-size: 0.875rem;
}

.combobox-list {
  overflow-y: auto;
}

.combobox-check {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 1rem;
  color: var(--primary);
}

.popover-item.selected {
  font-weight: 600;
}

.combobox-empty {
  padding: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}
/* ---------- Sheet additions ---------- */

.sheet-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
}

.sheet-description {
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* No entry animation on sheets: they are top-layer modal dialogs, and
   Chromium freezes ANY animation on a top-layer element at its first frame
   (translateX(100%) here = a full width off-screen, which dead-zones every
   click inside the sheet). Sheets render docked instantly. */
.sheet {
  animation: none;
}
/* ---------- Categories page ---------- */

.categories-tabs .tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-align: left;
}

.categories-tabs .tab .icon {
  flex: 0 0 auto;
}

.tab-main {
  white-space: nowrap;
}

.tab-hint {
  display: none;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.25rem;
  color: var(--muted-foreground);
  white-space: nowrap;
}

@media (min-width: 40rem) {
  .tab-hint {
    display: inline;
  }
}

.category-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.category-toolbar .input {
  width: min(24rem, 100%);
}

.category-toolbar .reports-filter-group .select {
  width: 12rem;
  flex: 0 0 auto;
}

/* Bare selects in a toolbar (the directory's category/subcategory filters)
   keep the pulldown width - without a filter-group wrapper they stretch. */
.category-toolbar > .select {
  width: 12rem;
  flex: 0 0 auto;
}


.category-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
}

/* Categories: the page fills the outlet exactly and the list card flexes
   into the remaining space, so only the card ever scrolls. */
.categories-page {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.categories-page > section {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

/* The list slot (outer [data-categories-list]) flexes into the page and
   scrolls its card; the inner .category-list keeps its own card styling. */
.categories-page > section > [data-categories-list] {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.category-list {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 1.25rem;
  overflow-y: auto;
  padding-bottom: 0.75rem;
}

.category-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.625rem 1rem;
}

.category-row + .category-row {
  border-top: 1px solid color-mix(in oklch, var(--border) 60%, transparent);
}

.category-row-child {
  background: color-mix(in oklch, var(--muted) 45%, transparent);
  padding-left: 2.5rem;
}

.category-row-main {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
}

.category-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background: color-mix(in oklch, var(--accent) 30%, var(--card));
  color: var(--accent-foreground);
}

.category-chevron {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--accent-foreground);
}

.category-meta {
  min-width: 0;
}

.category-name {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.25rem;
}

.category-row-child .category-name {
  font-weight: 500;
}

.category-desc {
  margin-top: 0.125rem;
  font-size: 0.75rem;
  line-height: 1rem;
  color: var(--muted-foreground);
}

.category-path {
  margin-left: 0.25rem;
}

.category-row-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 0.375rem;
}

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

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.media-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  background: var(--card);
}

.media-thumb {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--muted);
}

.media-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  background: color-mix(in oklch, var(--foreground) 78%, transparent);
  color: var(--card);
  font-size: 0.6875rem;
  font-weight: 500;
}

.media-meta {
  min-width: 0;
  padding: 0.5rem 0.625rem 0.25rem;
}

.media-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8125rem;
  font-weight: 500;
}

.media-caption {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.media-controls {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  padding: 0.25rem 0.375rem 0.375rem;
}

.media-controls .icon-btn {
  width: 1.75rem;
  height: 1.75rem;
}

.media-controls-spacer {
  flex: 1 1 auto;
}

.media-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  aspect-ratio: 4 / 5;
  padding: 1rem;
  border: 1px dashed var(--border);
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  color: var(--muted-foreground);
  font: inherit;
  text-align: center;
  cursor: pointer;
}

.media-empty:hover {
  border-color: color-mix(in oklch, var(--primary) 45%, var(--border));
  color: var(--foreground);
}

.media-empty-title {
  font-size: 0.8125rem;
  font-weight: 500;
}

.media-empty-hint {
  font-size: 0.75rem;
}

/* ---------- Artist media grid + availability editing (Task 18) ---------- */

.media-section-actions {
  display: flex;
  gap: 0.5rem;
}

.availability-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr) auto;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.75rem;
}

.availability-add .input {
  height: 2.25rem;
}

.availability-remove {
  margin-left: auto;
}

@media (max-width: 48rem) {
  .media-thumb-btn {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
    font: inherit;
    color: inherit;
    text-align: inherit;
  }
}

/* Lightbox: a compact dark stage, smaller than the window, with a thumbnail
   strip along the bottom for direct selection. */
.media-lightbox {
  border: 0;
  padding: 0;
  margin: auto;
  background: rgb(12 10 8 / 0.94);
  width: min(76rem, 92vw);
  height: min(48rem, 86dvh);
  max-width: 92vw;
  max-height: 86dvh;
  border-radius: calc(var(--radius) + 0.25rem);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 40px 90px -30px rgb(0 0 0 / 0.7);
}

.media-lightbox .lightbox-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 4.5rem;
}

.media-lightbox .lightbox-media {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-lightbox .lightbox-media img,
.media-lightbox .lightbox-media video {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: calc(var(--radius) - 2px);
  box-shadow: 0 30px 80px -30px rgb(0 0 0 / 0.6);
}

.media-lightbox .lightbox-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
}

.media-lightbox .lightbox-prev {
  position: absolute;
  top: 50%;
  left: 0.75rem;
  transform: translateY(-50%);
}

.media-lightbox .lightbox-next {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
}

.media-lightbox .lightbox-nav,
.media-lightbox .lightbox-close {
  display: grid;
  place-items: center;
  height: 3.5rem;
  width: 3.5rem;
  border-radius: 999px;
  border: 1px solid rgb(253 251 247 / 0.25);
  background: rgb(12 10 8 / 0.55);
  color: #fdfbf7;
  cursor: pointer;
  z-index: 1;
  transition: background-color var(--dur-fast) ease-out, transform var(--dur-fast) var(--ease-out-soft);
}

.media-lightbox .lightbox-nav:hover,
.media-lightbox .lightbox-close:hover {
  background: rgb(12 10 8 / 0.85);
}

.media-lightbox .lightbox-nav:active,
.media-lightbox .lightbox-close:active {
  transform: scale(0.96);
}

.media-lightbox .lightbox-prev:active {
  transform: translateY(-50%) scale(0.96);
}

.media-lightbox .lightbox-next:active {
  transform: translateY(-50%) scale(0.96);
}

/* Thumbnail strip: direct selection, no visible scrollbar. */
.media-lightbox .lightbox-thumbs {
  display: flex;
  gap: 0.375rem;
  padding: 0.5rem 0.75rem;
  overflow-x: auto;
  scrollbar-width: none;
  background: rgb(12 10 8 / 0.55);
}

.media-lightbox .lightbox-thumbs::-webkit-scrollbar {
  display: none;
}

.media-lightbox .lightbox-thumb {
  flex: 0 0 auto;
  height: 3.25rem;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 0.375rem;
  background: none;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity var(--dur-fast) ease-out, border-color var(--dur-fast) ease-out;
}

.media-lightbox .lightbox-thumb img,
.media-lightbox .lightbox-thumb video {
  display: block;
  height: 100%;
  width: auto;
  border-radius: 0.25rem;
}

.media-lightbox .lightbox-thumb:hover {
  opacity: 0.85;
}

.media-lightbox .lightbox-thumb.active {
  border-color: var(--accent);
  opacity: 1;
}

.media-grid .media-card .media-thumb video {
  pointer-events: none;
}

/* Settings page + company profile panel (Task 19; additive styles). The
   tab strip reuses the shared .tabs/.tab underline component. */
.settings-tabs {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

/* The strip pins to the top of the scrolling settings stack while the
   profile and defaults cards slide beneath it. */
.settings-tabs > .tabs {
  position: sticky;
  top: 0;
  z-index: 5;
  flex: 0 0 auto;
}

/* Defaults panel: same field rhythm as the dialogs, inside the detail card. */
.settings-tabs .detail-card {
  padding: 1.5rem;
  }

/* Currency + language share one row (collapses on narrow screens). */
.settings-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  }

@media (max-width: 48rem) {
  .settings-row-2 {
    grid-template-columns: 1fr;
    }
  }

/* The settings stack scrolls as one; the detail-card clip must not cut the
   Save button off. */
.settings-tabs .detail-card {
  overflow: visible;
  }

.settings-tabs .detail-card > .detail-section-label {
  margin-bottom: 0.5rem;
}

.settings-tabs .detail-card > .field {
  margin-top: 1rem;
  max-width: 26rem;
}

/* Each default value renders as its own card. */
.settings-tabs .detail-card > .default-value {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
}

/* Read-only organization identity on the Defaults panel. */
.settings-org-name {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0.25rem 0 0.4rem;
}

.settings-tabs .detail-card > .default-value > .field {
  max-width: 26rem;
  margin: 0;
}

.settings-tabs .detail-card > .form-footer {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

/* Panel cards carry their own breathing room (they render bare .card);
   the company panel is a detail card and manages its own padding. */
.settings-tabs > .card:not(.detail-card) {
  padding: 1.5rem;
}

.settings-block-head {
  display: grid;
  gap: 0.375rem;
  max-width: 28rem;
}

.settings-block-head + .settings-block-head {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.settings-block-title {
  font-size: 1.05rem;
  font-weight: 600;
}

.radio-rows {
  display: grid;
  gap: 0.5rem;
}

.radio-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

/* The company profile panel reuses the detail-card / detail-grid /
   social-card primitives from the artist record page. */

/* Events UI (Task 22; additive styles). */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.chip {
  padding: 0.3125rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  background: var(--card);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted-foreground);
}

.chip:hover {
  color: var(--foreground);
  background: var(--muted);
}

.chip.active {
  border-color: color-mix(in oklch, var(--primary) 45%, var(--border));
  background: var(--muted);
  color: var(--foreground);
}

.projects-filter-grid {
  grid-template-columns: auto minmax(12rem, 1fr);
  align-items: center;
}

.roster-total {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* Event dialog selector triggers + sheets */
.selector-trigger {
  height: auto;
  width: 100%;
  justify-content: flex-start;
  gap: 0.625rem;
  padding: 0.625rem 0.875rem;
  text-align: left;
}

.selector-trigger-label {
  font-weight: 600;
}

.selector-trigger-count {
  display: inline-grid;
  place-items: center;
  min-width: 1.25rem;
  margin-left: auto;
  padding: 0 0.375rem;
  border-radius: 999px;
  background: color-mix(in oklch, currentColor 14%, transparent);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted-foreground);
}

.selector-trigger-count[hidden] {
  display: none;
}

.selector-trigger-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  }

/* Proposal dialog packs up to five triggers (Expenses, Artists, Crew,
   Documents, Contracts) into one row; narrower windows wrap naturally. */
.selector-trigger-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  }

/* Labelled trigger groups (Costs / Team) inside the event dialog. */
.selector-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  }

.selector-body {
  display: grid;
  gap: 1rem;
}

.selector-shared {
  padding: 1rem;
  background: color-mix(in oklch, var(--muted) 55%, var(--card));
}

.selector-shared-title {
  font-size: 0.875rem;
  font-weight: 600;
}

.selector-shared-hint {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.selector-shared-grid {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.75rem;
  align-items: end;
  /* Purse value with the currency right beside it, then Set-for-all;
     max-content keeps the column from stretching into the card's width. */
  grid-template-columns: max-content auto auto;
}

/* Labeled fields inside the assign cards: the label sits in front of the
   input on one line (saves the extra label row). */
.selector-shared-field {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.selector-filter-row {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: 1fr auto;
}

.selector-checklist {
  display: grid;
  max-height: 12rem;
  gap: 0.125rem;
  margin-top: 0.75rem;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  overflow-y: auto;
}

.selector-check-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.375rem;
  border-radius: calc(var(--radius) - 2px);
  font-size: 0.875rem;
  cursor: pointer;
}

.selector-check-row:hover {
  background: color-mix(in oklch, var(--muted) 60%, transparent);
}

/* Checked tasks in the Select-tasks checklist carry the same tint as the
   Selected-tasks panel below the multiselect. */
.selector-check-row:has(input:checked) {
  background: color-mix(in oklch, var(--muted) 35%, var(--card));
}

.selector-multiselect {
  padding: 0.75rem;
  /* Same tint as the Selected-tasks panel (selector-selected) so the two
     cards read as one surface. */
  background: color-mix(in oklch, var(--muted) 35%, var(--card));
}

.selector-multiselect > summary {
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.selector-multiselect-body {
  margin-top: 0.75rem;
}

.selector-multiselect-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.selector-picker-grid {
  display: grid;
  max-height: 30vh;
  gap: 0.5rem;
  overflow-y: auto;
}

.selector-pick-card {
  display: grid;
  gap: 0.25rem;
  padding: 0.75rem;
  text-align: left;
  cursor: pointer;
}

.selector-pick-card.active {
  border-color: color-mix(in oklch, var(--primary) 55%, var(--border));
  background: color-mix(in oklch, var(--muted) 70%, var(--card));
}

.selector-pick-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.selector-details {
  display: grid;
  gap: 0.5rem;
}

.selector-details-title {
  font-size: 0.875rem;
  font-weight: 600;
}

.selector-details-grid {
  display: grid;
  gap: 0.5rem;
}

.assign-card {
  padding: 0.75rem;
}

/* Picture strip inside an assign card: full natural width (the 60% cap is
   for the proposal team grid rows) with a little air under the name. */
.assign-card .assign-card-pics {
  max-width: none;
  margin: 0.375rem 0 0.5rem;
}

/* Expense cards have no name heading - the remove button sits to the right
   of the expense name input. */
.expense-name-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.expense-name-row .input {
  flex: 1 1 auto;
  min-width: 0;
}

.expense-name-row .icon-btn {
  flex: 0 0 auto;
}

.assign-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.assign-card-name {
  min-width: 0;
  overflow: hidden;
  font-size: 0.875rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assign-card-fields {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.selector-override-grid {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.5rem;
  /* Price with the currency hugged right beside it; max-content keeps the
     columns from stretching into the sheet's free space. */
  grid-template-columns: max-content max-content;
  align-items: end;
}

/* Currency selects inside the assign sheets: hug their widest option
   instead of stretching across the column. */
.selector-shared-grid .select,
.selector-override-grid .select {
  width: auto;
}

/* Assignment notes match the responsibility field's height (the .input
   2.25rem) and stay manually resizable (resize: vertical from .textarea). */
.assign-card .textarea {
  min-height: 0;
  height: 2.25rem;
}

/* Expense cards: notes sit directly in the card - keep the same field
   rhythm above it. */
.assign-card > .textarea {
  margin-top: 0.5rem;
}

.selector-footer-count {
  font-size: 0.875rem;
  font-weight: 600;
}

/* Count + total hug the left edge of the footer; Done stays on the right. */
.selector-footer-meta {
  margin-right: auto;
  text-align: left;
}

/* Settings: the invitation-days input is a compact quarter-width field. */
#invitation-deadline {
  width: 25%;
}

.selector-footer-total {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.selector-empty {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.form-budget-line {
  margin-right: auto;
  font-size: 0.875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--success);
}

.form-budget-line.over {
  color: var(--destructive);
}

.review-eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--brand-navy);
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

@media (max-width: 48rem) {
  .review-grid {
    grid-template-columns: 1fr;
  }
}

.review-summary {
  padding: 0.875rem;
  background: color-mix(in oklch, var(--muted) 55%, var(--card));
}

.review-summary-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted-foreground);
}

.review-summary-hint {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.review-summary-total {
  margin-top: 0.125rem;
  font-size: 1rem;
  font-weight: 600;
}

/* Event detail overview sits flush under the hero card, matching the
   artist and support staff records: no divider, no gap. */
.event-overview {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.outlook-box {
  margin-top: 1rem;
  padding: 0.875rem;
  border: 1px solid color-mix(in oklch, var(--primary) 25%, var(--border));
  border-radius: calc(var(--radius) - 2px);
  background: color-mix(in oklch, var(--muted) 45%, var(--card));
}

/* Notes trays on the event record mirror the outlook-box: shared notes
   grows to fill the column, private notes pins to the bottom aligned
   with the budget & roster outlook box in the aside. */
.notes-box {
  padding: 0.875rem;
  border: 1px solid color-mix(in oklch, var(--primary) 25%, var(--border));
  border-radius: calc(var(--radius) - 2px);
  background: color-mix(in oklch, var(--muted) 45%, var(--card));
}

.notes-box-compact {
  min-height: 7.375rem;
}

.notes-box-full {
  min-height: 14.75rem;
}

/* Event record: notes absorb the free space above the private tray so
   both columns end flush. */
.event-overview .detail-main {
  gap: 1rem;
}

.event-overview .notes-box-compact {
  flex: 1 1 auto;
}

.notes-box .outlook-label {
  display: block;
}

.notes-label .icon {
  vertical-align: -0.125em;
  margin-right: 0.3125rem;
}

.outlook-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--brand-navy);
}

.outlook-lines {
  display: grid;
  gap: 0.375rem;
  margin-top: 0.5rem;
  font-size: 0.875rem;
}

/* Label left, value right - all values share one column. */
.outlook-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.outlook-line span {
  white-space: nowrap;
}

.outlook-lines b {
  font-weight: 600;
}

.outlook-note {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.outlook-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.outlook-under {
  font-weight: 500;
  color: var(--success);
}

.outlook-over {
  font-weight: 500;
  color: var(--destructive);
}

.tab-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 1rem 0 0.75rem;
}

.detail-hint {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* Invitation cards (detail tabs + invitations page) */
.invitation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

/* Per-event tab panels hide the inactive member grids. */
.invitation-grid[hidden] {
  display: none;
}

@media (max-width: 48rem) {
  .invitation-grid {
    grid-template-columns: 1fr;
  }
}

.invitation-card {
  padding: 0.75rem;
}

.invitation-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.invitation-card-id {
  display: grid;
  min-width: 0;
  gap: 0.125rem;
}

.invitation-card-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
}

a.invitation-card-name:hover {
  text-decoration: underline;
}

.invitation-card-email {
  overflow: hidden;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invitation-status-badge {
  justify-self: start;
  margin-top: 0.25rem;
}

.invitation-card-actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.25rem;
}

.invitation-deadline {
  width: 3.5rem;
  padding: 0.25rem 0.25rem;
  text-align: center;
  font-size: 0.75rem;
}

.invitation-purse {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
}

/* The status badge rides the right end of the purse line. */
.invitation-purse .invitation-status-badge {
  margin-left: auto;
}

.invitation-purse.muted {
  font-weight: 400;
  color: var(--muted-foreground);
}

.invitation-deadline-note,
    .invitation-response-note {
    margin-top: 0.375rem;
    font-size: 0.75rem;
    color: var(--muted-foreground);
    }

    /* Contract button left, reply deadline right, on one row. */
    .invitation-deadline-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.375rem;
    }

    .invitation-deadline-row .invitation-deadline-note {
    margin-top: 0;
    text-align: right;
    }

    .invitation-deadline-row .invitation-contract-add {
    margin-top: 0;
    }

.invitation-contract-add {
  justify-self: start;
  margin-top: 0.25rem;
  color: var(--brand-navy);
}

/* Contract rows inside the Assign artist contract dialog. */
.contract-list {
  display: grid;
  gap: 0.25rem;
}

.contract-list-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.5rem;
  border-radius: calc(var(--radius) - 4px);
  background: color-mix(in oklch, var(--muted) 60%, transparent);
  font-size: 0.75rem;
}

.contract-list-name {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--card-foreground);
}

.contract-list-purse {
  flex-shrink: 0;
  font-weight: 500;
}

.contract-file-label {
  font-weight: 500;
}

/* Invitations page */
.invitation-event-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.invitation-event-card {
  padding: 1rem;
}

.invitation-event-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.invitation-event-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
}

.invitation-event-name {
  font-size: 1.15rem;
  font-weight: 600;
}

.invitation-event-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  white-space: nowrap;
}

.invitation-event-client {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  position: relative;
  top: -1px;
  }

/* ---------- Assignment workspace (/todo) + roster calendar (Task 23) ------- */

.field-optional {
  color: var(--muted-foreground);
  font-weight: 400;
}

.selector-fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}

.selector-empty-block {
  padding: 0.625rem 0.75rem;
  border: 1px dashed var(--border);
  border-radius: calc(var(--radius) - 2px);
}

.selector-inline-create {
  display: grid;
  grid-template-columns: 1fr 1fr auto auto;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

/* The Ok toggle is a step down from the Add-task button beside it. */
.selector-ok-btn {
  padding: 0.25rem 0.6rem;
}

/* Event proposal team: each selected artist carries editable talent,
   duration, repetition, and price inputs; the numeric inputs are sized to
   their content (duration/repetition <= 99, price <= 999999.99). */
.selector-team-list {
  /* The ONE column definition: header and rows attach to it via subgrid,
     so the titles can never drift off their fields. Five STABLE tracks:
     name, talent, qty, min, units. The min track is fixed-width so
     toggling a row's minutes input never shifts anything. */
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 2.6fr) auto 4rem auto;
}

/* The proposal Expenses panel: two columns (name, notes). */
.selector-team-list.proposal-cost-list {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
}

/* Proposal record page: pictures strip under each artist/crew row. */
.proposal-record-pictures {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.375rem;
}

.proposal-record-pictures img {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  object-fit: cover;
  border: 1px solid var(--border);
}

/* Record/public strips reuse the proposal-pic thumbnail wrapper: the
   wrapper carries the border, the img fills it, and the magnifier badge
   shows the full-size picture on hover. */
.proposal-record-pictures .proposal-pic {
  width: 2.25rem;
  height: 2.25rem;
  border-width: 1px;
}

.proposal-record-pictures .proposal-pic img {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
}

.selector-team-list > .selector-team-row,
.selector-team-list > .selector-team-head {
  display: grid;
  grid-template-columns: subgrid;
  grid-column: 1 / -1;
}

/* Text fields fill their tracks; numeric inputs keep their inline widths. */
.selector-team-row .input {
  width: 100%;
}

/* Titles centered over their fields; the Units select docks right within
   its track (stable in both states - with or without the Min column). */
.selector-team-head .field-label {
  text-align: center;
}
.selector-team-row > .select {
  justify-self: end;
}

/* Number inputs: spinners are hidden app-wide (see base.css); keep the
   team numeric inputs centered under their column titles. */
.selector-team-row input[type="number"] {
  /* Center the numeric inputs under their column titles. */
  justify-self: center;
}

/* Qty + min inputs (Minute(s) rows): the pair sits in one cell with half
   the row's field gap, so it reads as one group inside the column. */
.selector-team-qty {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

/* The × between Qty and Minutes on Minute(s) rows. */
.selector-team-times {
  color: var(--muted-foreground);
  font-weight: 600;
}

/* The Min header label: hidden (invisibly reserved) until at least one row
   in the panel is Minute(s)-based. visibility keeps the layout box, so the
   Units column never shifts. */
.selector-team-min-head {
  visibility: hidden;
}
.selector-team-list-with-min .selector-team-min-head {
  visibility: visible;
}

/* Proposal team sheet: a bit wider than the default 30rem panel. */
.sheet.proposal-team-sheet {
  width: min(38rem, 100vw);
}

/* Headshot strip inside the team picker: horizontal scroll, tap to pick. */
.proposal-team-strip {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0.25rem 0.125rem 0.5rem;
}

.proposal-team-tile {
  flex: 0 0 auto;
  width: 6.5rem;
  display: grid;
  gap: 0.25rem;
  justify-items: center;
  padding: 0.375rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  cursor: pointer;
}

.proposal-team-tile.selected {
  border-color: var(--primary);
  background: color-mix(in oklch, var(--primary) 8%, var(--card));
}

.proposal-team-tile img,
.proposal-team-tile-initials {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: calc(var(--radius) - 2px);
}

.proposal-team-tile-initials {
  display: grid;
  place-items: center;
  background: var(--muted);
  font-weight: 600;
}

.proposal-team-tile-name {
  max-width: 100%;
  overflow: hidden;
  font-size: 0.6875rem;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Per-artist picture strip in the selected panel (headshot + portfolio).
   Click a picture to include it in the proposal - up to 4 per artist.
   The strip shares the row with the name/talent block. */
.proposal-pics {
  display: flex;
  flex: 0 0 auto;
  gap: 0.375rem;
  overflow-x: auto;
  max-width: 60%;
}

.proposal-pic {
  position: relative;
  flex: 0 0 auto;
  width: 3.25rem;
  height: 3.25rem;
  padding: 0;
  border: 2px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  overflow: hidden;
  cursor: pointer;
  background: var(--muted);
}

.proposal-pic.selected {
  border-color: var(--primary);
}

.proposal-pic.selected {
  border-color: var(--primary);
}

/* Magnifying-glass badge in the top-right corner: hover shows the
   full-size picture. */
.proposal-pic-zoom {
  position: absolute;
  top: 2px;
  right: 2px;
  display: grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  background: rgb(28 25 23 / 0.55);
  color: #fdfbf7;
  opacity: 0;
  transition: opacity var(--dur-fast, 120ms) ease-out;
}

.proposal-pic:hover .proposal-pic-zoom,
.proposal-pic:focus-visible .proposal-pic-zoom {
  opacity: 1;
}

.proposal-pic-preview {
  position: fixed;
  z-index: 90;
  display: none;
  pointer-events: none;
  padding: 0.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pop);
}

.proposal-pic-preview.visible {
  display: block;
}

.proposal-pic-preview img {
  display: block;
  max-width: min(24rem, 44vw);
  max-height: 60vh;
  object-fit: contain;
}

.proposal-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* In the proposal team sheet the name column stacks: talent (and the
   picture strip) sit UNDER the artist name, not beside it. */
[data-proposal-team-selected] .selector-selected-name {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}

.selector-team-row .selector-selected-name p {
  font-weight: 600;
}

.selector-team-row .input {
  min-width: 0;
}

/* Column-title header above the team rows (labels replace placeholders). */
.selector-team-head {
  padding: 0 0.75rem 0.25rem;
  border: 1px solid transparent;
  border-bottom-color: var(--border);
}

.selector-selected {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: color-mix(in oklch, var(--muted) 35%, var(--card));
}

.selector-selected-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 0.75rem;
}

.selector-selected-title {
  font-size: 0.875rem;
  font-weight: 600;
}

.selector-selected-hint {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.selector-selected-list {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.625rem;
}

.selector-selected-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  background: var(--card);
}

.selector-selected-name {
  display: flex;
  min-width: 0;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.selector-selected-name p {
  margin: 0;
}

.selector-check-notes {
  display: block;
  margin-top: 0.125rem;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--muted-foreground);
}

.selector-grip {
  cursor: grab;
}

.selector-grip:active {
  cursor: grabbing;
}

.selector-status {
  width: 9rem;
  flex-shrink: 0;
}

.assignment-groups {
  display: grid;
  gap: 1.25rem;
}

/* Inside the panel-padded to-do card the extra top inset is already paid. */
.card.reports-panel .assignment-groups {
  margin-top: 0;
}

.assignment-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.assignment-group-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.05rem;
}

.assignment-group-count {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.assignment-cards {
  display: grid;
  gap: 0.625rem;
}

.assignment-card {
  padding: 0.875rem;
}

.assignment-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.assignment-card-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.assignment-card-title h4 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.05rem;
}

.assignment-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

.assignment-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.3125rem;
}

.assignment-card-details {
  display: grid;
  gap: 0.625rem 1.5rem;
  margin-top: 0.625rem;
  padding-top: 0.625rem;
  border-top: 1px solid var(--border);
}

@media (min-width: 40rem) {
  .assignment-card-details {
    grid-template-columns: 1fr 1fr;
  }
}

.assignment-detail-label {
  font-size: 0.8125rem;
  font-weight: 600;
}

.assignment-task-row,
.assignment-notes,
.assignment-prereq-rows {
  margin-top: 0.125rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--muted-foreground);
}

.assignment-task-sep {
  color: var(--border);
  margin: 0 0.25rem;
}

.cycle-btn {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
  text-decoration: underline dotted transparent;
}

.cycle-btn:hover {
  text-decoration-color: currentColor;
}

.cycle-not_started { color: var(--muted-foreground); }
.cycle-in_progress { color: color-mix(in oklch, var(--ring) 80%, var(--foreground)); }
.cycle-done { color: var(--success); }
.cycle-cancelled { color: var(--destructive); }

.assignment-prereq-rows {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.prereq-row {
  display: inline-flex;
  align-items: center;
  gap: 0.3125rem;
  padding: 0.1875rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
}

.prereq-locked {
  border: 1px solid var(--border);
  background: color-mix(in oklch, var(--muted) 55%, transparent);
  color: var(--muted-foreground);
}

.prereq-done {
  border: 1px solid color-mix(in oklch, var(--success) 35%, var(--border));
  background: color-mix(in oklch, var(--success) 12%, transparent);
  color: var(--success);
}

.prereq-state {
  font-weight: 600;
}

.task-grid {
  display: grid;
  gap: 0.625rem;
}

/* Inside the panel-padded card the grid's own top inset is already paid. */
.card.reports-panel .task-grid {
  margin-top: 0;
}

@media (min-width: 40rem) {
  .task-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.task-card {
  padding: 0.875rem;
  background: color-mix(in oklch, var(--muted) 25%, var(--card));
}

.task-card h4 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.05rem;
}

.task-usage {
  margin-top: 0.125rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--brand-navy);
}

/* Roster availability calendar */
.roster-calendar {
  margin-top: 1.25rem;
  padding: 1rem;
}

.calendar-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.calendar-title {
  margin-top: 0.25rem;
  font-family: var(--font-serif);
  font-size: 1.35rem;
}

.calendar-description {
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 0.875rem 0;
}

.calendar-month-label {
  margin: 0;
  min-width: 11rem;
  text-align: center;
  font-family: var(--font-serif);
  font-size: 1.15rem;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
  text-align: center;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted-foreground);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
  margin-top: 0.25rem;
  touch-action: none;
}

.calendar-day {
  min-height: 3.75rem;
  padding: 0.25rem;
  border: 1px solid transparent;
  border-radius: calc(var(--radius) - 4px);
  font-size: 0.75rem;
}

.calendar-day:hover {
  border-color: var(--border);
}

.calendar-day.out {
  opacity: 0.45;
}

.calendar-day.today .calendar-day-num {
  display: inline-grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-foreground);
}

.calendar-day-num {
  font-size: 0.6875rem;
  color: var(--muted-foreground);
}

.calendar-day.calendar-drop {
  border-color: var(--ring);
  background: color-mix(in oklch, var(--ring) 14%, transparent);
}

.calendar-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.125rem;
  margin-top: 0.25rem;
}

.calendar-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 100%;
  padding: 0.0625rem 0.3125rem;
  border: 1px solid color-mix(in oklch, var(--success) 40%, var(--border));
  border-radius: 999px;
  background: color-mix(in oklch, var(--success) 14%, var(--card));
  color: color-mix(in oklch, var(--success) 75%, var(--foreground));
  font-size: 0.6875rem;
  cursor: grab;
}

.calendar-chip:active {
  cursor: grabbing;
}

.calendar-chip-dot {
  flex-shrink: 0;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 999px;
  background: var(--success);
}

.calendar-chip-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-chips.compact .calendar-chip {
  padding: 0.0625rem;
  border: 0;
  background: none;
}

.calendar-chips.compact .calendar-chip-label {
  display: none;
}

/* Event chips (productions) - primary tone separates them from green
   availability chips; cancelled productions render muted. The status
   attribute keeps the legacy data-project-status name (DB column). */
.calendar-chip.event {
  border-color: color-mix(in oklch, var(--primary) 40%, var(--border));
  background: color-mix(in oklch, var(--primary) 12%, var(--card));
  color: color-mix(in oklch, var(--primary) 78%, var(--foreground));
  cursor: pointer;
}

.calendar-chip.event .calendar-chip-dot {
  background: var(--primary);
}

.calendar-chip.event[data-project-status="cancelled"] {
  border-color: var(--border);
  background: var(--muted);
  color: var(--muted-foreground);
}

.calendar-chip.event[data-project-status="cancelled"] .calendar-chip-dot {
  background: var(--muted-foreground);
}

/* ---------- Public standalone pages (Task 25) ----------
   Ported from the legacy PublicArtist.tsx / PublicCompanyProfile.tsx /
   ArtistInvitation.tsx layouts: standalone, no sidebar, quiet paper
   background with the brand banner and card sections. */

.public-page {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
}

.public-banner {
  background: var(--brand-deep);
  padding: 2rem 1.5rem;
  color: var(--brand-ink);
}

.public-banner-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 64rem;
  margin: 0 auto;
}

.public-brand-mark {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
  background: var(--brand-mist);
  color: var(--brand-ink);
}

.public-brand-name {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.25rem;
}

.public-brand-sub {
  display: block;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-mist);
}

.public-body {
  max-width: 64rem;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.public-eyebrow {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-navy);
}

.public-eyebrow-light {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--brand-mist);
}

.public-profile-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 48rem) {
  .public-profile-grid {
    grid-template-columns: 180px 1fr;
  }
}

.public-headshot {
  display: grid;
  place-items: center;
  width: 10rem;
  height: 10rem;
  overflow: hidden;
  border-radius: 1.75rem;
  background: var(--secondary);
  color: var(--primary);
  font-family: var(--font-serif);
  font-size: 3rem;
}

.public-headshot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.public-title {
  margin: 0.5rem 0 0;
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 600;
  line-height: 1;
}

.public-subname {
  margin: 0.75rem 0 0;
  font-size: 1.125rem;
  color: var(--muted-foreground);
}

.public-location {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0 0;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.public-location .icon {
  color: var(--brand-navy);
}

.public-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.public-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--secondary);
  color: var(--secondary-foreground);
  font-size: 0.8125rem;
  font-weight: 500;
}

.public-columns {
  display: grid;
  gap: 2rem;
  margin-top: 3rem;
}

@media (min-width: 48rem) {
  .public-columns {
    grid-template-columns: 1fr 0.8fr;
  }
}

.public-heading {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 600;
}

.public-bio {
  margin: 1rem 0 0;
  white-space: pre-wrap;
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--muted-foreground);
}

.public-portfolio {
  margin-top: 2.25rem;
}

.public-portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

@media (min-width: 40rem) {
  .public-portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.public-portfolio-figure {
  margin: 0;
  overflow: hidden;
  border-radius: 1rem;
  background: var(--muted);
}

.public-portfolio-figure img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.public-portfolio-caption {
  padding: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
}

.public-socials {
  align-self: start;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--card);
}

.public-social-list {
  display: grid;
  gap: 0.5rem;
  margin-top: 1rem;
}

.public-social-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  color: inherit;
  text-decoration: none;
  font-size: 0.875rem;
  transition: border-color 120ms ease;
}

.public-social-link:hover {
  border-color: var(--ring);
}

.public-social-link .icon {
  color: var(--brand-navy);
}

.public-social-platform {
  display: block;
  font-weight: 500;
}

.public-social-handle {
  display: block;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.public-none {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* Unavailable / not-found state shared by the public pages. */

.public-unavailable {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 1.5rem;
  text-align: center;
}

.public-unavailable-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 2.25rem;
  font-weight: 600;
}

.public-unavailable-hint {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* Public company card. */

.public-company-card {
  max-width: 42rem;
  margin: 3rem auto;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 1.75rem;
  background: var(--card);
  box-shadow: var(--shadow-card);
}

.public-company-header {
  padding: 2rem 1.5rem;
  background: linear-gradient(90deg, var(--brand-navy), color-mix(in oklch, var(--brand-navy) 70%, var(--brand-ink)));
  color: var(--brand-deep);
}

@media (min-width: 40rem) {
  .public-company-header {
    padding: 2rem 2.5rem;
  }
}

.public-company-name {
  margin: 1rem 0 0;
  font-family: var(--font-serif);
  font-size: 2.75rem;
  font-weight: 600;
  line-height: 1.15;
}

.public-company-contact {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  color: var(--brand-mist);
}

.public-company-body {
  padding: 1.5rem;
}

@media (min-width: 40rem) {
  .public-company-body {
    padding: 2.5rem;
  }
}

.public-company-grid {
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 40rem) {
  .public-company-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.public-company-contacts {
  display: grid;
  gap: 0.75rem;
  align-content: start;
}

.public-company-link,
.public-company-location {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.875rem;
  color: var(--brand-navy);
  text-decoration: none;
}

.public-company-link:hover {
  text-decoration: underline;
}

.public-company-location {
  color: var(--muted-foreground);
}

.public-company-address {
  align-self: start;
  padding: 1rem;
  border-radius: 1rem;
  background: var(--muted);
}

.public-address-label {
  margin: 0;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.public-address-lines {
  margin: 0.5rem 0 0;
  white-space: pre-line;
  font-size: 0.875rem;
  line-height: 1.5;
}

.public-company-socials {
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}

.public-social-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--muted);
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.public-social-chip-link {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-foreground);
  text-decoration: none;
}

.public-social-glyph {
  font-weight: 700;
}

/* Invitation respond page (uniform public-record layout; the hero, columns,
   and brand pill come from the shared public-* styles above). */

.public-invite-card {
  margin-top: 1.25rem;
  padding: 1.5rem;
}

.public-invite-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.public-invite-card-head .icon {
  color: var(--brand-navy);
}

.public-invite-purse {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 0.75rem;
  border: 1px solid var(--brand-navy);
  border-radius: 0.75rem;
  background: var(--secondary);
  font-size: 0.875rem;
}

.public-invite-purse-amount {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.375rem;
  font-weight: 500;
}

.public-invite-contracts {
  display: grid;
  gap: 0.5rem;
  margin-top: 1rem;
}

.public-invite-contract {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: var(--muted);
  color: inherit;
  font-size: 0.875rem;
  text-decoration: none;
}

.public-invite-contract:hover {
  background: var(--secondary);
}

.public-invite-contract-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.public-invite-due {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.public-invite-note {
  min-height: 6rem;
  margin-top: 1rem;
  resize: vertical;
}

.public-invite-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.public-invite-later {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ---------- Reports (Task 27) ---------- */
/* Banner (hoisted), tab strip, and toolbar stay pinned; the results panel is
   the page's scroll container, so those controls never move while the user
   scrolls the records. */
.shell main#outlet > .reports-page {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.reports-page .reports-tabs-row,
.reports-page .reports-toolbar {
  flex: 0 0 auto;
}
.reports-page [data-reports-panel] {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: 0.5rem;
}
.reports-tabs-row {
  margin-top: 0.5rem;
}
.reports-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.375rem;
  background: var(--card);
  border: 1px solid var(--border, #e7e5e4);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-card);
}
.reports-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  height: 2.25rem;
  padding: 0 0.75rem;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
}
.reports-tab:hover {
  background: color-mix(in oklch, var(--foreground) 5%, transparent);
  color: var(--foreground, #1c1917);
}
.reports-tab.active {
  background: var(--accent, #edf4fa);
  color: var(--primary, #1e3a5f);
}
.reports-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
}
.reports-search {
  width: 100%;
  max-width: 24rem;
}
.reports-panel {
  margin-top: 1rem;
  padding: 1.25rem;
}
.reports-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.reports-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--foreground, #1c1917);
}
.reports-description {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}
.reports-export-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.reports-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  width: 100%;
  margin: 1.25rem 0;
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: color-mix(in oklch, var(--foreground) 4%, transparent);
}
/* Filter labels sit inline before their fields: "From [date] to [date]". */
.reports-filter-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.reports-filter-group .field-label {
  flex: 0 0 auto;
  margin: 0;
  white-space: nowrap;
}

/* Select filters take half the content width and stay inline after their label. */
.reports-filters .reports-filter-group .select {
  width: 14rem;
  flex: 0 0 auto;
}

/* Date filters: one fixed width everywhere, sized to the widest render
   (full YYYY-MM-DD plus the picker icon) so From/To pairs match and the
   input never shows dead space past the date. */
.reports-filter-group input[type="date"].input {
  width: 9rem;
  min-width: 0;
  flex: 0 0 auto;
}

@media (max-width: 48rem) {
  /* The denser 15px mobile base narrows the fixed desktop width - widen so
     the yyyy-mm-dd placeholder and picker icon still fit. */
  .reports-filter-group input[type="date"].input {
    width: 9.5rem;
  }

  /* Dialogs go full-screen. This file loads after components.css, so the
     shared variants (.dialog-wide for events, .dialog-narrow for small
     forms) would otherwise re-clamp the width on phones. */
  .dialog,
  .dialog-wide,
  .dialog-narrow {
    width: 100%;
    max-width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .dialog-panel {
    height: 100%;
    max-height: 100dvh;
    padding-bottom: env(safe-area-inset-bottom);
  }

  /* Compact record counter: the long "x of y records" text is hidden
     (font-size 0) and the data-compact value renders in its place. This
     file loads after components.css, so it must carry the override. */
  .record-count {
    font-size: 0;
  }

  .record-count::after {
    content: attr(data-compact);
    font-size: 0.875rem;
  }

  /* The banner copy is noise on a phone; the title carries the page. */
  .roster-banner-description {
    display: none;
  }

  /* Browse filters: the "From" label is clutter on a phone (the date
     placeholder says it all). Hidden visually only - screen readers keep
     the implicit label. */
  .reports-filter-from .field-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* Activity report: note shown when the server cap trimmed the log. */
.activity-cap-hint {
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

.reports-filters {
  align-items: center;
}
.reports-filters .select {
  width: 100%;
  max-width: 32rem;
}
.reports-filters .input {
  width: 100%;
}
.reports-results-header {
  display: flex;
  align-items: center;
  margin: 0 0 0 auto;
}
.reports-results-count {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}
.reports-results-count b {
  color: var(--foreground, #1c1917);
}
.cell-strong {
  font-weight: 600;
  color: var(--foreground, #1c1917);
}
.cell-sub {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}
.cell-capitalize {
  text-transform: capitalize;
}
.reports-status-planning {
  background: #fef3c7;
  color: #92400e;
}
.reports-status-confirmed {
  background: #d1fae5;
  color: #065f46;
}
.reports-status-completed {
  background: #eceefc;
  color: #3c3f66;
}
.reports-status-cancelled {
  background: #fee2e2;
  color: #b91c1c;
}
.reports-balance-over {
  color: #b91c1c;
  font-weight: 600;
  }
  [data-theme="dark"] .reports-balance-over {
  color: #f87171;
  }
  .reports-balance-under {
  color: #047857;
  font-weight: 600;
  }
  [data-theme="dark"] .reports-balance-under {
  color: #34d399;
  }
.reports-overview-cards {
  display: grid;
  gap: 1rem;
}
@media (min-width: 1280px) {
  .reports-overview-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.reports-overview-card {
  padding: 1rem;
}
.reports-overview-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.reports-overview-side {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.reports-overview-name {
  margin: 0.25rem 0 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--foreground, #1c1917);
}
.reports-overview-client {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}
.reports-overview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 0.625rem;
  padding: 0.5rem 0;
  border-top: 1px solid color-mix(in oklch, var(--foreground) 10%, transparent);
  border-bottom: 1px solid color-mix(in oklch, var(--foreground) 10%, transparent);
  font-size: 0.875rem;
  color: var(--muted-foreground);
}
.reports-overview-meta p {
  margin: 0;
}
.reports-overview-financials {
  display: flex;
  flex-direction: column;
  margin-top: 0.625rem;
  }
.reports-overview-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #1e3a5f;
}
[data-theme="dark"] .reports-overview-label {
  color: #a8c4e8;
}
.reports-overview-budget {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.875rem;
}
.reports-overview-budget .budget-label {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}
.reports-overview-budget b {
  font-weight: 600;
}
.reports-fin-tabs {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.625rem;
  padding: 0.25rem;
  border-radius: 0.5rem;
  background: color-mix(in oklch, var(--foreground) 5%, transparent);
}
.reports-fin-tab {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.0625rem;
  padding: 0.375rem 0.5rem;
  border: 0;
  border-radius: 0.375rem;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}
.reports-fin-tab:hover {
  background: color-mix(in oklch, var(--foreground) 5%, transparent);
}
.reports-fin-tab.active {
  background: var(--card);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.1);
}
.reports-fin-tab-name {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-foreground);
}
.reports-fin-tab.active .reports-fin-tab-name {
  color: var(--foreground, #1c1917);
}
.reports-fin-tab-value {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--foreground, #1c1917);
}
/* Five rows visible; the list scrolls beyond that. */
.reports-fin-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0.625rem 0 0;
  /* Fixed height: switching tabs never moves the balance below. */
  height: 6.75rem;
  overflow-y: auto;
}
.reports-fin-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.4;
}
.reports-fin-row-name {
  color: var(--muted-foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reports-fin-row-value {
  font-weight: 600;
  white-space: nowrap;
}
.reports-fin-empty {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}
.reports-overview-balance {
  margin: auto 0 0;
  padding-top: 0.5rem;
  border-top: 1px solid color-mix(in oklch, var(--foreground) 10%, transparent);
  font-size: 0.875rem;
  }
.reports-overview-note {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  line-height: 1.25rem;
  color: var(--muted-foreground);
}

/* =====================================================================
   Public pages: cinematic editorial skin (Awwwards-tier protocol)
   Scope: /public/artists, /public/support-staff, /public/company,
   /invite/:token only. The workspace keeps the stone editorial system.
   Archetype: Editorial Luxury - warm cream stage, espresso ink, massive
   serif voice, film grain, double-bezel cards, pill CTAs with nested
   icon chips, blur-fade scroll entries. Zero markup changes.
   ===================================================================== */

.public-page {
  position: relative;
  isolation: isolate;
  background: #fdfbf7;
  color: #1c1917;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Film grain: fixed, pointer-events-none, never on scrolling containers. */
.public-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Brand pill: lives at the bottom-right INSIDE the record card (in flow,
   so it can never collide with the record content above it). */
.public-banner {
  display: flex;
  justify-content: flex-end;
  /* Horizontal + bottom breathing room: cards without their own padding
     (the artist/crew report tray) would otherwise seat the pill on the
     border. */
  padding: 2.25rem 1.5rem 1.25rem;
}

.public-banner-inner {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  /* Kill the artist-era centering margin so the pill actually pins
     right under .public-banner's justify-content: flex-end. */
  margin: 0;
  padding: 0.3125rem 0.6875rem 0.3125rem 0.3125rem;
  border-radius: 999px;
  /* The pill links to scenique24.ca - keep it looking like the badge. */
  text-decoration: none;
  color: inherit;
  background: rgb(255 255 255 / 0.72);
  border: 1px solid rgb(28 25 23 / 0.08);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.03);
}

.public-brand-mark {
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 999px;
  background: #1c1917;
  color: #fdfbf7;
}

.public-brand-name {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.public-brand-sub {
  font-size: 0.5625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(28 25 23 / 0.55);
}

.public-body {
  position: relative;
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  /* Fill the space under the brand pill; the record centers in it. */
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

/* Auto margins center the record in the free space and collapse to normal
   flow when content is taller than the viewport - the top is never clipped
   and the document scrollbar appears when needed. flex-shrink: 0 keeps the
   card at its natural height, so shrinking the window makes the page grow
   (and scroll) instead of squeezing the card. */
.public-body > * {
  margin-block: auto;
  flex-shrink: 0;
}

/* Macro-whitespace belongs to this stage only. */
.public-profile-grid {
  gap: 3rem;
  align-items: end;
  padding-bottom: 3.5rem;
}

/* Avatar-less records (event share links): no reserved headshot column,
   content centered. */
.public-profile-grid.public-profile-single {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
}

/* "Presented By <company>" line above the eyebrow pill. */
/* Presenter row: label + company centered, social profiles pinned right. */
.proposal-presenter-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 1.25rem 1.5rem 0;
}

.proposal-presenter-row .public-presenter {
  grid-column: 2;
  margin: 0;
}

.proposal-presenter-row .public-social-list {
  grid-column: 3;
  justify-self: end;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  margin: 0;
}

/* Icon-only chips: platform names live in the tooltip. */
.proposal-presenter-row .public-social-link {
  width: 2.375rem;
  height: 2.375rem;
  padding: 0;
  justify-content: center;
}

.proposal-presenter-row .public-social-link .icon {
  background: none;
  width: auto;
  height: auto;
}

.public-presenter {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
}

.public-presenter-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgb(28 25 23 / 0.6);
}

.public-presenter-name {
  font-size: 1.0625rem;
  font-weight: 600;
  color: rgb(28 25 23 / 0.85);
  text-decoration: none;
}

/* Linked presenter name (company website) invites the click. */
a.public-presenter-name:hover {
  text-decoration: underline;
}

/* The event record's serif title runs a step smaller than the artist
   hero. */
.public-profile-single .public-title {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
}

.public-profile-single .public-badges {
  justify-content: center;
}

/* Rounded-square tray behind the whole record. The tint is the artist
   headshot tray color (espresso over cream) - one shade darker than the
   stage, so the record reads as one object. */
.public-record-card {
  border-radius: 2rem;
  border: 1px solid rgb(28 25 23 / 0.08);
  background: rgb(28 25 23 / 0.04);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.03), 0 24px 60px -40px rgb(0 0 0 / 0.2);
  padding: clamp(1.5rem, 4vw, 3rem);
}

/* Tighten the macro whitespace now that the grid lives inside the tray. */
.public-record-card .public-profile-grid {
  padding-bottom: 2.5rem;
}

/* Double bezel: machined plate in a tray. */
.public-headshot {
  padding: 0.375rem;
  border-radius: 2rem;
  background: rgb(28 25 23 / 0.04);
  border: 1px solid rgb(28 25 23 / 0.06);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.03);
}

.public-headshot img {
  border-radius: calc(2rem - 0.375rem);
  box-shadow: inset 0 1px 1px rgb(255 255 255 / 0.35);
}

.public-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.3125rem 0.875rem;
  border-radius: 999px;
  border: 1px solid rgb(28 25 23 / 0.12);
  background: rgb(255 255 255 / 0.6);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgb(28 25 23 / 0.65);
}

.public-title {
  margin: 1.25rem 0 0;
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.public-subname,
.public-location {
  font-size: 1.0625rem;
  color: rgb(28 25 23 / 0.62);
}

.public-location .icon {
  color: #1c1917;
}

.public-badge {
  border-radius: 999px;
  border: 1px solid rgb(28 25 23 / 0.1);
  background: rgb(255 255 255 / 0.65);
}

.public-heading {
  font-family: var(--font-serif);
  font-size: 1.625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.public-bio {
  max-width: 62ch;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: rgb(28 25 23 / 0.78);
}

.public-portfolio-figure {
  overflow: hidden;
  border-radius: 1.25rem;
  border: 1px solid rgb(28 25 23 / 0.06);
  background: rgb(255 255 255 / 0.7);
  transition: transform var(--dur-med) var(--ease-spring), box-shadow var(--dur-med) var(--ease-out-soft);
}

.public-portfolio-figure:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.05);
}

.public-powered-by {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgb(28 25 23 / 0.55);
}

/* Social and contact rows become pill CTAs with nested icon chips. */
.public-social-link,
.public-company-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem 0.625rem 1rem;
  border-radius: 999px;
  border: 1px solid rgb(28 25 23 / 0.08);
  background: rgb(255 255 255 / 0.72);
  transition: transform var(--dur-fast) var(--ease-out-soft), background-color var(--dur-fast) ease-out, box-shadow var(--dur-med) var(--ease-out-soft);
}

/* The contact-row stack runs narrower than its column, with a little
   extra width for the label-free pills. */
.public-contact-rows {
  max-width: 75%;
}

.public-social-link:hover,
.public-company-link:hover {
  background: rgb(255 255 255 / 0.95);
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.05);
  transform: translateY(-1px);
}

.public-social-link:active,
.public-company-link:active {
  transform: scale(0.98);
}

.public-social-link .icon,
.public-company-link .icon:last-child {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: rgb(28 25 23 / 0.05);
  color: #1c1917;
  transition: transform var(--dur-med) var(--ease-spring);
}

.public-social-link:hover .icon,
.public-company-link:hover .icon:last-child {
  transform: translate(1px, -1px) scale(1.05);
}

/* Company card: espresso hero with massive serif, cream machined body. */
.public-company-card {
  overflow: hidden;
  border-radius: 2rem;
  border: 1px solid rgb(28 25 23 / 0.06);
  background: rgb(255 255 255 / 0.7);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.03), 0 24px 60px -40px rgb(0 0 0 / 0.2);
}

.public-company-header {
  background:
    radial-gradient(circle at 18% 20%, rgb(255 255 255 / 0.06), transparent 40%),
    linear-gradient(120deg, #1c1917, #33302e 70%, #262320);
  color: #fdfbf7;
  padding: 4rem 2.5rem;
}

.public-company-name {
  font-size: clamp(2.5rem, 6.5vw, 4.5rem);
  letter-spacing: -0.03em;
  line-height: 1.04;
}

.public-eyebrow-light {
  border-color: rgb(253 251 247 / 0.25);
  background: rgb(253 251 247 / 0.08);
  color: rgb(253 251 247 / 0.75);
}

.public-company-body {
  padding: 2.5rem;
}

.public-company-grid {
  gap: 3rem;
}

/* Invitation card: the same machined treatment. */
.public-invite-card {
  border-radius: 2rem;
  border: 1px solid rgb(28 25 23 / 0.06);
  background: rgb(255 255 255 / 0.82);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.03), 0 24px 60px -40px rgb(0 0 0 / 0.2);
}

/* Invitation CTAs: pill buttons on this stage. */
.public-invite-actions {
  gap: 0.75rem;
}

.public-invite-actions .btn,
.public-invite-later .btn {
  border-radius: 999px;
  padding: 0 1.5rem;
  height: 2.75rem;
}

.public-invite-purse-amount {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* Cinematic entry: blur-fade-up, staggered, transform/opacity/filter only.
   Collapses completely under reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .public-body > *,
  .public-company-card {
    animation: public-cinematic 800ms var(--ease-spring) both;
    animation-delay: calc(var(--stagger, 0) * 90ms);
  }

  .public-body > *:nth-child(1) { --stagger: 0; }
  .public-body > *:nth-child(2) { --stagger: 1; }
  .public-body > *:nth-child(3) { --stagger: 2; }
  .public-body > *:nth-child(4) { --stagger: 3; }

  @keyframes public-cinematic {
    from {
      opacity: 0;
      transform: translateY(40px);
      filter: blur(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
      filter: blur(0);
    }
  }
}

@media (max-width: 47.99rem) {
  .public-body {
    padding: 1.75rem 1.25rem;
  }

  .public-company-header {
    padding: 2.5rem 1.5rem;
  }

  .public-company-body {
    padding: 1.5rem;
  }
}

/* ---------- Calendar page ---------- */

/* The page fills the outlet exactly (categories pattern) so the whole
   month grid fits the window instead of scrolling the page. */
.page-calendar {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.calendar-card {
  margin-top: 0.5rem;
  padding: 1rem 1.25rem 1.25rem;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: auto;
}

.calendar-month,
.calendar-week,
.calendar-day-view {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
}

.calendar-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.calendar-toolbar-nav {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.calendar-title {
  flex: 1;
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  min-width: 12rem;
}

.calendar-views {
  display: flex;
  gap: 0.375rem;
}

.calendar-month {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  /* Weekday header auto; the six week rows share the remaining height and
     only grow past it when a day's events need more room. */
  grid-template-rows: auto repeat(6, minmax(min-content, 1fr));
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  overflow: hidden;
}

.calendar-weekday {
  padding: 0.375rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-foreground);
  background: color-mix(in oklch, var(--muted) 70%, var(--card));
  border-bottom: 1px solid var(--border);
}

.calendar-cell {
  min-width: 0;
  padding: 0.375rem;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.calendar-month .calendar-cell:nth-child(7n + 1) {
  border-left: 0;
}

.calendar-cell.outside {
  background: color-mix(in oklch, var(--muted) 60%, var(--card));
}

.calendar-cell.outside .calendar-day-num {
  color: color-mix(in oklch, var(--muted-foreground) 55%, transparent);
}

.calendar-day-num {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted-foreground);
  align-self: flex-start;
  min-width: 1.375rem;
  text-align: center;
  padding: 0.1rem 0;
  border-radius: 999px;
}

.calendar-cell.today .calendar-day-num {
  background: var(--accent);
  color: var(--accent-foreground);
}

.calendar-events {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.calendar-event {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.7rem;
  line-height: 1.4;
  padding: 0.1rem 0.4rem;
  text-decoration: none;
}

.calendar-event:hover {
  filter: brightness(0.96);
}

.calendar-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: minmax(min-content, 1fr);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  overflow: hidden;
}

.calendar-day-col {
  min-height: 0;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.calendar-day-col:first-child {
  border-left: 0;
}

.calendar-day-col .calendar-cell {
  border-top: 0;
  flex: 1;
  min-height: 0;
}

.calendar-col-head {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
  padding: 0.375rem 0.5rem;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklch, var(--muted) 70%, var(--card));
}

.calendar-day-col.today .calendar-col-head {
  background: color-mix(in oklch, var(--accent) 30%, var(--card));
}

.calendar-col-name {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-foreground);
}

.calendar-col-num {
  font-size: 0.8rem;
  font-weight: 600;
}

.calendar-day-view {
  border: 1px dashed var(--border);
  border-radius: 0.5rem;
  padding: 1rem;
}

.calendar-day-list {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.calendar-day-list .calendar-event {
  font-size: 0.8rem;
  padding: 0.3rem 0.6rem;
  white-space: normal;
}

.calendar-empty {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.85rem;
}

@media (max-width: 47.99rem) {
  /* On phones the page scrolls naturally; give the grid back its floor. */
  .page-calendar {
    height: auto;
  }

  .calendar-card {
    overflow: visible;
  }

  .calendar-month {
    grid-template-rows: none;
    grid-auto-rows: minmax(3.5rem, auto);
  }

  .calendar-event {
    font-size: 0.6rem;
    padding: 0.05rem 0.25rem;
  }

  .calendar-week {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .calendar-day-col {
    border-left: 0;
    border-top: 1px solid var(--border);
    min-height: 6rem;
  }
}

/* ---------- Sticky controls + in-panel scrolling (list windows) ---------- */
/* The tab strip and each panel's filter row stay pinned; the card below is
   the scroll container for its records. Same pattern as the roster tables
   and the Reports workspace. */
[data-assignments-panel],
[data-tasks-panel] {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* The panels toggle via the hidden attribute; display:flex would beat the
   UA's [hidden] rule, so re-assert it. */
[data-assignments-panel][hidden],
[data-tasks-panel][hidden] {
  display: none;
}

.card.reports-panel {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.invitation-event-grid {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

/* Calendar: the view toolbar stays pinned inside the card; the month/week/
   day grid scrolls when the window is short (height:auto on mobile keeps
   the natural flow). */
.calendar-toolbar {
  flex: 0 0 auto;
}

.calendar-month,
.calendar-week,
.calendar-day-view {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

/* Settings: bound the page so the tab strip (sticky above) sits on a
   scrolling stack of profile/defaults cards. */
.shell main#outlet > .settings-page {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* Operator console (standalone /operator page). Top-aligned: the backdrop's
   centering suits a short login card, not a working console. place-items
   alone is not enough - the implicit grid rows stretch to fill the viewport
   (align-content normal), which pushed the card most of the way down. */
.operator-backdrop {
  overflow: auto;
  padding: 2rem 1.5rem;
  align-content: start;
  row-gap: 0.625rem;
}

.operator-card {
  width: min(72rem, 100%);
}

/* auth-card is narrower; the console table needs the room. */
.auth-backdrop .operator-card {
  width: min(72rem, 100%);
  max-width: min(72rem, 100%);
}

.platform-banner-host:empty {
  display: none;
}

/* Platform maintenance / scheduled-downtime banner (shell-level, above the
   page-banner host so hoisting never displaces it). */
.platform-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding: 0.625rem 0.875rem;
  border: 1px solid;
  border-radius: 0.625rem;
  font-size: 0.875rem;
}
.platform-banner.banner-red {
  border-color: rgba(185, 28, 28, 0.3);
  background: #fef2f2;
  color: #7f1d1d;
}
.platform-banner.banner-amber {
  border-color: rgba(180, 83, 9, 0.3);
  background: #fffbeb;
  color: #78350f;
}
[data-theme="dark"] .platform-banner.banner-red {
  background: rgba(127, 29, 29, 0.22);
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.35);
}
[data-theme="dark"] .platform-banner.banner-amber {
  background: rgba(120, 53, 15, 0.22);
  color: #fde68a;
  border-color: rgba(251, 191, 36, 0.35);
}
.platform-banner-title {
  font-weight: 600;
}
.platform-banner-description {
  margin-top: 0.125rem;
  opacity: 0.85;
}

/* In-app messaging: sidebar bell, unread badge, announcements panel. */
.announcements-bell {
  position: relative;
}
.bell-badge {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  min-width: 1rem;
  height: 1rem;
  padding: 0 0.25rem;
  border-radius: 9999px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 1rem;
  text-align: center;
}
.announcements-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 60vh;
  overflow: auto;
  padding-right: 0.25rem;
}
.announcement {
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  opacity: 0.75;
}
.announcement.unread {
  opacity: 1;
  border-left: 3px solid var(--primary);
}
.announcement-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.announcement-date {
  color: var(--muted-foreground);
  font-size: 0.75rem;
}
.unread-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: var(--primary);
  margin-left: auto;
}
.announcement-title {
  margin-top: 0.375rem;
  font-weight: 600;
}
.announcement-body {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  line-height: 1.4;
  white-space: pre-wrap;
}
.announcement .announcement-mark {
  margin-top: 0.5rem;
}
.kind-badge {
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.kind-badge.kind-news { background: rgba(59, 130, 246, 0.15); color: #1d4ed8; }
.kind-badge.kind-update { background: rgba(139, 92, 246, 0.15); color: #6d28d9; }
.kind-badge.kind-tip { background: rgba(16, 185, 129, 0.15); color: #047857; }
[data-theme="dark"] .kind-badge.kind-news { color: #93c5fd; }
[data-theme="dark"] .kind-badge.kind-update { color: #c4b5fd; }
[data-theme="dark"] .kind-badge.kind-tip { color: #6ee7b7; }
.announcements-empty {
  color: var(--muted-foreground);
  font-size: 0.875rem;
}
.ann-compose .admin-users-toolbar {
  display: flex;
  gap: 0.5rem;
}

/* Operator Security tab: summary cards, alerts, event list. */
.security-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.security-card {
  display: flex;
  align-items: baseline;
  gap: 0.375rem;
  padding: 0.3125rem 0.625rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  font-size: 0.8125rem;
  white-space: nowrap;
}
.security-card-value {
  font-weight: 700;
}
.security-card-label {
  color: var(--muted-foreground);
  font-size: 0.75rem;
}
.security-alert {
  padding: 0.625rem 0.875rem;
  border: 1px solid;
  border-radius: 0.625rem;
  font-size: 0.875rem;
}
.security-alert.severity-alert {
  border-color: rgba(185, 28, 28, 0.35);
  background: #fef2f2;
}
.security-alert.severity-warning {
  border-color: rgba(180, 83, 9, 0.35);
  background: #fffbeb;
}
[data-theme="dark"] .security-alert.severity-alert { background: rgba(127, 29, 29, 0.2); }
[data-theme="dark"] .security-alert.severity-warning { background: rgba(120, 53, 15, 0.2); }
.kind-badge.security-alert { background: rgba(185, 28, 28, 0.15); color: #b91c1c; }
.kind-badge.security-warning { background: rgba(180, 83, 9, 0.15); color: #b45309; }
.kind-badge.security-info { background: rgba(59, 130, 246, 0.15); color: #1d4ed8; }

/* Operator console: the backdrop is always dark, so the header text needs
   light colors (auth-title/subtitle default to dark-on-light). The h1 is
   the first element now - no extra top margin. */
.operator-backdrop .auth-title {
  color: #f8f5f0;
  margin-top: 0;
}
.operator-backdrop .auth-subtitle {
  color: rgba(255, 255, 255, 0.72);
}

/* Centered card headers (badge, title, hint) in the settings cards. */
.operator-card .card-head {
  display: grid;
  justify-items: center;
  gap: 0.375rem;
  margin-bottom: 1rem;
  text-align: center;
}
.operator-card .card-head h3 {
  margin: 0;
}

/* Toggle switches (platform settings, compose forms). */
.switch {
  appearance: none;
  width: 2.75rem;
  height: 1.5rem;
  border-radius: 9999px;
  background: var(--muted);
  border: 1px solid var(--border);
  position: relative;
  cursor: pointer;
  transition: background 0.15s ease;
  flex-shrink: 0;
}
.switch::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0.1875rem;
  transform: translateY(-50%);
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 9999px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: left 0.15s ease;
}
.switch:checked {
  background: var(--primary);
  border-color: var(--primary);
}
.switch:checked::after {
  left: calc(100% - 1.3125rem);
}

/* Dark: --primary flips to near-white, so a checked track is white while
   the hardcoded white knob would vanish into it (on/off became two
   different-looking blobs). Checked flips the knob to the primary ink;
   unchecked gets a lifted track so the white knob sits on a pill that is
   clearly distinct from the dialog surface. */
[data-theme="dark"] .switch:not(:checked) {
  background: color-mix(in oklch, var(--muted-foreground) 28%, var(--muted));
  border-color: color-mix(in oklch, var(--muted-foreground) 45%, transparent);
}
[data-theme="dark"] .switch:checked::after {
  background: var(--primary-foreground);
}

.operator-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin-top: 0.75rem;
}

.operator-table th {
  text-align: left;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--muted-foreground);
}

.operator-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.operator-table tr[data-member-row] td {
  color: var(--muted-foreground);
}

/* Billing card (Administrator): the price ladder sits beside the usage. */
.admin-billing-prices {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  white-space: nowrap;
}

.admin-billing-prices p {
  margin: 0.125rem 0;
}
