:root {
  --ac: #4f8dff;
  --bg: #0a0b0e;
  --card: #101218;
  --fg: #e7e9ee;
  --muted: #9aa3b2;
  --accent: var(--ac);
  --err: #f87171;
  --ok: #34d399;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Geist', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(79,141,255,.28); color: #fff; }

/* ── Landing page keyframes ── */
@keyframes v24blink { 0%,49%{opacity:1} 50%,100%{opacity:0} }

/* ── Landing page components ── */
.lp-nav-link {
  color: #9aa3b2;
  text-decoration: none;
  transition: color .15s;
}
.lp-nav-link:hover { color: #e7e9ee; }

.lp-btn-sm {
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  border-radius: 9px;
  background: var(--ac);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 8px 24px -10px var(--ac);
  transition: filter .15s;
}
.lp-btn-sm:hover { filter: brightness(1.12); }

.lp-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 26px;
  border-radius: 11px;
  background: var(--ac);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  box-shadow: 0 14px 34px -12px var(--ac);
  transition: filter .15s;
}
.lp-btn-primary:hover { filter: brightness(1.12); }

.lp-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 24px;
  border-radius: 11px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  color: #e7e9ee;
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  transition: background .15s, border-color .15s;
}
.lp-btn-ghost:hover { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.16); }

.lp-card {
  position: relative;
  padding: 28px 26px 30px;
  border-radius: 16px;
  background: #101218;
  border: 1px solid rgba(255,255,255,.08);
  transition: border-color .15s;
}
.lp-card:hover { border-color: rgba(255,255,255,.14); }

.lp-card-sm {
  padding: 26px 24px;
  border-radius: 15px;
  background: #101218;
  border: 1px solid rgba(255,255,255,.08);
  transition: border-color .15s;
}
.lp-card-sm:hover { border-color: rgba(255,255,255,.14); }

.lp-card-xs {
  padding: 22px;
  border-radius: 13px;
  background: #101218;
  border: 1px solid rgba(255,255,255,.08);
  transition: border-color .15s;
}
.lp-card-xs:hover { border-color: rgba(255,255,255,.14); }

.lp-cursor {
  display: inline-block;
  width: 9px;
  height: 17px;
  background: #cfd6e4;
  vertical-align: -3px;
  animation: v24blink 1.1s steps(1) infinite;
}

/* Hero-Spec-Leiste: Trennpunkt am Folge-Element kleben (wandert beim Umbruch
   als Einheit mit "· …" mit, statt einsam am Zeilenende zu hängen). */
.spec-strip span:not(:first-child)::before {
  content: "·";
  color: #3a414e;
  margin: 0 14px;
}

.lp-faq {
  border-top: 1px solid rgba(255,255,255,.09);
  padding: 22px 0;
}
.lp-faq summary {
  cursor: pointer;
  list-style: none;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  transition: color .15s;
}
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary:hover { color: var(--ac); }
.lp-faq p {
  margin: 14px 0 0;
  font-size: 15px;
  line-height: 1.65;
  color: #9aa3b2;
}

/* ── App UI (auth + dashboard) ── */
.hidden { display: none; }

/* Nav-Gruppen (Gast vs. eingeloggt). Eigene Regel, damit .hidden trotz
   display:flex greift (höhere Spezifität via zwei Klassen). */
.nav-group { display: flex; align-items: center; gap: 28px; }
.nav-group.hidden { display: none; }

/* SSO / Google-Button */
.gbtn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  border-radius: 9px;
  background: #fff;
  color: #1f2328;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid rgba(255,255,255,.16);
  transition: filter .15s;
}
.gbtn:hover { filter: brightness(.94); }
.sso-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: #6b7280;
  font-size: 13px;
}
.sso-divider span.line { flex: 1; height: 1px; background: rgba(255,255,255,.1); }

