:root {
  color-scheme: light;
  --bg: oklch(0.96 0.008 250);
  --surface: oklch(1 0 0);
  --surface-alt: oklch(0.92 0.018 242);
  --ink: oklch(0.18 0.035 250);
  --muted: oklch(0.42 0.035 250);
  --line: oklch(0.83 0.019 248);
  --brand: oklch(0.47 0.14 242);
  --brand-strong: oklch(0.38 0.16 245);
  --accent: oklch(0.63 0.16 35);
  --danger: oklch(0.49 0.17 25);
  --radius: 12px;
  --shadow: 0 8px 18px oklch(0.24 0.05 250 / 0.12);
  /* Kraeftige Easing-Kurven (Emil Kowalski): die CSS-Defaults sind zu schwach. */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, oklch(0.95 0.02 245), oklch(0.98 0.005 180) 52%, oklch(0.94 0.02 35));
  color: var(--ink);
}

a {
  color: var(--brand-strong);
}

button,
input {
  font: inherit;
}

button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.brand-logo {
  height: 40px;
  width: 40px;
  border-radius: 9px;
  display: block;
}

.auth-logo {
  width: min(340px, 80%);
  height: auto;
  margin: 0 auto;
  display: block;
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 56px;
}

.intro-panel,
.auth-panel,
.upload-page,
.admin-dashboard,
.station-page {
  display: grid;
  gap: 24px;
}

.admin-dashboard {
  max-width: 980px;
  margin: 0 auto;
}

.intro-panel,
.auth-panel {
  max-width: 720px;
  padding: clamp(28px, 6vw, 64px) 0;
}

.label {
  margin: 0 0 8px;
  color: var(--brand-strong);
  font-size: 0.9rem;
  font-weight: 800;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
  text-wrap: balance;
}

h1 {
  max-width: 12ch;
  font-size: clamp(2.4rem, 7vw, 5.4rem);
  line-height: 0.96;
}

h2 {
  font-size: clamp(1.35rem, 2.5vw, 2rem);
}

h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0;
}

p {
  max-width: 68ch;
  color: var(--muted);
  line-height: 1.6;
}

.upload-heading p,
.section-heading p,
.dashboard-heading p {
  margin-bottom: 0;
}

.upload-box,
.admin-form,
.event-create-form,
.station-panel,
.event-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.upload-box,
.admin-form,
.event-create-form {
  display: grid;
  gap: 16px;
  padding: clamp(18px, 4vw, 28px);
}

.drop-zone {
  display: grid;
  min-height: 180px;
  place-items: center;
  gap: 8px;
  border: 2px dashed oklch(0.68 0.08 242);
  border-radius: 10px;
  background: oklch(0.96 0.018 242);
  padding: 24px;
  text-align: center;
  cursor: pointer;
}

.drop-zone-title {
  color: var(--ink);
  font-size: clamp(1.6rem, 5vw, 3rem);
  font-weight: 850;
}

.drop-zone-copy {
  color: var(--muted);
}

input[type="file"] {
  min-height: 48px;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
input[type="date"],
input[type="search"],
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 14px;
  transition: border-color 140ms var(--ease-out), box-shadow 140ms var(--ease-out);
}

input[type="text"]:focus-visible,
input[type="password"]:focus-visible,
input[type="number"]:focus-visible,
input[type="email"]:focus-visible,
input[type="date"]:focus-visible,
input[type="search"]:focus-visible,
select:focus-visible {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--brand) 18%, transparent);
}

.primary-action,
.secondary-action,
.station-shutter {
  min-height: 52px;
  border: 0;
  border-radius: 10px;
  padding: 0 18px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), filter 160ms var(--ease-out),
    box-shadow 160ms var(--ease-out);
}

.primary-action:hover,
.secondary-action:hover,
.station-shutter:hover {
  filter: brightness(0.96);
}

.primary-action:active,
.secondary-action:active,
.station-shutter:active {
  transform: scale(0.97);
}

.primary-action:focus-visible,
.secondary-action:focus-visible,
.station-shutter:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--brand) 32%, transparent);
}

