:root {
  --ink: #000000;
  --muted: #767676;
  --paper: #ffffff;
  --surface: #ffffff;
  --surface-alt: #f5f5f5;
  --line: #e5e5e5;
  --charcoal: #111111;
  --rust: #000000;
  --olive: #000000;
  --blue: #000000;
  --gold: #000000;
  --accent: #000000;
  --rail-width: 260px;
  --rail-collapsed: 80px;
  --topbar-height: 72px;
  color-scheme: light;
}

html[data-theme="dark"] {
  --ink: #ffffff;
  --muted: #999999;
  --paper: #000000;
  --surface: #0a0a0a;
  --surface-alt: #1a1a1a;
  --line: #333333;
  --charcoal: #ffffff;
  --rust: #ffffff;
  --olive: #ffffff;
  --blue: #ffffff;
  --gold: #ffffff;
  --accent: #ffffff;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, "Inter", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

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

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

.app-shell.rail-collapsed {
  grid-template-columns: var(--rail-collapsed) minmax(0, 1fr);
}

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-right: 1px solid var(--line);
  background: var(--surface);
  padding: 1rem 0.75rem;
  overflow: hidden;
}

.rail-brand,
.rail-nav a,
.rail-toggle {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0 0.7rem;
}

.rail-brand {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand-mark {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border: 2px solid #e8503f;
  border-radius: 50%;
  box-shadow: 6px 0 0 -2px #2f8fbd, -4px 5px 0 -2px #f0b12b, 2px -5px 0 -2px #7f5fbf;
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.rail-nav:not(.rail-nav-bottom) {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.rail-nav a {
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.rail-nav a:hover,
.rail-nav a.active {
  background: var(--charcoal);
  color: #fffdf8;
}

html[data-theme="dark"] .rail-nav a:hover,
html[data-theme="dark"] .rail-nav a.active {
  background: var(--surface-alt);
  color: var(--ink);
}

/* ── Rail expandable sections ── */

.rail-section {
  display: flex;
  flex-direction: column;
}

.rail-section-row {
  display: flex;
  align-items: center;
  gap: 0;
}

.rail-section-header {
  flex: 1;
  min-width: 0;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.rail-chevron {
  flex: 0 0 24px;
  width: 24px;
  height: 28px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 0.6rem;
  padding: 0;
  transition: color 0.12s;
}
.rail-chevron:hover { color: var(--ink); background: var(--surface-alt); }
.rail-chevron::after { content: '▸'; }
.rail-section.expanded .rail-chevron::after { content: '▾'; }

.app-shell.rail-collapsed .rail-chevron { display: none; }

.rail-subitems {
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0.25rem 0 0.25rem 1rem;
  padding: 0.5rem 0 0.5rem 0.75rem;
  border-left: 2px solid var(--line);
  overflow-y: auto;
}

.rail-section.expanded .rail-subitems {
  display: flex;
}

.app-shell.rail-collapsed .rail-subitems {
  display: none !important;
}

.rail-subitems .sidebar-section {
  gap: 0;
}

.rail-subitems .sidebar-section h4 {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.rail-subitems .filter-chips {
  gap: 3px;
}

.rail-subitems .chip {
  font-size: 0.72rem;
  padding: 2px 7px;
}

.rail-subitems .folder-item {
  font-size: 0.8rem;
  padding: 0.35rem 0.5rem;
}

/* ── end Rail sections ── */

.rail-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: inline-grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 0.72rem;
}

.rail-toggle {
  cursor: pointer;
}

.rail-toggle span {
  width: 28px;
  height: 2px;
  display: block;
  background: currentColor;
  box-shadow: 0 7px 0 currentColor, 0 -7px 0 currentColor;
}

.app-shell.rail-collapsed .rail-label {
  display: none;
}

.app-shell.rail-collapsed .rail-brand,
.app-shell.rail-collapsed .rail-nav a,
.app-shell.rail-collapsed .rail-toggle {
  justify-content: center;
  padding: 0;
}

.workspace {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 68px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto auto auto;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  padding: 0.75rem clamp(1rem, 2.2vw, 2rem);
  backdrop-filter: blur(14px);
}

.global-search {
  min-width: 0;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--surface);
}

.global-search span {
  width: 18px;
  height: 18px;
  margin-left: 0.85rem;
  border: 2px solid var(--muted);
  border-radius: 50%;
  position: relative;
}

.global-search span::after {
  content: "";
  position: absolute;
  right: -7px;
  bottom: -5px;
  width: 8px;
  height: 2px;
  background: var(--muted);
  transform: rotate(45deg);
}

.global-search input {
  width: 100%;
  min-height: 42px;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0 0.85rem;
}

.icon-action,
.account-chip,
.logout-chip,
.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 0 1.5rem;
  text-transform: uppercase;
  white-space: nowrap;
  border-radius: 0;
  transition: all 0.2s ease;
}

.button:hover {
  background: var(--paper);
  color: var(--ink);
}

html[data-theme="dark"] .account-chip,
html[data-theme="dark"] .button {
  color: var(--paper);
}

.yeja-theme-control {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 3px;
}

.yeja-theme-label,
.yeja-theme-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.yeja-theme-control button {
  min-height: 34px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  padding: 0 0.7rem;
  text-transform: uppercase;
}

.yeja-theme-control button:hover,
.yeja-theme-control button:focus-visible,
.yeja-theme-control button.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.button.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}

.button.secondary:hover {
  background: var(--ink);
  color: var(--paper);
}

.button.disabled,
.button:disabled {
  border-color: var(--line);
  background: var(--surface-alt);
  color: var(--muted);
  pointer-events: none;
}

.icon-action {
  width: 42px;
  padding: 0;
  background: transparent;
  color: var(--ink);
}

.logout-chip {
  background: transparent;
  color: var(--ink);
}

.icon-action span {
  width: 16px;
  height: 20px;
  border: 2px solid currentColor;
  border-radius: 10px 10px 6px 6px;
  position: relative;
}

.icon-action span::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 7px;
  height: 2px;
  background: currentColor;
  transform: translateX(-50%);
}

.app-main {
  min-height: calc(100vh - var(--topbar-height));
  padding: clamp(1rem, 2.2vw, 2rem);
}

/* Full-bleed layouts (My Studio, etc.) — no padding, fixed height */
.app-main.studio-mode {
  padding: 0;
  min-height: 0;
  height: calc(100vh - var(--topbar-height));
  overflow: hidden;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.eyebrow {
  margin: 0 0 0.45rem;
  color: var(--rust);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-family: "Unbounded", "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: clamp(2.2rem, 4vw, 4.6rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
}

h2 {
  margin-bottom: 0.75rem;
  font-family: "Unbounded", "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: clamp(1.7rem, 2.4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.05;
}

h3 {
  margin-bottom: 0.55rem;
  font-size: 1rem;
}

.lede {
  max-width: 54rem;
  color: var(--muted);
  font-size: 1rem;
}

.suite-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.front-hero {
  min-height: min(720px, calc(100vh - 116px));
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 0.72fr);
  align-items: stretch;
  gap: clamp(1rem, 3vw, 2rem);
  border-bottom: 1px solid var(--line);
  padding-bottom: clamp(1.5rem, 4vw, 3rem);
}

.front-copy {
  display: grid;
  align-content: center;
  justify-items: start;
  min-height: 460px;
}

.front-copy h1 {
  max-width: 13ch;
  font-size: clamp(3.2rem, 7vw, 7.6rem);
}

.front-copy .lede {
  max-width: 42rem;
  margin-top: 1rem;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
}

.front-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.4rem;
}

.front-artwork {
  position: relative;
  min-height: 520px;
  display: block;
  overflow: hidden;
  background: var(--charcoal);
}

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

.front-artwork span {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  display: grid;
  gap: 0.2rem;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  color: var(--ink);
  padding: 1rem;
}

.front-artwork strong,
.editorial-tile strong {
  display: block;
  font-family: "Unbounded", "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0;
  line-height: 1.05;
}

.front-categories {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-top: 0;
  background: var(--surface);
}

.front-categories a {
  min-height: 58px;
  display: grid;
  place-items: center;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.front-categories a:last-child {
  border-right: 0;
}

.front-categories a:hover {
  background: var(--charcoal);
  color: #fffdf8;
}

html[data-theme="dark"] .front-categories a:hover {
  background: var(--surface-alt);
  color: var(--ink);
}

.front-section {
  padding: clamp(2rem, 5vw, 4.5rem) 0 1rem;
}

.front-section h2 {
  max-width: 14ch;
  font-size: clamp(2rem, 4vw, 4.8rem);
}

.front-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 1rem;
}

.front-split .muted {
  max-width: 46rem;
}

.featured-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.featured-work {
  min-height: 390px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  background: var(--surface);
}

.featured-work img {
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: cover;
}

.featured-work div {
  padding: 1rem;
}

.featured-work:hover {
  background: var(--ink);
  color: var(--paper);
}

.featured-work:hover .muted {
  color: color-mix(in srgb, var(--paper) 76%, transparent);
}

.front-suite-grid {
  margin-top: 1rem;
}

.product-card {
  position: relative;
}

.product-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  min-width: 44px;
  min-height: 28px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--rust);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.editorial-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.72fr);
  grid-auto-rows: minmax(210px, auto);
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
  margin-top: clamp(2rem, 5vw, 4rem);
}

.editorial-tile {
  min-height: 240px;
  display: grid;
  align-items: end;
  background: var(--surface);
  color: var(--ink);
  overflow: hidden;
}

.editorial-tile.tall {
  grid-row: span 2;
}

.editorial-tile img {
  width: 100%;
  height: 100%;
  min-height: 500px;
  object-fit: cover;
}

