/*
 * Operator portal – in the design of aviatis-marketing.at and qmedia.at:
 * night-blue ground, large Poppins headings, Inter text, pill buttons, rounded dark surfaces.
 * Aviatis blue for actions, Aviatis red sparingly, QMedia green for "running / all good".
 * Local fonts only. No shadows, no gradients; surfaces are told apart by tone.
 */
@font-face { font-family: "Inter"; src: url("fonts/Inter-Regular.9897b7f5ce95.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-SemiBold.cb2dd6cbd028.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("fonts/Poppins-Bold.b54b12f49a94.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #0b0e1a;
  --surface: #131829;
  --surface-2: #1b2136;
  --surface-3: #252c46;
  --edge: #2a3150;
  --text: #eef1f8;
  --muted: #a3abc2;
  --blue: #3b55f0;
  --blue-dark: #2f45d0;
  --blue-soft: rgba(59, 85, 240, 0.16);
  --blue-text: #9fb0ff;
  --red: #b62e2b;
  --red-soft: rgba(182, 46, 43, 0.2);
  --red-text: #ff8a80;
  --green: #86bc25;
  --green-soft: rgba(134, 188, 37, 0.14);
  --green-text: #a6d65a;
  --amber-soft: rgba(242, 181, 68, 0.14);
  --amber-text: #f2c46d;
  --white: #ffffff;
  --radius: 24px;
  --radius-s: 14px;
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

::selection { background: var(--blue); color: var(--white); }
html { accent-color: var(--blue); caret-color: var(--blue-text); scrollbar-color: var(--surface-3) var(--bg); -webkit-text-size-adjust: 100%; }
* { box-sizing: border-box; }
body { margin: 0; font: 400 15px/1.6 "Inter", system-ui, sans-serif; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: "Poppins", "Inter", sans-serif; font-weight: 700; line-height: 1.05; letter-spacing: -0.03em; margin: 0 0 var(--s2); text-wrap: balance; }
h1 { font-size: clamp(34px, 4.2vw, 56px); }
h2 { font-size: 22px; letter-spacing: -0.02em; margin-top: var(--s5); }
.panel h2 { margin-top: 0; }
a { color: var(--blue-text); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--white); text-decoration-thickness: 2px; }
p { margin: 0 0 var(--s2); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
/* Instead of style attributes: the Content-Security-Policy allows styles from this file only. */
.flush { margin: 0; }
.break { word-break: break-all; }
.gap-top { margin-top: 16px; }
code { font-size: 13px; color: var(--muted); }
td, .facts dd, .badge, .when { font-variant-numeric: tabular-nums; }

.topbar { position: sticky; top: 0; z-index: 10; background: rgba(11, 14, 26, 0.94); }
.topbar-inner, main, .foot-inner { max-width: 1240px; margin: 0 auto; padding: 0 var(--s4); }
.topbar-inner { display: flex; align-items: center; gap: var(--s3); min-height: 76px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--text); }
.brand:hover { color: var(--white); text-decoration: none; }
.brand img { height: 40px; width: 40px; object-fit: contain; background: var(--white); border-radius: 10px; padding: 3px; }
.brand span { font-family: "Poppins", "Inter", sans-serif; font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
nav.main { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; justify-content: center; }
nav.main a { text-decoration: none; color: var(--muted); padding: 9px 16px; border-radius: 999px; font-weight: 600; transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out); }
nav.main a:hover { color: var(--text); background: var(--surface-2); }
nav.main a.active { color: var(--white); background: var(--surface-3); }
.user { display: flex; align-items: center; gap: var(--s2); font-size: 13px; color: var(--muted); }
.user form { margin: 0; }
main { padding-top: var(--s5); padding-bottom: 72px; }
.foot { margin-top: var(--s5); }
.foot-inner { display: flex; align-items: center; gap: var(--s2); padding-top: var(--s4); padding-bottom: var(--s4); font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.foot img { height: 34px; width: auto; background: var(--white); border-radius: 10px; padding: 5px 8px; }

.head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s4); }
.head h1 { margin: 0; }
.actions { display: flex; gap: var(--s1); flex-wrap: wrap; align-items: center; }
.actions form { margin: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.login-as { display: flex; align-items: stretch; gap: 0; }
.login-as select { font: 600 14px/1 "Inter", sans-serif; padding: 0 var(--s2) 0 14px; background: var(--surface-2); color: var(--text); border: 1px solid var(--edge); border-right: 0; border-radius: 999px 0 0 999px; max-width: 260px; }
.login-as button { border-radius: 0 999px 999px 0; }

.button, button {
  font: 700 14px/1 "Poppins", "Inter", sans-serif; letter-spacing: -0.005em;
  border: 1px solid transparent; border-radius: 999px; cursor: pointer;
  padding: 13px 22px; background: var(--blue); color: var(--white); text-decoration: none; display: inline-block;
  transition: background-color 160ms var(--ease-out), border-color 160ms var(--ease-out), color 160ms var(--ease-out), transform 120ms var(--ease-out);
}
.button:hover, button:hover { background: var(--blue-dark); color: var(--white); text-decoration: none; }
.button.secondary, button.secondary { background: transparent; color: var(--text); border-color: var(--edge); }
.button.secondary:hover, button.secondary:hover { background: var(--surface-2); border-color: var(--surface-3); }
.button.danger, button.danger { background: var(--red); }
.button.danger:hover, button.danger:hover { background: #9a2522; }
.button.small, button.small { padding: 9px 15px; font-size: 13px; }
.button:active, button:active { transform: scale(0.97); }
button:disabled, .button[aria-disabled="true"] { background: var(--surface-2); color: var(--muted); border-color: transparent; cursor: not-allowed; transform: none; }
.button:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

label { display: block; font-weight: 600; margin-bottom: 8px; }
input[type=text], input[type=password], input[type=email], input:not([type]), textarea {
  width: 100%; max-width: 520px; font: inherit; font-size: 15px; padding: 13px 16px; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--edge); border-radius: var(--radius-s);
  transition: border-color 160ms var(--ease-out), background-color 160ms var(--ease-out);
}
input:hover, textarea:hover { border-color: var(--surface-3); }
input:focus, textarea:focus { border-color: var(--blue); background: var(--bg); outline: none; }
input::placeholder, textarea::placeholder { color: #6f7896; }
textarea { max-width: 620px; }
input[type=checkbox] { width: 18px; height: 18px; }
.field { margin-bottom: var(--s3); }
.field label:has(input[type=checkbox]) { font-weight: 400; display: flex; gap: var(--s1); align-items: center; margin-bottom: 6px; }
.help { font-size: 13px; color: var(--muted); margin-top: 6px; max-width: 620px; }
.errorlist { list-style: none; padding: 0; margin: 6px 0 0; color: var(--red-text); font-size: 13px; }
.inline-form { display: flex; gap: var(--s1); flex-wrap: wrap; align-items: center; }
.inline-form input[type=text] { max-width: 300px; }
.inline-form label { margin: 0; font-weight: 400; display: flex; gap: 6px; align-items: center; color: var(--muted); }

.panel { background: var(--surface); padding: var(--s4); margin-bottom: var(--s3); border-radius: var(--radius); }
.notice { padding: var(--s2) var(--s3); margin-bottom: var(--s3); background: var(--blue-soft); color: var(--text); border-radius: var(--radius-s); }
.notice.error { background: var(--red-soft); }
.notice.warning { background: var(--amber-soft); }
.notice.success { background: var(--green-soft); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: var(--s3); }

.status-band { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; padding: var(--s4); margin-bottom: var(--s5); border-radius: var(--radius); background: var(--surface); }
.status-band p { margin: 0; display: flex; align-items: center; gap: 6px var(--s3); flex-wrap: wrap; }
.status-band strong { font-family: "Poppins", "Inter", sans-serif; font-size: clamp(24px, 2.6vw, 34px); letter-spacing: -0.025em; line-height: 1.1; display: flex; align-items: center; gap: 14px; }
.status-band strong::before { content: ""; width: 14px; height: 14px; border-radius: 50%; flex: none; }
.status-band.ok strong { color: var(--green-text); }
.status-band.ok strong::before { background: var(--green); }
.status-band.bad { background: var(--red-soft); }
.status-band.bad strong { color: var(--red-text); }
.status-band.bad strong::before { background: var(--red); }
.status-band p .small { color: var(--muted); font-size: 14px; flex-basis: 100%; padding-left: 28px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0 6px; }
th { text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); padding: 0 16px 4px; white-space: nowrap; }
td { padding: 16px; vertical-align: top; background: var(--surface); }
td:first-child { border-radius: var(--radius-s) 0 0 var(--radius-s); }
td:last-child { border-radius: 0 var(--radius-s) var(--radius-s) 0; }
td:only-child { border-radius: var(--radius-s); }
tbody tr td { transition: background-color 120ms var(--ease-out); }
tbody tr:hover td { background: var(--surface-2); }
td a { font-weight: 600; }
td a.site-name { font-family: "Poppins", "Inter", sans-serif; font-weight: 700; font-size: 17px; letter-spacing: -0.01em; text-decoration: none; color: var(--text); white-space: nowrap; }
td a.site-name:hover { color: var(--white); text-decoration: underline; }
td.warnings { min-width: 220px; }
td.warnings .badge { white-space: normal; margin: 0 4px 4px 0; line-height: 1.35; }
td.when { white-space: nowrap; color: var(--muted); }
.panel td { background: var(--surface-2); }
.panel tbody tr:hover td { background: var(--surface-3); }

.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--surface-3); color: var(--text); white-space: nowrap; }
.badge.ok { background: var(--green-soft); color: var(--green-text); }
.badge.bad { background: var(--red-soft); color: var(--red-text); }
.badge.wait { background: var(--amber-soft); color: var(--amber-text); }
.badge.info { background: var(--blue-soft); color: var(--blue-text); }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px var(--s3); margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
pre.output { background: #070912; color: #d6dcef; padding: var(--s3); border-radius: var(--radius-s); overflow-x: auto; font-size: 13px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; max-height: 70vh; }
.secret { letter-spacing: .08em; word-break: break-all; background: var(--surface-2); padding: 10px 14px; border-radius: var(--radius-s); }
.qr svg { width: 220px; height: 220px; background: var(--white); padding: 10px; border-radius: var(--radius-s); }

main.auth { max-width: 1240px; margin: 0 auto; padding: clamp(var(--s4), 6vh, 80px) var(--s4); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(var(--s4), 6vw, 96px); align-items: center; min-height: calc(100vh - 90px); min-height: calc(100svh - 90px); }
.auth-field { display: flex; flex-direction: column; gap: var(--s4); }
.auth-field p { margin: 0; }
.auth-field .auth-title { font-family: "Poppins", "Inter", sans-serif; font-weight: 700; font-size: clamp(48px, 7vw, 104px); line-height: 0.95; letter-spacing: -0.045em; }
.auth-field .auth-title span { color: inherit; }
.auth-field .auth-note { font-size: 19px; line-height: 1.55; max-width: 34ch; color: var(--muted); }
.auth-pair { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 13px; }
.auth-pair img { height: 40px; width: auto; background: var(--white); border-radius: 10px; padding: 4px 8px; }
.auth-card .panel { padding: clamp(var(--s3), 3vw, 44px); margin: 0; }
.auth-card h1 { font-size: 30px; }
.auth-card button[type=submit]:not(.secondary) { width: 100%; padding: 15px 22px; }
.auth-card input[type=text], .auth-card input[type=password], .auth-card input:not([type]) { max-width: none; }
.auth .logo { display: none; }
.auth-cancel { margin-top: var(--s2); }

@media (max-width: 860px) {
  .topbar-inner, main, .foot-inner { padding-left: var(--s2); padding-right: var(--s2); }
  .topbar-inner { gap: var(--s1) var(--s2); padding-top: 10px; padding-bottom: 10px; min-height: 0; }
  .user { margin-left: auto; }
  nav.main { order: 3; flex-basis: 100%; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; }
  nav.main a { padding: 8px 12px; white-space: nowrap; }
  main { padding-top: var(--s4); }
  main.auth { grid-template-columns: 1fr; min-height: 0; padding: var(--s4) var(--s2); gap: var(--s4); }
  .auth-field .auth-title { font-size: 48px; }
  .panel, .status-band { padding: var(--s3); }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before { transition: none !important; }
}