/* Hinweis-Banner (Verifizierung / SSO-Status) */
.notice {
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.5;
  margin-top: 16px;
}
.notice.info { background: rgba(79,141,255,.12); border: 1px solid rgba(79,141,255,.3); color: #cfe0ff; }
.notice.ok { background: rgba(52,211,153,.12); border: 1px solid rgba(52,211,153,.32); color: #bdf0db; }
.notice.warn { background: rgba(251,146,60,.12); border: 1px solid rgba(251,146,60,.32); color: #ffd9b8; }

/* Admin Control Panel: Tabellen */
.atable-wrap { overflow-x: auto; margin-top: 16px; }
.atable { width: 100%; border-collapse: collapse; font-size: 14px; }
.atable th {
  text-align: left;
  padding: 10px 12px;
  color: var(--muted);
  font-weight: 500;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .05em;
  white-space: nowrap;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.atable td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  vertical-align: middle;
}
.atable tr:hover td { background: rgba(255,255,255,.02); }
.atable input[type=number], .atable input[type=datetime-local] {
  padding: 7px 9px;
  font-size: 13px;
}
.atable .cinput { width: 90px; }
.atable input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--ac); }
.mono-sm { font-family: 'Geist Mono', monospace; font-size: 12px; color: var(--muted); }

.abtn {
  background: rgba(255,255,255,.06);
  color: var(--fg);
  border: none;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
}
.abtn:hover:not(:disabled) { background: rgba(255,255,255,.1); }
.abtn:disabled { opacity: .45; cursor: not-allowed; }
.abtn.danger-sm { border: 1px solid var(--err); background: transparent; color: var(--err); }
.abtn.danger-sm:hover:not(:disabled) { background: rgba(248,113,113,.12); }

/* Profil: Schlüssel-Wert-Zeilen */
.prow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.plabel { color: var(--muted); font-size: 14px; }
.pval { color: var(--fg); font-size: 14px; font-weight: 500; text-align: right; word-break: break-all; }

.container { max-width: 640px; margin: 0 auto; padding: 48px 20px; }

.card {
  background: var(--card);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  padding: 22px;
  margin-top: 24px;
}

.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tab {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 8px 4px;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
  border-bottom: 2px solid transparent;
}
.tab.active { color: var(--fg); border-bottom-color: var(--ac); }

form { display: flex; flex-direction: column; gap: 12px; }

input {
  background: #0a0b0e;
  border: 1px solid rgba(255,255,255,.1);
  color: var(--fg);
  padding: 12px;
  border-radius: 9px;
  font-size: 1rem;
  font-family: inherit;
}
input:focus { outline: none; border-color: rgba(79,141,255,.5); }

button { font-size: 1rem; border-radius: 9px; cursor: pointer; font-family: inherit; }
button[type=submit], .primary { background: var(--ac); color: #fff; border: none; padding: 12px; }
.primary { width: 100%; padding: 14px; font-weight: 600; }
.primary:disabled { opacity: .5; cursor: not-allowed; }
.link { background: none; border: none; color: var(--ac); cursor: pointer; }
.link:hover { color: #7aaaff; }

.row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; color: var(--muted); }

.error { color: var(--err); min-height: 1.2em; margin: 8px 0 0; }

.server { border: 1px solid rgba(255,255,255,.08); border-radius: 11px; padding: 16px; margin-top: 16px; }

.badge { font-size: .8rem; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.06); }
.badge.running { background: rgba(62,207,142,.18); color: var(--ok); }
.badge.failed { background: rgba(248,113,113,.18); color: var(--err); }
.badge.provisioning, .badge.pending, .badge.destroying {
  background: rgba(79,141,255,.18);
  color: var(--ac);
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  vertical-align: -2px;
  border: 2px solid rgba(255,255,255,.1);
  border-top-color: var(--ac);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.danger {
  background: transparent;
  border: 1px solid var(--err);
  color: var(--err);
  padding: 9px 14px;
  margin-top: 14px;
}
.danger:hover:not(:disabled) { background: rgba(248,113,113,.12); }
.danger:disabled { opacity: .5; cursor: not-allowed; }

code, pre {
  background: #0a0b0e;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 7px;
  padding: 2px 6px;
  font-size: .9rem;
}
pre { padding: 12px; overflow-x: auto; }

.dl {
  display: inline-block;
  margin-top: 10px;
  background: var(--ok);
  color: #06281c;
  padding: 10px 14px;
  border-radius: 9px;
  text-decoration: none;
  font-weight: 600;
}

.muted { color: var(--muted); font-size: .85rem; }

.forwards { margin-top: 14px; border-top: 1px solid rgba(255,255,255,.08); padding-top: 14px; }
.fwhead { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.fwhead h3 { margin: 0; font-size: 1rem; font-weight: 600; color: #fff; letter-spacing: -.01em; }
.fwcount {
  font-family: 'Geist Mono', monospace; font-size: .72rem; padding: 1px 9px;
  border-radius: 999px; background: rgba(79,141,255,.16); color: #cfe0ff;
}
.fwlist { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 8px; }
.fwrow {
  display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap;
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px; padding: 10px 13px;
}
.fwaddr { display: flex; align-items: center; gap: 8px; }
.fwaddr code { font-size: .86rem; }
.fwtag {
  font-family: 'Geist Mono', monospace; font-size: .64rem; letter-spacing: .04em;
  padding: 2px 7px; border-radius: 6px; background: rgba(79,141,255,.16); color: #cfe0ff;
}
.fwmap { font-size: .84rem; color: var(--muted); }
.fwacts { margin-left: auto; display: flex; gap: 14px; }
.fwacts .link { font-size: .82rem; }
.fwdel { color: var(--err); }
.fwdel:hover { color: #ff9a9a; }
.fwempty {
  font-size: .86rem; line-height: 1.5; color: var(--muted);
  background: rgba(79,141,255,.06); border: 1px dashed rgba(79,141,255,.22);
  border-radius: 10px; padding: 12px 14px;
}
.fwtools { display: flex; flex-direction: column; gap: 10px; }

.fwform { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.fwform input { flex: 1; min-width: 150px; padding: 9px; }
.fwform select {
  background: #0a0b0e;
  border: 1px solid rgba(255,255,255,.1);
  color: var(--fg);
  border-radius: 9px;
  padding: 0 10px;
  font-family: inherit;
}
.fwform button { background: rgba(255,255,255,.06); color: var(--fg); border: none; padding: 9px 14px; }
.fwform button:hover:not(:disabled) { background: rgba(255,255,255,.1); }
.fwform button:disabled { opacity: .5; cursor: not-allowed; }

/* SSH-Befehl: Kopier-Button in der Box (rechts oben). Der Befehl bricht um statt
   unter den Button zu scrollen → kein Overlap, auch bei langen Hostnamen. */
.cmdlabel { margin: 12px 0 6px; }
.cmdbox { position: relative; }
.cmdbox pre.cmd { margin: 0; padding-right: 96px; white-space: pre-wrap; overflow-wrap: anywhere; }
.cmdbox .copy {
  position: absolute; top: 8px; right: 8px;
  background: rgba(255,255,255,.08); color: var(--fg);
  border: 1px solid rgba(255,255,255,.14); border-radius: 7px;
  padding: 5px 14px; font-size: .8rem; line-height: 1; white-space: nowrap;
}
.cmdbox .copy:hover { background: rgba(255,255,255,.16); }

/* Server-Kopfzeile: Hostname + Status links, Auslastungs-Gauges rechts */
.srv-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px 28px; flex-wrap: wrap;
}
.srv-id { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; min-width: 0; }
.srv-id strong { font-size: 1.02rem; letter-spacing: -.01em; }

/* Live-Auslastung: CPU / RAM / Disk als kompakte Donut-Gauges */
.gauges { display: flex; gap: 14px; }
.gauge { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ring { position: relative; width: 42px; height: 42px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .trk { fill: none; stroke: rgba(255,255,255,.09); stroke-width: 3.2; }
.ring .arc {
  fill: none; stroke: var(--ac); stroke-width: 3.2; stroke-linecap: round;
  transition: stroke-dasharray .55s ease, stroke .3s ease;
}
.ring .arc.hot { stroke: #ff6b6b; }
.gc {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: 'Geist Mono', monospace; font-size: .66rem; font-weight: 600; color: var(--fg);
}
/* Label + used/total in EINER Zeile unter dem Donut (statt zwei) */
.gcap { display: flex; align-items: baseline; gap: 5px; white-space: nowrap; line-height: 1; }
.glabel { font-size: .58rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.gsub { font-size: .58rem; font-family: 'Geist Mono', monospace; color: var(--muted); }

/* Login-Card kompakt halten; das Dashboard nutzt die volle Breite. */
#auth { max-width: 460px; }

/* key.pem-Hinweis (einmalig verfügbar + chmod-Tipp) */
.keyhint { font-size: .82rem; color: #ffd9b8; margin: 8px 0 0; }
.keyhint code { font-size: .8rem; }

/* Ablauf-Countdown: < 1 h hervorheben */
[data-expires].soon { color: #ffb454; font-weight: 600; }

/* Forward-Adresse: kleiner Kopier-Link */
.fwcopy { font-size: .8rem; }

/* kurzes Aufblitzen, wenn ein Port-Chip ins Formular übernommen wurde */
@keyframes v24flash {
  0%   { box-shadow: 0 0 0 0 rgba(79,141,255,.55); }
  100% { box-shadow: 0 0 0 7px rgba(79,141,255,0); }
}
.flash { animation: v24flash .8s ease-out; }

/* "Läuft ab"-Countdown in der Kopfzeile (Host/Port stehen bereits im SSH-String) */
.srv-exp { display: inline-flex; align-items: baseline; gap: 6px; color: var(--muted); font-size: .85rem; }
.srv-exp .exp-label { font-size: .66rem; text-transform: uppercase; letter-spacing: .06em; }
.srv-exp [data-expires] { font-family: 'Geist Mono', monospace; }

/* kleiner Inline-Hinweis (z. B. Portforwarding-Tipp, Kapazitäts-Note) */
.hint { font-size: .85rem; color: var(--muted); margin: 8px 0; }
.hint.box {
  background: rgba(79,141,255,.08); border: 1px solid rgba(79,141,255,.22);
  color: #cfe0ff; border-radius: 9px; padding: 10px 12px;
}
#request-note { margin-top: 10px; text-align: center; }

/* Port-Erkennung: anklickbare Vorschläge */
.fwscan { margin-top: 10px; }
.fwports { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.portchip {
  background: rgba(79,141,255,.12); border: 1px solid rgba(79,141,255,.3);
  color: #cfe0ff; border-radius: 999px; padding: 5px 12px; font-size: .82rem;
  font-family: 'Geist Mono', monospace;
}
.portchip:hover { background: rgba(79,141,255,.2); }

/* ── Rechtsseiten (Impressum / Datenschutz / Nutzungsbedingungen) ── */
.legal {
  max-width: 820px;
  margin: 0 auto;
  padding: 72px 32px 96px;
  line-height: 1.7;
}
.legal h1 {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -.025em;
  color: #fff;
  margin: 0 0 8px;
}
.legal .legal-sub {
  color: var(--muted);
  font-family: 'Geist Mono', monospace;
  font-size: 13px;
  margin: 0 0 40px;
}
.legal h2 {
  font-size: 22px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -.01em;
  margin: 44px 0 12px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.legal h3 {
  font-size: 16px;
  font-weight: 600;
  color: #e7e9ee;
  margin: 26px 0 8px;
}
.legal p, .legal li { color: #b9c0cd; font-size: 15.5px; }
.legal ul { padding-left: 22px; margin: 10px 0; }
.legal li { margin: 6px 0; }
.legal a { color: var(--ac); text-decoration: none; }
.legal a:hover { text-decoration: underline; }
.legal strong { color: #e7e9ee; }
.legal code {
  font-family: 'Geist Mono', monospace;
  font-size: 13.5px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 5px;
  padding: 1px 6px;
  color: #cfd6e4;
}
.legal .legal-note {
  background: rgba(79,141,255,.08);
  border: 1px solid rgba(79,141,255,.22);
  border-radius: 10px;
  padding: 16px 18px;
  margin: 24px 0;
  font-size: 14.5px;
  color: #cfe0ff;
}
.legal .legal-note strong { color: #eaf1ff; }
.legal table.legal-tbl {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 14.5px;
}
.legal table.legal-tbl th,
.legal table.legal-tbl td {
  text-align: left;
  padding: 9px 12px;
  border: 1px solid rgba(255,255,255,.08);
  vertical-align: top;
  color: #b9c0cd;
}
.legal table.legal-tbl th { color: #e7e9ee; font-weight: 600; background: rgba(255,255,255,.03); }
