@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;800&family=Cormorant+Garamond:wght@500;600;700&family=Source+Serif+4:wght@400;500;600&display=swap");

:root {
  --brand-yellow: #ffe135;
  --brand-ink: #050505;
  --brand-paper: #f7f5f0;
  --brand-surface: #fafaf8;
  --brand-surface-alt: #f0eee9;
  --brand-border: #d8d4cc;
  --brand-mid: #6c6c6c;
  --brand-success: #4f7a58;
  --brand-warning: #d39b18;
  --brand-error: #a33a32;
  --brand-info: #3f5f8e;
  --text-primary: #18181b;
  --text-secondary: #3f3f46;
  --text-tertiary: #71717a;
  --text-placeholder: #a1a1aa;
  --overlay-backdrop: rgba(0, 0, 0, 0.16);
  --overlay-panel: #111111;
  --overlay-text: #faf9f6;
  --overlay-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  --page-width: 1120px;
  --focus-ring: #ffe135;
  --page-background: var(--brand-paper);
  --panel-background: #ffffff;
  --panel-muted: var(--brand-surface);
  --panel-alt: var(--brand-surface-alt);
  --border-strong: var(--brand-ink);
  --border-soft: var(--brand-border);
  --button-text: var(--brand-ink);
  --status-muted-bg: var(--brand-surface);
  --status-muted-text: var(--text-secondary);
}

body.dark {
  --brand-yellow: #b09b12;
  --brand-ink: #faf9f6;
  --brand-paper: #090909;
  --brand-surface: #151515;
  --brand-surface-alt: #1b1b1b;
  --brand-border: rgba(255, 255, 255, 0.16);
  --brand-mid: rgba(250, 249, 246, 0.58);
  --brand-success: #305238;
  --brand-warning: #7b5a12;
  --brand-error: #6f2f2a;
  --brand-info: #26466f;
  --text-primary: #faf9f6;
  --text-secondary: rgba(250, 249, 246, 0.82);
  --text-tertiary: rgba(250, 249, 246, 0.58);
  --text-placeholder: rgba(250, 249, 246, 0.42);
  --overlay-backdrop: rgba(0, 0, 0, 0.58);
  --overlay-panel: #111111;
  --overlay-text: #faf9f6;
  --overlay-shadow: 0 10px 32px rgba(0, 0, 0, 0.42);
  --focus-ring: #b09b12;
  --page-background: #090909;
  --panel-background: #111111;
  --panel-muted: #151515;
  --panel-alt: #1b1b1b;
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-soft: rgba(255, 255, 255, 0.16);
  --button-text: var(--brand-ink);
  --status-muted-bg: #181818;
  --status-muted-text: rgba(250, 249, 246, 0.82);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  min-width: 0;
}

html {
  color-scheme: light;
}

body.dark {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page-background);
  color: var(--text-primary);
  font-family: "Source Serif 4", Georgia, serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--brand-yellow);
  color: #000000;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.wrap,
.hero-content,
.section-content,
.survey-footer,
.survey-hero > header {
  width: min(var(--page-width), calc(100% - 2rem));
  margin: 0 auto;
}

.wrap {
  padding: 7.5rem 0 4rem;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  display: flex;
  min-height: 5rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem max(1rem, calc((100vw - var(--page-width)) / 2));
  border-bottom: 1px solid var(--border-strong);
  background: var(--page-background);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.brand-title,
.logo {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.nav-link,
.back-link,
.panel a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition:
    color 150ms ease,
    border-color 150ms ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.back-link:hover,
.back-link:focus-visible,
.panel a:hover,
.panel a:focus-visible {
  color: var(--text-primary);
  border-color: var(--brand-yellow);
}

.theme-toggle {
  display: inline-flex;
  height: 2.75rem;
  width: 2.75rem;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--panel-background);
  color: var(--text-primary);
  transition:
    background-color 150ms ease,
    color 150ms ease,
    border-color 150ms ease,
    transform 150ms ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  background: var(--panel-muted);
  border-color: var(--brand-yellow);
  transform: translateY(-1px);
}

.theme-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
}

header nav[aria-label="Primary"] button:not(.theme-toggle),
.button-primary,
.card-action {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  border: 1px solid var(--border-strong);
  border-radius: 0.375rem;
  background: var(--brand-yellow);
  color: var(--button-text);
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition:
    background-color 150ms ease,
    color 150ms ease,
    transform 150ms ease;
}

header nav[aria-label="Primary"] button:not(.theme-toggle):hover,
header nav[aria-label="Primary"] button:not(.theme-toggle):focus-visible,
.button-primary:hover,
.button-primary:focus-visible,
.card-action:hover,
.card-action:focus-visible {
  background: var(--brand-ink);
  color: var(--brand-yellow);
  transform: translateY(-1px);
}

