:root {
  --font-display: "Merriweather", Georgia, serif;
  --font-body: "Montserrat", "Segoe UI", sans-serif;
  --bg: #ece9e5;
  --bg-soft: #f6f4f1;
  --surface: rgba(255, 255, 255, 0.96);
  --surface-strong: #ffffff;
  --text: #231f20;
  --muted: #676160;
  --line: rgba(35, 31, 32, 0.09);
  --brand: #b92031;
  --brand-strong: #9b2421;
  --brand-soft: #d87a82;
  --secondary: #434142;
  --shadow: 0 20px 44px rgba(35, 31, 32, 0.08);
  --glow-one: rgba(255, 255, 255, 0.85);
  --glow-two: rgba(244, 241, 237, 0.92);
  --button-shadow: 0 14px 30px rgba(185, 32, 49, 0.22);
  --metric-accent-a: rgba(185, 32, 49, 0.08);
  --metric-accent-b: rgba(246, 244, 241, 0.98);
  --tag-ai-bg: rgba(185, 32, 49, 0.08);
  --tag-ai-line: rgba(185, 32, 49, 0.22);
  --hero-badge-bg: rgba(255, 255, 255, 0.94);
  --hero-badge-line: rgba(35, 31, 32, 0.08);
  --focus-ring: rgba(185, 32, 49, 0.18);
}

html[data-theme="dark"] {
  --bg: #131313;
  --bg-soft: #202020;
  --surface: rgba(23, 23, 23, 0.94);
  --surface-strong: #212121;
  --text: #f6f1eb;
  --muted: #d6d0ca;
  --line: rgba(255, 255, 255, 0.08);
  --brand: #ca616b;
  --brand-strong: #b92031;
  --brand-soft: #f0dfdf;
  --secondary: #d9d3cd;
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
  --glow-one: rgba(32, 32, 32, 0.08);
  --glow-two: rgba(255, 255, 255, 0.02);
  --button-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
  --metric-accent-a: rgba(185, 32, 49, 0.12);
  --metric-accent-b: rgba(36, 31, 33, 0.92);
  --tag-ai-bg: rgba(185, 32, 49, 0.16);
  --tag-ai-line: rgba(216, 122, 130, 0.34);
  --hero-badge-bg: rgba(255, 255, 255, 0.04);
  --hero-badge-line: rgba(255, 255, 255, 0.08);
  --focus-ring: rgba(202, 97, 107, 0.24);
}

html {
  font-size: 15px;
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at top center, var(--glow-one), transparent 28%),
    linear-gradient(180deg, var(--bg-soft), var(--bg));
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  backdrop-filter: blur(18px);
  background: rgba(250, 248, 245, 0.88);
  border-bottom: 1px solid var(--line);
}

html[data-theme="dark"] .site-header {
  background: rgba(16, 16, 16, 0.9);
}

.navbar {
  padding: 1rem 0;
}

.navbar-brand {
  display: flex;
  flex-direction: column;
  color: var(--text);
  text-decoration: none;
}

.brand-lockup {
  flex-direction: row;
  align-items: center;
  gap: 0.95rem;
}

.brand-logo-shell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.8rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(67, 65, 66, 0.08);
  box-shadow: 0 12px 28px rgba(35, 31, 32, 0.08);
}

.brand-logo {
  display: block;
  width: auto;
  height: 2.6rem;
}

.brand-copy {
  display: flex;
  flex-direction: column;
}

.brand-kicker,
.eyebrow,
.gallery-meta,
.lightbox-kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--brand);
}

.brand-name,
.display-title,
.section-heading h2,
.page-header h1,
.panel-card h2,
.gallery-card h3,
.photo-card h3,
.page-copy h1 {
  font-family: var(--font-body);
}

.brand-name {
  font-size: 1.25rem;
}

.nav-link {
  color: var(--muted);
}

.nav-link:hover,
.nav-link:focus,
.text-link,
.text-link:hover {
  color: var(--brand-strong);
}

.toolbar-btn,
.btn-outline-secondary {
  border-color: var(--line);
  color: var(--text);
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.toolbar-btn:hover,
.toolbar-btn:focus {
  background: var(--surface-strong);
  color: var(--text);
  border-color: var(--brand);
}

.btn-brand {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  border: none;
  box-shadow: var(--button-shadow);
}

.btn-brand:hover,
.btn-brand:focus {
  color: #fff;
  transform: translateY(-1px);
}

.user-pill,
.tag-chip,
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  font-size: 0.82rem;
}

.tag-ai {
  background: var(--tag-ai-bg);
  border-color: var(--tag-ai-line);
}

.hero-badge {
  background: var(--hero-badge-bg);
  border-color: var(--hero-badge-line);
}

.hero-panel,
.section-block,
.panel-card,
.office-card,
.gallery-card,
.photo-card,
.metric-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1.75rem;
  box-shadow: var(--shadow);
}

.hero-panel,
.section-block,
.panel-card {
  padding: 2rem;
}

.display-title {
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 0.96;
}

.lead-copy,
.page-header p,
.page-copy p,
.gallery-copy p,
.photo-copy p {
  color: var(--muted);
  max-width: 60ch;
}

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

.metric-card {
  padding: 1.35rem;
    text-align: center;  
}

.metric-card-accent {
  background: linear-gradient(135deg, var(--metric-accent-a), var(--metric-accent-b));
}

