:root {
  --bg: #f3efe7;
  --bg-accent: #edf7f3;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: rgba(255, 255, 255, 0.96);
  --surface-muted: rgba(244, 247, 250, 0.88);
  --ink: #132238;
  --ink-soft: #516174;
  --line: rgba(19, 34, 56, 0.10);
  --line-strong: rgba(19, 34, 56, 0.18);
  --accent: #0f766e;
  --accent-strong: #0b5f58;
  --accent-soft: rgba(15, 118, 110, 0.10);
  --highlight: #f59e0b;
  --danger: #dc2626;
  --success: #16a34a;
  --shadow-lg: 0 24px 60px rgba(17, 24, 39, 0.10);
  --shadow-md: 0 14px 30px rgba(17, 24, 39, 0.08);
  --shadow-sm: 0 8px 18px rgba(17, 24, 39, 0.06);
  --radius-2xl: 28px;
  --radius-xl: 22px;
  --radius-lg: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.dashboard-body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Manrope', 'Segoe UI', sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.10), transparent 32%),
    radial-gradient(circle at bottom right, rgba(245, 158, 11, 0.14), transparent 28%),
    linear-gradient(180deg, var(--bg-accent) 0%, var(--bg) 100%);
}

body.dashboard-body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.40) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.40) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 85%);
  z-index: 0;
}

img {
  display: block;
  max-width: 100%;
}

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

button {
  cursor: pointer;
}

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

.hidden {
  display: none !important;
}

.dashboard-frame {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
  min-height: 100vh;
  padding: 24px;
}

.dashboard-sidebar {
  position: sticky;
  top: 24px;
  height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 28px;
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: 32px;
  color: #f7fbff;
  background: linear-gradient(180deg, rgba(9, 18, 33, 0.94) 0%, rgba(15, 33, 49, 0.96) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 70px rgba(9, 18, 33, 0.30);
  backdrop-filter: blur(22px);
}

.sidebar-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.sidebar-brand::before {
  content: '';
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #38bdf8, #34d399);
  box-shadow: 0 0 0 8px rgba(52, 211, 153, 0.12);
}

.sidebar-caption {
  margin: 10px 0 0;
  color: rgba(231, 239, 248, 0.70);
  line-height: 1.6;
}

.sidebar-nav {
  display: grid;
  gap: 10px;
  flex-shrink: 0;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 16px;
  color: rgba(247, 251, 255, 0.82);
  font-weight: 600;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.sidebar-nav a:hover,
.sidebar-nav a.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.10);
  transform: translateX(2px);
}

.sidebar-note {
  margin-top: 0;
  padding: 20px;
  max-height: none;
  overflow: visible;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.sidebar-note h3 {
  margin: 8px 0 10px;
  font-size: 1.05rem;
  font-weight: 700;
}

.sidebar-note p:last-child {
  margin: 0;
  color: rgba(231, 239, 248, 0.74);
  line-height: 1.7;
}

.sidebar-logout {
  width: 100%;
  justify-content: center;
  margin-top: auto;
  flex-shrink: 0;
}

.dashboard-main-wrap {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.dashboard-topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 4px 0;
}

.dashboard-topbar h1,
.objects-hero h2,
.project-hero h2,
.panel-heading h3,
.create-project-dialog h3,
.editor-panel h3,
.empty-state h3 {
  margin: 0;
  font-size: clamp(1.85rem, 2vw, 2.65rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.dashboard-topbar__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.dashboard-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.dashboard-footer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 24px 4px 12px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.dashboard-footer a {
  display: inline-flex;
  margin-right: 14px;
  color: var(--ink);
}

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

.section-copy {
  margin: 14px 0 0;
  max-width: 720px;
  color: var(--ink-soft);
  line-height: 1.75;
}

.panel {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border-radius: var(--radius-2xl);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px);
}

.panel::after {
  content: '';
  position: absolute;
  inset: auto 24px 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(15, 118, 110, 0.18), transparent);
}

.panel--hero {
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.92), rgba(245, 249, 252, 0.88));
}