.hero-badge,
.section-kicker,
.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 2rem;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--brand-yellow);
  color: var(--button-text);
  font-family: "Montserrat", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.page-hero,
.hero-content,
.section-content,
.content-panel,
.panel,
.benefit-item,
.spec-card {
  border: 1px solid var(--border-soft);
  background: var(--panel-background);
}

.page-hero,
.hero-content,
.section-content,
.content-panel {
  padding: 2rem;
}

.page-hero,
.hero-content {
  display: grid;
  gap: 2rem;
  align-items: start;
}

.page-title,
.hero-text h1,
.survey-section h2,
.panel h1,
.card h1,
.section-title,
.name {
  margin: 0;
  color: var(--text-primary);
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.95;
  text-transform: uppercase;
}

.page-title,
.hero-text h1 {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  max-width: 12ch;
}

.section-title,
.survey-section h2,
.panel h1,
.card h1 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.hero-copy-block,
.hero-text {
  display: grid;
  gap: 1rem;
}

.subtitle,
.hero-copy {
  margin: 0;
  max-width: 40rem;
  color: var(--text-secondary);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 600;
  line-height: 1.3;
}

.survey-section p,
.meta,
#status {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1rem;
}

.hero-stats,
.benefits,
.specs-grid {
  display: grid;
  gap: 1rem;
}

.hero-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hero-stat {
  border: 1px solid var(--border-soft);
  background: var(--panel-muted);
  padding: 1.25rem;
}

.hero-stat strong {
  display: block;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
  font-family: "Montserrat", sans-serif;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  text-transform: uppercase;
}

.hero-stat span {
  display: block;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

.content-panel {
  margin-top: 2rem;
}

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-soft);
}

.section-kicker {
  margin-bottom: 0.75rem;
}

.toolbar {
  display: flex;
  width: 100%;
  justify-content: flex-end;
}

.search-shell {
  display: flex;
  width: min(100%, 28rem);
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--border-strong);
  background: var(--panel-muted);
  padding: 0 1rem;
}

.search-shell svg {
  flex: none;
  width: 1.1rem;
  height: 1.1rem;
  color: var(--text-tertiary);
}

.toolbar input,
input[type="search"],
input[type="text"],
textarea {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0.95rem 0;
  color: var(--text-primary);
  font-size: 1rem;
}

.toolbar input::placeholder,
input[type="search"]::placeholder,
input[type="text"]::placeholder,
textarea::placeholder {
  color: var(--text-placeholder);
}

.toolbar input:focus,
input[type="search"]:focus,
input[type="text"]:focus,
textarea:focus {
  outline: none;
}

.search-shell:focus-within {
  box-shadow: inset 0 0 0 1px var(--border-strong), 0 0 0 2px var(--focus-ring);
}

.state {
  display: flex;
  min-height: 9rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-soft);
  background: var(--panel-muted);
  padding: 1.5rem;
  color: var(--text-secondary);
  text-align: center;
}

.state.error,
.panel.error {
  border-left: 4px solid var(--brand-error);
}

.error {
  color: var(--brand-error);
}

.empty-state {
  border-style: dashed;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.grid > .state {
  grid-column: 1 / -1;
}

.card {
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: var(--panel-background);
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background-color 150ms ease;
}

.card:hover,
.card:focus-within {
  transform: translateY(-2px);
  background: var(--panel-muted);
}

.thumb-wrap {
  aspect-ratio: 4 / 3;
  border-bottom: 1px solid var(--border-strong);
  background: var(--panel-alt);
  padding: 1.25rem;
}

.thumb {
  height: 100%;
  width: 100%;
  border: 1px solid color-mix(in srgb, var(--border-strong) 55%, transparent);
  background: var(--brand-paper);
  object-fit: cover;
}

.card-body {
  display: flex;
  min-height: 15rem;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.25rem;
}

.card-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.75rem;
}

.name {
  font-size: 1.3rem;
  line-height: 1.05;
}

.card-copy {
  max-width: 34ch;
}

.meta {
  color: var(--text-secondary);
}

.meta--small {
  color: var(--text-tertiary);
  font-family: "Montserrat", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.status {
  gap: 0.45rem;
}

.status::before {
  content: "";
  height: 0.5rem;
  width: 0.5rem;
  border-radius: 999px;
  background: currentColor;
}

.status--live {
  border-color: #79b084;
  background: #4f7a58;
  color: #ffffff;
}

.status--archived {
  border-color: var(--border-soft);
  background: var(--status-muted-bg);
  color: var(--status-muted-text);
}

.card-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-soft);
}