.metric-value {
  display: block;
  font-size: 2rem;
  font-family: var(--font-display);
}

.metric-label {
  color: var(--muted);
}

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

.gallery-card,
.office-card {
  overflow: hidden;
}

.gallery-image,
.office-image {
  min-height: 220px;
  background-size: cover;
  background-position: center;
}

.gallery-card-media-link,
.gallery-card-title-link {
  color: inherit;
  display: block;
  text-decoration: none;
}

.gallery-card-title-link h3 {
  color: inherit;
}

.gallery-card-media-link:focus-visible,
.gallery-card-title-link:focus-visible {
  border-radius: 1rem;
  outline: 2px solid var(--brand);
  outline-offset: 4px;
}

.office-image-empty {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(35, 31, 32, 0.05)),
    linear-gradient(135deg, rgba(185, 32, 49, 0.05), rgba(246, 244, 241, 0.98));
}

html[data-theme="dark"] .office-image-empty {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.18)),
    linear-gradient(135deg, rgba(185, 32, 49, 0.08), rgba(33, 26, 29, 0.96));
}

.gallery-copy,
.office-copy,
.photo-copy {
  padding: 1.35rem;
}

.large-card .gallery-image {
  min-height: 280px;
}

.photo-thumb,
.photo-thumb img {
  width: 100%;
  display: block;
}

.photo-thumb,
.photo-focus-trigger {
  background: transparent;
  cursor: zoom-in;
}

.photo-focus-trigger {
  width: 100%;
  padding: 0;
  border: 0;
}

.photo-focus-trigger img {
  width: 100%;
  display: block;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.page-header {
  margin-bottom: 2rem;
}

.panel-card,
.admin-office-card {
  overflow: hidden;
}

.admin-table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--text);
  --bs-table-border-color: var(--line);
}

.form-panel .form-control,
.form-panel textarea {
  border-radius: 1rem;
  border-color: var(--line);
  background: var(--surface-strong);
  color: var(--text);
}

.form-control:focus,
.form-check-input:focus,
.btn:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 0.2rem var(--focus-ring);
}

.status-banner {
  border-radius: 1rem;
  border: none;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.lightbox-modal .modal-dialog {
  max-width: min(94vw, 1400px);
}

.lightbox-shell {
  background: rgba(17, 15, 16, 0.96);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.75rem;
  overflow: hidden;
}

.lightbox-body {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: min(82vh, 920px);
  padding: 1.5rem;
}

.lightbox-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: min(76vh, 840px);
}

.lightbox-image {
  max-width: 100%;
  max-height: 76vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 1.25rem;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 3;
  padding: 0.9rem;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.14);
  filter: invert(1) grayscale(1);
  opacity: 0.95;
}

.lightbox-close:hover,
.lightbox-close:focus {
  background-color: rgba(255, 255, 255, 0.22);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  transform: translateY(-50%);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.lightbox-nav:hover,
.lightbox-nav:focus {
  background: rgba(255, 255, 255, 0.24);
}

.lightbox-prev {
  left: 1rem;
}

.lightbox-next {
  right: 1rem;
}

.lightbox-nav[hidden] {
  display: none !important;
}

.fade-up {
  opacity: 0;
  transform: translateY(18px);
  animation: fade-up 0.6s ease forwards;
}

@keyframes fade-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 991.98px) {
  .site-header {
    position: static;
  }

  .hero-panel,
  .section-block,
  .panel-card {
    padding: 1.5rem;
  }
}

@media (max-width: 767.98px) {
  .lightbox-body {
    min-height: 100dvh;
    padding: 1rem;
  }

  .lightbox-stage {
    min-height: calc(100dvh - 2rem);
  }

  .lightbox-image {
    max-height: calc(100dvh - 2rem);
  }

  .lightbox-nav {
    width: 3rem;
    height: 3rem;
    font-size: 1.75rem;
  }

  .lightbox-prev {
    left: 0.75rem;
  }

  .lightbox-next {
    right: 0.75rem;
  }

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

  html {
    font-size: 14px;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .brand-lockup {
    gap: 0.7rem;
  }

  .brand-logo-shell {
    padding: 0.45rem 0.65rem;
  }

  .brand-logo {
    height: 2.2rem;
  }

  .gallery-image,
  .office-image,
  .large-card .gallery-image {
    min-height: 190px;
  }
}



.workspace-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(185, 32, 49, 0.14), rgba(202, 97, 107, 0.24));
  color: var(--brand-strong);
  border: 1px solid rgba(185, 32, 49, 0.16);
  font-size: 0.82rem;
  font-weight: 600;
}

.sign-in-panel,
.helper-card,
.workspace-gallery-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(246, 244, 241, 0.95));
}

html[data-theme="dark"] .sign-in-panel,
html[data-theme="dark"] .helper-card,
html[data-theme="dark"] .workspace-gallery-card {
  background: linear-gradient(180deg, rgba(36, 31, 33, 0.98), rgba(24, 20, 22, 0.95));
}

.sign-in-hero .display-title {
    padding-left: 15px;
    padding-right: 15px;
}

.sign-in-panel h2,
.helper-card h3,
.workspace-gallery-card h3,
.workspace-band h2,
.form-section-title {
  font-family: var(--font-display);
}

.compact-callout {
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  background: rgba(246, 244, 241, 0.88);
  border: 1px solid var(--line);
  color: var(--muted);
}