.primary-action {
  background: var(--brand);
  color: white;
}

.secondary-action {
  background: var(--surface-alt);
  color: var(--ink);
}

.station-shutter {
  min-width: min(100%, 320px);
  min-height: 84px;
  background: var(--accent);
  color: oklch(0.17 0.04 35);
  font-size: clamp(1.3rem, 3vw, 2rem);
}

.status-line,
.station-status,
.error-text,
.success-text {
  margin: 0;
  font-weight: 700;
}

.error-text {
  color: var(--danger);
}

.success-text {
  color: oklch(0.36 0.12 150);
}

.gallery-section {
  display: grid;
  gap: 18px;
}

.section-heading {
  display: grid;
  gap: 4px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.photo-tile {
  display: grid;
  gap: 8px;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
}

.photo-tile img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border-radius: 10px;
  background: var(--surface-alt);
}

.photo-tile span {
  color: var(--muted);
  font-size: 0.86rem;
}

.photo-tile {
  cursor: pointer;
}

/* ---------- Bild-Lightbox (Popup statt neuem Tab) ---------- */
.lightbox {
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(22, 17, 12, 0.93);
}

.lightbox::backdrop {
  background: rgba(22, 17, 12, 0.6);
}

.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img {
  max-width: 92vw;
  max-height: 84dvh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
  background: #000;
}

.lightbox-btn {
  position: fixed;
  border: 0;
  cursor: pointer;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 999px;
  display: grid;
  place-items: center;
  line-height: 1;
}

.lightbox-btn:hover {
  background: rgba(0, 0, 0, 0.72);
}

.lightbox-close {
  top: 14px;
  right: 16px;
  width: 46px;
  height: 46px;
  font-size: 1.8rem;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 54px;
  font-size: 2rem;
}

.lightbox-prev {
  left: 12px;
}

.lightbox-next {
  right: 12px;
}

.lightbox-btn[hidden] {
  display: none;
}

.lightbox-caption {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 14px;
  text-align: center;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  padding: 0 16px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.empty-state {
  display: none;
  margin: 0;
  padding: 16px;
  border-radius: 10px;
  background: var(--surface-alt);
}

.empty-state.is-visible {
  display: block;
}

.dashboard-heading,
.station-hero,
.event-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.dashboard-actions,
.button-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.secondary-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border-radius: 10px;
  background: var(--surface-alt);
  color: var(--ink);
  padding: 0 12px;
  font-weight: 800;
  text-decoration: none;
  transition: background-color 150ms var(--ease-out), transform 120ms var(--ease-out);
}

.secondary-link:hover {
  background: var(--line);
}

.secondary-link:active {
  transform: scale(0.98);
}

.status-pill {
  border-radius: 999px;
  background: oklch(0.9 0.08 150);
  color: oklch(0.28 0.09 150);
  padding: 8px 12px;
  font-weight: 800;
}

.inline-form-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.events-list {
  display: grid;
  gap: 16px;
}

.event-card {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.event-card-compact {
  padding: 18px;
}

.event-card-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 18px;
  align-items: start;
}