.editorial-tile span {
  padding: 1.25rem;
}

.editorial-tile.tall span {
  background: var(--surface);
}

.editorial-tile.dark {
  background: #11110f;
  color: #fffdf8;
}

.suite-card,
.panel,
.metric,
.reward-card,
.rfp-row,
.influencer-card,
.event-card,
.gate-panel,
.feature-band article {
  background: var(--surface);
}

.suite-card {
  min-height: 220px;
  display: grid;
  align-content: space-between;
  gap: 1rem;
  padding: 1rem;
}

.suite-card p,
.metric span,
.muted {
  color: var(--muted);
}

.app-layout {
  display: grid;
  gap: 1rem;
}

.three-pane {
  grid-template-columns: 260px minmax(0, 1fr) 330px;
  align-items: stretch;
}

.two-pane {
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.55fr);
}

.panel {
  border: 1px solid var(--line);
  padding: 1rem;
}

.folder-list,
.tag-list,
.bid-ledger,
.calendar-list,
.rfp-list,
.kanban-column {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.folder-list li,
.tag-list li,
.calendar-list li,
.bid-ledger li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.asset-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}

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

.asset-table th {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.thumb {
  width: 54px;
  aspect-ratio: 1;
  background: var(--surface-alt);
  object-fit: cover;
}

.inspector-image,
.hero-media,
.video-pane {
  min-height: 280px;
  background: var(--surface-alt);
  overflow: hidden;
}

.inspector-image img,
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.field-stack {
  display: grid;
  gap: 0.8rem;
  margin: 1rem 0;
}

.field-stack label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.field-stack input,
.field-stack textarea,
.filter-row select {
  min-height: 40px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 0.6rem;
}

.gallery-filters,
.metrics-row,
.influencer-grid,
.events-row,
.reward-stack {
  display: grid;
  gap: 1rem;
}

.gallery-filters {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  position: sticky;
  top: 68px;
  z-index: 4;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 0.75rem;
}

.filter-row {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.masonry {
  columns: 4 220px;
  column-gap: 1rem;
}

.masonry figure {
  break-inside: avoid;
  margin: 0 0 1rem;
}

.masonry img {
  width: 100%;
  background: var(--surface-alt);
}

.masonry figcaption {
  padding-top: 0.4rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.modal-preview {
  display: grid;
  grid-template-columns: 3fr 1fr;
  min-height: 360px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.modal-art {
  background: var(--charcoal);
}

.modal-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-meta {
  padding: 1rem;
}

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

.metric {
  border: 1px solid var(--line);
  padding: 1rem;
}

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

.metric small {
  display: block;
  color: var(--rust);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sparkline {
  height: 38px;
  margin-top: 0.75rem;
  background: linear-gradient(135deg, transparent 45%, var(--blue) 46%, var(--blue) 51%, transparent 52%);
  background-size: 38px 38px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid var(--line);
  background: var(--line);
  gap: 1px;
}

.calendar-day {
  min-height: 132px;
  background: var(--surface);
  padding: 0.75rem;
}

.calendar-day strong {
  display: block;
  margin-bottom: 0.45rem;
}

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

.influencer-card,
.event-card,
.reward-card,
.rfp-row {
  border: 1px solid var(--line);
  padding: 1rem;
}

.auction-live {
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.6fr);
}

.video-pane {
  display: grid;
  place-items: center;
  color: #fffdf8;
  background: linear-gradient(135deg, #1f1f1d, #2f5f88);
}

.bid-terminal {
  background: #11110f;
  color: #fffdf8;
}

.countdown {
  font-size: clamp(2.8rem, 6vw, 6rem);
  font-weight: 800;
  line-height: 1;
}

.current-bid {
  color: #f4c177;
  font-size: 2rem;
  font-weight: 800;
}

.bid-ledger li {
  color: rgba(255, 253, 248, 0.74);
}

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

.rfp-board {
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
}

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

.kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.kanban-column {
  min-height: 360px;
  background: var(--surface);
  padding: 0.75rem;
}

.kanban-card {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 0.75rem;
}

.campaign-layout {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
}

.campaign-hero {
  background: var(--surface);
  border: 1px solid var(--line);
}

.campaign-copy {
  padding: 1rem;
}

.progress {
  height: 12px;
  overflow: hidden;
  background: var(--surface-alt);
}

.progress span {
  display: block;
  height: 100%;
  background: var(--olive);
}

.reward-stack {
  align-content: start;
}

.feature-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
  margin: 1rem 0;
}

.feature-band.tight {
  margin-top: 0;
}

.feature-band article {
  min-height: 150px;
  padding: 1rem;
}

.gate-panel {
  display: grid;
  gap: 0.65rem;
  border: 1px solid var(--line);
  margin: 1rem 0;
  padding: 1rem;
}

.gate-panel h3 {
  margin-bottom: 0;
}

.verified-inline {
  display: grid;
  gap: 0.15rem;
  border: 1px solid rgba(89, 107, 86, 0.45);
  background: rgba(89, 107, 86, 0.1);
  color: var(--olive);
  margin: 1rem 0;
  padding: 0.8rem;
}

.verified-inline span,
.verification-badge span {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.profile-hero,
.profile-grid,
.dashboard-section {
  margin-bottom: 1rem;
}

.profile-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 1rem;
  align-items: stretch;
}

.verification-badge {
  display: grid;
  align-content: center;
  gap: 0.3rem;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 1rem;
}

.verification-badge strong {
  font-family: "Unbounded", "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.05;
}

.verification-badge.is-verified {
  border-color: rgba(89, 107, 86, 0.45);
  background: rgba(89, 107, 86, 0.1);
  color: var(--olive);
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.7fr);
  gap: 1rem;
}

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

.field-grid label,
.check-row {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.field-grid input,
.field-grid select {
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 0.65rem;
}

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

.check-row {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 0.75rem;
  text-transform: none;
  letter-spacing: 0;
}

.check-row input {
  width: 18px;
  height: 18px;
  margin-top: 0.15rem;
  accent-color: var(--olive);
}

.check-row small {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-weight: 500;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.unlock-list,
.revenue-list,
.asset-performance {
  display: grid;
  gap: 0.65rem;
}

.unlock-list article,
.revenue-list div,
.asset-performance div {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 0.75rem;
}

.unlock-list article.unlocked {
  border-color: rgba(89, 107, 86, 0.45);
  background: rgba(89, 107, 86, 0.1);
}

.revenue-list div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.revenue-list span {
  color: var(--muted);
}

.asset-performance div {
  position: relative;
  padding-right: 4rem;
}

.asset-performance span {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--blue);
  font-weight: 800;
}

.dashboard-section {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 1rem;
}

@media (max-width: 1100px) {
  .suite-grid,
  .front-hero,
  .three-pane,
  .two-pane,
  .auction-live,
  .rfp-board,
  .campaign-layout,
  .profile-hero,
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .metrics-row,
  .front-categories,
  .featured-strip,
  .gallery-filters,
  .influencer-grid,
  .events-row,
  .kanban,
  .editorial-grid,
  .feature-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .front-artwork {
    min-height: 420px;
  }
}

@media (max-width: 760px) {
  .app-shell,
  .app-shell.rail-collapsed {
    grid-template-columns: 1fr;
  }

  .rail {
    position: relative;
    height: auto;
    display: block;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 0.85rem 1rem;
    overflow: hidden;
  }

  .rail-brand {
    margin-bottom: 0.6rem;
  }

  .rail-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
  }

  .rail-nav a,
  .rail-section-header {
    min-width: 0;
  }

  .rail-subitems,
  .rail-section.expanded .rail-subitems {
    display: none;
  }

  .rail-chevron {
    display: none;
  }

  .rail-toggle {
    display: none;
  }

  .topbar {
    grid-template-columns: 1fr;
    position: relative;
  }

  .global-search {
    width: 100%;
  }

  .icon-action,
  .account-chip,
  .logout-chip,
  .platform-theme-control {
    justify-self: start;
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .front-hero {
    min-height: auto;
    padding-bottom: 1.25rem;
  }

  .front-copy {
    min-height: auto;
  }

  .front-copy h1 {
    max-width: 11ch;
  }

  .front-artwork {
    min-height: 360px;
  }

  .front-split {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .metrics-row,
  .front-categories,
  .featured-strip,
  .gallery-filters,
  .influencer-grid,
  .events-row,
  .kanban,
  .editorial-grid,
  .feature-band,
  .field-grid,
  .checklist {
    grid-template-columns: 1fr;
  }

  .front-categories a {
    min-height: 48px;
  }

  .featured-work,
  .editorial-tile,
  .editorial-tile img {
    min-height: 300px;
  }
}

/* ── My Studio ──────────────────────────────────────────────────────────────── */

.studio-layout {
  display: grid;
  grid-template-columns: 1fr 0px;
  grid-template-rows: 1fr;
  height: 100%;
  overflow: hidden;
  transition: grid-template-columns 0.22s ease;
}
.studio-layout.detail-open {
  grid-template-columns: 1fr 340px;
}

/* Sidebar */
.studio-sidebar {
  border-right: 1px solid var(--line);
  overflow-y: auto;
  padding: 1.25rem 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.folder-tree {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.folder-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--ink);
  font-size: 0.825rem;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
}
.folder-item:hover      { background: var(--surface-alt); }
.folder-item.active     { background: var(--surface-alt); font-weight: 600; }
.folder-item span       { font-size: 0.75rem; color: var(--muted); }
.folder-add {
  margin-top: 4px;
  padding: 0.35rem 0.6rem;
  border: 1px dashed var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  width: 100%;
}
.folder-add:hover { border-color: var(--gold); color: var(--gold); }

.sidebar-section h4 {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.chip {
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 0.75rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.12s;
}
.chip:hover  { border-color: var(--ink); color: var(--ink); }
.chip.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 4px; }
.tag-chip {
  padding: 0.2rem 0.5rem;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 0.72rem;
  font-family: inherit;
  cursor: pointer;
}
.tag-chip span { opacity: 0.6; }
.tag-chip:hover { border-color: var(--gold); color: var(--gold); }

/* Center pane */
.studio-center {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.studio-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.studio-search-input {
  flex: 1;
  min-width: 0;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface-alt);
  color: var(--ink);
  font-size: 0.875rem;
  font-family: inherit;
}
.studio-search-input:focus { outline: none; border-color: var(--gold); }
.studio-toolbar select {
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.8rem;
  font-family: inherit;
  cursor: pointer;
}
.view-toggle { display: flex; gap: 2px; }
.view-toggle button {
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  border-radius: 5px;
  cursor: pointer;
}
.view-toggle button.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* Grid */
.studio-grid {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.875rem;
  align-content: start;
  position: relative;
}
.studio-grid.drag-over {
  outline: 2px dashed var(--gold);
  outline-offset: -4px;
  background: color-mix(in srgb, var(--gold) 5%, transparent);
}
.studio-grid.list-view {
  grid-template-columns: 1fr;
  gap: 0;
}

/* Artwork cards */
.artwork-card {
  border-radius: 0;
  border: 1px solid var(--line);
  overflow: hidden;
  cursor: pointer;
  background: var(--surface);
  transition: border-color 0.2s ease;
  position: relative;
}
.artwork-card:hover {
  border-color: var(--ink);
}
.artwork-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.09);
  transform: translateY(-1px);
}
.artwork-card.selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold);
}
.card-checkbox {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  width: 1.1rem;
  height: 1.1rem;
  z-index: 2;
  accent-color: var(--gold);
  cursor: pointer;
}
.card-badges {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}
.visibility-badge {
  font-size: 0.75rem;
  line-height: 1;
  opacity: 0.7;
  flex-shrink: 0;
}
.bulk-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--line);
  font-size: 0.85rem;
  flex-shrink: 0;
}
.bulk-bar.hidden { display: none; }
.bulk-bar #bulk-count { font-weight: 600; margin-right: 0.25rem; }
.card-thumb {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--surface-alt);
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.artwork-card-meta {
  padding: 0.5rem 0.625rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
}
.card-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.thumb-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  color: var(--muted);
  background: var(--surface-alt);
  aspect-ratio: 4/3;
}