html[data-theme="dark"] .compact-callout {
  background: rgba(255, 255, 255, 0.05);
}

.workspace-band {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(185, 32, 49, 0.05), rgba(255, 255, 255, 0.98));
}

.workspace-band::after {
  content: "";
  position: absolute;
  inset: auto -3rem -4rem auto;
  width: 12rem;
  height: 12rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(202, 97, 107, 0.18), transparent 65%);
  pointer-events: none;
}

html[data-theme="dark"] .workspace-band {
  background: linear-gradient(135deg, rgba(185, 32, 49, 0.08), rgba(24, 20, 22, 0.96));
}

.workspace-band-compact {
  padding: 1.35rem 1.5rem;
}

.workspace-band-header,
.workspace-office-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.workspace-actions {
  align-items: center;
}

.workspace-office-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(240, 237, 233, 0.96));
}

html[data-theme="dark"] .workspace-office-card {
  background: linear-gradient(180deg, rgba(36, 31, 33, 0.98), rgba(23, 19, 21, 0.96));
}

.workspace-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.workspace-gallery-card {
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.editor-layout .editor-main,
.editor-layout .helper-card {
  height: 100%;
}

.helper-card {
  padding: 1.5rem;
}

.info-stack {
  display: grid;
  gap: 0.8rem;
}

.info-stack span {
  display: block;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  background: rgba(246, 244, 241, 0.82);
  border: 1px solid var(--line);
  color: var(--muted);
}

html[data-theme="dark"] .info-stack span {
  background: rgba(255, 255, 255, 0.05);
}

.form-section-title {
  margin: 0;
  font-size: 1.3rem;
}

.form-panel .form-check-label {
  color: var(--text);
}

@media (max-width: 991.98px) {
  .workspace-band-header,
  .workspace-office-header {
    flex-direction: column;
  }
}

@media (max-width: 767.98px) {
  .lightbox-body {
    min-height: 100dvh;
    padding: 1rem;
  }

  .lightbox-stage {
    min-height: calc(100dvh - 2rem);
  }

  .lightbox-image {
    max-height: calc(100dvh - 2rem);
  }

  .lightbox-nav {
    width: 3rem;
    height: 3rem;
    font-size: 1.75rem;
  }

  .lightbox-prev {
    left: 0.75rem;
  }

  .lightbox-next {
    right: 0.75rem;
  }

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

  .workspace-gallery-grid {
    grid-template-columns: 1fr;
  }

  .workspace-pill {
    font-size: 0.78rem;
  }
}




/* Admin workspace refresh */
.workspace-stage,
.editor-stage,
.editor-sheet {
  position: relative;
  overflow: hidden;
}

.workspace-stage {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(240, 235, 230, 0.96));
}

html[data-theme="dark"] .workspace-stage {
  background: linear-gradient(135deg, rgba(33, 28, 29, 0.98), rgba(24, 20, 22, 0.96));
}

.workspace-stage-grid,
.editor-stage-grid {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

.workspace-stage-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.95fr);
}

.workspace-stage-badges,
.workspace-stage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.workspace-stage-badges {
  margin-bottom: 1rem;
}

.workspace-stage-actions {
  margin-top: 1.5rem;
}

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

.workspace-kpi-card {
  min-height: 8.75rem;
  padding: 1.35rem;
  border-radius: 1.35rem;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(243, 239, 235, 0.95));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

html[data-theme="dark"] .workspace-kpi-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  box-shadow: none;
}

.workspace-kpi-card-accent {
  background: linear-gradient(135deg, rgba(185, 32, 49, 0.08), rgba(255, 250, 237, 0.95));
}

html[data-theme="dark"] .workspace-kpi-card-accent {
  background: linear-gradient(135deg, rgba(185, 32, 49, 0.18), rgba(255, 255, 255, 0.04));
}

.workspace-kpi-value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 0.95;
}

.workspace-kpi-label {
  color: var(--muted);
}

.workspace-stage-foot {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.workspace-note-card {
  padding: 1.35rem 1.4rem;
  border-radius: 1.35rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.68);
}

html[data-theme="dark"] .workspace-note-card {
  background: rgba(255, 255, 255, 0.03);
}

.workspace-note-card h2,
.workspace-empty-state h2 {
  margin-bottom: 0.5rem;
}

.workspace-empty-state {
  text-align: center;
}

.workspace-office-section {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 240, 236, 0.92));
}

html[data-theme="dark"] .workspace-office-section {
  background: linear-gradient(180deg, rgba(32, 27, 29, 0.96), rgba(22, 19, 20, 0.94));
}

.workspace-section-heading .lead-copy {
  margin-bottom: 0;
}

.admin-office-shell {
  padding: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.995), rgba(242, 238, 233, 0.96));
}

html[data-theme="dark"] .admin-office-shell {
  background: linear-gradient(180deg, rgba(36, 31, 33, 0.99), rgba(24, 20, 22, 0.96));
}

.admin-office-shell-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 1.5rem;
  padding: 2rem 2rem 0;
}

.admin-office-description {
  color: var(--muted);
  max-width: 68ch;
  margin-bottom: 1rem;
}

.admin-office-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  align-self: start;
}

.admin-office-stat {
  padding: 1rem 1.05rem;
  border-radius: 1.2rem;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(244, 240, 236, 0.95));
}