.event-card-content {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.event-card-actions {
  display: grid;
  gap: 10px;
  justify-items: stretch;
}

.event-card-actions form,
.event-card-actions button,
.event-card-actions .secondary-link {
  width: 100%;
}

.event-card-actions .secondary-link {
  justify-content: center;
}

.event-card h2 {
  font-size: 1.35rem;
}

.event-card p {
  margin: 4px 0 0;
}

.event-meta {
  display: grid;
  gap: 12px;
  margin: 0;
}

.event-meta div {
  display: grid;
  gap: 4px;
}

.event-meta dt {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.event-meta dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.event-meta-compact {
  gap: 10px;
}

.station-admin-list {
  display: grid;
  gap: 12px;
}

.station-admin-row {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.sync-status-grid,
.form-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.sync-status-grid div {
  display: grid;
  gap: 4px;
  border-radius: 10px;
  background: var(--surface-alt);
  padding: 14px;
}

.sync-status-grid span,
.form-grid span {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.form-grid label {
  display: grid;
  gap: 6px;
}

.sync-status-grid strong {
  font-size: 1.7rem;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
}

.checkbox-row input {
  width: 22px;
  height: 22px;
}

.link-list {
  display: grid;
  gap: 8px;
  overflow-wrap: anywhere;
}

.link-disabled {
  color: var(--muted);
  text-decoration: line-through;
  overflow-wrap: anywhere;
}

.link-note {
  display: block;
  color: var(--danger);
  font-size: 0.82rem;
  font-weight: 800;
}

.dashboard-actions form {
  margin: 0;
}

.event-choice-list {
  display: grid;
  gap: 10px;
}

.choice-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 14px 16px;
  text-decoration: none;
}

.station-body {
  height: 100dvh;
  overflow: hidden; /* Kiosk: kein Scrollen, alles passt auf eine Seite */
  background:
    radial-gradient(circle at top left, oklch(0.95 0.025 95), transparent 32rem),
    radial-gradient(circle at top right, oklch(0.96 0.025 35), transparent 34rem),
    oklch(0.985 0.006 75);
  color: oklch(0.24 0.035 250);
}

.station-body .site-header {
  display: none;
}

.station-body .page-shell {
  width: min(1780px, calc(100% - 48px));
  height: 100dvh;
  padding: clamp(14px, 2vw, 28px) 0;
}

.station-camera-page {
  height: 100%;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(10px, 1.6vw, 20px);
}

.station-titlebar {
  display: grid;
  justify-items: center;
  gap: clamp(6px, 1vh, 12px);
  text-align: center;
}

.station-titlebar h1 {
  max-width: none;
  margin: 0;
  color: oklch(0.27 0.035 250);
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: clamp(2.1rem, 4.4vw, 3.6rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: 0.01em;
}

/* zarte Gold-Verzierung mit Mittelpunkt – passt zum Hochzeits-Charme */
.station-flourish {
  display: block;
  width: clamp(120px, 18vw, 240px);
  height: 9px;
  background:
    radial-gradient(circle, oklch(0.72 0.11 80) 0 2.5px, transparent 3px) center / 9px 9px no-repeat,
    linear-gradient(to right, transparent, oklch(0.72 0.11 80 / 0.7) 18%, transparent 42%) left center / 50% 1px no-repeat,
    linear-gradient(to left, transparent, oklch(0.72 0.11 80 / 0.7) 18%, transparent 42%) right center / 50% 1px no-repeat;
}

.camera-stage {
  position: relative;
  display: grid;
  min-height: 0;
  overflow: hidden;
  border: 1px solid oklch(0.78 0.045 80);
  border-radius: 12px;
  background: oklch(0.18 0.03 250);
  cursor: pointer;
  outline: none;
}

.camera-stage:focus-visible {
  box-shadow: 0 0 0 4px oklch(0.72 0.11 80 / 0.35);
}

.camera-stage.is-busy {
  cursor: wait;
}

.camera-video,
.camera-preview {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}

.camera-video.is-mirrored {
  transform: scaleX(-1);
}

.camera-placeholder {
  display: grid;
  place-content: center;
  gap: 8px;
  min-height: 0;
  padding: 28px;
  color: white;
  text-align: center;
}

.camera-placeholder strong {
  font-size: clamp(1.7rem, 4vw, 3.8rem);
  line-height: 1;
}

.camera-placeholder span {
  color: oklch(0.88 0.02 250);
  font-size: clamp(1rem, 2vw, 1.3rem);
}

.capture-countdown {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: oklch(0.12 0.025 250 / 0.42);
  color: white;
  font-size: clamp(6rem, 20vw, 18rem);
  font-weight: 900;
  line-height: 1;
}

.camera-status {
  position: absolute;
  left: 50%;
  bottom: 14px;
  max-width: min(720px, calc(100% - 32px));
  transform: translateX(-50%);
  border-radius: 999px;
  background: oklch(1 0 0 / 0.88);
  color: oklch(0.31 0.035 250);
  padding: 9px 16px;
  font-weight: 750;
  text-align: center;
}

.watch-actions {
  position: absolute;
  left: 50%;
  bottom: 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(460px, calc(100% - 32px));
  transform: translateX(-50%);
  gap: 10px;
}

/* Foto-Review als richtige Anzeige: dunkle Buehne ueber dem Livebild,
   Bild per Pinch/Doppeltipp/Mausrad zoombar, gezoomt verschiebbar. */
.station-review {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: oklch(0.18 0.03 250);
  touch-action: none;
  cursor: zoom-in;
}

.station-review[hidden] {
  display: none;
}

.station-review-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: center center;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
}

.station-review-image.is-animating {
  transition: transform 220ms var(--ease-out);
}

@media (prefers-reduced-motion: reduce) {
  .station-review-image.is-animating {
    transition: none;
  }
}

/* Foto-Review: "Noch ein Foto" als Pille rechts neben der Statuszeile,
   im Stil der Status-Anzeige mit goldenem Akzent (Hochzeits-Charme). */
.watch-actions.review-actions {
  left: auto;
  right: 16px;
  bottom: 14px;
  transform: none;
  grid-template-columns: 1fr;
  width: auto;
}

.review-actions .primary-action {
  min-height: 0;
  padding: 9px 18px;
  border: 1px solid oklch(0.72 0.11 80);
  border-radius: 999px;
  background: oklch(1 0 0 / 0.92);
  color: oklch(0.31 0.035 250);
  font-weight: 750;
}

.review-actions .primary-action:hover {
  filter: none;
  border-color: oklch(0.64 0.12 80);
  background: oklch(0.98 0.012 80);
}

.station-bottom-bar {
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(220px, 1fr) minmax(240px, 380px);
  align-items: center;
  gap: clamp(10px, 2vw, 24px);
}

.countdown-stepper,
.camera-picker,
.last-photo-button {
  min-height: 66px;
  border: 1px solid oklch(0.78 0.045 80);
  border-radius: 10px;
  background: oklch(1 0 0 / 0.88);
  color: oklch(0.25 0.035 250);
}

.countdown-stepper {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  overflow: hidden;
}

.countdown-stepper button {
  height: 100%;
  border: 0;
  background: transparent;
  color: oklch(0.53 0.09 75);
  font-size: 2.3rem;
  cursor: pointer;
}

.countdown-stepper span {
  font-weight: 800;
  text-align: center;
}

.camera-picker {
  display: grid;
  grid-template-columns: auto minmax(160px, 1fr);
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
}

.camera-picker span {
  color: oklch(0.45 0.03 250);
  font-weight: 800;
}

.camera-picker select {
  min-height: 44px;
}

.last-photo-button {
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: center;
  gap: 12px;
  padding: 8px 14px 8px 8px;
  font: inherit;
  font-weight: 850;
  text-align: left;
  cursor: pointer;
}

.last-photo-button img {
  width: 92px;
  height: 52px;
  border-radius: 8px;
  background: oklch(0.92 0.012 80);
  object-fit: cover;
}

.last-photo-button:not(.has-photo) {
  grid-template-columns: 1fr;
}

.last-photo-button small {
  display: block;
  color: oklch(0.48 0.03 250);
  font-size: 0.8rem;
  font-weight: 700;
}

.station-gallery-dialog {
  width: min(1020px, calc(100% - 32px));
  max-height: min(760px, calc(100vh - 32px));
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  padding: 20px;
}

.station-gallery-dialog::backdrop {
  background: oklch(0.15 0.03 250 / 0.58);
}

.station-gallery-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.station-photo-grid {
  max-height: min(560px, calc(100vh - 190px));
  overflow: auto;
}

.camera-video[hidden],
.camera-preview[hidden],
.camera-placeholder[hidden],
.capture-countdown[hidden],
.watch-actions[hidden],
.camera-picker[hidden],
.last-photo-button img[hidden] {
  display: none;
}

@media (max-width: 740px) {
  .dashboard-heading,
  .station-hero,
  .event-card-header,
  .choice-row,
  .dashboard-actions,
  .button-row {
    align-items: stretch;
    flex-direction: column;
  }

  .inline-form-row,
  .event-card-layout,
  .station-workspace,
  .station-actions {
    grid-template-columns: 1fr;
  }

  .event-card-actions {
    grid-template-columns: 1fr;
  }

  .station-body .page-shell {
    width: calc(100% - 20px);
    padding: 10px 0;
  }

  .station-camera-page {
    grid-template-rows: auto minmax(280px, 1fr) auto;
  }

  .camera-stage,
  .camera-video,
  .camera-preview,
  .camera-placeholder {
    min-height: 52vh;
  }

  .station-bottom-bar {
    grid-template-columns: 1fr;
  }

  .camera-picker {
    grid-template-columns: 1fr;
  }

  .last-photo-button {
    grid-template-columns: 88px 1fr;
  }

  h1 {
    max-width: 100%;
  }
}

/* ---------- Adminbereich: Sidebar-Layout ---------- */
.admin-shell {
  display: flex;
  align-items: stretch;
  min-height: 100vh;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 244px;
  min-width: 244px;
  height: 100vh;
  padding: 20px 14px;
  background: var(--surface);
  border-right: 1px solid var(--line);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 16px;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 800;
  text-decoration: none;
}

.admin-brand img {
  border-radius: 8px;
}

.admin-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
}

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border-radius: 10px;
  color: var(--ink);
  font-weight: 750;
  text-decoration: none;
  transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out);
}