/* List view */
.list-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 0.6rem 0;
}
.list-card:first-child { border-top: 1px solid var(--line); }
.list-thumb {
  width: 48px; height: 36px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface-alt);
}
.list-thumb img { width: 100%; height: 100%; object-fit: cover; }
.list-thumb .thumb-placeholder {
  width: 48px; height: 36px;
  font-size: 1rem;
  aspect-ratio: unset;
}
.list-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.list-meta strong { font-size: 0.85rem; }
.list-meta span   { font-size: 0.75rem; color: var(--muted); }
.list-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.list-right small { font-size: 0.72rem; color: var(--muted); }

/* Status chips */
.status-chip {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 600;
  padding: 0.13rem 0.45rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.status-draft   { background: var(--surface-alt); color: var(--muted); }
.status-ready   { background: #e8f5e9; color: #2e7d32; }
.status-minting { background: #fff8e1; color: #f57f17; }
.status-minted  { background: #fef8ec; color: var(--gold); }
.status-sold    { background: #ede7f6; color: #5c4fcf; }

/* Skeleton */
.studio-skeletons {
  display: contents;
}
.artwork-card.skeleton {
  animation: shimmer 1.4s ease infinite;
  background: linear-gradient(90deg, var(--line) 25%, var(--surface-alt) 50%, var(--line) 75%);
  background-size: 200% 100%;
  border: none;
  min-height: 160px;
  pointer-events: none;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Empty state */
.studio-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 4rem 2rem;
  color: var(--muted);
  text-align: center;
}

/* Detail panel */
.studio-detail {
  border-left: 1px solid var(--line);
  overflow-y: auto;
  padding: 1.25rem;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.detail-close {
  position: absolute;
  top: 0.875rem; right: 0.875rem;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  border-radius: 4px;
}
.detail-close:hover { background: var(--surface-alt); color: var(--ink); }

.detail-thumb {
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-alt);
  margin-bottom: 1rem;
}
.detail-thumb img { width: 100%; object-fit: contain; max-height: 220px; }
.detail-thumb-placeholder {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  color: var(--muted);
}

.detail-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1rem;
}
.detail-tab {
  padding: 0.45rem 0.75rem;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  font-family: inherit;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.detail-tab.active { color: var(--ink); border-bottom-color: var(--gold); font-weight: 600; }

.detail-tab-content {
  flex: 1;
  overflow-y: auto;
  padding-top: 0.5rem;
}

/* Detail panel header */
.detail-title {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.35rem;
  word-break: break-word;
}
.detail-header {
  margin-bottom: 0.75rem;
}
.detail-badges {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

/* Detail form */
#detail-form label,
#artwork-edit-form label,
#share-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
#detail-form input,
#detail-form select,
#detail-form textarea,
#artwork-edit-form input,
#artwork-edit-form select,
#artwork-edit-form textarea,
#share-form input,
#share-form select,
#share-form textarea {
  padding: 0.4rem 0.6rem;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.85rem;
  font-family: inherit;
}
#detail-form input:focus,
#detail-form textarea:focus,
#artwork-edit-form input:focus,
#artwork-edit-form textarea:focus,
#share-form input:focus { outline: none; border-color: var(--gold); }
#detail-form textarea,
#artwork-edit-form textarea { resize: vertical; min-height: 72px; }

.dim-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px;
}
.toggle-row {
  flex-direction: row !important;
  align-items: center;
  gap: 0.5rem !important;
}
.detail-actions,
.detail-actions-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}
.detail-file-info { margin: 0.5rem 0; }
.mint-section { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }

/* Share list */
.share-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}
.share-row strong { display: block; font-size: 0.825rem; }
.share-row small  { display: block; font-size: 0.72rem; color: var(--muted); }
.share-actions    { display: flex; gap: 4px; flex-shrink: 0; }

/* Activity log */
.activity-log {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.activity-log li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
}
.log-icon { font-size: 0.9rem; flex-shrink: 0; padding-top: 1px; }
.log-meta strong { display: block; font-size: 0.8rem; }
.log-meta small  { display: block; font-size: 0.72rem; color: var(--muted); }

/* Upload queue */
.upload-queue {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 300px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.875rem 1rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.queue-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  padding: 0.2rem 0;
}
.queue-item span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  padding-right: 0.5rem;
}
.qi-status { color: var(--muted); flex-shrink: 0; }

/* Toasts */
.studio-toast-container {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  z-index: 400;
  pointer-events: none;
}
.studio-toast {
  padding: 0.55rem 1.1rem;
  border-radius: 20px;
  font-size: 0.825rem;
  font-weight: 500;
  animation: toast-in 0.2s ease;
  pointer-events: none;
}
.studio-toast-success { background: var(--ink); color: var(--paper); }
.studio-toast-error   { background: #c0392b; color: #fff; }
.studio-toast-info    { background: var(--gold); color: #fff; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Mobile */
@media (max-width: 768px) {
  .studio-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
  }
  .studio-layout.detail-open {
    grid-template-columns: 1fr;
  }
  .rail-subitems.mobile-open {
    display: flex !important;
    position: fixed;
    inset-y: 0;
    left: 0;
    width: 260px;
    background: var(--surface);
    z-index: 200;
    box-shadow: 4px 0 24px rgba(0,0,0,0.12);
    overflow-y: auto;
    padding: 1.25rem 0.875rem;
    gap: 1.25rem;
    border-left: none;
    margin: 0;
  }
  .sidebar-toggle-btn { display: block !important; }
  .studio-detail {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 85vh;
    border-radius: 16px 16px 0 0;
    border-left: none;
    border-top: 1px solid var(--line);
    z-index: 200;
    background: var(--surface);
    box-shadow: 0 -8px 32px rgba(0,0,0,0.12);
  }
}

/* ── Section layout (shared by Gallery, Broadcast, Auctions, Commissions, Campaigns, Profile) ── */

.section-layout {
  display: grid;
  grid-template-columns: 1fr;
  height: 100%;
  overflow: hidden;
}
.section-layout.two-pane {
  grid-template-columns: 220px 1fr;
}

.section-sidebar {
  border-right: 1px solid var(--line);
  overflow-y: auto;
  padding: 1.25rem 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.section-center {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.section-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.section-title {
  font-size: 1rem;
  font-weight: 600;
  flex: 1;
}

/* ── Content grid (Gallery, Broadcast influencer cards) ── */

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  padding: 1.25rem;
  overflow-y: auto;
  align-content: start;
}
.content-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.content-card {
  border-radius: 8px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--surface);
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.12s;
}
.content-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.09);
  transform: translateY(-1px);
}
.content-card.flat {
  border-radius: 6px;
  cursor: default;
}
.content-card.flat:hover {
  transform: none;
  box-shadow: none;
}