html[data-theme="dark"] .admin-office-stat {
  background: rgba(255, 255, 255, 0.03);
}

.admin-office-stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.95rem;
  line-height: 1;
}

.admin-office-stat-label {
  color: var(--muted);
  font-size: 0.88rem;
}

.admin-office-toolbar {
  padding: 1.25rem 2rem 0;
}

.workspace-empty-strip {
  margin: 1.5rem 2rem 2rem;
  padding: 1rem 1.1rem;
  border-radius: 1.15rem;
  border: 1px solid rgba(185, 32, 49, 0.14);
  background: rgba(185, 32, 49, 0.05);
  color: var(--secondary);
  display: grid;
  gap: 0.25rem;
}

html[data-theme="dark"] .workspace-empty-strip {
  background: rgba(185, 32, 49, 0.09);
}

.admin-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
  gap: 1rem;
  padding: 1.5rem 2rem 2rem;
}

.admin-gallery-tile {
  min-height: 100%;
  padding: 1.3rem;
}

.admin-gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-gallery-subtitle {
  color: var(--muted);
  margin-bottom: 0;
}

.admin-gallery-detail-list {
  margin: 0 0 1rem;
  display: grid;
  gap: 0.75rem;
}

.admin-gallery-detail-list div,
.editor-summary-list div,
.editor-chip-panel {
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: rgba(246, 244, 241, 0.82);
}

html[data-theme="dark"] .admin-gallery-detail-list div,
html[data-theme="dark"] .editor-summary-list div,
html[data-theme="dark"] .editor-chip-panel {
  background: rgba(255, 255, 255, 0.04);
}

.admin-gallery-detail-list dt,
.editor-summary-list dt {
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.7rem;
  color: var(--brand);
}

.admin-gallery-detail-list dd,
.editor-summary-list dd {
  margin: 0;
}

.editor-stage {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(242, 237, 232, 0.96));
}

html[data-theme="dark"] .editor-stage {
  background: linear-gradient(135deg, rgba(34, 30, 31, 0.98), rgba(22, 19, 20, 0.95));
}

.editor-stage-grid {
  grid-template-columns: minmax(0, 1.35fr) 320px;
}

.editor-stage h1 {
  margin-bottom: 0.75rem;
  font-family: var(--font-display);
}

.editor-stage-aside {
  display: grid;
  gap: 0.75rem;
}

.editor-stage-stat {
  padding: 1rem 1.05rem;
  border-radius: 1.15rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
}

html[data-theme="dark"] .editor-stage-stat {
  background: rgba(255, 255, 255, 0.04);
}

.editor-stage-stat-label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.68rem;
  color: var(--brand);
}

.editor-stage-stat strong {
  display: block;
  margin-top: 0.4rem;
  font-size: 1rem;
  font-weight: 600;
}

.editor-sheet {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(243, 239, 234, 0.97));
}

html[data-theme="dark"] .editor-sheet {
  background: linear-gradient(180deg, rgba(35, 30, 32, 0.99), rgba(24, 20, 21, 0.97));
}

.editor-validation:not(:empty) {
  margin-bottom: -0.25rem;
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(185, 32, 49, 0.16);
  background: rgba(185, 32, 49, 0.08);
}

.editor-section-card {
  padding: 1.5rem;
  border-radius: 1.5rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

html[data-theme="dark"] .editor-section-card {
  background: rgba(255, 255, 255, 0.03);
  box-shadow: none;
}

.editor-section-head {
  max-width: 58ch;
  margin-bottom: 1.25rem;
}

.editor-section-head p {
  color: var(--muted);
}

.editor-toggle-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
  padding: 1rem 1.05rem;
  margin-bottom: 1rem;
  border-radius: 1.15rem;
  border: 1px solid var(--line);
  background: rgba(246, 244, 241, 0.82);
}

html[data-theme="dark"] .editor-toggle-card {
  background: rgba(255, 255, 255, 0.04);
}

.editor-toggle-card-compact {
  height: 100%;
  margin-bottom: 0;
}

.editor-toggle-card .form-check-input {
  float: none;
  margin: 0.2rem 0 0;
}