.admin-nav a svg {
  flex: none;
  opacity: 0.78;
}

.admin-nav a:hover {
  background: var(--surface-alt);
}

.admin-nav a.active {
  background: var(--brand);
  color: #fff;
}

.admin-nav a.active svg {
  opacity: 1;
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.admin-user-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-alt);
  color: var(--brand-strong);
  font-size: 0.85rem;
  font-weight: 800;
}

.admin-user-meta {
  display: grid;
  min-width: 0;
}

.admin-user-name {
  font-size: 0.9rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-logout {
  border: 0;
  background: none;
  padding: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.admin-logout:hover {
  color: var(--brand-strong);
}

.admin-content {
  flex: 1;
  min-width: 0;
  max-width: 1100px;
  padding: 28px clamp(20px, 3vw, 44px) 64px;
}

.admin-content .admin-dashboard {
  max-width: none;
  margin: 0;
}

.admin-content h1 {
  max-width: none;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  line-height: 1.15;
}

.admin-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

@media (max-width: 880px) {
  .admin-shell {
    flex-direction: column;
  }

  .admin-sidebar {
    position: static;
    width: auto;
    min-width: 0;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .admin-brand {
    padding: 6px 8px;
  }

  .admin-nav {
    flex: 1 1 100%;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .admin-user {
    border-top: 0;
    padding-top: 0;
  }
}

/* ---------- Login / Landing-Seite ---------- */
.auth-wrap {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  min-height: 100vh;
  padding: 28px 20px;
}

.auth-card {
  width: min(420px, 100%);
  display: grid;
  gap: 18px;
  padding: clamp(28px, 5vw, 46px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  text-align: center;
}

.auth-card .auth-logo {
  width: min(248px, 72%);
  height: auto;
  margin: 0 auto 2px;
  display: block;
}

.auth-intro {
  display: grid;
  gap: 6px;
}

.auth-intro h1 {
  max-width: none;
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: clamp(2.3rem, 6vw, 3.1rem);
  font-weight: 600;
  line-height: 1.04;
}

.auth-intro p {
  max-width: none;
  margin: 0 auto;
  color: var(--muted);
}

.auth-form {
  display: grid;
  gap: 10px;
  margin-top: 6px;
  text-align: left;
}

.auth-form label {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.auth-form input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 18px;
}

.auth-form input:focus-visible {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--brand) 20%, transparent);
}

.auth-form .primary-action {
  width: 100%;
  margin-top: 10px;
  border-radius: 999px;
}

.auth-form .error-text {
  margin-top: 2px;
}

.auth-foot {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }

  .primary-action:active,
  .secondary-action:active,
  .secondary-link:active,
  .station-shutter:active,
  .bg-option:active {
    transform: none;
  }
}