.card-timestamps {
  display: grid;
  gap: 0.3rem;
}

.card-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 7rem 1rem 2rem;
}

.panel {
  width: min(100%, 34rem);
  padding: 2rem;
}

.panel h1 {
  margin-bottom: 1rem;
}

.panel p + p {
  margin-top: 1rem;
}

.auth-card {
  display: grid;
  gap: 1rem;
}

.loading {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(circle at top, rgba(255, 225, 53, 0.16), transparent 30%),
    var(--page-background);
}

.loading .panel {
  max-width: 30rem;
  border-color: var(--border-strong);
  background: var(--panel-background);
  box-shadow: var(--overlay-shadow);
}

.loading.hidden {
  display: none;
}

.survey-hero {
  padding: 7.25rem 0 2rem;
}

.survey-hero > header {
  margin-bottom: 2rem;
}

.survey-section {
  padding: 0 0 1.5rem;
}

.survey-section h2 {
  margin-bottom: 1rem;
}

.survey-section p + p {
  margin-top: 1rem;
}

.benefits,
.specs-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  margin-top: 1.75rem;
}

.benefit-item,
.spec-card {
  padding: 1.5rem;
}

.benefit-item h3,
.spec-card h3 {
  margin: 0 0 0.9rem;
  color: var(--text-primary);
  font-family: "Montserrat", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.spec-card ul {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--text-secondary);
}

.spec-card li + li {
  margin-top: 0.5rem;
}

.survey-section.dark .section-content {
  background: var(--panel-muted);
  border-color: var(--border-strong);
}

.survey-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--border-strong);
  color: var(--text-tertiary);
}

.viewer-page {
  overflow: hidden;
  background: #050505;
}

.pcuk-demo-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  z-index: 99999;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(20, 20, 20, 0.72);
  color: #fff;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 14px;
}

.pcuk-demo-banner--bottom {
  bottom: 12px;
}

body.dark .pcuk-demo-banner {
  background: rgba(10, 10, 10, 0.7);
}

.pcuk-demo-banner strong {
  font-weight: 700;
}

.pcuk-demo-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.pcuk-demo-actions .button-primary {
  text-decoration: none;
  white-space: nowrap;
  min-height: 2.4rem;
  padding: 0 0.9rem;
}

.pcuk-demo-reset-modal[hidden] {
  display: none;
}

.pcuk-demo-reset-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  background: var(--overlay-backdrop);
  padding: 16px;
}

.pcuk-demo-reset-modal__panel {
  width: min(440px, 100%);
  border: 1px solid var(--border-strong);
  border-radius: 0.75rem;
  background: var(--panel-background);
  color: var(--text-primary);
  box-shadow: var(--overlay-shadow);
  padding: 1rem;
}

.pcuk-demo-reset-modal__panel h2 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pcuk-demo-reset-modal__panel p {
  margin: 0 0 1rem;
  color: var(--text-secondary);
}

.pcuk-demo-reset-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.pcuk-demo-reset-modal__cancel {
  background: var(--panel-muted);
}

.pcuk-demo-reset-modal__cancel:hover,
.pcuk-demo-reset-modal__cancel:focus-visible {
  background: var(--panel-alt);
  color: var(--text-primary);
}

.potree_container {
  position: fixed;
  inset: 0;
}

#potree_render_area,
#potree_sidebar_container {
  font-family: "Montserrat", sans-serif;
}

.viewer-page #potree_sidebar_container {
  width: 340px;
  border-right: 1px solid var(--border-strong);
  background: var(--brand-mid);
  color: var(--text-primary);
  scrollbar-color: var(--text-tertiary) var(--brand-mid);
  /* Clip selectmenus / popups so they do not extend under #potree_render_area (higher z-index) */
  overflow-x: hidden;
}

.viewer-page #sidebar_root {
  color: var(--text-primary);
  font-family: "Montserrat", sans-serif;
}

.viewer-page #sidebar_root #sidebar_header h3 {
  margin: 0.9rem 0.75rem 0.6rem;
  color: var(--overlay-text);
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.viewer-page #potree_menu.accordion > h3 {
  background: #71717a !important;
  color: var(--overlay-text);
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.viewer-page #potree_sidebar_container a {
  color: var(--text-primary);
}

.viewer-page #potree_sidebar_container #menu_about + div,
.viewer-page #potree_sidebar_container .about-credit {
  margin: 8px 0;
  padding: 0 8px;
  color: var(--overlay-text);
}

.viewer-page #potree_sidebar_container #menu_about + div a,
.viewer-page #potree_sidebar_container .about-credit a {
  color: var(--overlay-text);
}