.editor-toggle-card .form-check-label {
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.editor-summary-list {
  margin: 0;
  display: grid;
  gap: 0.8rem;
}

.editor-chip-board {
  margin-top: 0.75rem;
}

.tag-chip-button {
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.tag-chip-button:hover,
.tag-chip-button:focus {
  transform: translateY(-1px);
  border-color: var(--brand);
  outline: none;
}

@media (min-width: 1200px) {
  .editor-sidebar {
    position: sticky;
    top: 6.25rem;
  }
}

@media (max-width: 1199.98px) {
  .editor-stage-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 991.98px) {
  .workspace-stage-grid,
  .workspace-stage-foot,
  .admin-office-shell-top {
    grid-template-columns: 1fr;
  }

  .admin-office-toolbar,
  .admin-gallery-grid,
  .workspace-empty-strip,
  .admin-office-shell-top {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .admin-office-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .lightbox-body {
    min-height: 100dvh;
    padding: 1rem;
  }

  .lightbox-stage {
    min-height: calc(100dvh - 2rem);
  }

  .lightbox-image {
    max-height: calc(100dvh - 2rem);
  }

  .lightbox-nav {
    width: 3rem;
    height: 3rem;
    font-size: 1.75rem;
  }

  .lightbox-prev {
    left: 0.75rem;
  }

  .lightbox-next {
    right: 0.75rem;
  }

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

  .workspace-kpi-grid,
  .workspace-stage-foot,
  .admin-office-summary,
  .admin-gallery-grid {
    grid-template-columns: 1fr;
  }

  .admin-gallery-header {
    flex-direction: column;
  }

  .editor-section-card {
    padding: 1.25rem;
  }
}

/* Admin actions and media management */
.tag-chip-status-live {
  background: rgba(28, 126, 84, 0.1);
  border-color: rgba(28, 126, 84, 0.18);
  color: #1c7e54;
}

.tag-chip-status-draft {
  background: rgba(185, 32, 49, 0.08);
  border-color: rgba(185, 32, 49, 0.18);
  color: var(--brand-strong);
}

.tag-chip-hero {
  background: rgba(156, 124, 48, 0.14);
  border-color: rgba(156, 124, 48, 0.22);
  color: #8a6820;
}

html[data-theme="dark"] .tag-chip-status-live {
  color: #7dd3a7;
}

html[data-theme="dark"] .tag-chip-hero {
  color: #f1d28a;
}

.btn-outline-danger {
  border-color: rgba(185, 32, 49, 0.28);
  color: var(--brand-strong);
}

.btn-outline-danger:hover,
.btn-outline-danger:focus {
  background: rgba(185, 32, 49, 0.08);
  border-color: var(--brand);
  color: var(--brand-strong);
}

.admin-inline-actions form,
.action-card-stack form {
  margin: 0;
}

.admin-media-section {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(243, 238, 233, 0.93));
}

html[data-theme="dark"] .admin-media-section {
  background: linear-gradient(180deg, rgba(32, 27, 29, 0.95), rgba(22, 19, 20, 0.93));
}

.admin-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1rem;
}

.admin-media-card {
  overflow: hidden;
  border-radius: 1.35rem;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 240, 236, 0.95));
  box-shadow: var(--shadow);
}

html[data-theme="dark"] .admin-media-card {
  background: linear-gradient(180deg, rgba(36, 31, 33, 0.98), rgba(24, 20, 22, 0.95));
}

.admin-media-thumb {
  position: relative;
  min-height: 220px;
  background: rgba(246, 244, 241, 0.82);
  overflow: hidden;
}

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

.admin-media-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  color: var(--muted);
  background: linear-gradient(135deg, rgba(185, 32, 49, 0.05), rgba(255, 255, 255, 0.9));
}

html[data-theme="dark"] .admin-media-thumb-empty {
  background: linear-gradient(135deg, rgba(185, 32, 49, 0.09), rgba(255, 255, 255, 0.03));
}

.admin-media-body {
  padding: 1.25rem;
}

.admin-media-body h3 {
  margin-bottom: 0.35rem;
}

.admin-media-caption {
  color: var(--muted);
  min-height: 3.2rem;
  margin-bottom: 0;
}

.photo-preview-shell {
  position: relative;
  min-height: 260px;
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(246, 244, 241, 0.82);
}

.photo-preview-shell img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  display: block;
}

.photo-preview-shell-empty img {
  display: none;
}

.photo-preview-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  text-align: center;
  color: var(--muted);
  background: linear-gradient(135deg, rgba(185, 32, 49, 0.04), rgba(255, 255, 255, 0.9));
}

html[data-theme="dark"] .photo-preview-empty {
  background: linear-gradient(135deg, rgba(185, 32, 49, 0.08), rgba(255, 255, 255, 0.03));
}

.compact-info-stack {
  gap: 0.55rem;
}

.compact-info-stack span {
  padding: 0.75rem 0.85rem;
}

.danger-stage {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(246, 234, 234, 0.96));
}

html[data-theme="dark"] .danger-stage {
  background: linear-gradient(135deg, rgba(40, 24, 26, 0.97), rgba(23, 19, 20, 0.95));
}

.danger-stage-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: start;
}

.danger-stage-aside {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: flex-end;
}

.danger-badge {
  color: var(--brand-strong);
}

.danger-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(246, 238, 238, 0.96));
}

html[data-theme="dark"] .danger-card {
  background: linear-gradient(180deg, rgba(39, 27, 29, 0.98), rgba(23, 20, 21, 0.95));
}

.danger-summary-list {
  margin: 0;
  display: grid;
  gap: 0.8rem;
}