.panel--sticky {
  position: sticky;
  top: 24px;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

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

.metrics-grid--compact {
  margin-top: -8px;
}

.metric-card {
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(249, 251, 252, 0.88));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.metric-card strong {
  display: block;
  margin: 10px 0 8px;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.05em;
}

.metric-card span {
  color: var(--ink-soft);
}

.saas-button,
.chip-button,
.export-tab,
.action-chip,
.action-tile,
.style-card {
  appearance: none;
  border: 0;
}

.saas-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent) 0%, #1f9b90 100%);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 12px 26px rgba(15, 118, 110, 0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.saas-button:hover,
.chip-button:hover,
.export-tab:hover,
.action-chip:hover,
.action-tile:hover,
.style-card:hover {
  transform: translateY(-1px);
}

.saas-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

.saas-button--ghost {
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  box-shadow: none;
}

.inline-message {
  min-height: 22px;
  color: var(--ink-soft);
  line-height: 1.6;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--ink-soft);
  font-weight: 700;
}

.objects-page,
.workspace-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.objects-hero,
.project-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
}

.objects-hero__actions,
.project-hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.project-meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.project-meta-chip,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
}

.project-meta-chip {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(19, 34, 56, 0.10);
}

.status-pill {
  background: rgba(15, 118, 110, 0.10);
  color: var(--accent-strong);
}

.status-pill--queued {
  background: rgba(245, 158, 11, 0.16);
  color: #b45309;
}

.status-pill--processing {
  background: rgba(56, 189, 248, 0.16);
  color: #0369a1;
}

.status-pill--done {
  background: rgba(22, 163, 74, 0.12);
  color: #166534;
}

.status-pill--failed {
  background: rgba(220, 38, 38, 0.12);
  color: #991b1b;
}

.objects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 18px;
}

.object-card {
  overflow: hidden;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.90));
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.object-card:hover {
  transform: translateY(-4px);
  border-color: rgba(15, 118, 110, 0.26);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.10);
}

.object-card__media {
  position: relative;
  min-height: 136px;
  padding: 18px;
  background:
    radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.18), transparent 36%),
    linear-gradient(135deg, rgba(15, 118, 110, 0.15), rgba(19, 34, 56, 0.06));
}

.object-card__media::after {
  content: '';
  position: absolute;
  inset: 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0.14));
}

.object-card__count {
  position: absolute;
  right: 24px;
  bottom: 22px;
  z-index: 1;
  display: grid;
  justify-items: end;
}

.object-card__count span {
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.06em;
}

.object-card__count small {
  color: var(--ink-soft);
  font-weight: 700;
}

.object-card__body {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.object-card__body h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

.object-card__body p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.7;
}

.object-card__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.upload-dropzone {
  display: grid;
  gap: 16px;
  padding: 28px;
  border: 1.5px dashed rgba(15, 118, 110, 0.30);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.05), rgba(255, 255, 255, 0.76));
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.upload-dropzone.dragover {
  transform: translateY(-2px);
  border-color: rgba(15, 118, 110, 0.62);
  box-shadow: 0 16px 30px rgba(15, 118, 110, 0.10);
}

.upload-dropzone__visual {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.16), rgba(56, 189, 248, 0.14));
  color: var(--accent-strong);
  font-size: 2rem;
  font-weight: 800;
}

.upload-dropzone h4,
.empty-state h3,
.queue-summary__item strong {
  margin: 0;
}

.upload-dropzone p,
.empty-state p,
.queue-summary__item span,
.field span,
.editor-panel small,
.action-tile small,
.style-card span {
  color: var(--ink-soft);
}

.upload-dropzone__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.upload-status {
  min-height: 24px;
  color: var(--ink-soft);
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.95fr);
  gap: 24px;
  align-items: start;
}

.workspace-main,
.workspace-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.photo-card {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  box-shadow: var(--shadow-sm);
}

.photo-card__image-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #dbe6ef;
  cursor: pointer;
}

.photo-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.photo-card:hover .photo-card__image {
  transform: scale(1.03);
}

