:root {
  --bg: #f5f2eb;
  --surface: rgba(255, 255, 255, 0.76);
  --surface-strong: #ffffff;
  --ink: #1f211d;
  --muted: #6e7166;
  --line: rgba(71, 77, 60, 0.14);
  --line-strong: rgba(50, 57, 40, 0.22);
  --accent: #44513f;
  --accent-soft: rgba(68, 81, 63, 0.1);
  --shadow: 0 24px 60px rgba(27, 32, 24, 0.08);
  --radius-sm: 14px;
  --radius-md: 24px;
  --radius-lg: 34px;
  --max-width: 1240px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", system-ui, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(117, 129, 92, 0.18), transparent 32%),
    radial-gradient(circle at right 20%, rgba(181, 168, 133, 0.16), transparent 28%),
    linear-gradient(180deg, #f8f5ef 0%, var(--bg) 58%, #efe9de 100%);
  color: var(--ink);
}

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

button,
input,
textarea {
  font: inherit;
}

/* ── Layout ── */

.page-shell {
  width: min(100%, calc(var(--max-width) + 64px));
  margin: 0 auto;
  padding: 22px 20px 40px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 0 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-copy {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  text-transform: uppercase;
}

.brand-copy strong {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  background: linear-gradient(145deg, #2d3527 0%, #5f6f55 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-sub {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.34em;
  color: #5f6f55;
}

.topnav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(18px);
}

.topnav a {
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--muted);
  transition: background-color 180ms ease, color 180ms ease;
}

.topnav-form {
  margin: 0;
}

.topnav-button {
  border: none;
  background: transparent;
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease;
}

.topnav a:hover,
.topnav a:focus-visible,
.topnav-button:hover,
.topnav-button:focus-visible {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  outline: none;
}

.topnav .is-active {
  background: var(--accent);
  color: #fbfaf7;
}

.app-frame {
  display: grid;
  gap: 28px;
}

.app-frame > * {
  animation: rise 520ms ease both;
}

/* ── Typography ── */

.eyebrow,
.mini-label,
.group-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--muted);
}

h1,
h2 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.lead {
  max-width: 50ch;
  margin: 12px 0 0;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--muted);
}

/* ── Pipeline status indicator ── */

.pipeline {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: flex;
  gap: 0;
  align-items: center;
}

.pipeline li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.pipeline li + li::before {
  content: "";
  display: block;
  width: 32px;
  height: 2px;
  background: var(--line);
  margin-right: 8px;
}

.pipeline li.is-done + li::before {
  background: var(--accent);
}

.pipe-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
  flex-shrink: 0;
}

.pipeline .is-done .pipe-dot {
  background: var(--accent);
}

.pipeline .is-current .pipe-dot {
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.pipeline .is-current strong {
  color: var(--ink);
}

.pipeline .is-done strong {
  color: var(--accent);
}

.status-source {
  margin: 16px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  word-break: break-all;
}

/* ── Panels and cards ── */

.workspace {
  padding: clamp(22px, 2vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(18px);
}

.section-head,
.summary-bar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.section-head.is-spacious {
  align-items: start;
}

.section-head + .editor-form {
  margin-top: 22px;
}

.status-hero {
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top right, rgba(68, 81, 63, 0.12), transparent 32%),
    rgba(255, 255, 255, 0.62);
}

/* ── Forms ── */

.editor-form {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  display: grid;
  gap: 18px;
}

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

.field span {
  font-weight: 700;
}

.field input,
.field textarea {
  width: 100%;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(248, 246, 241, 0.92);
  color: var(--ink);
  transition: border-color 180ms ease, background-color 180ms ease;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(68, 81, 63, 0.55);
  background: #fff;
}

.toggle-row,
.toggle-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.toggle-row strong {
  display: block;
  margin-bottom: 4px;
}

.toggle-row small {
  color: var(--muted);
}

.toggle-row input,
.toggle-line input {
  accent-color: var(--accent);
}

.action-row,
.head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ── Buttons ── */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.button-primary {
  background: var(--accent);
  color: #fbfaf7;
}

.button-primary:hover,
.button-primary:focus-visible {
  background: #384633;
}

.button-secondary {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  border-color: rgba(68, 81, 63, 0.28);
  background: rgba(247, 245, 239, 1);
}

/* ── Summary bar ── */

.summary-bar {
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.62);
}