.danger-summary-list div {
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

html[data-theme="dark"] .danger-summary-list div {
  background: rgba(255, 255, 255, 0.04);
}

.danger-summary-list dt {
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.7rem;
  color: var(--brand);
}

.danger-summary-list dd {
  margin: 0;
}

.danger-callout {
  display: grid;
  gap: 0.3rem;
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  border: 1px solid rgba(185, 32, 49, 0.18);
  background: rgba(185, 32, 49, 0.08);
}

.danger-preview-card .photo-preview-shell {
  min-height: 300px;
}

.danger-preview-card .photo-preview-shell img {
  min-height: 300px;
}

@media (max-width: 991.98px) {
  .danger-stage-grid {
    grid-template-columns: 1fr;
  }

  .danger-stage-aside {
    justify-content: flex-start;
  }
}

@media (max-width: 767.98px) {
  .lightbox-body {
    min-height: 100dvh;
    padding: 1rem;
  }

  .lightbox-stage {
    min-height: calc(100dvh - 2rem);
  }

  .lightbox-image {
    max-height: calc(100dvh - 2rem);
  }

  .lightbox-nav {
    width: 3rem;
    height: 3rem;
    font-size: 1.75rem;
  }

  .lightbox-prev {
    left: 0.75rem;
  }

  .lightbox-next {
    right: 0.75rem;
  }

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

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

  .photo-preview-shell,
  .photo-preview-shell img,
  .danger-preview-card .photo-preview-shell,
  .danger-preview-card .photo-preview-shell img {
    min-height: 220px;
  }
}

.upload-dropzone {
  padding: 1.35rem;
  border: 1px dashed rgba(185, 32, 49, 0.28);
  border-radius: 1.25rem;
  background: linear-gradient(135deg, rgba(185, 32, 49, 0.05), rgba(255, 255, 255, 0.94));
}

html[data-theme="dark"] .upload-dropzone {
  background: linear-gradient(135deg, rgba(185, 32, 49, 0.1), rgba(255, 255, 255, 0.03));
}

.upload-review-section {
  overflow: hidden;
}

.upload-review-table-wrap {
  border-radius: 1.25rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.74);
}

html[data-theme="dark"] .upload-review-table-wrap {
  background: rgba(255, 255, 255, 0.03);
}

.upload-review-table {
  min-width: 1100px;
}

.upload-review-table thead th {
  padding: 1rem;
  background: rgba(246, 244, 241, 0.9);
  border-bottom: 1px solid var(--line);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
}

html[data-theme="dark"] .upload-review-table thead th {
  background: rgba(255, 255, 255, 0.04);
}

.upload-review-table td {
  padding: 1rem;
  vertical-align: top;
}

.upload-preview-cell {
  width: 220px;
}

.upload-preview-card {
  min-height: 150px;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(246, 244, 241, 0.82);
}

.upload-preview-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}

.upload-preview-card-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  color: var(--muted);
  text-align: center;
}

.upload-file-name {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  word-break: break-word;
}

.upload-settings-stack {
  display: grid;
  gap: 0.85rem;
  min-width: 240px;
}

.upload-textarea {
  min-width: 260px;
}

@media (max-width: 767.98px) {
  .lightbox-body {
    min-height: 100dvh;
    padding: 1rem;
  }

  .lightbox-stage {
    min-height: calc(100dvh - 2rem);
  }

  .lightbox-image {
    max-height: calc(100dvh - 2rem);
  }

  .lightbox-nav {
    width: 3rem;
    height: 3rem;
    font-size: 1.75rem;
  }

  .lightbox-prev {
    left: 0.75rem;
  }

  .lightbox-next {
    right: 0.75rem;
  }

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

  .upload-preview-cell {
    width: 180px;
  }
}


.photo-actions {
  align-items: center;
}

.action-control {
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  gap: 0.55rem;
  line-height: 1;
  padding: 0.55rem 0.9rem;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.action-control:hover,
.action-control:focus-visible {
  border-color: rgba(185, 32, 49, 0.28);
  box-shadow: 0 16px 28px rgba(35, 31, 32, 0.12);
  color: var(--ink);
  outline: none;
  text-decoration: none;
  transform: translateY(-1px);
}

.action-control-symbol {
  align-items: center;
  background: rgba(185, 32, 49, 0.12);
  border-radius: 999px;
  color: var(--brand);
  display: inline-flex;
  flex-shrink: 0;
  height: 1.55rem;
  justify-content: center;
  width: 1.55rem;
}

.action-control-active {
  background: rgba(185, 32, 49, 0.1);
  border-color: rgba(185, 32, 49, 0.22);
  color: var(--brand);
}

.action-control-active .action-control-symbol {
  background: var(--brand);
  color: #fff;
}

html[data-theme="dark"] .action-control {
  background: rgba(47, 39, 42, 0.92);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--paper);
}

html[data-theme="dark"] .action-control:hover,
html[data-theme="dark"] .action-control:focus-visible {
  border-color: rgba(202, 97, 107, 0.45);
  box-shadow: 0 20px 38px rgba(0, 0, 0, 0.28);
  color: var(--paper);
}

html[data-theme="dark"] .action-control-symbol {
  background: rgba(202, 97, 107, 0.18);
  color: #f7d5d8;
}

.favorite-form {
  display: inline-flex;
  margin: 0;
}

.single-metric-grid {
  grid-template-columns: 1fr;
}

.saved-photo-card h3 {
  margin-bottom: 0.35rem;
}

.saved-photo-meta {
  margin-bottom: 1rem;
  color: var(--muted);
}

.tag-chip-quality-high {
    background: rgba(30, 118, 72, 0.14);
    color: #1e7648;
}

.tag-chip-quality-medium {
    background: rgba(193, 128, 19, 0.14);
    color: #8c5b0b;
}

.tag-chip-quality-low {
    background: rgba(155, 36, 33, 0.14);
    color: #9b2421;
}

body[data-bs-theme="dark"] .tag-chip-quality-high {
    background: rgba(73, 191, 122, 0.18);
    color: #9de0b7;
}

body[data-bs-theme="dark"] .tag-chip-quality-medium {
    background: rgba(216, 169, 59, 0.18);
    color: #f1d891;
}

body[data-bs-theme="dark"] .tag-chip-quality-low {
    background: rgba(202, 97, 107, 0.18);
    color: #f1b7bc;
}

