:root {
  color-scheme: dark;
  --bg: #04080d;
  --panel: rgba(12, 18, 28, 0.9);
  --panel-raised: rgba(255, 255, 255, 0.035);
  --field: rgba(255, 255, 255, 0.045);
  --line: rgba(139, 176, 221, 0.16);
  --line-strong: rgba(139, 176, 221, 0.3);
  --text: #f3f7fb;
  --muted: #94aabe;
  --faint: #6c8296;
  --accent: #7cb5ff;
  --accent-ink: #04101d;
  --danger: #fc8181;
  --danger-soft: rgba(245, 101, 101, 0.12);
  --success: #9ae6b4;
  --warning: #ffd78e;
  --radius: 14px;
  --radius-small: 10px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(124, 181, 255, 0.13), transparent 26%),
    radial-gradient(circle at bottom right, rgba(124, 181, 255, 0.06), transparent 28%),
    var(--bg);
  color: var(--text);
  font: 14px/1.45 "Segoe UI", "Helvetica Neue", sans-serif;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 19px;
}

code,
pre {
  font-family: Consolas, "SFMono-Regular", "Liberation Mono", monospace;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

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

.admin-page {
  width: min(1320px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 22px 0 120px;
}

/* Header */

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.eyebrow {
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin-top: 2px;
  font-size: 28px;
  letter-spacing: -0.03em;
}

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

.header-link {
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  transition: color 140ms ease, border-color 140ms ease, background 140ms ease;
}

.header-link:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: var(--panel-raised);
}

/* Panels */

.top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 28px;
}

.panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(14px);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.22);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.section-copy {
  margin: 4px 0 0;
  max-width: 70ch;
  color: var(--muted);
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inline-status {
  color: var(--muted);
  font-size: 13px;
}

.inline-status--error {
  color: #feb2b2;
}

/* Buttons */

.button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--panel-raised);
  color: var(--text);
  font: inherit;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.button:hover,
.icon-button:hover {
  border-color: rgba(124, 181, 255, 0.5);
  background: rgba(124, 181, 255, 0.1);
}

.button--primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.button--primary:hover {
  border-color: #a5ccff;
  background: #a5ccff;
}

.button--danger {
  border-color: rgba(245, 101, 101, 0.35);
  color: #ffd5d5;
}

.button--danger:hover {
  border-color: rgba(245, 101, 101, 0.6);
  background: var(--danger-soft);
}

.button--small {
  padding: 6px 11px;
  font-size: 13px;
}

.button:disabled,
.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.button--busy:disabled {
  cursor: wait;
}

.icon-button {
  width: 34px;
  height: 34px;
  padding: 0;
  font-size: 20px;
}

/* Form fields */

.field {
  display: grid;
  gap: 5px;
}

.field span {
  color: var(--muted);
  font-size: 12px;
}

.field input,
.field select,
.search-field input,
.sort-field select {
  width: 100%;
  min-width: 0;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--field);
  color: var(--text);
  font: inherit;
}

.field input:hover,
.search-field input:hover,
.sort-field select:hover {
  border-color: var(--line-strong);
}

select option {
  background: #0c1520;
  color: var(--text);
}

/* Upload */

.segmented {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--field);
  justify-self: start;
}

.segmented-option {
  position: relative;
  cursor: pointer;
}

.segmented-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-option span {
  display: block;
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  transition: background 140ms ease, color 140ms ease;
}

.segmented-option input:checked + span {
  background: rgba(124, 181, 255, 0.18);
  color: var(--text);
}

.segmented-option input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.file-drop {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(124, 181, 255, 0.03);
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease;
}

.file-drop:hover,
.file-drop:focus-within,
.file-drop--over {
  border-color: rgba(124, 181, 255, 0.55);
  background: rgba(124, 181, 255, 0.06);
}

.file-drop-label {
  color: var(--muted);
  font-size: 13px;
}

.file-drop input {
  width: 100%;
  color: var(--text);
  font: inherit;
}

.file-drop input::file-selector-button {
  margin-right: 12px;
  padding: 7px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--panel-raised);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.file-drop input::file-selector-button:hover {
  border-color: rgba(124, 181, 255, 0.5);
  background: rgba(124, 181, 255, 0.1);
}