.summary-bar > div {
  display: grid;
  gap: 6px;
}

/* ── Photo gallery ── */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.photo-tile {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.68);
  overflow: hidden;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.photo-tile:hover {
  transform: translateY(-2px);
}

.photo-tile label,
.ready-tile {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.photo-tile input {
  accent-color: var(--accent);
}

.photo-tile.is-selected {
  border-color: rgba(68, 81, 63, 0.4);
  background: rgba(255, 255, 255, 0.86);
}

.photo-view {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 20px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.photo-meta {
  display: grid;
  gap: 4px;
}

.photo-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.photo-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.photo-meta small {
  color: var(--muted);
}

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

/* ── Jobs dashboard ── */

.jobs-list-wrap {
  padding-top: 12px;
}

.jobs-list {
  display: grid;
  gap: 12px;
}

.job-item {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
}

.job-main {
  display: grid;
  gap: 4px;
}

.job-main small {
  color: var(--muted);
}

.job-actions {
  display: flex;
  justify-content: end;
}

/* ── Auth pages ── */

.auth-wrap {
  max-width: 680px;
  width: min(100%, 680px);
  margin: clamp(32px, 8vh, 96px) auto 0;
}

.auth-form {
  margin-top: 10px;
}

.errorlist {
  margin: 8px 0 0;
  padding-left: 18px;
  color: #7a3434;
}

.ready-tile .photo-view {
  aspect-ratio: 4 / 3;
}

.export-head {
  padding-bottom: 4px;
}

.export-submit {
  min-width: 142px;
}

.export-photo-list {
  display: grid;
  gap: 18px;
  margin-top: 16px;
}

.export-card {
  display: grid;
  grid-template-columns: minmax(320px, 44%) minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 46px rgba(27, 32, 24, 0.07);
}

.export-preview-panel {
  min-height: 420px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(68, 81, 63, 0.08), transparent 44%),
    rgba(248, 246, 241, 0.78);
}

.export-preview {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 392px;
  border-radius: 8px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(31, 33, 29, 0.08);
}

.export-editor {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 18px;
}

.export-card-head,
.export-control-head,
.quality-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.export-card-head {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.export-card-head strong,
.export-control-head strong,
.quality-row strong {
  display: block;
  font-size: 0.96rem;
  font-weight: 800;
}

.export-card-head small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.82rem;
}

.dimension-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.dimension-pill {
  flex-shrink: 0;
  padding: 7px 10px;
  border: 1px solid rgba(68, 81, 63, 0.15);
  border-radius: 999px;
  background: rgba(68, 81, 63, 0.08);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
}

.export-control-group {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
}

.export-mini-button {
  min-height: 36px;
  padding: 9px 13px;
  font-size: 0.82rem;
}

.crop-summary {
  min-height: 32px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(68, 81, 63, 0.08);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}

.segmented-control,
.format-options,
.custom-size-fields,
.crop-fields-grid {
  display: grid;
  gap: 10px;
}

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

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

.custom-size-fields,
.crop-fields-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.segmented-control label,
.format-options label {
  min-width: 0;
}

.segmented-control input,
.format-options input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.segmented-control span,
.format-options span {
  display: grid;
  place-items: center;
  min-height: 42px;
  padding: 9px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(248, 246, 241, 0.92);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.segmented-control input:checked + span,
.format-options input:checked + span {
  border-color: rgba(68, 81, 63, 0.46);
  background: var(--accent);
  color: #fbfaf7;
  box-shadow: 0 8px 20px rgba(68, 81, 63, 0.16);
}

.segmented-control input:focus-visible + span,
.format-options input:focus-visible + span {
  outline: 3px solid rgba(68, 81, 63, 0.18);
  outline-offset: 2px;
}

.crop-fields-grid label,
.custom-size-fields label,
.quality-row {
  display: grid;
  gap: 6px;
}

.ready-tile .crop-fields-grid label,
.ready-tile .quality-override-label {
  padding: 0;
}

.crop-fields-grid input,
.custom-size-fields input,
.quality-row input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(248, 246, 241, 0.92);
  color: var(--ink);
  padding: 8px 10px;
}

.custom-size-fields.is-hidden {
  display: none;
}

.quality-row {
  grid-template-columns: minmax(130px, 0.8fr) minmax(160px, 1fr);
  align-items: center;
}

.quality-row input[type="range"] {
  min-height: 30px;
  padding: 0;
  cursor: pointer;
}

.quality-row small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.78rem;
}