.content-card .card-thumb {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--surface-alt);
}
.content-card .card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.card-overlay-badge {
  position: absolute;
  top: 0.5rem; right: 0.5rem;
  font-size: 0.62rem;
  font-weight: 600;
  padding: 0.13rem 0.45rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--surface);
}
.card-overlay-badge.status-available { background: #e8f5e9; color: #2e7d32; }
.card-overlay-badge.status-reserved  { background: #fff8e1; color: #f57f17; }
.card-overlay-badge.status-sold      { background: #ede7f6; color: #5c4fcf; }

.content-card-meta {
  padding: 0.6rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.card-sub {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-price {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--ink);
  margin-top: 2px;
}

/* ── Metrics strip (Broadcast) ── */

.metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.metric-tile {
  padding: 1rem 1.25rem;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.metric-tile:last-child { border-right: none; }
.metric-tile span  { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.metric-tile strong { font-size: 1.35rem; font-weight: 700; font-family: 'Unbounded', sans-serif; }
.metric-tile small  { font-size: 0.72rem; font-weight: 500; }
.trend-up   { color: #2e7d32; }
.trend-down { color: #c0392b; }

/* ── Queue list (Broadcast schedule) ── */

.queue-list {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 0 1.25rem;
}
.queue-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}
.queue-day {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  width: 48px;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.queue-body {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex-wrap: wrap;
}
.queue-type {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: var(--surface-alt);
  color: var(--muted);
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.queue-text {
  font-size: 0.85rem;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.queue-channel {
  font-size: 0.72rem;
  color: var(--muted);
  flex-shrink: 0;
}
.filter-chips.vertical {
  flex-direction: column;
  gap: 2px;
}
.filter-chips.vertical .chip {
  text-align: left;
  border-radius: 6px;
}

/* ── Auction live panel ── */

.auction-live-panel {
  display: grid;
  grid-template-columns: 1fr 280px;
  flex: 1;
  overflow: hidden;
}
.live-stage {
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #c0392b;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  border: 1px solid currentColor;
  width: fit-content;
  animation: pulse-badge 2s ease infinite;
}
@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.65; }
}
.live-artwork {
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-alt);
  max-height: 360px;
}
.live-artwork img {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  display: block;
}
.live-info { display: flex; flex-direction: column; gap: 0.4rem; }
.live-info h2 { margin: 0; font-size: 1.25rem; }
.live-timer {
  font-size: 2.5rem;
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0.25rem 0;
}
.current-bid {
  font-size: 1.75rem;
  font-weight: 700;
  font-family: 'Unbounded', sans-serif;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
}
.bid-ledger-panel {
  border-left: 1px solid var(--line);
  padding: 1.25rem;
  overflow-y: auto;
}
.bid-ledger-panel h4 {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.bid-ledger-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.bid-ledger-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
}
.bid-ledger-list li:first-child { background: color-mix(in srgb, var(--gold) 6%, transparent); border-radius: 4px; }
.bid-id { flex: 1; color: var(--muted); }
.bid-ledger-list strong { font-weight: 600; }
.bid-ledger-list small  { font-size: 0.7rem; color: var(--muted); flex-shrink: 0; }

/* ── RFP list (Public Art Commissions) ── */

.rfp-list-new {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 0 1.25rem 1.25rem;
}
.rfp-card {
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.12s;
}
.rfp-card:hover { background: var(--surface-alt); margin: 0 -1.25rem; padding: 0 1.25rem; }
.rfp-card-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 0;
}
.rfp-title {
  display: block;
  font-size: 0.925rem;
  font-weight: 600;
  margin-bottom: 3px;
}
.rfp-meta {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
}
.rfp-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.rfp-right strong { font-size: 0.925rem; font-weight: 600; }

/* ── Campaign list (Fundraisers) ── */

.campaign-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  padding: 0 1.25rem 1.25rem;
}
.campaign-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.campaign-card:hover .campaign-thumb img { transform: scale(1.04); }
.campaign-thumb {
  width: 80px;
  height: 60px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface-alt);
}
.campaign-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}
.campaign-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.campaign-progress { display: flex; flex-direction: column; gap: 4px; }
.progress-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--gold);
  transition: width 0.4s ease;
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--muted);
}
.progress-meta strong { color: var(--ink); }

/* ── Profile sidebar ── */

.profile-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.4rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.profile-identity strong { font-size: 0.925rem; font-weight: 600; }
.profile-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  flex-shrink: 0;
}
.unlock-list-small {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.unlock-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
  padding: 0.25rem 0;
}
.unlock-row.unlocked { color: var(--ink); }
.unlock-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line);
  flex-shrink: 0;
}
.unlock-row.unlocked .unlock-dot { background: var(--gold); }

/* ── Profile center panels ── */

.profile-panels {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 0;
  flex: 1;
  overflow: hidden;
}
.profile-form-card {
  border-right: 1px solid var(--line);
  overflow-y: auto;
  padding: 1.5rem;
}
.profile-form-card h3 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.profile-stats-card {
  overflow-y: auto;
  padding: 1.5rem;
}
.profile-stats-card h3 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.revenue-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.revenue-list div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.825rem;
}
.revenue-list div span  { color: var(--muted); }
.revenue-list div strong { font-weight: 600; }

/* ── Rail nav bottom pin ── */

.rail-nav-bottom {
  flex: 0 0 auto;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
}

/* ── Section layout mobile ── */

@media (max-width: 768px) {
  .section-layout.two-pane {
    grid-template-columns: 1fr;
  }
  .section-layout.two-pane .section-sidebar {
    display: none;
  }
  .auction-live-panel {
    grid-template-columns: 1fr;
  }
  .bid-ledger-panel {
    border-left: none;
    border-top: 1px solid var(--line);
  }
  .metrics-strip {
    grid-template-columns: 1fr 1fr;
  }
  .profile-panels {
    grid-template-columns: 1fr;
  }
  .profile-form-card {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .content-grid.cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Context menu ── */

.context-menu {
  position: fixed;
  z-index: 1000;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.14);
  padding: 0.25rem;
  min-width: 160px;
  animation: ctx-appear 80ms ease;
}

@keyframes ctx-appear {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

.ctx-header {
  padding: 0.4rem 0.75rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}

.ctx-item {
  display: block;
  width: 100%;
  background: none;
  border: none;
  border-radius: 5px;
  padding: 0.45rem 0.75rem;
  text-align: left;
  font-size: 0.875rem;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.1s;
}
.ctx-item:hover { background: var(--paper); }
.ctx-item.danger { color: #b33; }
.ctx-item.danger:hover { background: #fff0f0; }

.ctx-divider {
  height: 1px;
  background: var(--line);
  margin: 0.25rem 0;
}

/* ── Artwork card ⋯ button ── */

.artwork-card { position: relative; }

.card-menu-btn {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  background: rgba(255,255,255,.85);
  border: none;
  border-radius: 5px;
  padding: 0 0.4rem;
  font-size: 1rem;
  line-height: 1.6;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 2;
  backdrop-filter: blur(4px);
}
.artwork-card:hover .card-menu-btn,
.artwork-card.selected .card-menu-btn { opacity: 1; }

.list-card .card-menu-btn {
  position: static;
  opacity: 1;
  background: none;
  backdrop-filter: none;
}

/* ── Nested folders ── */

.folder-node { width: 100%; }

.folder-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 6px;
  padding-right: 0.25rem;
  transition: background 0.1s;
}
.folder-row:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.folder-row.active { background: color-mix(in srgb, var(--accent) 14%, transparent); }

.folder-chevron {
  background: none;
  border: none;
  font-size: 0.65rem;
  width: 1.2rem;
  flex-shrink: 0;
  cursor: pointer;
  color: var(--muted);
  padding: 0;
  line-height: 1;
}
.folder-chevron.invisible { visibility: hidden; pointer-events: none; }

.folder-name-btn {
  background: none;
  border: none;
  flex: 1;
  text-align: left;
  padding: 0.4rem 0.25rem;
  font-size: 0.875rem;
  cursor: pointer;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-count {
  font-size: 0.75rem;
  color: var(--muted);
  flex-shrink: 0;
}

.folder-rename,
.folder-delete-btn,
.folder-move-here {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  opacity: 0;
  padding: 0.2rem 0.3rem;
  border-radius: 4px;
  transition: opacity 0.1s, background 0.1s;
}
.folder-row:hover .folder-rename,
.folder-row:hover .folder-delete-btn,
.folder-row:hover .folder-move-here { opacity: 1; }
.folder-delete-btn:hover { background: #fff0f0; color: #b33; }
.folder-move-here { opacity: 1; color: var(--accent); font-weight: 600; }

.folder-children { width: 100%; }

/* ── Bulk bar select-all ── */

.bulk-select-all {
  display: flex;
  align-items: center;
  cursor: pointer;
}
.bulk-select-all input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--gold, var(--accent));
  cursor: pointer;
}

/* ── Lightbox theater preview ─────────────────────────────────────────────── */

.studio-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.93);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-canvas {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.6);
  user-select: none;
}

.lb-placeholder {
  width: 280px;
  height: 280px;
  background: #222;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  color: #666;
  user-select: none;
}

.lb-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  z-index: 1;
}
.lb-close:hover { background: rgba(255, 255, 255, 0.22); }

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  font-size: 1.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  z-index: 1;
}
.lb-nav:hover { background: rgba(255, 255, 255, 0.22); }
.lb-prev { left: 1rem; }
.lb-next { right: 1rem; }

.lb-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lb-title {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lb-counter {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.8rem;
  flex-shrink: 0;
}

.lb-details-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  padding: 0.3rem 0.75rem;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}
.lb-details-btn:hover { background: rgba(255, 255, 255, 0.25); }

/* ── Inline dialogs (replace browser prompt/confirm) ─────────────────────── */