.disclosure-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.disclosure {
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--panel-raised);
}

.disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.disclosure > summary::-webkit-details-marker {
  display: none;
}

.disclosure > summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 140ms ease;
}

.disclosure[open] > summary::after {
  transform: translateY(1px) rotate(-135deg);
}

.disclosure > summary:hover,
.disclosure[open] > summary {
  color: var(--text);
}

.disclosure-body {
  padding: 2px 12px 12px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.hierarchy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.hierarchy {
  margin: 0;
}

.hierarchy figcaption {
  margin-bottom: 4px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hierarchy pre {
  margin: 0;
  overflow-x: auto;
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
}

.upload-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.upload-progress {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--panel-raised);
}

.progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.progress-track {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #60b9ff, #7cb5ff);
  transition: width 180ms ease;
}

.progress-fill--error {
  background: linear-gradient(90deg, #f56565, #fc8181);
}

.progress-fill--done {
  background: linear-gradient(90deg, #48bb78, #9ae6b4);
}

.progress-detail {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

/* Jobs */

.jobs-list {
  display: grid;
  gap: 10px;
  max-height: 520px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.jobs-empty {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-small);
  color: var(--faint);
  text-align: center;
}

.job-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
  border-radius: var(--radius-small);
  background: var(--panel-raised);
}

.job-card--running,
.job-card--queued {
  border-left-color: var(--accent);
}

.job-card--failed {
  border-left-color: var(--danger);
}

.job-card--succeeded {
  border-left-color: #48bb78;
}

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

.job-title {
  min-width: 0;
}

.job-file {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.job-times {
  margin-top: 2px;
  color: var(--faint);
  font-size: 12px;
}

.job-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.job-status-badge {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.job-status-badge--queued {
  background: rgba(124, 181, 255, 0.14);
  color: #b9d6ff;
}

.job-status-badge--running {
  background: rgba(255, 199, 107, 0.14);
  color: var(--warning);
}

.job-status-badge--succeeded {
  background: rgba(72, 187, 120, 0.16);
  color: var(--success);
}

.job-status-badge--failed {
  background: rgba(245, 101, 101, 0.16);
  color: #feb2b2;
}

.job-progress {
  display: grid;
  gap: 6px;
}

.job-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.job-progress-meta span:last-child {
  color: var(--muted);
}

.job-error {
  padding: 8px 10px;
  border: 1px solid rgba(245, 101, 101, 0.26);
  border-radius: 8px;
  background: rgba(245, 101, 101, 0.08);
  color: #feb2b2;
  font-size: 13px;
}

.job-details > summary {
  padding: 7px 10px;
  font-size: 12px;
}

.job-details .disclosure-body {
  display: grid;
  gap: 10px;
  padding: 0 10px 10px;
}

.job-meta-row {
  display: grid;
  gap: 6px;
}

.job-meta-label {
  color: var(--faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(124, 181, 255, 0.12);
  color: var(--text);
  font-size: 12px;
}

.tag--muted {
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.job-log {
  margin: 0;
  padding: 10px;
  border-radius: 8px;
  background: #08111b;
  color: #dbe4f0;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: calc(1.45em * 8 + 20px);
  overflow-y: auto;
  scrollbar-width: thin;
}

/* Tours */

.tours-toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 0 -8px 14px;
  padding: 10px 8px;
  border-bottom: 1px solid transparent;
  transition: background 140ms ease, border-color 140ms ease;
}

.tours-toolbar.is-stuck {
  border-bottom-color: var(--line);
  background: rgba(6, 11, 18, 0.94);
  backdrop-filter: blur(10px);
}

.tours-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.tours-count {
  color: var(--muted);
  font-size: 13px;
}

.tours-controls {
  display: flex;
  gap: 8px;
}

.search-field input {
  width: 260px;
  border-radius: 999px;
  padding-left: 14px;
}

.sort-field select {
  border-radius: 999px;
  cursor: pointer;
}

.status-card {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--muted);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  align-items: start;
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  transition: border-color 140ms ease;
}

.project-card:hover {
  border-color: var(--line-strong);
}

.project-card--selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent) inset;
}

.project-card--client-disabled {
  border-color: rgba(245, 101, 101, 0.35);
}

.project-card--busy {
  opacity: 0.55;
  pointer-events: none;
}

.project-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-small);
  background: #0f1720;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 300ms ease;
}

.project-thumb:hover img {
  transform: scale(1.03);
}

.project-thumb-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--faint);
  font-size: 13px;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.025) 0 10px, transparent 10px 20px),
    #0f1720;
}