.viewer-page #tools {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(3, auto);
  row-gap: 0.4rem;
  column-gap: 0.25rem;
  align-items: center;
}

.viewer-page #tools .button-icon {
  justify-self: center;
  align-self: center;
}

.viewer-page #navigation {
  /* Potree injects a set of <img class="button-icon"> controls + a couple selectgroups.
     Using a 4-column grid makes the controls lay out predictably in ~4 rows. */
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem 0.25rem;
  align-items: center;
}

.viewer-page #navigation br {
  display: none;
}

.viewer-page #navigation .button-icon {
  justify-self: center;
  align-self: center;
}

/* Camera Projection is a selectgroup label row; make it span full width. */
.viewer-page #navigation #camera_projection_options {
  grid-column: 1 / -1;
}

.viewer-page #camera_projection_options label.ui-button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  white-space: nowrap;
}

/* Clipping tools (icons) - keep in one horizontal row. */
.viewer-page #clipping_tools {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.25rem;
  align-items: center;
}

.viewer-page #clipping_tools .button-icon {
  flex: 0 0 auto;
}

.viewer-page #sidebar_root a.home-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.1rem;
  padding: 0 0.5rem;
  border: 1px solid var(--border-strong);
  border-radius: 0.375rem;
  background: var(--brand-yellow);
  color: var(--button-text);
  font-family: "Montserrat", sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition:
    background-color 150ms ease,
    color 150ms ease,
    transform 150ms ease;
}

.viewer-page #sidebar_root #sidebar_header .header-buttons {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin: 0 0.75rem 0.85rem;
}

.viewer-page #sidebar_root a.home-button span {
  line-height: 1;
  white-space: nowrap;
}

.viewer-page #sidebar_root a.home-button:hover,
.viewer-page #sidebar_root a.home-button:focus-visible {
  background: var(--brand-ink);
  color: var(--brand-yellow);
  transform: translateY(-1px);
}

.viewer-page #sidebar_root a.home-button svg {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
}

.viewer-page .divider {
  background: var(--text-tertiary);
  color: var(--overlay-text);
}

.viewer-page .ui-slider {
  /* Needed so jQuery UI can position the handle using `left` correctly. */
  position: relative;
  height: 10px;
  border-width: 2px !important;
  border-style: solid;
  border-color: var(--border-soft) !important;
  background: var(--panel-background) !important;
  border-radius: 999px;
}

.viewer-page .ui-slider-handle {
  /* Potree ships a custom slider look; we keep positioning behavior from jQuery UI. */
  position: absolute !important;
  width: 18px !important;
  height: 18px !important;
  border-radius: 999px !important;
  background: var(--brand-yellow) !important;
  border: 2px solid var(--brand-ink) !important;
  box-sizing: border-box !important;
  /* Center the handle vertically on the thicker track. */
  top: 50% !important;
  transform: translateY(-50%);
  /* jQuery UI normally uses a negative margin-left to center the handle. */
  margin-left: -9px !important;
}

.viewer-page #splat_quality_options label.ui-button {
  /* Potree renders Splat Quality options as selectgroup labels (flex "buttons"). */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

.viewer-page #background_options label.ui-button {
  /* Potree renders Background options as selectgroup labels (flex "buttons"). */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

.viewer-page #cliptask_options > fieldset > span,
.viewer-page #clipmethod_options > fieldset > span {
  /* Keep Clip Task / Clip Method buttons on a single row. */
  display: flex !important;
  flex-wrap: nowrap !important;
  width: 100%;
}

.viewer-page #cliptask_options label.ui-button,
.viewer-page #clipmethod_options label.ui-button {
  /* Center the text within each selectgroup button. */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  white-space: nowrap;
  flex: 1 1 0;
}

.viewer-page .potree-panel {
  border: 1px solid var(--border-soft);
  border-radius: 0;
  background: var(--panel-muted);
  color: var(--text-secondary);
}

.viewer-page .potree-panel-heading {
  border-bottom: 1px solid var(--border-soft);
  background: transparent;
  color: var(--text-primary);
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.viewer-page #menu_scene + .pv-menu-list .potree-panel {
  /* Restore Potree's original panel styling for the Scene menu area. */
  border: 1px solid black;
  border-radius: 0.4em;
  padding: 0px;
  background-color: var(--bg-light-color);
}

.viewer-page #menu_scene + .pv-menu-list .potree-panel-heading {
  /* Restore Potree's heading background for the Scene menu area. */
  border-bottom: none;
  background: var(--bg-dark-color);
  background-color: var(--bg-dark-color);
}

.viewer-page #scene_export {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
}

.viewer-page #scene_export br {
  display: none;
}

