:root {
  --bg: #0f172a;
  --panel: #111827;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --brand: #facc15;
  --brand-dark: #ca8a04;
  --line: #e2e8f0;
  --danger: #dc2626;
  --ok: #16a34a;
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html {
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}
body {
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow-x: clip;
  background: #f8fafc;
  color: var(--text);
  line-height: 1.5;
}
a { color: inherit; }
img, video, canvas { max-width: 100%; }
h1, h2, h3, h4, h5, h6 {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 1rem;
  background: rgba(15, 23, 42, .96);
  color: white;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(2, 6, 23, .18);
}
.brand {
  display: flex;
  gap: .7rem;
  align-items: center;
  text-decoration: none;
  min-width: 0;
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 62vw; }
.brand small { color: #cbd5e1; font-size: .76rem; }
.brand-mark { font-size: 1.7rem; }
.top-actions a {
  color: #f8fafc;
  text-decoration: none;
  font-weight: 700;
  font-size: .9rem;
}
.main {
  width: min(1040px, 100%);
  min-width: 0;
  margin: 0 auto;
  padding: 1rem;
}
.footer {
  width: min(1040px, 100%);
  margin: 2rem auto 0;
  padding: 1.5rem 1rem 2.5rem;
  color: var(--muted);
  font-size: .9rem;
}
.footer-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.footer-links a { color: #334155; font-weight: 750; }
.footer-version { margin-bottom: 0; }
.muted { color: var(--muted); }

.hero, .page-head, .selector-card, .content-card, .empty-state, .weather-card, .form-card, .help-card, .section-editor {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
}
.hero {
  padding: 1.5rem;
  background: linear-gradient(135deg, #111827, #1e293b);
  color: white;
}
.hero h1 { margin: .25rem 0 .5rem; font-size: clamp(1.9rem, 8vw, 3.5rem); line-height: 1; }
.hero p { color: #cbd5e1; }
.eyebrow {
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand) !important;
  font-weight: 800;
  font-size: .8rem;
  margin: 0;
}
.alert {
  margin-top: 1rem;
  padding: .9rem 1rem;
  border-radius: 14px;
  background: #fef3c7;
  color: #713f12;
  font-weight: 800;
}
.alert.danger { background: #fee2e2; color: #7f1d1d; }

.selector-card { margin-top: 1rem; padding: 1rem; }
.selector-card h2 { margin-top: 0; }
.select-form { display: grid; gap: .65rem; }
label { font-weight: 750; font-size: .9rem; }
input, select, textarea {
  width: 100%;
  padding: .85rem .9rem;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: white;
  color: var(--text);
}
textarea { resize: vertical; }
button, .secondary-button, .download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-height: 46px;
  padding: .75rem 1rem;
  border: 0;
  border-radius: 14px;
  background: var(--brand);
  color: #1f2937;
  font-weight: 900;
  text-decoration: none;
}
button:hover, .secondary-button:hover, .download:hover { filter: brightness(.96); }
.secondary-button { background: #e2e8f0; color: var(--text); }
.danger-button { background: #fee2e2; color: #991b1b; margin-top: .75rem; }
.link-button { background: transparent; color: white; padding: 0; min-height: 0; }

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .85rem;
  margin-top: 1rem;
}
.tile {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: .15rem .8rem;
  padding: 1rem;
  text-decoration: none;
  background: white;
  border: 1px solid var(--line);
  border-radius: 17px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
}
.tile-icon { grid-row: span 2; font-size: 1.7rem; }
.tile strong { font-size: 1.02rem; }
.tile small { color: var(--muted); }

.backlink {
  display: inline-flex;
  margin: .5rem 0 1rem;
  color: #334155;
  text-decoration: none;
  font-weight: 800;
}
.page-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  margin-bottom: 1rem;
}
.page-head.compact { margin-top: 1rem; }
.page-icon { font-size: 2rem; }
.page-head h1, .page-head h2 { margin: 0; line-height: 1.1; }
.page-head p { margin: .35rem 0 0; color: var(--muted); }
.content-list { display: grid; gap: 1rem; }
.content-card { padding: 1rem; overflow: hidden; }
.content-card h2 { margin: 0 0 .5rem; }
.content-card p { margin: .25rem 0 .75rem; }
.legal-content h2 { margin: 1.5rem 0 .5rem; font-size: 1.2rem; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content address { font-style: normal; }
.legal-content a { overflow-wrap: anywhere; }
.legal-placeholder {
  padding: .8rem 1rem;
  border-radius: 14px;
  background: #fef3c7;
  color: #713f12;
  font-weight: 700;
}
.content-card figure {
  max-width: 100%;
  margin: 0;
}
.content-image-link {
  display: block;
  max-width: 100%;
  color: inherit;
  text-decoration: none;
  cursor: zoom-in;
}
.content-image-link:focus-visible {
  outline: 3px solid #38bdf8;
  outline-offset: 3px;
}
.content-image { width: 100%; max-width: 100%; border-radius: 14px; border: 1px solid var(--line); display: block; }
.image-loading-frame {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #eef1f6;
}
.image-loading-frame::after {
  content: "";
  position: absolute;
  z-index: 1;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(1, 17, 82, .2);
  border-top-color: #011152;
  border-radius: 50%;
  animation: image-loading-spin .75s linear infinite;
}
.image-loading-frame img {
  position: relative;
  z-index: 2;
  opacity: 0;
  transition: opacity .2s ease;
}
.image-loading-frame.is-loaded img,
.image-loading-frame.has-error img { opacity: 1; }
.image-loading-frame.is-loaded::after,
.image-loading-frame.has-error::after { display: none; }
.content-image-loading-frame { display: flex; width: 100%; min-height: 180px; border-radius: 14px; }
.logo-loading-frame { min-width: 72px; min-height: 34px; background: rgba(255, 255, 255, 0); }
.login-logo-loading-frame { min-width: 120px; min-height: 72px; background: rgba(255, 255, 255, 0); }
.file-image-loading-frame { width: 88px; height: 88px; border-radius: 3px; }
@keyframes image-loading-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .image-loading-frame::after { animation-duration: 1.5s; }
}
figcaption { margin-top: .5rem; color: var(--muted); }
.empty-state { padding: 1.2rem; color: var(--muted); }

.weather-card { padding: 1rem; margin-bottom: 1rem; }
.weather-current { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center; }
.weather-temp { font-size: 3rem; line-height: 1; font-weight: 950; }
.weather-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; margin-top: 1rem; }
.weather-metric { background: #f8fafc; border: 1px solid var(--line); border-radius: 14px; padding: .8rem; }
.weather-metric small { color: var(--muted); display: block; }
.hourly { display: flex; gap: .75rem; overflow-x: auto; padding: .25rem 0 .5rem; margin-top: 1rem; }
.hour-card { min-width: 130px; background: #f8fafc; border: 1px solid var(--line); border-radius: 14px; padding: .8rem; }
.hour-card strong, .hour-card small { display: block; }
.loading { color: var(--muted); }

.admin-shell { padding: .25rem 0; }
.admin-shell.narrow { max-width: 480px; margin: 2rem auto; }
.admin-nav {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
  padding: .75rem;
  margin-bottom: 1rem;
  background: var(--panel);
  border-radius: 16px;
}
.admin-nav a, .admin-nav form { color: white; text-decoration: none; font-weight: 850; margin: 0; }
.admin-nav a { padding: .45rem .65rem; border-radius: 10px; background: rgba(255,255,255,.08); }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.stat-card { padding: 1rem; background: white; border: 1px solid var(--line); border-radius: 16px; text-decoration: none; }
.stat-card strong { display: block; font-size: 2rem; }
.stat-card span { color: var(--muted); }
.help-card, .form-card, .section-editor { padding: 1rem; margin-top: 1rem; }
.inline-create { display: grid; gap: .65rem; margin: 1rem 0; }
.admin-list { display: grid; gap: .65rem; }
.admin-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .75rem;
  padding: .9rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  text-decoration: none;
}
.admin-row small { display: block; color: var(--muted); }
.row-icon { font-size: 1.5rem; }
.badge { justify-self: end; border-radius: 999px; padding: .25rem .55rem; background: #dcfce7; color: #166534; font-size: .8rem; font-weight: 850; }
.muted-badge { background: #e2e8f0; color: #475569; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: .8rem; }
.full { grid-column: 1 / -1; }
.checkbox { display: flex; align-items: center; gap: .5rem; }
.checkbox input { width: auto; }
.access-fieldset { border: 1px solid var(--line); border-radius: 14px; padding: 1rem; }
.access-fieldset legend { padding: 0 .35rem; font-weight: 800; }
.access-grid { display: grid; gap: .65rem; margin-top: .75rem; }
.access-grid .checkbox { padding: .65rem; border-radius: 12px; background: #f8fafc; }
.rich-toolbar {
  display: flex;
  gap: .25rem;
  flex-wrap: wrap;
  padding: .4rem;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background: #f1f5f9;
}
.rich-toolbar button, .rich-toolbar select, .rich-toolbar input {
  width: auto;
  min-height: 32px;
  padding: .25rem .45rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #475569;
  font-size: .82rem;
  font-weight: 500;
}
.rich-toolbar button { min-width: 32px; }
.rich-toolbar button:hover, .rich-toolbar select:hover, .rich-toolbar input:hover {
  border-color: #cbd5e1;
  background: white;
  filter: none;
}
.rich-toolbar input[type="color"] { width: 34px; padding: .2rem; }
.rich-toolbar .rich-html-toggle {
  min-width: auto;
  margin-left: auto;
  padding-inline: .65rem;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}
.rich-toolbar .rich-html-toggle[aria-pressed="true"] {
  border-color: #94a3b8;
  background: white;
  color: #011152;
}
.rich-editor {
  min-height: 280px;
  padding: 1rem;
  border: 2px solid #cbd5e1;
  border-radius: 0 0 12px 12px;
  background: white;
  color: var(--text);
  overflow-wrap: anywhere;
  box-shadow: inset 0 1px 3px rgba(15, 23, 42, .05);
}
.rich-editor:empty::before {
  content: "Text hier eingeben …";
  color: #94a3b8;
  pointer-events: none;
}
.rich-editor:focus {
  border-color: #94a3b8;
  outline: 2px solid rgba(250, 204, 21, .35);
  outline-offset: 1px;
}
.rich-source {
  min-height: 280px;
  padding: 1rem;
  border: 2px solid #94a3b8;
  border-radius: 0 0 12px 12px;
  background: #0f172a;
  color: #e2e8f0;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: .85rem;
  line-height: 1.55;
  tab-size: 2;
  resize: vertical;
}
.rich-source:focus {
  border-color: #cbd5e1;
  outline: 2px solid rgba(250, 204, 21, .35);
  outline-offset: 1px;
}
.formatted-text {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.formatted-text p, .formatted-text div { margin: .25rem 0 .75rem; }
.formatted-text h1, .formatted-text h2, .formatted-text h3,
.formatted-text h4, .formatted-text h5, .formatted-text h6,
.rich-editor h1, .rich-editor h2, .rich-editor h3,
.rich-editor h4, .rich-editor h5, .rich-editor h6 {
  margin: 1.25rem 0 .5rem;
  line-height: 1.2;
}
.formatted-text ul, .formatted-text ol,
.rich-editor ul, .rich-editor ol { padding-left: 1.5rem; }
.formatted-text blockquote, .rich-editor blockquote {
  margin: 1rem 0;
  padding: .25rem 1rem;
  border-left: 4px solid #94a3b8;
  color: #475569;
}
.formatted-text pre, .rich-editor pre {
  max-width: 100%;
  padding: 1rem;
  overflow-x: auto;
  border-radius: 3px;
  background: #e2e8f0;
}
.formatted-text table, .rich-editor table {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 1rem 0;
  overflow-x: auto;
  border-collapse: collapse;
  overscroll-behavior-inline: contain;
}
.formatted-text th, .formatted-text td,
.rich-editor th, .rich-editor td {
  padding: .55rem .65rem;
  border: 1px solid #cbd5e1;
  text-align: left;
  vertical-align: top;
}
.formatted-text img, .rich-editor img {
  max-width: 100%;
  height: auto;
}
.formatted-text a, .rich-editor a {
  color: #011152;
  text-decoration: underline;
  text-underline-offset: .12em;
}
.button-row { display: flex; gap: .65rem; flex-wrap: wrap; }
.section-editor { border-left: 5px solid var(--brand); }
.new-section { border-left-color: #38bdf8; }

@media (min-width: 720px) {
  .main { padding: 1.5rem; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .select-form, .inline-create { grid-template-columns: 1fr auto; align-items: end; }
  .select-form label { grid-column: 1 / -1; }
  .form-grid { grid-template-columns: repeat(2, 1fr); }
  .access-grid { grid-template-columns: repeat(2, 1fr); }
  .weather-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 980px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .hero { padding: 2rem; }
}

code {
  padding: .12rem .35rem;
  border-radius: 7px;
  background: #e2e8f0;
  color: #0f172a;
}
.form-help {
  display: block;
  margin-top: .35rem;
  color: var(--muted);
  font-size: .82rem;
}
.file-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .9rem;
  margin-top: 1rem;
}
.file-card {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: .8rem;
  align-items: start;
  padding: .8rem;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
}
.file-card img, .pdf-preview {
  width: 88px;
  height: 88px;
  border: 1px solid var(--line);
  border-radius: 14px;
  object-fit: cover;
  background: #f8fafc;
}
.pdf-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  text-decoration: none;
}
.file-card-body {
  display: grid;
  gap: .45rem;
  min-width: 0;
}
.file-card-body strong {
  overflow-wrap: anywhere;
}
.file-card-body small {
  color: var(--muted);
}
.copy-url {
  font-size: .85rem;
  padding: .55rem .65rem;
}
.compact-button {
  min-height: 42px;
  margin-top: 0;
}

@media (min-width: 720px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .file-grid { grid-template-columns: repeat(2, 1fr); }
}
.stat-grid { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }

/* Clean dark visual system */
:root {
  --bg: #000824;
  --panel: #011152;
  --brand: #011152;
  --brand-dark: #000b3b;
  --line: #d9deea;
  --radius: 4px;
  --bar-height: 76px;
}
body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 85% 0%, rgba(1, 17, 82, .72), transparent 32rem),
    linear-gradient(145deg, #00030f 0%, #000824 55%, #010d3d 100%);
  background-attachment: fixed;
}
body.has-background-image {
  background-color: #000824;
  background-image: var(--site-background-image);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}
.topbar {
  min-height: var(--bar-height);
  padding: .85rem clamp(1rem, 4vw, 3rem);
  background: #011152;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
  box-shadow: none;
  backdrop-filter: none;
}
.brand strong {
  max-width: 36vw;
  font-size: .9rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.brand small { color: rgba(255, 255, 255, .58); }
.header-right, .header-logos {
  display: flex;
  align-items: center;
}
.header-right { gap: clamp(.8rem, 2vw, 1.75rem); }
.header-logos { gap: clamp(.65rem, 1.5vw, 1.25rem); }
.header-logos img {
  display: block;
  width: auto;
  max-width: 128px;
  height: 34px;
  object-fit: contain;
}
.company-logo {
  opacity: 1;
  filter: brightness(0) saturate(100%) invert(100%) !important;
  -webkit-filter: brightness(0) saturate(100%) invert(100%) !important;
  mix-blend-mode: normal;
}
.header-logos span:not(.logo-divider) {
  color: white;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
}
.festival-name,
.festival-name p,
.festival-name div {
  margin: 0;
}
.header-logos > .festival-name {
  min-width: 0;
  max-width: min(42vw, 360px);
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.login-logos .festival-name {
  max-width: min(240px, 42vw);
  color: white;
  font-size: clamp(1rem, 4vw, 1.35rem);
  line-height: 1.15;
  text-align: left;
  overflow-wrap: anywhere;
}
.rich-editor-compact {
  min-height: 96px;
}
.rich-source-compact { min-height: 96px; }
.logo-divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, .3);
}
.top-actions {
  padding-left: clamp(.6rem, 1.5vw, 1.25rem);
  border-left: 1px solid rgba(255, 255, 255, .3);
}
.top-actions a, .top-actions .link-button {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.main {
  flex: 1 0 auto;
  padding-top: 2rem;
}
.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(.75rem, 2vw, 1.5rem);
  flex-wrap: wrap;
  width: 100%;
  min-height: var(--bar-height);
  margin: 2rem 0 0;
  padding: .85rem clamp(1rem, 4vw, 3rem);
  background: #011152;
  color: white;
  border-top: 1px solid rgba(255, 255, 255, .12);
}
.footer > p { margin: 0; }
.footer-links a { color: white; font-weight: 500; }
.footer .muted { color: white; }

.hero, .page-head, .selector-card, .content-card, .empty-state, .weather-card, .form-card, .help-card, .section-editor {
  border-radius: 4px;
  border-color: rgba(217, 222, 234, .9);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
}
.hero {
  padding: clamp(1.5rem, 4vw, 2.75rem);
  background: #011152;
  border-color: rgba(255, 255, 255, .16);
}
.hero h1 { font-weight: 650; letter-spacing: -.035em; }
.hero p { color: rgba(255, 255, 255, .7); }
.eyebrow {
  color: rgba(255, 255, 255, .55) !important;
  font-weight: 600;
  letter-spacing: .18em;
}
.selector-card { margin-top: 1rem; }
.tile {
  border-radius: 3px;
  border: 1px solid #dfe3eb;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .15);
  transition: border-color .15s ease, transform .15s ease;
}
.tile:hover {
  border-color: #011152;
  transform: translateY(-2px);
}
.page-head { border-left: 4px solid #011152; }
.backlink { color: rgba(255, 255, 255, .78); font-weight: 600; }
.content-card, .selector-card, .page-head, .weather-card, .empty-state,
.form-card, .help-card, .section-editor, .stat-card, .admin-row, .file-card {
  color: #0f172a;
}
.content-image, .weather-metric, .hour-card, .file-card, .file-card img, .pdf-preview {
  border-radius: 3px;
}
input, select, textarea {
  border-radius: 3px;
  border-color: #cbd2df;
}
input:focus, select:focus, textarea:focus {
  border-color: #011152;
  outline: 2px solid rgba(1, 17, 82, .14);
  outline-offset: 1px;
}
button, .secondary-button, .download {
  min-height: 42px;
  border-radius: 3px;
  background: #011152;
  color: white;
  font-weight: 650;
  letter-spacing: .01em;
}
.secondary-button { background: #e5e9f0; color: #111827; }
.danger-button { background: #991b1b; color: white; }
.alert, .legal-placeholder { border-radius: 3px; }

.admin-shell > h1, .admin-shell > h2 {
  color: white;
  font-weight: 600;
  letter-spacing: -.025em;
}
.admin-nav {
  padding: .5rem 0;
  border-radius: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .2);
  background: transparent;
}
.admin-nav a {
  padding: .45rem .65rem;
  border-radius: 2px;
  background: transparent;
  font-weight: 550;
}
.admin-nav a:hover { background: rgba(255, 255, 255, .1); }
.stat-grid { gap: 1rem; }
.stat-card {
  min-height: 130px;
  padding: 1.25rem;
  border-radius: 3px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, .16);
}
.stat-card strong {
  color: #011152;
  font-weight: 600;
  letter-spacing: -.04em;
}
.admin-row {
  border-radius: 3px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
}
.badge { border-radius: 2px; font-weight: 650; }
.section-editor {
  border-left: 3px solid #011152;
}
.new-section { border-left-color: #64748b; }
.access-fieldset, .access-grid .checkbox { border-radius: 3px; }
.rich-toolbar { border-radius: 3px 3px 0 0; }
.rich-editor, .rich-source { border-radius: 0 0 3px 3px; }

.login-page .topbar {
  min-height: 64px;
  background: transparent;
  border-bottom-color: rgba(255, 255, 255, .1);
}
.login-page .footer { min-height: 64px; }
.login-page .main {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: calc(100vh - 210px);
  padding: 3rem 1rem;
}
.login-shell {
  width: min(440px, 100%);
}
.login-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1.25rem, 5vw, 2.5rem);
  min-height: 92px;
  margin-bottom: 2rem;
}
.login-logos img {
  width: auto;
  max-width: min(180px, 38vw);
  height: 72px;
  object-fit: contain;
}
.login-logos strong {
  color: white;
  font-size: clamp(1rem, 4vw, 1.35rem);
  font-weight: 650;
  letter-spacing: .16em;
}
.login-logo-divider {
  width: 1px;
  height: 54px;
  background: rgba(255, 255, 255, .28);
}
.login-card {
  padding: clamp(1.5rem, 5vw, 2.25rem);
  background: white;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 3px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}
.login-card h1 {
  margin: .25rem 0 .5rem;
  color: #0f172a;
  font-size: 1.75rem;
  font-weight: 600;
}
.login-kicker {
  margin: 0;
  color: #011152;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .16em;
}
.login-form {
  display: grid;
  gap: .7rem;
  margin-top: 1.5rem;
}
.login-form button { margin-top: .25rem; }
.login-page .footer {
  margin-top: 0;
  text-align: center;
}
.login-page .footer-links { justify-content: center; }

@media (max-width: 719px) {
  :root { --bar-height: 68px; }
  .brand small { display: none; }
  .header-right, .header-logos { min-width: 0; max-width: 100%; }
  .logo-loading-frame { min-width: 0; }
  .header-logos img { max-width: 76px; height: 27px; }
  .header-logos span:not(.logo-divider) { font-size: .55rem; }
  .logo-divider { height: 22px; }
  .top-actions { padding-left: .6rem; }
  .main { padding-top: 1.25rem; }
  .page-head { align-items: flex-start; }
}
@media (max-width: 600px) {
  .topbar { justify-content: flex-end; }
  .brand { display: none; }
  .header-right { width: 100%; justify-content: flex-end; }
  .header-logos img { max-width: 64px; }
}

.quick-access-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .75rem;
  padding: .7rem .8rem;
}
.admin-row-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .75rem;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.admin-row-main small { display: block; color: var(--muted); }
.quick-access-form {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding-left: .75rem;
  border-left: 1px solid var(--line);
}
.quick-access-label {
  color: #64748b;
  font-size: .7rem;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.permission-icons {
  display: flex;
  align-items: center;
  gap: .35rem;
  flex-wrap: wrap;
}
.permission-icons-large { margin-top: .75rem; }
.permission-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}
.permission-icon input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.permission-icon span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  background: #f1f5f9;
  filter: grayscale(1);
  opacity: .48;
  transition: border-color .12s ease, background .12s ease, opacity .12s ease;
}
.permission-icon:hover span {
  border-color: #64748b;
  opacity: .75;
}
.permission-icon input:checked + span {
  border-color: #011152;
  background: #e8ecf8;
  box-shadow: inset 0 0 0 1px #011152;
  filter: none;
  opacity: 1;
}
.permission-icon input:focus-visible + span {
  outline: 2px solid #64748b;
  outline-offset: 2px;
}
.quick-save {
  min-height: 32px;
  padding: .35rem .55rem;
  font-size: .75rem;
}

@media (max-width: 800px) {
  .quick-access-row { grid-template-columns: 1fr; }
  .quick-access-form {
    padding: .65rem 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
  .quick-access-label { margin-right: auto; }
}

.header-logos {
  justify-content: flex-start;
  color: white;
  text-decoration: none;
}
.header-login {
  color: white;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
}
.user-menu {
  position: relative;
  color: white;
}
.user-menu summary {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-height: 40px;
  padding: .35rem .5rem;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover, .user-menu[open] summary {
  border-color: rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .08);
}
.user-menu-icon {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  background: rgba(255, 255, 255, .12);
  border-radius: 3px;
}
.user-menu-name {
  max-width: 180px;
  overflow: hidden;
  font-size: .82rem;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-menu-caret {
  color: rgba(255, 255, 255, .55);
  font-size: .7rem;
}
.user-menu-dropdown {
  position: absolute;
  top: calc(100% + .5rem);
  right: 0;
  z-index: 40;
  display: grid;
  width: 190px;
  padding: .35rem;
  border: 1px solid #d9deea;
  border-radius: 3px;
  background: white;
  color: #0f172a;
  box-shadow: 0 16px 35px rgba(0, 0, 0, .28);
}
.user-menu-dropdown a, .user-menu-dropdown button {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  min-height: 38px;
  padding: .55rem .65rem;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: #0f172a;
  font-size: .82rem;
  font-weight: 500;
  text-decoration: none;
}
.user-menu-dropdown a:hover, .user-menu-dropdown button:hover {
  background: #eef1f7;
  filter: none;
}
.user-menu-dropdown form {
  margin: 0;
  border-top: 1px solid #e2e8f0;
}

@media (max-width: 600px) {
  .topbar { justify-content: space-between; }
  .header-logos { gap: .45rem; }
  .header-logos img { max-width: 58px; }
  .user-menu-name { max-width: 105px; }
}