.project-select {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px 4px 6px;
  border-radius: 999px;
  background: rgba(4, 8, 13, 0.72);
  backdrop-filter: blur(6px);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 140ms ease;
}

.project-card:hover .project-select,
.project-select:focus-within,
.project-card--selected .project-select,
.is-selecting .project-select {
  opacity: 1;
}

/* Touch screens have no hover, so the Select box always shows there. */
@media (hover: none) {
  .project-select {
    opacity: 1;
  }
}

.project-select input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.client-access-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(245, 101, 101, 0.5);
  background: rgba(60, 12, 12, 0.85);
  color: #ffd5d5;
  font-size: 11px;
  font-weight: 600;
}

.project-info {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.project-card h3 {
  font-size: 16px;
  overflow-wrap: anywhere;
}

.project-meta {
  color: var(--muted);
  font-size: 12px;
}

.project-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: auto;
}

.project-actions .button--primary {
  flex: 1;
}

/* More menu */

.menu {
  position: relative;
}

.menu > summary {
  list-style: none;
}

.menu > summary::-webkit-details-marker {
  display: none;
}

.menu-trigger {
  padding-inline: 11px;
  letter-spacing: 0.08em;
}

.menu[open] .menu-trigger {
  border-color: rgba(124, 181, 255, 0.5);
  background: rgba(124, 181, 255, 0.1);
}