.photo-card__badge-row {
  position: absolute;
  inset: 12px 12px auto;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.photo-card__body {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.photo-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

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

.action-chip,
.chip-button {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: none;
}

.action-chip--accent,
.chip-button {
  background: var(--accent-soft);
  border-color: rgba(15, 118, 110, 0.18);
  color: var(--accent-strong);
}

.chip-button--subtle {
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
}

.action-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 700;
}

.queue-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.queue-summary__item {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface-muted);
}

.queue-summary__item strong {
  display: block;
  margin-top: 8px;
  font-size: 1.5rem;
  line-height: 1;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.job-card {
  display: grid;
  gap: 16px;
  padding: 20px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  box-shadow: var(--shadow-sm);
}

.job-card__header,
.job-card__actions,
.editor-preview-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.job-card__meta {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

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

.progress-bar {
  height: 100%;
  width: var(--progress, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #34d399);
}

.compare-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #0f172a;
  aspect-ratio: 4 / 3;
  --compare-position: 50;
}

.compare-image-base,
.compare-image-after,
.compare-handle {
  position: absolute;
  inset: 0;
}

.compare-image-base img,
.compare-image-after img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compare-image-after {
  clip-path: inset(0 0 0 calc(var(--compare-position) * 1%));
}

.compare-handle {
  left: calc(var(--compare-position) * 1%);
  width: 2px;
  background: rgba(255, 255, 255, 0.92);
  transform: translateX(-1px);
}

.compare-label {
  position: absolute;
  top: 16px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.58);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.compare-label--before {
  left: 16px;
}

.compare-label--after {
  right: 16px;
}

.compare-range {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 3;
  width: calc(100% - 32px);
  margin: 0;
  appearance: none;
  background: transparent;
}

.compare-range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
}

.compare-range::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -7px;
  border-radius: 999px;
  border: 0;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.24);
}

.compare-range::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
}

.compare-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 0;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.24);
}

.error-callout {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(220, 38, 38, 0.16);
  background: rgba(220, 38, 38, 0.06);
  color: #991b1b;
  line-height: 1.6;
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 34px;
  border-radius: 24px;
  border: 1px dashed rgba(19, 34, 56, 0.18);
  background: rgba(255, 255, 255, 0.54);
  text-align: center;
}

.empty-state--compact {
  min-height: 320px;
  align-content: center;
}

.empty-state__icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  font-size: 1.8rem;
}

.listing-form,
.field-grid,
.field-grid--single {
  display: grid;
  gap: 14px;
}

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

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

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

.field span {
  font-size: 0.88rem;
  font-weight: 700;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.58);
}

.field input:focus,
.field textarea:focus {
  outline: 2px solid rgba(15, 118, 110, 0.18);
  border-color: rgba(15, 118, 110, 0.28);
}

.field textarea,
#description-result {
  min-height: 160px;
  resize: vertical;
}

.export-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 10px;
}

.export-tab {
  min-height: 48px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-weight: 800;
}

.export-tab.is-active {
  background: linear-gradient(135deg, var(--ink) 0%, #223654 100%);
  color: #fff;
  box-shadow: 0 12px 24px rgba(19, 34, 56, 0.20);
}

.export-surface {
  min-height: 200px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(245, 248, 251, 0.92));
  color: var(--ink);
  white-space: pre-wrap;
  line-height: 1.7;
}

.app-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(9, 18, 33, 0.58);
  backdrop-filter: blur(12px);
}

.app-modal__dialog {
  position: relative;
  width: min(1120px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 28px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.30);
  background: linear-gradient(180deg, rgba(250, 252, 253, 0.98), rgba(242, 246, 249, 0.96));
  box-shadow: 0 30px 70px rgba(9, 18, 33, 0.28);
}

.create-project-dialog {
  width: min(620px, 100%);
}

.create-project-dialog__intro {
  margin-bottom: 22px;
}

.create-project-dialog__intro p:last-child {
  margin: 10px 0 0;
  color: var(--ink-soft);
  line-height: 1.7;
}

.app-modal__close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(19, 34, 56, 0.06);
  color: var(--ink);
  font-size: 1.4rem;
}

.editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 24px;
}

.editor-preview-column,
.editor-panel {
  display: grid;
  gap: 18px;
}