.studio-dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.studio-dialog {
  background: var(--surface, #fff);
  border: 1px solid var(--line, #e0e0e0);
  border-radius: 10px;
  padding: 1.5rem;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.studio-dialog-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  margin: 0;
  line-height: 1.45;
}

.studio-dialog-input {
  width: 100%;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--line, #ddd);
  border-radius: 6px;
  font-size: 0.9rem;
  background: var(--surface);
  color: var(--ink);
  box-sizing: border-box;
}
.studio-dialog-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 20%, transparent);
}

.studio-dialog-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

/* ── Star button on artwork cards ────────────────────────────────────────── */

.card-star-btn {
  position: absolute;
  top: 0.4rem;
  left: 0.4rem;
  background: rgba(255, 255, 255, 0.85);
  border: none;
  border-radius: 50%;
  width: 1.6rem;
  height: 1.6rem;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s;
  z-index: 2;
  color: #bbb;
  line-height: 1;
}
.artwork-card:hover .card-star-btn,
.artwork-card.selected .card-star-btn { opacity: 1; }
.card-star-btn.starred { opacity: 1; color: #f5a623; background: rgba(255, 255, 255, 0.92); }
.card-star-btn:hover { background: rgba(255, 255, 255, 1); }

/* In list view, star is inline (not absolute) */
.list-card .card-star-btn {
  position: static;
  opacity: 1;
  background: none;
  backdrop-filter: none;
  font-size: 0.9rem;
  width: auto;
  height: auto;
  border-radius: 0;
  color: #ccc;
  padding: 0 0.2rem;
}
.list-card .card-star-btn.starred { color: #f5a623; }
.list-card:hover .card-star-btn { color: #aaa; }

/* ── Recents section in sidebar ───────────────────────────────────────────── */

#recents-list { display: flex; flex-direction: column; gap: 0.25rem; margin-top: 0.3rem; }

.recent-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.4rem;
  border: none;
  background: none;
  border-radius: 6px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background 0.12s;
}
.recent-item:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }

.recent-thumb {
  width: 2rem;
  height: 2rem;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.recent-thumb-placeholder {
  width: 2rem;
  height: 2rem;
  background: var(--line, #e0e0e0);
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}

.recent-label {
  font-size: 0.8rem;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── List view column headers ────────────────────────────────────────────── */

.list-header {
  display: flex;
  align-items: center;
  padding: 0 0.5rem;
  border-bottom: 1px solid var(--line, #e0e0e0);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 2;
  gap: 0.5rem;
}

.list-header .list-thumb { width: 2.5rem; flex-shrink: 0; }

.col-sort-btn {
  background: none;
  border: none;
  padding: 0.45rem 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 4px;
  transition: color 0.12s, background 0.12s;
  white-space: nowrap;
}
.col-sort-btn:hover { color: var(--ink); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.col-sort-btn.active { color: var(--ink); }

/* ── Feature: Folder colors ─────────────────────────────────────────────────── */
.folder-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
  flex-shrink: 0;
  vertical-align: middle;
}
.folder-color-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px 8px;
  background: var(--surface-alt, #f5f5f5);
  border-top: 1px solid var(--line, #e0e0e0);
  border-bottom: 1px solid var(--line, #e0e0e0);
}
.folder-color-swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: border-color 0.12s, transform 0.1s;
}
.folder-color-swatch:hover { transform: scale(1.2); border-color: var(--ink) !important; }

/* ── Feature: Search typeahead dropdown ─────────────────────────────────────── */
.search-wrap { position: relative; }
.search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 500;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  max-height: 320px;
  overflow-y: auto;
}
.search-result-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  width: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.search-result-item:hover { background: var(--surface-alt, #f5f5f5); }
.search-result-thumb {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  object-fit: cover;
  flex: 0 0 32px;
}
.search-result-placeholder {
  background: var(--surface-alt, #f5f5f5);
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 600;
}
.search-result-title {
  flex: 1;
  font-size: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Feature: Notes (artwork comments) ─────────────────────────────────────── */
.notes-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.note-item {
  background: var(--surface-alt, #f5f5f5);
  border-radius: 6px;
  padding: 8px 10px;
}
.note-body {
  font-size: 0.82rem;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}
.note-meta {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 4px;
  display: flex;
  align-items: center;
}

/* ── Feature: Pagination (load more) ───────────────────────────────────────── */
.load-more-row {
  display: flex;
  justify-content: center;
  padding: 1.5rem;
  grid-column: 1 / -1;
}

/* ── Feature: File requests panel ──────────────────────────────────────────── */
.requests-panel h2 { font-size: 1.1rem; font-weight: 700; }
.request-list { display: flex; flex-direction: column; gap: 10px; }
.request-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface-alt, #f5f5f5);
  border-radius: 8px;
  border: 1px solid var(--line, #e0e0e0);
}
.request-info { flex: 1; min-width: 0; }
.request-actions { display: flex; gap: 6px; flex-shrink: 0; align-items: center; }

/* ── Card hover overlay (eye / details) ── */
.card-thumb { position: relative; overflow: hidden; }
.card-hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  transition: opacity 0.15s;
}
.artwork-card:hover .card-hover-overlay,
.artwork-card:focus-within .card-hover-overlay { opacity: 1; }
.card-overlay-btn {
  background: rgba(255,255,255,0.92);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, transform 0.12s;
  flex-shrink: 0;
}
.card-overlay-btn:hover { background: #fff; transform: scale(1.1); }

/* ── Drag & drop ── */
.artwork-card.dragging { opacity: 0.4; cursor: grabbing; }
.folder-grid-item.drag-over,
.folder-row.drag-over { box-shadow: inset 0 0 0 2px var(--accent, #3b82f6); background: var(--surface-alt); border-radius: 6px; }

/* ── Folder thumbnail collage ── */
.folder-thumb-collage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.folder-thumb-collage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.folder-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 2.8rem;
  background: var(--surface-alt);
  color: var(--muted);
}
.folder-item-count {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.78em;
}

/* ── Uppy: hide persistent status bar outside modal ── */
#uppy-mount { position: fixed; inset: 0; pointer-events: none; z-index: 9999; }
#uppy-mount .uppy-Dashboard-overlay,
#uppy-mount .uppy-Dashboard { pointer-events: auto; }
#uppy-mount .uppy-StatusBar:not([class*="isUploading"]):not([class*="isComplete"]) { display: none; }

/* ── Social Layout ── */
.social-layout { display: flex; flex-direction: column; height: 100%; overflow: hidden; }
.social-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1.25rem; border-bottom: 1px solid var(--line); flex-shrink: 0; gap: 1rem; }
.social-tabs { display: flex; gap: 2px; background: var(--surface-alt); border-radius: 8px; padding: 3px; }
.social-tab { padding: 6px 14px; border: none; background: transparent; border-radius: 6px; font-size: 0.8rem; font-weight: 600; cursor: pointer; color: var(--muted); transition: background 0.12s, color 0.12s; }
.social-tab.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.social-content { flex: 1; overflow-y: auto; padding: 1.25rem; }

/* ── Queue ── */
.social-queue { display: flex; flex-direction: column; gap: 1.5rem; max-width: 680px; margin: 0 auto; }
.queue-date-group { display: flex; flex-direction: column; gap: 8px; }
.queue-date-label { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin: 0 0 4px; }
.social-post-card { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; transition: box-shadow 0.12s; }
.social-post-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.07); }
.post-card-channel { flex-shrink: 0; }
.channel-icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; font-size: 0.7rem; font-weight: 800; color: #fff; }
.channel-icon.instagram { background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.channel-icon.tiktok { background: #000; }
.channel-icon.x { background: #000; }
.channel-icon.linkedin { background: #0a66c2; }
.channel-icon.pinterest { background: #e60023; }
.channel-icon.youtube { background: #ff0000; }
.channel-icon.threads { background: #000; }
.post-card-body { flex: 1; min-width: 0; }
.post-card-text { font-size: 0.85rem; color: var(--ink); margin: 0 0 6px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.post-card-meta { display: flex; gap: 8px; align-items: center; }
.post-card-time { font-size: 0.75rem; color: var(--muted); }
.post-card-actions { display: flex; gap: 6px; flex-shrink: 0; opacity: 0; transition: opacity 0.12s; }
.social-post-card:hover .post-card-actions { opacity: 1; }
.post-action-btn { font-size: 0.72rem; padding: 4px 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); cursor: pointer; color: var(--ink); }
.post-action-btn:hover { background: var(--surface-alt); }
.social-empty { text-align: center; padding: 4rem 2rem; color: var(--muted); }
.social-empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.social-empty h3 { margin: 0 0 0.5rem; color: var(--ink); }
.social-empty p { font-size: 0.85rem; margin: 0 0 1.25rem; }

/* ── Calendar ── */
.social-calendar { max-width: 900px; margin: 0 auto; }
.calendar-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.calendar-header h3 { flex: 1; text-align: center; margin: 0; font-size: 1rem; }
.calendar-header button { background: var(--surface-alt); border: 1px solid var(--line); border-radius: 6px; width: 32px; height: 32px; cursor: pointer; font-size: 1.1rem; color: var(--ink); }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.cal-day-header { padding: 8px; text-align: center; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); background: var(--surface-alt); border-bottom: 1px solid var(--line); }
.cal-cell { min-height: 96px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); position: relative; cursor: pointer; background: var(--surface); transition: background 0.1s; }
.cal-cell:hover { background: var(--surface-alt); }
.cal-cell:nth-child(7n) { border-right: none; }
.cal-cell.other-month { background: var(--surface-alt); opacity: 0.5; }
.cal-cell.today .cal-day-num { background: var(--accent, #3b82f6); color: #fff; border-radius: 50%; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; }
.cal-day-num { font-size: 0.75rem; font-weight: 600; color: var(--muted); margin-bottom: 4px; display: inline-block; }
.cal-posts { display: flex; flex-direction: column; gap: 2px; }
.cal-post-chip { font-size: 0.62rem; padding: 2px 5px; border-radius: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.cal-post-chip.status-scheduled { background: #dbeafe; color: #1d4ed8; }
.cal-post-chip.status-draft { background: var(--surface-alt); color: var(--muted); }
.cal-post-chip.status-published { background: #dcfce7; color: #15803d; }
.cal-add-btn { position: absolute; bottom: 4px; right: 4px; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 0.7rem; cursor: pointer; opacity: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.cal-cell:hover .cal-add-btn { opacity: 1; }

/* ── Channels ── */
.channels-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; max-width: 800px; }
.channel-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px; display: flex; align-items: center; gap: 12px; }
.channel-card-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 800; color: #fff; flex-shrink: 0; }
.instagram-bg { background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.tiktok-bg { background: #000; }
.x-bg { background: #000; }
.linkedin-bg { background: #0a66c2; }
.pinterest-bg { background: #e60023; }
.youtube-bg { background: #ff0000; }
.threads-bg { background: #000; }
.channel-card-info { flex: 1; min-width: 0; }
.channel-card-info strong { display: block; font-size: 0.85rem; }
.channel-status { font-size: 0.72rem; }
.channel-status.connected { color: #16a34a; }
.channel-status.disconnected { color: var(--muted); }

/* ── Analytics shell ── */
.analytics-shell { max-width: 900px; margin: 0 auto; }
.analytics-kpi-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 2rem; }
.kpi-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 1.25rem; }
.kpi-label { display: block; font-size: 0.75rem; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.kpi-value { display: block; font-size: 1.8rem; font-weight: 800; }
.analytics-empty-notice { background: var(--surface-alt); border-radius: 8px; padding: 1.5rem; text-align: center; margin-bottom: 2rem; }
.post-performance-table { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 1.25rem; }
.post-performance-table h4 { margin: 0 0 1rem; }
.table-empty { color: var(--muted); font-size: 0.85rem; }

/* ── Composer ── */
.social-composer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 800; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.social-composer { background: var(--surface); border-radius: 14px; width: 100%; max-width: 600px; max-height: 90vh; overflow-y: auto; display: flex; flex-direction: column; }
.composer-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.composer-header h3 { margin: 0; font-size: 1rem; }
.composer-close { background: none; border: none; font-size: 1.1rem; cursor: pointer; color: var(--muted); padding: 4px 8px; border-radius: 4px; }
.composer-close:hover { background: var(--surface-alt); color: var(--ink); }
.composer-channels { padding: 0.75rem 1.25rem; border-bottom: 1px solid var(--line); }
.channel-bubble-row { display: flex; gap: 8px; flex-wrap: wrap; }
.channel-bubble { position: relative; cursor: pointer; }
.channel-bubble-icon { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.65rem; font-weight: 800; color: #fff; border: 2px solid transparent; transition: border-color 0.12s; }
.channel-bubble.active .channel-bubble-icon { border-color: #3b82f6; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px #3b82f6; }
.channel-bubble-check { position: absolute; bottom: -2px; right: -2px; width: 14px; height: 14px; background: #3b82f6; border-radius: 50%; color: #fff; font-size: 0.5rem; display: none; align-items: center; justify-content: center; border: 1.5px solid var(--surface); }
.channel-bubble.active .channel-bubble-check { display: flex; }
.composer-no-channels { font-size: 0.82rem; color: var(--muted); margin: 0; }
.composer-body { padding: 0.75rem 1.25rem; }
.composer-body textarea { width: 100%; resize: vertical; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 0.88rem; font-family: inherit; background: var(--surface); color: var(--ink); min-height: 120px; box-sizing: border-box; }
.composer-body textarea:focus { outline: none; border-color: #3b82f6; }
.composer-char-counter { text-align: right; font-size: 0.72rem; color: var(--muted); margin-top: 4px; }
.composer-char-counter.over-limit { color: #ef4444; }
.composer-assets { padding: 0.75rem 1.25rem; border-top: 1px solid var(--line); }
.composer-media-grid { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.composer-media-thumb { width: 72px; height: 72px; border-radius: 6px; object-fit: cover; }
.composer-asset-actions { display: flex; gap: 8px; }
.studio-asset-picker { border-top: 1px solid var(--line); padding: 0.75rem 1.25rem; }
.asset-picker-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.asset-picker-header h4 { margin: 0; font-size: 0.85rem; }
.asset-picker-header button { background: none; border: none; cursor: pointer; color: var(--muted); font-size: 1rem; }
.asset-picker-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; max-height: 200px; overflow-y: auto; }
.asset-picker-thumb { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; cursor: pointer; border: 2px solid transparent; transition: border-color 0.12s; }
.asset-picker-thumb.selected { border-color: #3b82f6; }
.composer-footer { padding: 0.75rem 1.25rem; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 12px; flex-shrink: 0; background: var(--surface); border-radius: 0 0 14px 14px; }
.composer-schedule-area { display: flex; align-items: center; gap: 8px; flex: 1; font-size: 0.78rem; color: var(--muted); }
.composer-schedule-area input[type=datetime-local] { height: 30px; padding: 0 6px; font-size: 0.75rem; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--ink); }
.composer-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ── Fundraisers ───────────────────────────────────────────────── */

.fr-shell { display: flex; flex-direction: column; height: 100%; }

.fr-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 52px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}

.fr-tabs { display: flex; gap: 4px; }
.fr-tab {
  padding: 6px 16px; border-radius: 20px; border: none; background: none;
  font-size: 0.85rem; color: var(--muted); cursor: pointer; transition: all 0.15s;
}
.fr-tab.active { background: var(--accent); color: #fff; }
.fr-tab:not(.active):hover { background: var(--surface); color: var(--ink); }

.fr-content { flex: 1; overflow-y: auto; padding: 24px; }

.fr-section-title { font-size: 0.75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; }
.fr-section-h { font-size: 1rem; font-weight: 600; margin: 0 0 16px; }

.fr-empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 80px 24px; text-align: center; gap: 12px;
}
.fr-empty-icon { font-size: 48px; line-height: 1; }
.fr-empty h3 { font-size: 1.1rem; font-weight: 600; margin: 0; }
.fr-empty p { color: var(--muted); font-size: 0.9rem; margin: 0; }
.fr-empty-inline { color: var(--muted); font-size: 0.9rem; padding: 16px 0; }
.fr-muted { color: var(--muted); }

/* Status badges */
.fr-card-badge {
  display: inline-flex; padding: 2px 8px; border-radius: 4px;
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
}
.fr-s-draft    { background: var(--surface); color: var(--muted); }
.fr-s-preview  { background: #fef9c3; color: #854d0e; }
.fr-s-live     { background: #dcfce7; color: #166534; }
.fr-s-funded   { background: #dbeafe; color: #1e40af; }
.fr-s-closed   { background: var(--surface); color: var(--muted); }
.fr-s-cancelled{ background: #fee2e2; color: #991b1b; }

/* Campaign cards grid */
.fr-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px;
}
.fr-card {
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  background: var(--card); cursor: pointer; transition: box-shadow 0.15s;
}
.fr-card:hover { box-shadow: 0 4px 16px var(--shadow); }
.fr-card-img { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--surface); }
.fr-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fr-card-img-placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, var(--surface), var(--border)); }
.fr-card-img .fr-card-badge { position: absolute; top: 8px; left: 8px; }
.fr-card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.fr-card-title { font-size: 0.95rem; font-weight: 600; line-height: 1.3; }
.fr-card-sub { font-size: 0.82rem; color: var(--muted); }
.fr-card-meta { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--muted); }

/* Progress bar */
.fr-progress-wrap { display: flex; flex-direction: column; gap: 4px; }
.fr-progress-wrap.large { gap: 8px; }
.fr-progress-bar {
  height: 6px; background: var(--border); border-radius: 3px; overflow: hidden;
}
.fr-progress-bar.small { height: 4px; }
.fr-progress-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.6s ease; }
.fr-progress-stats { display: flex; justify-content: space-between; font-size: 0.78rem; }
.fr-raised { font-weight: 700; color: var(--ink); }
.fr-pct { color: var(--muted); }

/* Campaign detail */
.fr-back-btn {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 0.85rem; padding: 0; margin-bottom: 16px; display: inline-flex; align-items: center; gap: 4px;
}
.fr-back-btn:hover { color: var(--ink); }

.fr-detail-inner {
  display: grid; grid-template-columns: 1fr 360px; gap: 40px; align-items: start;
}
@media (max-width: 900px) { .fr-detail-inner { grid-template-columns: 1fr; } }

.fr-detail-left { display: flex; flex-direction: column; gap: 20px; }
.fr-hero { border-radius: 10px; overflow: hidden; background: var(--surface); }
.fr-hero-img { width: 100%; display: block; max-height: 420px; object-fit: cover; }
.fr-hero-placeholder { width: 100%; height: 300px; background: linear-gradient(135deg, var(--surface), var(--border)); }

/* Tabs nav */
.fr-tabs-nav { display: flex; gap: 0; border-bottom: 2px solid var(--border); }
.fr-detail-tab {
  background: none; border: none; padding: 10px 16px; font-size: 0.85rem;
  cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: all 0.15s;
}
.fr-detail-tab.active { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }

.fr-tab-panel { padding-top: 20px; }
.fr-story-canvas { font-size: 0.95rem; line-height: 1.7; color: var(--ink); }
.fr-story-canvas img { max-width: 100%; border-radius: 8px; }
.fr-story-canvas h2 { font-size: 1.2rem; margin-top: 24px; }
.fr-story-canvas p { margin-bottom: 12px; }

/* Stretch goals */
.fr-stretch-goals { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.fr-stretch-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); opacity: 0.6;
}
.fr-stretch-item.unlocked { opacity: 1; border-color: var(--accent); background: var(--card); }
.fr-stretch-icon { font-size: 20px; flex-shrink: 0; }
.fr-stretch-body { flex: 1; }
.fr-stretch-title { font-weight: 600; font-size: 0.9rem; }
.fr-stretch-desc { font-size: 0.82rem; color: var(--muted); margin-top: 2px; }
.fr-stretch-threshold { font-size: 0.78rem; color: var(--accent); font-weight: 600; margin-top: 4px; }

/* Updates */
.fr-update { padding: 16px 0; border-bottom: 1px solid var(--border); }
.fr-update:last-child { border-bottom: none; }
.fr-backer-only-badge {
  display: inline-block; background: #fef9c3; color: #854d0e;
  font-size: 0.7rem; font-weight: 700; padding: 2px 8px; border-radius: 4px; margin-bottom: 6px;
}
.fr-update-title { font-size: 0.95rem; font-weight: 600; margin-bottom: 4px; }
.fr-update-date { font-size: 0.78rem; color: var(--muted); margin-bottom: 8px; }
.fr-update-body { font-size: 0.9rem; line-height: 1.6; color: var(--muted); }

/* Funding console */
.fr-detail-right { display: flex; flex-direction: column; gap: 24px; }
.fr-console {
  border: 1px solid var(--border); border-radius: 12px; padding: 24px;
  background: var(--card); display: flex; flex-direction: column; gap: 16px;
  position: sticky; top: 16px;
}
.fr-console-title { font-size: 1.1rem; font-weight: 700; margin: 0; }
.fr-console-subtitle { font-size: 0.85rem; color: var(--muted); margin: 0; }

.fr-console-stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
.fr-stat { text-align: center; padding: 10px; background: var(--surface); border-radius: 8px; }
.fr-stat-val { font-size: 1.15rem; font-weight: 700; }
.fr-stat-label { font-size: 0.72rem; color: var(--muted); margin-top: 2px; }

.fr-back-project-btn { width: 100%; font-size: 0.95rem; padding: 12px; }
.fr-closed-notice {
  text-align: center; padding: 10px; background: var(--surface);
  border-radius: 8px; font-size: 0.9rem; color: var(--muted);
}

/* Perks */
.fr-perks-section { display: flex; flex-direction: column; gap: 12px; }
.fr-perks-list { display: flex; flex-direction: column; gap: 12px; }
.fr-perk-card {
  border: 1px solid var(--border); border-radius: 10px; padding: 16px;
  background: var(--card); cursor: pointer; transition: all 0.15s;
  display: flex; flex-direction: column; gap: 8px;
}
.fr-perk-card:hover { border-color: var(--accent); }
.fr-perk-card.selected { border-color: var(--accent); border-width: 2px; }
.fr-perk-card.full { opacity: 0.5; cursor: default; }
.fr-perk-img { width: 100%; border-radius: 6px; object-fit: cover; max-height: 120px; }
.fr-perk-price { font-size: 1.1rem; font-weight: 700; }
.fr-perk-title { font-size: 0.9rem; font-weight: 600; }
.fr-perk-desc { font-size: 0.82rem; color: var(--muted); line-height: 1.4; }
.fr-perk-meta { display: flex; flex-direction: column; gap: 2px; font-size: 0.75rem; color: var(--muted); }

/* Dashboard */
.fr-dashboard-list { display: flex; flex-direction: column; gap: 12px; }
.fr-dash-row {
  display: flex; gap: 14px; align-items: center;
  padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--card);
}
.fr-dash-thumb { width: 64px; height: 48px; flex-shrink: 0; border-radius: 6px; overflow: hidden; background: var(--surface); }
.fr-dash-thumb img { width: 100%; height: 100%; object-fit: cover; }
.fr-dash-thumb-ph { width: 100%; height: 100%; background: var(--border); }
.fr-dash-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.fr-dash-title { font-size: 0.9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fr-dash-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 0.78rem; color: var(--muted); }
.fr-dash-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* Pledge modal */
.fr-pledge-modal {
  position: fixed; inset: 0; background: #0008; z-index: 900;
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.fr-pledge-modal[hidden] { display: none !important; }
.fr-pledge-inner {
  background: var(--card); border-radius: 16px; padding: 0;
  max-width: 520px; width: 100%; max-height: 85vh; overflow-y: auto;
  display: flex; flex-direction: column;
}
.fr-pledge-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.fr-pledge-header h3 { margin: 0; font-size: 1rem; }
.fr-pledge-close {
  background: none; border: none; font-size: 20px; cursor: pointer;
  color: var(--muted); line-height: 1; padding: 0;
}
#fr-pledge-body { padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.fr-pledge-hint { font-size: 0.85rem; color: var(--muted); margin: 0; }

.fr-pledge-perks { display: flex; flex-direction: column; gap: 8px; }
.fr-mini-perk {
  padding: 12px; border: 1px solid var(--border); border-radius: 8px;
  cursor: pointer; transition: all 0.15s;
}
.fr-mini-perk:hover:not(.full) { border-color: var(--accent); }
.fr-mini-perk.selected { border-color: var(--accent); border-width: 2px; background: var(--surface); }
.fr-mini-perk.full { opacity: 0.5; cursor: default; }
.fr-mini-perk-price { font-size: 0.95rem; font-weight: 700; }
.fr-mini-perk-title { font-size: 0.82rem; color: var(--muted); }
.fr-mini-perk-full { font-size: 0.75rem; color: #dc2626; margin-top: 2px; }

.fr-pledge-amount-row { display: flex; flex-direction: column; gap: 6px; }
.fr-pledge-amount-row label { font-size: 0.82rem; color: var(--muted); }
.fr-pledge-input-wrap { display: flex; align-items: center; gap: 8px; }
.fr-pledge-currency { font-size: 1.1rem; font-weight: 600; }
.fr-pledge-amount-input {
  flex: 1; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg); color: var(--ink); font-size: 1rem;
}
.fr-pledge-amount-input:focus { outline: none; border-color: var(--accent); }

.fr-addons-grid { display: flex; flex-direction: column; gap: 8px; }
.fr-addon-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--card);
}
.fr-addon-card.selected { border-color: var(--accent); }
.fr-addon-price { font-size: 0.95rem; font-weight: 700; flex-shrink: 0; }
.fr-addon-title { font-size: 0.85rem; font-weight: 500; }
.fr-addon-desc { font-size: 0.75rem; color: var(--muted); }

.fr-shipping-form { display: flex; flex-direction: column; gap: 12px; }
.fr-field { display: flex; flex-direction: column; gap: 6px; }
.fr-field label { font-size: 0.82rem; color: var(--muted); }
.fr-select {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg); color: var(--ink); font-size: 0.9rem;
}
.fr-shipping-est { font-size: 0.9rem; color: var(--muted); }

.fr-confirm-summary { display: flex; flex-direction: column; gap: 0; background: var(--surface); border-radius: 8px; overflow: hidden; }
.fr-confirm-row {
  display: flex; justify-content: space-between; padding: 10px 14px;
  font-size: 0.9rem; border-bottom: 1px solid var(--border);
}
.fr-confirm-row:last-child { border-bottom: none; }
.fr-confirm-row.total { font-weight: 700; font-size: 1rem; }
.fr-confirm-note { font-size: 0.8rem; color: var(--muted); margin: 0; }

.fr-pledge-next-btn { width: 100%; }

/* Campaign builder */
.fr-builder { max-width: 680px; }
.fr-builder-header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.fr-builder-header h2 { margin: 0; font-size: 1.2rem; font-weight: 700; }

.fr-phases {
  display: flex; align-items: center; gap: 0; margin-bottom: 32px;
  padding: 16px; background: var(--surface); border-radius: 10px; overflow-x: auto;
}
.fr-phase { display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0; }
.fr-phase-dot {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--border); background: var(--bg);
  transition: all 0.15s;
}
.fr-phase.active .fr-phase-dot { background: var(--accent); border-color: var(--accent); }
.fr-phase.done .fr-phase-dot { background: var(--accent); border-color: var(--accent); opacity: 0.5; }
.fr-phase-label { font-size: 0.72rem; color: var(--muted); white-space: nowrap; }
.fr-phase.active .fr-phase-label { color: var(--ink); font-weight: 600; }
.fr-phase-line { flex: 1; height: 2px; background: var(--border); min-width: 20px; }

.fr-builder-section { margin-bottom: 28px; }
.fr-builder-section h3 { font-size: 0.9rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin: 0 0 16px; }
.fr-builder-form { display: flex; flex-direction: column; gap: 0; }
.fr-input {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg); color: var(--ink); font-size: 0.9rem; width: 100%; box-sizing: border-box;
}
.fr-input:focus { outline: none; border-color: var(--accent); }
.fr-textarea {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg); color: var(--ink); font-size: 0.9rem;
  width: 100%; box-sizing: border-box; resize: vertical; font-family: inherit;
}
.fr-textarea:focus { outline: none; border-color: var(--accent); }
.fr-builder-actions { display: flex; gap: 10px; padding-top: 8px; }
/* ════════════════════════════════════════════════════════════════════════════════ */
/* ─────────────────── COMMON ROOM: Reddit-Style Community ──────────────────────── */
/* ════════════════════════════════════════════════════════════════════════════════ */

.cr-shell { display: flex; flex-direction: column; height: 100vh; }
.cr-topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 24px; background: var(--bg); border-bottom: 1px solid var(--border);
  gap: 20px;
}
.cr-brand { display: flex; align-items: center; }
.cr-logo {
  font-weight: 700; font-size: 0.95rem; line-height: 1.1; color: var(--ink);
  text-align: left;
}
.cr-logo span { display: block; font-size: 0.65rem; color: var(--muted); margin-top: 2px; }
.cr-sort select {
  padding: 6px 10px; border: 1px solid var(--border); border-radius: 4px;
  background: var(--bg); color: var(--ink); font-size: 0.85rem; cursor: pointer;
}
.cr-sort select:focus { outline: none; border-color: var(--accent); }

.cr-body { display: flex; flex: 1; overflow: hidden; gap: 0; }
.cr-main { flex: 1; display: flex; flex-direction: column; overflow-y: auto; border-right: 1px solid var(--border); }
.cr-featured {
  padding: 20px 24px; border-bottom: 1px solid var(--border); background: var(--bg-alt);
}
.cr-featured h3 { margin: 0 0 12px; font-size: 0.75rem; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.cr-featured-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.cr-featured-item {
  padding: 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; font-size: 0.85rem;
}
.cr-featured-label { font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.cr-featured-item p { margin: 4px 0; color: var(--muted); font-size: 0.75rem; }
.cr-featured-item .button { font-size: 0.7rem; padding: 4px 8px; margin-top: 8px; }

.cr-feed { flex: 1; overflow-y: auto; padding: 20px 24px; }
.cr-composer {
  margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border);
}
.cr-compose-trigger {
  width: 100%; padding: 12px 16px; text-align: left; background: var(--bg-alt);
  border: 1px solid var(--border); border-radius: 20px; color: var(--muted); cursor: pointer;
  font-size: 0.9rem; transition: all 0.2s;
}
.cr-compose-trigger:hover { background: var(--border); }

.cr-thread-card {
  display: flex; gap: 12px; margin-bottom: 16px; padding: 12px; background: var(--bg);
  border: 1px solid var(--border); border-radius: 6px; transition: all 0.2s;
}
.cr-thread-card:hover { background: var(--bg-alt); border-color: var(--accent); }

.cr-vote-bar {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0;
  min-width: 40px;
}
.cr-vote {
  background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1.2rem;
  padding: 2px 4px; transition: color 0.2s;
}
.cr-vote:hover { color: var(--accent); }
.cr-vote.active { color: var(--accent); }
.cr-upvote.active { color: #FF4500; }
.cr-downvote.active { color: #818E8E; }
.cr-score { font-size: 0.85rem; font-weight: 600; color: var(--ink); }
.cr-score.upvoted { color: #FF4500; }
.cr-score.downvoted { color: #818E8E; }

.cr-thread-content { flex: 1; }
.cr-community-link {
  font-size: 0.75rem; color: var(--muted); text-decoration: none; font-weight: 600;
  transition: color 0.2s;
}
.cr-community-link:hover { color: var(--accent); }
.cr-thread-title {
  margin: 6px 0; font-size: 0.95rem; font-weight: 600; color: var(--ink); line-height: 1.3;
}
.cr-thread-title a { color: var(--ink); text-decoration: none; transition: color 0.2s; }
.cr-thread-title a:hover { color: var(--accent); }
.cr-thread-image { width: 100%; max-height: 180px; border-radius: 6px; margin: 8px 0; object-fit: cover; }
.cr-thread-meta { margin: 8px 0 0; font-size: 0.75rem; color: var(--muted); }
.cr-reply-count { margin-left: 8px; }

.cr-empty {
  text-align: center; padding: 40px 20px; color: var(--muted); font-size: 0.9rem;
}

.cr-sidebar {
  width: 280px; background: var(--bg-alt); border-left: 1px solid var(--border);
  display: flex; flex-direction: column; overflow-y: auto;
}
.cr-sidebar > * { padding: 0 16px; }
.cr-communities, .cr-news {
  border-bottom: 1px solid var(--border); padding: 16px !important;
}
.cr-communities h4, .cr-news h4 {
  margin: 0 0 12px; font-size: 0.75rem; text-transform: uppercase; color: var(--muted);
  font-weight: 600; letter-spacing: 0.5px;
}
.cr-community-list { display: flex; flex-direction: column; gap: 4px; }
.cr-community-item {
  padding: 8px 10px; border-radius: 4px; text-decoration: none; color: var(--ink);
  font-size: 0.85rem; transition: all 0.2s; border-left: 3px solid transparent;
}
.cr-community-item:hover { background: var(--bg); color: var(--accent); }
.cr-community-item.active { background: var(--accent-light); color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
.cr-comm-name { display: block; font-weight: 600; }
.cr-comm-title { display: block; font-size: 0.75rem; color: var(--muted); }

.cr-news-item {
  padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 0.8rem;
}
.cr-news-item:last-child { border-bottom: none; }
.cr-news-title { color: var(--ink); font-weight: 500; margin-bottom: 4px; cursor: pointer; transition: color 0.2s; }
.cr-news-title:hover { color: var(--accent); }
.cr-news-time { color: var(--muted); font-size: 0.7rem; }

.cr-thread-detail {
  padding: 20px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  margin-bottom: 20px;
}
.cr-back-btn { color: var(--accent); text-decoration: none; font-size: 0.9rem; margin-bottom: 16px; display: inline-block; }
.cr-back-btn:hover { text-decoration: underline; }
.cr-thread-header { margin-bottom: 16px; }
.cr-thread-header h2 { margin: 0 0 8px; font-size: 1.2rem; color: var(--ink); }
.cr-thread-main { margin-bottom: 24px; }
.cr-thread-full-image { width: 100%; max-height: 400px; border-radius: 6px; margin-bottom: 16px; object-fit: cover; }
.cr-thread-body { margin: 16px 0; line-height: 1.6; color: var(--ink); }
.cr-thread-stats { margin: 16px 0; font-size: 0.9rem; color: var(--muted); }
.cr-replies { border-top: 1px solid var(--border); padding-top: 16px; }
.cr-replies h3 { margin: 0 0 16px; font-size: 0.95rem; }

/* ──────────────────── COMMON ROOM: Thread Composer & Replies ──────────────────── */

.cr-composer-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: flex;
  align-items: center; justify-content: center; z-index: 1000; padding: 20px;
}
.cr-composer-overlay[hidden] { display: none !important; }

.cr-composer-modal {
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  width: 100%; max-width: 500px; box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.cr-composer-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.cr-composer-header h2 { margin: 0; font-size: 1.1rem; }
.cr-composer-close {
  background: none; border: none; font-size: 1.2rem; cursor: pointer;
  color: var(--muted); transition: color 0.2s;
}
.cr-composer-close:hover { color: var(--ink); }

.cr-composer-body {
  padding: 20px; display: flex; flex-direction: column; gap: 12px;
}

.cr-community-select {
  display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem;
}
.cr-community-select label { font-weight: 600; color: var(--ink); }
.cr-community-select select {
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 4px;
  background: var(--bg); color: var(--ink); cursor: pointer;
}

.cr-composer-input {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 4px;
  background: var(--bg); color: var(--ink); font-size: 0.95rem; font-weight: 600;
}
.cr-composer-input:focus { outline: none; border-color: var(--accent); }

.cr-composer-textarea {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 4px;
  background: var(--bg); color: var(--ink); font-size: 0.9rem; min-height: 120px;
  font-family: inherit; resize: vertical;
}
.cr-composer-textarea:focus { outline: none; border-color: var(--accent); }

.cr-composer-actions {
  display: flex; gap: 8px; justify-content: flex-end; padding-top: 8px;
}

.cr-post-card {
  padding: 12px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 6px; display: flex; gap: 12px; margin-bottom: 12px;
}

.cr-post-content { flex: 1; }
.cr-post-meta { margin: 0; font-size: 0.75rem; color: var(--muted); }
.cr-post-body { margin: 6px 0; line-height: 1.5; color: var(--ink); }
.cr-post-image { width: 100%; max-height: 200px; border-radius: 4px; margin: 8px 0; object-fit: cover; }

.cr-post-actions {
  display: flex; gap: 12px; margin-top: 8px; font-size: 0.8rem;
}
.cr-reply-btn { background: none; border: none; color: var(--muted); cursor: pointer; transition: color 0.2s; }
.cr-reply-btn:hover { color: var(--accent); }

.cr-reply-form {
  padding: 12px; background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: 4px; margin: 12px 0;
}

.cr-reply-textarea {
  width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 4px;
  background: var(--bg); color: var(--ink); font-family: inherit; font-size: 0.9rem;
  resize: vertical; min-height: 80px;
}
.cr-reply-textarea:focus { outline: none; border-color: var(--accent); }

.cr-thread-detail { padding: 20px 0; }
.cr-thread-detail .cr-back-btn {
  display: inline-block; margin-bottom: 16px; color: var(--accent); text-decoration: none; font-size: 0.9rem;
}
.cr-thread-detail .cr-back-btn:hover { text-decoration: underline; }

.cr-thread-main { margin-bottom: 24px; }
.cr-thread-header h2 { margin: 0 0 8px; font-size: 1.3rem; color: var(--ink); }
.cr-thread-body { margin: 12px 0; line-height: 1.6; color: var(--ink); }
.cr-thread-full-image { width: 100%; max-height: 400px; border-radius: 6px; margin: 12px 0; object-fit: cover; }
.cr-thread-stats { margin: 12px 0; font-size: 0.9rem; color: var(--muted); }

.cr-replies { border-top: 1px solid var(--border); padding-top: 16px; margin-top: 20px; }
.cr-replies h3 { margin: 0 0 12px; font-size: 0.95rem; }