.viewer-page .potree_sidebar_brand,
.viewer-page .propertypanel_content .heading {
  color: var(--text-primary);
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.viewer-page .jstree-anchor {
  color: var(--text-secondary) !important;
  font-family: "Montserrat", sans-serif;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.viewer-page #jstree_scene .jstree-anchor {
  /* Match the default Potree Scene menu (jstree) look. */
  color: var(--font-color-2) !important;
  font-family: "Montserrat", sans-serif;
  font-size: 0.76rem;
  letter-spacing: 0;
  text-transform: none;
}

.viewer-page #jstree_scene .jstree-checkbox {
  display: inline-block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.viewer-page .ui-state-default,
.viewer-page .ui-widget-content,
.viewer-page .ui-widget-header,
.viewer-page select,
.viewer-page input[type="text"] {
  border-color: var(--border-soft);
  background: var(--panel-background) !important;
  color: var(--text-primary);
}

.viewer-page .potree_menu_toggle,
.viewer-page #potree_map_toggle {
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--panel-background);
}

.viewer-page .annotation-titlebar,
.viewer-page .annotation-item {
  border: 1px solid var(--border-strong);
  background: var(--overlay-panel);
  color: var(--overlay-text);
  box-shadow: var(--overlay-shadow);
}

.viewer-page .annotation-description {
  display: none !important;
}

body.auth-page .theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 30000;
}

@media (min-width: 960px) {
  .page-hero,
  .hero-content {
    grid-template-columns: minmax(0, 1.2fr) 320px;
  }
}

@media (max-width: 720px) {
  .wrap,
  .hero-content,
  .section-content,
  .survey-footer,
  .survey-hero > header {
    width: min(100%, calc(100% - 1rem));
  }

  .topbar {
    align-items: start;
    flex-direction: column;
    padding: 0.875rem 1rem;
  }

  .nav-links {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .page-hero,
  .hero-content,
  .section-content,
  .content-panel,
  .panel {
    padding: 1.5rem;
  }

  .section-header,
  .card-footer,
  .survey-footer {
    align-items: start;
    flex-direction: column;
  }

  .toolbar,
  .search-shell {
    width: 100%;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .page-title,
  .hero-text h1 {
    max-width: none;
  }
}

/* Static error pages (e.g. CloudFront custom error responses) */
body.error-page .page-hero.error-hero .page-title {
  max-width: 24ch;
}

body.error-page .error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-top: 0.25rem;
}

body.error-page .error-detail {
  margin: 0;
  max-width: 36rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.55;
}

body.error-page .error-back {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  border: 1px solid var(--border-strong);
  border-radius: 0.375rem;
  background: var(--panel-background);
  color: var(--text-primary);
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition:
    background-color 150ms ease,
    color 150ms ease,
    transform 150ms ease,
    border-color 150ms ease;
}

body.error-page .error-back:hover,
body.error-page .error-back:focus-visible {
  background: var(--panel-muted);
  border-color: var(--brand-yellow);
  transform: translateY(-1px);
}

/* ── Viewer page overrides ─────────────────────────────────── */

#menu_filters,
#menu_filters + div {
  display: none !important;
}

.viewer-page #potree_quick_buttons {
  left: 1rem;
  top: 1rem;
}

.viewer-page .potree_menu_toggle,
.viewer-page #potree_map_toggle {
  width: 56px;
  height: 56px;
  min-width: 56px;
  min-height: 56px;
  max-width: 56px;
  max-height: 56px;
  aspect-ratio: 1 / 1;
  display: block;
  margin: 0;
  padding: 10px;
  box-sizing: border-box;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--brand-yellow);
  object-fit: contain;
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    transform 150ms ease;
}

.viewer-page .potree_menu_toggle:hover,
.viewer-page .potree_menu_toggle:focus-visible,
.viewer-page #potree_map_toggle:hover,
.viewer-page #potree_map_toggle:focus-visible {
  background: var(--brand-yellow);
  border-color: var(--brand-ink);
  filter: brightness(0.95);
  transform: translateY(-1px);
}

#toast_container {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.viewer-toast {
  min-width: 220px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(17, 24, 39, 0.92);
  color: #f9fafb;
  font-size: 14px;
  font-family: "Montserrat", sans-serif;
  font-weight: 500;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translateY(6px);
  animation: toast-in 160ms ease-out forwards;
}

.viewer-toast.toast-success {
  border-color: rgba(52, 211, 153, 0.6);
}

.viewer-toast.toast-error {
  border-color: rgba(248, 113, 113, 0.7);
}

.viewer-toast.toast-hide {
  animation: toast-out 180ms ease-in forwards;
}