.editor-preview-stage {
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(180deg, #dde7ef, #cfd9e2);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.62);
  aspect-ratio: 4 / 3;
  min-height: 320px;
}

.editor-preview-stage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.editor-preview-stage .empty-state {
  height: 100%;
  align-content: center;
}

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

.action-tile,
.style-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  text-align: left;
  box-shadow: var(--shadow-sm);
}

.action-tile span:first-child {
  font-size: 1.5rem;
}

.action-tile strong,
.style-card strong {
  font-size: 1rem;
}

.action-tile.is-active,
.style-card.is-active {
  border-color: rgba(15, 118, 110, 0.24);
  box-shadow: 0 18px 34px rgba(15, 118, 110, 0.10);
  background: linear-gradient(180deg, rgba(239, 250, 248, 0.96), rgba(255, 255, 255, 0.98));
}

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

.style-card__preview {
  min-height: 96px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.65);
}

.style-preview--modern {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent),
    linear-gradient(135deg, #f8fafc, #dbeafe 46%, #bfdbfe 100%);
}

.style-preview--scandinavian {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), transparent),
    linear-gradient(135deg, #fdfcf8, #f6f0dd 40%, #dceadf 100%);
}

.style-preview--minimal {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent),
    linear-gradient(135deg, #fbfbfb, #e7eaee 50%, #d4d8de 100%);
}

.style-preview--classic {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent),
    linear-gradient(135deg, #f6ead8, #e4c6a1 44%, #c89365 100%);
}

.toast-stack {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(360px, calc(100vw - 32px));
}

.toast {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.40);
  background: rgba(17, 24, 39, 0.92);
  color: #fff;
  box-shadow: 0 18px 35px rgba(17, 24, 39, 0.20);
  animation: toast-in 0.24s ease;
}

.toast--success {
  background: rgba(15, 118, 110, 0.95);
}

.toast--error {
  background: rgba(153, 27, 27, 0.95);
}

.toast--info {
  background: rgba(17, 24, 39, 0.92);
}

.toast__title {
  font-size: 0.94rem;
  font-weight: 800;
}

.toast__body {
  font-size: 0.88rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-height: 920px) {
  .dashboard-sidebar {
    gap: 16px;
    padding: 22px;
  }

  .sidebar-brand {
    font-size: 1.8rem;
  }

  .sidebar-caption {
    font-size: 0.92rem;
    line-height: 1.45;
  }

  .sidebar-nav {
    gap: 8px;
  }

  .sidebar-nav a {
    min-height: 42px;
    font-size: 1.02rem;
  }

  .sidebar-note {
    padding: 16px;
  }

  .sidebar-note h3 {
    margin: 6px 0 8px;
    font-size: 1rem;
  }

  .sidebar-note p:last-child {
    font-size: 0.92rem;
    line-height: 1.55;
  }
}
@media (max-width: 1280px) {
  .workspace-grid,
  .editor-grid {
    grid-template-columns: 1fr;
  }

  .panel--sticky {
    position: static;
  }
}

@media (max-width: 960px) {
  .dashboard-frame {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .dashboard-sidebar {
    position: static;
    height: auto;
    overflow: visible;
  }

  .sidebar-note {
    max-height: none;
    overflow: visible;
  }

  .dashboard-topbar,
  .objects-hero,
  .project-hero,
  .panel-heading,
  .job-card__header,
  .job-card__actions,
  .editor-preview-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-topbar__actions,
  .objects-hero__actions,
  .project-hero__actions,
  .panel-actions {
    justify-content: flex-start;
  }

  .metrics-grid,
  .field-grid,
  .queue-summary,
  .action-tile-grid,
  .style-picker,
  .export-tabs {
    grid-template-columns: 1fr;
  }

  .dashboard-footer {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .panel,
  .app-modal__dialog {
    padding: 22px;
  }

  .photo-grid,
  .results-grid,
  .objects-grid {
    grid-template-columns: 1fr;
  }

  .photo-card__actions {
    grid-template-columns: 1fr;
  }

  .toast-stack {
    top: auto;
    right: 16px;
    bottom: 16px;
    left: 16px;
    width: auto;
  }
}