.admin-media-quality-note {
    margin-bottom: 0.9rem;
    color: var(--muted-text);
    font-size: 0.92rem;
    line-height: 1.5;
}

.quality-note-panel {
    min-width: 0;
}

.admin-media-card-quality-warning {
    border-color: rgba(185, 32, 49, 0.24);
    box-shadow: 0 18px 38px rgba(100, 32, 40, 0.08);
}

.admin-media-card-quality-warning .admin-media-thumb {
    box-shadow: inset 0 0 0 1px rgba(185, 32, 49, 0.2);
}

[data-bs-theme="dark"] .admin-media-card-quality-warning {
    border-color: rgba(202, 97, 107, 0.35);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.24);
}

.featured-section-heading {
  align-items: end;
  gap: 1rem;
}

.office-title
{
    color: var(--muted);
    font-size: 1.8rem;
    font-weight: 600;
    text-decoration: none;
}


.section-caption {
  color: var(--muted);
  font-size: 0.95rem;
}

.featured-gallery-scroller {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(18rem, 23rem);
  gap: 1.25rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
}

.featured-gallery-scroller::-webkit-scrollbar {
  height: 10px;
}

.featured-gallery-scroller::-webkit-scrollbar-thumb {
  background: rgba(67, 65, 66, 0.24);
  border-radius: 999px;
}

.featured-gallery-card {
  scroll-snap-align: start;
}

.featured-gallery-card .gallery-image {
  min-height: 220px;
}

.featured-gallery-card .gallery-copy {
  min-height: 100%;
}

@media (max-width: 767.98px) {
  .featured-gallery-scroller {
    grid-auto-columns: minmax(16rem, 85vw);
    gap: 1rem;
  }

  .featured-gallery-card .gallery-image {
    min-height: 190px;
  }
}


.photo-media,
.photo-focus-media,
.lightbox-frame {
  position: relative;
}

.photo-media,
.photo-focus-media {
  overflow: hidden;
  border-radius: 1.5rem;
  isolation: isolate;
}

.photo-media .photo-thumb,
.photo-focus-media .photo-focus-trigger,
.photo-focus-media .photo-focus-trigger img,
.photo-media .photo-thumb img {
  border-radius: 0 !important;
}

.photo-media-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
}

.media-overlay-actions {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.media-overlay-actions-large {
  top: 1.1rem;
  right: 1.1rem;
}

.lightbox-frame {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
}

.lightbox-overlay-actions {
  z-index: 4;
}

.media-icon-button {
  width: 2.9rem;
  height: 2.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 999px;
  background: rgba(235, 241, 246, 0.9);
  color: var(--brand-strong);
  text-decoration: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 14px 24px rgba(35, 31, 32, 0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.media-icon-button:hover,
.media-icon-button:focus-visible {
  transform: translateY(-1px);
  text-decoration: none;
  color: var(--brand-strong);
  background: rgba(242, 246, 250, 0.98);
  border-color: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 30px rgba(35, 31, 32, 0.18);
  outline: none;
}

.media-icon-button:disabled {
  opacity: 0.72;
  cursor: wait;
  transform: none;
}

.media-icon-button[hidden] {
  display: none !important;
}

.media-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.3rem;
  height: 1.3rem;
  font-size: 1.15rem;
  line-height: 1;
}

.media-icon-share {
  font-size: 1rem;
}

.media-icon-button.is-favorited {
  background: rgba(242, 246, 250, 0.98);
  border-color: rgba(255, 255, 255, 0.92);
  color: var(--brand-strong);
}

.media-icon-button.is-favorited .media-icon-heart {
  font-weight: 700;
}

.photo-copy-compact {
  display: flex;
  justify-content: flex-end;
  padding-top: 0.95rem;
}

html[data-theme="dark"] .media-icon-button {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.28);
}

/*html[data-theme="dark"] .media-icon-button:hover,
html[data-theme="dark"] .media-icon-button:focus-visible,
html[data-theme="dark"] .media-icon-button.is-favorited {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff3f5;
}*/

@media (max-width: 767.98px) {
  .media-overlay-actions,
  .media-overlay-actions-large,
  .lightbox-overlay-actions {
    top: 0.8rem;
    right: 0.8rem;
    gap: 0.55rem;
  }

  .photo-media-badge {
    top: 0.8rem;
    left: 0.8rem;
  }

  .media-icon-button {
    width: 2.55rem;
    height: 2.55rem;
  }
}

.upload-review-callout {
  color: var(--text);
}

.upload-review-list {
  display: grid;
  gap: 1.25rem;
}

.upload-review-item {
  padding: 1.35rem;
  border-radius: 1.5rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.44);
  overflow: hidden;
}

html[data-theme="dark"] .upload-review-item {
  background: rgba(255, 255, 255, 0.03);
  box-shadow: none;
}

.upload-review-item-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.upload-review-preview-column {
  min-width: 0;
}

.upload-review-editor-column {
  min-width: 0;
  display: grid;
  gap: 1rem;
  overflow: hidden;
}

.upload-review-main-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 1rem;
  align-items: start;
}

.upload-review-field-panel,
.upload-review-setting-card {
  min-width: 0;
  padding: 1rem;
  border-radius: 1.15rem;
  border: 1px solid var(--line);
  background: rgba(246, 244, 241, 0.82);
}