#measurement_edit_toggle {
  display: block;
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: "Montserrat", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(17, 24, 39, 0.92);
  color: #f9fafb;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.22);
}

#measurement_edit_toggle.is-enabled {
  background: rgba(5, 150, 105, 0.9);
  border-color: rgba(16, 185, 129, 0.9);
}

#measurement_edit_toggle_item {
  list-style: none;
  margin: 6px 10px;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(6px);
  }
}

/* ── Annotations UI ────────────────────────────────────────── */

.pcuk-annotations-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 10px 6px;
}

.pcuk-annotations-toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: rgba(17, 24, 39, 0.92);
  color: #f9fafb;
  font-family: "Montserrat", sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition:
    filter 150ms ease,
    transform 150ms ease,
    background-color 150ms ease,
    border-color 150ms ease;
}

.pcuk-annotations-toolbar button:hover,
.pcuk-annotations-toolbar button:focus-visible {
  filter: brightness(0.95);
  transform: translateY(-1px);
  border-color: var(--brand-yellow);
}

.pcuk-annotations-toolbar button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.pcuk-annotations-list {
  margin: 0;
  padding: 0 10px 12px;
  list-style: none;
  display: grid;
  gap: 8px;
}

.pcuk-annotations-item {
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: rgba(17, 24, 39, 0.92);
  color: #f9fafb;
  padding: 10px 10px;
  display: grid;
  gap: 3px;
  cursor: pointer;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    filter 150ms ease;
}

.pcuk-annotations-item:hover,
.pcuk-annotations-item:focus-visible {
  transform: translateY(-1px);
  border-color: var(--brand-yellow);
  filter: brightness(0.98);
  outline: none;
}

.pcuk-annotations-item.is-selected {
  border-color: var(--brand-yellow);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand-yellow) 40%, transparent);
}

.pcuk-annotations-item-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.pcuk-annotations-item-meta {
  font-size: 11px;
  opacity: 0.82;
}

#pcuk_annotation_modal {
  display: none;
}

.pcuk-modal-grid {
  display: grid;
  gap: 10px;
}

.pcuk-modal-grid label {
  display: grid;
  gap: 6px;
  font-family: "Montserrat", sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.pcuk-modal-grid input[type="text"],
.pcuk-modal-grid textarea {
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--panel-background);
  color: var(--text-primary);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
}

.pcuk-modal-grid textarea {
  min-height: 110px;
  resize: vertical;
}

.pcuk-file-row {
  display: grid;
  gap: 6px;
}

.pcuk-file-hint {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 12px;
  color: var(--text-secondary);
  letter-spacing: 0;
  text-transform: none;
}

.pcuk-photo-preview {
  position: relative;
  margin-top: 4px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  overflow: hidden;
  background: var(--panel-background);
  max-height: 280px;
}

.pcuk-photo-preview img {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: 10px;
}

.pcuk-photo-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.pcuk-photo-remove:hover,
.pcuk-photo-remove:focus-visible {
  background: rgba(200, 40, 40, 0.85);
}

/* ── PDF hint row (hint text + view button side by side) ──── */

.pcuk-pdf-hint-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pcuk-pdf-hint-row .pcuk-file-hint {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pcuk-pdf-view-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--brand-yellow);
  color: var(--button-text);
  font-family: "Montserrat", sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background-color 150ms ease,
    color 150ms ease,
    transform 150ms ease;
}

.pcuk-pdf-view-btn:hover,
.pcuk-pdf-view-btn:focus-visible {
  background: var(--brand-ink);
  color: var(--brand-yellow);
  transform: translateY(-1px);
}

/* ── PDF viewer overlay / popup ───────────────────────────── */

.pcuk-pdf-overlay {
  position: fixed;
  inset: 0;
  z-index: 30000;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: pcuk-pdf-fade-in 180ms ease-out;
}

.pcuk-pdf-overlay.is-open {
  display: grid;
}

.pcuk-pdf-viewer {
  display: grid;
  grid-template-rows: auto 1fr;
  width: min(960px, calc(100vw - 48px));
  height: min(85vh, calc(100vh - 48px));
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel-background);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.06);
  animation: pcuk-pdf-scale-in 220ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pcuk-pdf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--panel-muted);
}

.pcuk-pdf-filename {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: "Montserrat", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.pcuk-pdf-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.pcuk-pdf-download-btn,
.pcuk-pdf-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--panel-background);
  color: var(--text-primary);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition:
    background-color 150ms ease,
    color 150ms ease,
    border-color 150ms ease,
    transform 150ms ease;
}