.quality-row.is-soft {
  opacity: 0.74;
}

.quality-override-label {
  display: grid;
  gap: 6px;
}

.quality-override-label input,
.quality-override-label select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(248, 246, 241, 0.92);
  color: var(--ink);
  padding: 8px 10px;
}

.quality-override-label input[type="range"] {
  min-height: 28px;
  padding: 0;
  cursor: pointer;
}

.quality-override-label small {
  color: var(--muted);
  font-size: 0.78rem;
}

/* ── Detail rows ── */

.detail-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.detail-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.detail-row span {
  color: var(--muted);
}

/* ── Utility ── */

.is-hidden {
  display: none;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Live gallery (working page) ── */

.live-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(22px, 2.5vw, 32px);
  margin-bottom: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top right, rgba(68, 81, 63, 0.08), transparent 40%),
    rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(18px);
}

.live-header-left {
  display: grid;
  gap: 8px;
}

.live-header .lead {
  margin: 0;
}

.scanning-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  background: rgba(68, 81, 63, 0.08);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  width: fit-content;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-glow 1.4s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(68, 81, 63, 0.45);
    opacity: 1;
  }
  50% {
    box-shadow: 0 0 0 6px rgba(68, 81, 63, 0);
    opacity: 0.7;
  }
}

.source-url {
  display: block;
  font-size: 0.88rem;
  color: var(--muted);
  word-break: break-all;
  line-height: 1.5;
}

.live-gallery {
  margin-top: 0;
}

/* Tile inner wrapper for consistent padding */
.tile-inner {
  display: grid;
  gap: 14px;
  padding: 14px;
}

/* Arrived tile animation */
.tile-arrived {
  animation: tile-pop 420ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes tile-pop {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ── Skeleton shimmer ── */

.skeleton-tile {
  pointer-events: none;
}

.skeleton-shimmer {
  background: linear-gradient(
    100deg,
    rgba(68, 81, 63, 0.05) 0%,
    rgba(68, 81, 63, 0.10) 40%,
    rgba(68, 81, 63, 0.05) 60%,
    rgba(68, 81, 63, 0.05) 100%
  );
  background-size: 250% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
  border-radius: 20px;
}

.skeleton-text {
  display: block;
  height: 14px;
  border-radius: 7px;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ── Error state ── */

.status-error {
  margin-top: 12px;
  padding: 16px 22px;
  border: 1px solid rgba(168, 70, 70, 0.2);
  border-radius: var(--radius-sm);
  background: rgba(168, 70, 70, 0.06);
  color: #7a3434;
  font-size: 0.92rem;
}

.status-error p {
  margin: 0;
}

.empty-msg {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 1rem;
}

.crop-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(245, 242, 235, 0.12), transparent 34%),
    rgb(10 20 30 / 74%);
  backdrop-filter: blur(10px);
}

.crop-modal.is-hidden {
  display: none;
}

.crop-modal-panel {
  width: min(1280px, 100%);
  max-height: 92vh;
  overflow: auto;
  border-radius: 8px;
  background: var(--surface, #fff);
  padding: 22px;
  box-shadow: 0 30px 90px rgba(5, 10, 15, 0.28);
}

.crop-modal-head {
  margin-bottom: 18px;
}

.crop-modal-head .lead {
  margin-top: 8px;
}

.crop-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}

.crop-canvas-wrap {
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(20, 24, 18, 0.08);
  padding: 12px;
}

.crop-canvas-wrap img {
  display: block;
  max-width: 100%;
  max-height: 72vh;
}

.crop-controls-panel {
  display: grid;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
}

.ratio-grid,
.crop-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.ratio-grid button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(248, 246, 241, 0.92);
  color: var(--ink);
  cursor: pointer;
}