.menu-list {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;
  display: grid;
  min-width: 230px;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #0b131d;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}

.menu--up .menu-list {
  top: auto;
  bottom: calc(100% + 6px);
}

.menu-item {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.menu-item:hover,
.menu-item:focus-visible {
  background: rgba(124, 181, 255, 0.12);
}

.menu-item:disabled {
  cursor: wait;
  opacity: 0.6;
}

.menu-item--danger {
  color: #ffb4b4;
}

.menu-item--danger:hover,
.menu-item--danger:focus-visible {
  background: var(--danger-soft);
}

.menu-separator {
  height: 1px;
  margin: 5px 4px;
  background: var(--line);
}

/* Per-tour settings: opened from the ... menu; the card widens to the full row while open. */

.project-settings:not([open]) {
  display: none;
}

.project-card--settings-open {
  grid-column: 1 / -1;
  border-color: var(--line-strong);
}

.project-card--settings-open {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  column-gap: 18px;
  row-gap: 10px;
  align-items: start;
}

.project-card--settings-open .project-thumb {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.project-card--settings-open .project-select {
  top: 20px;
  left: 20px;
}

.project-card--settings-open .client-access-badge {
  right: auto;
  left: 240px;
}

.project-card--settings-open .project-info {
  grid-column: 2;
  align-self: end;
}

.project-card--settings-open .project-actions {
  grid-column: 2;
  align-self: start;
}

.project-card--settings-open .project-actions .button--primary {
  flex: 0 0 auto;
  padding-inline: 24px;
}

.project-card--settings-open .project-settings {
  grid-column: 1 / -1;
}

@media (max-width: 720px) {
  .project-card--settings-open {
    display: flex;
  }

  .project-card--settings-open .project-actions .button--primary {
    flex: 1;
  }
}

.project-settings > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
}

.project-settings.disclosure > summary::after,
.project-settings.disclosure[open] > summary::after {
  display: none;
}

.settings-close {
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
}

.settings-close:hover {
  color: var(--text);
}

.project-settings .disclosure-body {
  display: grid;
  gap: 14px;
  padding: 2px 10px 12px;
}

.tools-loading {
  color: var(--muted);
  font-size: 13px;
}

.settings-section {
  display: grid;
  gap: 8px;
}

.settings-section + .settings-section {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.settings-title {
  color: var(--faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.settings-hint {
  margin: 0;
  color: var(--faint);
  font-size: 12px;
}

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  min-height: 32px;
}

.setting-label {
  display: grid;
  min-width: 0;
}

.setting-label strong {
  font-size: 13px;
  font-weight: 500;
}

.setting-label span {
  color: var(--faint);
  font-size: 12px;
}

.switch {
  position: relative;
  flex-shrink: 0;
  width: 38px;
  height: 22px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease;
}

.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 160ms ease, background 160ms ease;
}

.switch[aria-checked="true"] {
  border-color: var(--accent);
  background: rgba(124, 181, 255, 0.35);
}

.switch[aria-checked="true"]::after {
  transform: translateX(16px);
  background: var(--text);
}

.switch:disabled {
  cursor: wait;
  opacity: 0.6;
}

.inline-input {
  display: flex;
  align-items: center;
  gap: 6px;
}

.inline-input input {
  width: 64px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.inline-input input.viewer-password {
  width: 150px;
}

.inline-input .unit {
  color: var(--faint);
  font-size: 12px;
}

.scan-display-list {
  display: grid;
  gap: 4px;
}

.setting-status {
  min-height: 1em;
  color: var(--muted);
  font-size: 12px;
}

.setting-status--error {
  color: #feb2b2;
}

.projection-tools {
  display: grid;
  gap: 10px;
}

.tools-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tools-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px;
  gap: 8px 10px;
  align-items: end;
}

.tool-field {
  display: grid;
  gap: 4px;
}

.tool-field--full {
  grid-column: 1 / -1;
}

.tool-field span {
  color: var(--muted);
  font-size: 12px;
}

.tool-field select {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.tool-slider {
  width: 100%;
  accent-color: var(--accent);
}

.tool-value,
.meta-pill {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--text);
  font-size: 12px;
}

.pano-output {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #08111b;
}

.output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 13px;
}

.output-json {
  margin: 0;
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Combine bar */

.combine-bar {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 50;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(200px, 280px) auto;
  gap: 12px;
  align-items: center;
  width: min(920px, calc(100vw - 32px));
  padding: 12px 14px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: rgba(9, 15, 23, 0.97);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
  transform: translateX(-50%);
}

.combine-summary {
  display: grid;
  min-width: 0;
}

.combine-actions {
  display: flex;
  gap: 8px;
}

/* Toasts */

.toast-region {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 120;
  display: grid;
  gap: 8px;
  width: min(380px, calc(100vw - 36px));
  pointer-events: none;
}

.combine-bar:not([hidden]) ~ .toast-region {
  bottom: 110px;
}

.toast {
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-left: 3px solid #48bb78;
  border-radius: 10px;
  background: rgba(11, 19, 29, 0.97);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  font-size: 13px;
  pointer-events: auto;
  animation: toast-in 160ms ease;
}

.toast--error {
  border-left-color: var(--danger);
  color: #ffd5d5;
}

.toast--leaving {
  opacity: 0;
  transition: opacity 240ms ease;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

/* Modal */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 6, 10, 0.72);
  backdrop-filter: blur(10px);
}

.modal-dialog {
  display: grid;
  gap: 12px;
  width: min(520px, 100%);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(9, 15, 23, 0.97);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.modal-head h2 {
  margin-top: 4px;
  font-size: 22px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

/* Small screens */

@media (max-width: 1040px) {
  .top-grid {
    grid-template-columns: 1fr;
  }

  .jobs-list {
    max-height: none;
  }
}

@media (max-width: 720px) {
  .admin-page {
    width: calc(100vw - 24px);
    padding-top: 16px;
  }

  .page-header,
  .tours-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .header-links {
    justify-content: flex-start;
  }

  .tours-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .search-field input {
    width: 100%;
  }

  .disclosure-row,
  .hierarchy-grid {
    grid-template-columns: 1fr;
  }

  .upload-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .project-select {
    opacity: 1;
  }

  .combine-bar {
    grid-template-columns: 1fr;
    bottom: 10px;
  }

  .combine-actions .button {
    flex: 1;
  }

  .combine-bar:not([hidden]) ~ .toast-region {
    bottom: 200px;
  }
}