.pcuk-pdf-download-btn:hover,
.pcuk-pdf-download-btn:focus-visible,
.pcuk-pdf-close-btn:hover,
.pcuk-pdf-close-btn:focus-visible {
  background: var(--brand-yellow);
  color: var(--button-text);
  border-color: var(--brand-ink);
  transform: translateY(-1px);
}

.pcuk-pdf-body {
  position: relative;
  overflow: hidden;
}

.pcuk-pdf-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
  background: #f4f4f4;
}

@keyframes pcuk-pdf-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pcuk-pdf-scale-in {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Admin dashboard (admin.html) — Atlas design system: flat panels, 1px borders, paper surfaces, yellow accent — see notes/design-system.json */
.admin-page .admin-grid {
  display: grid;
  gap: 1.75rem;
}

.admin-dashboard-stack {
  margin-top: 2rem;
  padding: 0;
  border: none;
  background: transparent;
}

/* Admin workspace tabs (admin.html) */
.admin-tabs {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.admin-tabs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0 0 1.25rem;
  padding: 0;
  border-bottom: 1px solid var(--border-soft);
}

.admin-tab {
  position: relative;
  margin: 0 0 -1px;
  padding: 0.65rem 1rem;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 0;
  background: transparent;
  color: var(--text-secondary);
  font-family: "Montserrat", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.3;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    color 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease;
}

.admin-tab:hover {
  color: var(--text-primary);
}

.admin-tab:focus-visible {
  outline: 2px solid var(--accent-ring, #ffe135);
  outline-offset: 2px;
}

.admin-tab[aria-selected="true"] {
  border-color: var(--border-soft);
  border-bottom-color: var(--panel-background);
  background: var(--panel-background);
  color: var(--text-primary);
}

.admin-tab-panels {
  min-width: 0;
}

/* Uploaders: tab bar is hidden; add top spacing so panels line up with the admin tab layout */
.admin-tabs-nav[hidden] ~ .admin-tab-panels {
  margin-top: 1.25rem;
}

.admin-tab-panel.admin-grid {
  display: grid;
  gap: 1.75rem;
}

.admin-tab-panel[hidden] {
  display: none !important;
}

.admin-cognito-section {
  margin-top: 2rem;
}

.admin-cognito-panel .admin-cognito-body {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.25rem 2rem;
  align-items: center;
}

.admin-cognito-copy {
  min-width: 0;
}

.admin-cognito-copy #metricsContent {
  margin-top: 0.75rem;
}

.admin-cognito-copy #metricsContent p {
  margin: 0.35rem 0 0;
}

.admin-cognito-copy #metricsContent p:first-child {
  margin-top: 0;
}

.admin-cognito-chart-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

#metricsPieChart {
  display: block;
  max-width: 100%;
  height: auto;
}

.admin-cognito-legend {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.admin-cognito-legend li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.2rem 0;
}

.admin-cognito-legend .swatch {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 1px;
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .admin-cognito-panel .admin-cognito-body {
    grid-template-columns: 1fr;
  }

  .admin-cognito-chart-wrap {
    justify-self: center;
  }
}

.admin-panel {
  margin: 0;
  border: 1px solid var(--border-soft);
  border-radius: 0;
  background: var(--panel-background);
  padding: 1.5rem;
}

.admin-panel > h2 {
  margin: 0 0 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-primary);
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.3;
  text-transform: uppercase;
}

.admin-panel > p:first-of-type {
  margin-top: 0;
}

.admin-panel .admin-lede {
  margin: 0 0 1.25rem;
}

.admin-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.admin-row:last-child {
  margin-bottom: 0;
}

.admin-row input[type="text"],
.admin-row select {
  min-height: 2.75rem;
  flex: 1 1 12rem;
  max-width: 22rem;
  border: 1px solid var(--border-strong);
  border-radius: 0;
  background: var(--panel-background);
  padding: 0.65rem 0.85rem;
  color: var(--text-primary);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1rem;
  transition:
    box-shadow 150ms ease,
    border-color 150ms ease;
}

.admin-row input[type="text"]::placeholder {
  color: var(--text-placeholder);
}

.admin-row input[type="text"]:focus,
.admin-row select:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--focus-ring);
}

.admin-input-compact {
  max-width: 12rem !important;
}

.admin-label-fov {
  margin-top: 0.65rem;
  display: grid !important;
  gap: 0.35rem !important;
  max-width: 8rem;
}

.admin-label-fov input[type="text"] {
  width: 100%;
  min-height: 2.75rem;
  border: 1px solid var(--border-strong);
  border-radius: 0;
  background: var(--panel-background);
  padding: 0.65rem 0.85rem;
  color: var(--text-primary);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1rem;
}

.admin-label-fov input[type="text"]:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--focus-ring);
}

#orgUsersContainer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