.ratio-grid button:hover,
.ratio-grid button:focus-visible,
.ratio-grid button.is-active {
  border-color: rgba(68, 81, 63, 0.4);
  background: var(--accent);
  color: #fbfaf7;
  outline: none;
}

/* ── Responsive ── */

@media (max-width: 1024px) {
  .gallery-grid,
  .compact-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .export-card {
    grid-template-columns: 1fr;
  }

  .export-preview-panel {
    min-height: 360px;
  }

  .export-preview {
    min-height: 332px;
  }

  .topbar,
  .section-head,
  .summary-bar,
  .live-header {
    align-items: start;
    flex-direction: column;
  }

  .pipeline {
    flex-wrap: wrap;
  }

  .crop-workbench {
    grid-template-columns: 1fr;
  }

  .crop-controls-panel {
    grid-row: 1;
  }
}

@media (max-width: 720px) {
  .page-shell {
    padding-inline: 14px;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topnav {
    width: 100%;
    justify-content: space-between;
    border-radius: 20px;
  }

  .topnav a {
    flex: 1 1 0;
    text-align: center;
  }

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

  .export-editor {
    padding: 14px;
  }

  .export-card-head,
  .export-control-head,
  .quality-row {
    align-items: stretch;
    flex-direction: column;
  }

  .dimension-pill {
    width: fit-content;
  }

  .dimension-stack {
    justify-content: flex-start;
  }

  .segmented-control,
  .format-options,
  .custom-size-fields,
  .crop-fields-grid {
    grid-template-columns: 1fr;
  }

  .quality-row {
    grid-template-columns: 1fr;
  }

  .crop-modal {
    padding: 12px;
  }

  .crop-modal-panel {
    padding: 14px;
  }

  .crop-canvas-wrap {
    min-height: 320px;
  }

  .job-item {
    grid-template-columns: 1fr;
  }

  .job-actions {
    justify-content: start;
  }

  .button {
    width: 100%;
  }

  .action-row,
  .head-actions {
    flex-direction: column;
  }
}

/* ── Flash messages ── */
.flash-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.flash {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.92rem;
}

.flash-error {
  border-color: rgba(176, 58, 46, 0.4);
  background: rgba(176, 58, 46, 0.08);
  color: #8a2c22;
}

.flash-warning {
  border-color: rgba(170, 120, 30, 0.4);
  background: rgba(170, 120, 30, 0.08);
  color: #7a5712;
}

.flash-success {
  border-color: rgba(68, 81, 63, 0.4);
  background: var(--accent-soft);
  color: var(--accent);
}

/* ── Intake tabs (home) ── */
.intake-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 18px;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
}

.intake-tab {
  border: 0;
  cursor: pointer;
  padding: 9px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--muted);
  background: transparent;
}

.intake-tab.is-active {
  background: var(--surface-strong);
  color: var(--ink);
  box-shadow: 0 6px 16px rgba(27, 32, 24, 0.08);
}

/* ── Upload dropzone ── */
.dropzone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 28px;
  text-align: center;
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone:hover,
.dropzone.is-dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.dropzone-prompt {
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}

.dropzone-prompt small {
  color: var(--muted);
}