html[data-theme="dark"] .upload-review-field-panel,
html[data-theme="dark"] .upload-review-setting-card {
  background: rgba(255, 255, 255, 0.04);
}

.upload-review-main-grid > *,
.upload-review-settings-grid > * {
  min-width: 0;
}

.upload-review-field-panel .form-control,
.upload-review-setting-card .form-control {
  width: 100%;
  max-width: 100%;
}

.upload-review-alt-text,
.upload-textarea {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  min-height: 11rem;
}

.upload-review-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1rem;
  align-items: stretch;
}

.upload-review-toggle-card {
  min-height: 100%;
}

.upload-review-setting-card .info-stack span {
  min-height: 5.5rem;
}

@media (max-width: 1199.98px) {
  .upload-review-item-grid {
    grid-template-columns: 1fr;
  }

  .upload-preview-card {
    max-width: 320px;
  }
}

@media (max-width: 767.98px) {
  .upload-review-item {
    padding: 1rem;
  }

  .upload-review-main-grid,
  .upload-review-settings-grid {
    grid-template-columns: 1fr;
  }

  .upload-preview-card {
    max-width: none;
  }
}


.audit-section-heading {
  align-items: start;
}

.audit-quick-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.6rem;
}

.audit-table-wrap {
  border-radius: 1.35rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.68);
  overflow: hidden;
}

html[data-theme="dark"] .audit-table-wrap {
  background: rgba(255, 255, 255, 0.03);
}

.audit-table {
  width: 100% !important;
}

.audit-table thead th {
  white-space: nowrap;
}

.audit-thumbnail-cell {
  width: 120px;
}

.audit-thumbnail-link {
  display: block;
  text-decoration: none;
}

.audit-thumbnail {
  display: block;
  width: 96px;
  height: 72px;
  object-fit: cover;
  border-radius: 0.95rem;
  border: 1px solid var(--line);
  background: rgba(246, 244, 241, 0.82);
}

.audit-thumbnail-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.82rem;
}

.audit-gallery-cell,
.audit-metric-stack {
  display: grid;
  gap: 0.2rem;
}

.audit-gallery-link {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.audit-gallery-link:hover,
.audit-gallery-link:focus {
  color: var(--brand-strong);
}

.audit-gallery-meta,
.audit-metric-stack span {
  color: var(--muted);
  font-size: 0.86rem;
}

.audit-health-cell {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-weight: 700;
}

.audit-health-cell-good {
  background: rgba(28, 126, 84, 0.1);
  color: #1c7e54;
}

.audit-health-cell-warning {
  background: rgba(185, 32, 49, 0.1);
  color: var(--brand-strong);
}

.audit-flag-row {
  min-width: 240px;
}

.audit-flag-chip {
  background: rgba(185, 32, 49, 0.08);
  border-color: rgba(185, 32, 49, 0.16);
}

.audit-actions {
  min-width: 170px;
}

.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_length {
  margin-bottom: 1rem;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  border-radius: 0.9rem;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--text);
  padding: 0.45rem 0.7rem;
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
  margin-top: 1rem;
}

.dataTables_wrapper .paginate_button {
  border-radius: 999px !important;
}

html[data-theme="dark"] .audit-health-cell-good {
  color: #8fe0b5;
}

@media (max-width: 991.98px) {
  .audit-section-heading {
    flex-direction: column;
  }

  .audit-quick-filters {
    justify-content: flex-start;
  }
}

.search-form-panel {
  margin-inline: auto;
  max-width: 72rem;
  padding: 1.25rem;
  border-radius: 1.5rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
}

html[data-theme="dark"] .search-form-panel {
  background: rgba(255, 255, 255, 0.04);
}

.search-form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.9rem;
}

.search-form-input {
  min-height: 3.75rem;
}

.tag-chip-link {
  text-decoration: none;
}

.tag-chip-link:hover,
.tag-chip-link:focus {
  color: var(--brand-strong);
  border-color: rgba(185, 32, 49, 0.22);
}

.photo-masonry-grid {
  column-count: 1;
  column-gap: 1.25rem;
}

.photo-masonry-grid-search {
  column-gap: 1.4rem;
}

.photo-masonry-grid-compact {
  column-gap: 1rem;
}

.photo-masonry-item {
  break-inside: avoid;
  display: inline-block;
  width: 100%;
  margin-bottom: 1.25rem;
}

.photo-masonry-item .photo-card {
  width: 100%;
}

.photo-card .photo-thumb,
.photo-card .photo-thumb img {
  display: block;
  width: 100%;
}

.search-photo-card .photo-copy,
.saved-photo-card .photo-copy {
  padding: 1rem 1.05rem 1.15rem;
}

.search-photo-copy h3,
.saved-photo-card h3 {
  margin-bottom: 0.35rem;
}

.search-tag-row {
  margin-top: 0.15rem;
}

@media (min-width: 768px) {
  .photo-masonry-grid {
    column-count: 2;
  }
}

@media (min-width: 1200px) {
  .photo-masonry-grid {
    column-count: 3;
  }
}

@media (min-width: 1500px) {
  .photo-masonry-grid-search {
    column-count: 4;
  }
}

@media (max-width: 767.98px) {
  .search-form-row {
    grid-template-columns: 1fr;
  }

  .search-form-panel {
    padding: 1rem;
  }
}