#orgUsersContainer label {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 0.5rem;
  text-transform: none;
  letter-spacing: normal;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-secondary);
}

#orgUsersContainer input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--brand-yellow);
}

#metricsContent p {
  margin: 0.35rem 0 0;
  color: var(--text-secondary);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1rem;
  line-height: 1.5;
}

#metricsContent p:first-child {
  margin-top: 0;
}

#metricsContent strong {
  color: var(--text-primary);
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.admin-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  border: 1px solid var(--border-soft);
  background: var(--panel-background);
}

.admin-list li {
  border-bottom: 1px solid var(--border-soft);
  padding: 1rem 1.1rem;
  background: var(--panel-background);
}

.admin-list li:last-child {
  border-bottom: none;
}

.admin-muted {
  color: var(--text-tertiary);
  font-size: 0.92rem;
  line-height: 1.45;
}

.admin-panel p.admin-muted,
.admin-lede.admin-muted {
  font-family: "Source Serif 4", Georgia, serif;
  color: var(--text-secondary);
}

.pill {
  display: inline-block;
  margin-right: 0.35rem;
  margin-bottom: 0.15rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  background: var(--panel-muted);
  color: var(--text-secondary);
  font-family: "Montserrat", sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-fieldset {
  margin: 0 0 1rem;
  border: 1px solid var(--border-soft);
  border-radius: 0;
  background: var(--panel-muted);
  padding: 1rem 1.1rem 1.15rem;
}

.admin-fieldset:last-of-type {
  margin-bottom: 0;
}

.admin-fieldset > label {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
  color: var(--text-secondary);
  font-family: "Montserrat", sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.3;
  text-transform: uppercase;
}

.admin-fieldset > label input[type="text"] {
  width: 100%;
  max-width: 36rem;
  min-height: 2.75rem;
  border: 1px solid var(--border-strong);
  border-radius: 0;
  background: var(--panel-background);
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1rem;
  transition:
    box-shadow 150ms ease,
    border-color 150ms ease;
}

.admin-fieldset > label input[type="text"]:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--focus-ring);
}

.admin-fieldset legend {
  padding: 0 0.4rem;
  color: var(--text-secondary);
  font-family: "Montserrat", sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.admin-form-grid {
  display: grid;
  gap: 0.85rem;
}

.admin-form-grid label,
.potree-upload-row label,
.admin-form-row-6 label {
  display: grid;
  gap: 0.35rem;
  color: var(--text-secondary);
  font-family: "Montserrat", sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.3;
  text-transform: uppercase;
}

.admin-form-grid input[type="text"],
.admin-form-grid input[type="number"],
.admin-form-grid input[type="search"],
.admin-form-grid textarea,
.admin-form-grid select,
.admin-form-row-6 input[type="text"] {
  width: 100%;
  max-width: 36rem;
  border: 1px solid var(--border-strong);
  border-radius: 0;
  background: var(--panel-background);
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1rem;
  line-height: 1.4;
  transition:
    box-shadow 150ms ease,
    border-color 150ms ease;
}

.admin-form-grid textarea {
  min-height: 5.5rem;
  resize: vertical;
}

.admin-form-grid input::placeholder,
.admin-form-grid textarea::placeholder {
  color: var(--text-placeholder);
}

.admin-form-grid input:focus,
.admin-form-grid textarea:focus,
.admin-form-grid select:focus,
.admin-form-row-6 input:focus {
  outline: none;
  border-color: var(--border-strong);
  box-shadow: 0 0 0 2px var(--focus-ring);
}

.admin-form-row-6 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.25rem, 1fr));
  gap: 0.65rem;
  align-items: end;
}

.admin-form-row-6 input[type="text"] {
  max-width: none;
  min-height: 2.75rem;
}

.potree-upload-row {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.5rem;
}

.potree-upload-row input[type="file"] {
  width: 100%;
  max-width: 36rem;
  border: 1px dashed var(--border-soft);
  border-radius: 0;
  background: var(--panel-background);
  padding: 0.5rem 0.65rem;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.potree-upload-row input[type="file"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--focus-ring);
}

.admin-panel code {
  padding: 0.1rem 0.35rem;
  border: 1px solid var(--border-soft);
  background: var(--brand-paper);
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.85em;
}

body.dark .admin-panel code {
  background: var(--panel-alt);
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-soft);
}

.admin-actions .admin-muted {
  flex: 1 1 12rem;
}

button.registry-delete {
  margin-top: 0.65rem;
  min-height: 2.25rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--border-strong);
  border-radius: 0;
  background: var(--panel-background);
  color: var(--text-secondary);
  font-family: "Montserrat", sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

button.registry-delete:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}
