/* Realmgate
   Farbwelt: Nordend bei Nacht. Gletscherblau statt Fantasy-Gold,
   Messing ausschliesslich fuer Aktionen, die etwas zerstoeren koennen.
   Schrift: Georgia fuer Ueberschriften (gestochene Anmutung),
   Systemschrift fuer Fliesstext, Monospace fuer alles Technische -
   Dateinamen, Zeitstempel und Accountnamen sind Daten, keine Prosa. */

:root {
  --ice-900: #0a151d;
  --ice-800: #0f1e29;
  --ice-700: #162b39;
  --ice-600: #1e3a4d;
  --frost:   #78cfe4;
  --frost-d: #3f97b0;
  --brass:   #c9a227;
  --ember:   #d4634a;
  --paper:   #e6ecef;
  --muted:   #8ba3b0;
  --ok:      #6fbf8b;

  --face-display: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --face-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --face-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  --gap: 1.5rem;
  --radius: 3px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ice-900);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(120, 207, 228, .09), transparent 70%);
  color: var(--paper);
  font-family: var(--face-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- Kopfzeile ---------------------------------------------------------- */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--ice-600);
  background: rgba(10, 21, 29, .8);
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: var(--paper);
}

/* Signaturelement: ein Portalring, wie er in Dalaran an der Wand haengt.
   Bewusst das einzige dekorative Element der Seite. */
.brand-mark {
  width: 15px; height: 15px;
  border: 2px solid var(--frost);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(120, 207, 228, .13), inset 0 0 6px rgba(120, 207, 228, .5);
  flex: none;
}

.brand-text {
  font-family: var(--face-display);
  font-size: 1.25rem;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.masthead nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.masthead nav a,
.linkish {
  color: var(--muted);
  text-decoration: none;
  font-size: .93rem;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color .15s, border-color .15s;
}

.masthead nav a:hover,
.linkish:hover { color: var(--frost); border-bottom-color: var(--frost-d); }
.masthead nav a[aria-current="page"] { color: var(--paper); border-bottom-color: var(--frost); }

.linkish {
  background: none;
  border: 0;
  border-bottom: 1px solid transparent;
  font: inherit;
  font-size: .93rem;
  cursor: pointer;
  padding: 0 0 2px;
}

/* --- Grundlayout -------------------------------------------------------- */

main {
  flex: 1;
  width: 100%;
  max-width: 62rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

h1 {
  font-family: var(--face-display);
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  font-weight: 400;
  letter-spacing: .01em;
  margin: 0 0 .4rem;
}

h2 {
  font-family: var(--face-display);
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: .04em;
  margin: 0 0 .75rem;
  color: var(--frost);
}

h3 { font-size: .95rem; margin: 0 0 .5rem; letter-spacing: .03em; }

.lede { color: var(--muted); margin: 0 0 2rem; }
.dim { color: var(--muted); }
.mono { font-family: var(--face-mono); font-size: .85em; }

.panel {
  background: var(--ice-800);
  border: 1px solid var(--ice-600);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: var(--gap);
}

.panel-danger { border-color: rgba(212, 99, 74, .45); }
.panel-danger h2 { color: var(--ember); }

.note {
  border-left: 2px solid var(--ice-600);
  padding: .25rem 0 .25rem 1.1rem;
  color: var(--muted);
  font-size: .9rem;
  margin-top: var(--gap);
}
.note ul { margin: .4rem 0 0; padding-left: 1.1rem; }

/* --- Formulare ---------------------------------------------------------- */

.stack { display: flex; flex-direction: column; gap: .4rem; }
.stack label { font-size: .85rem; color: var(--muted); margin-top: .8rem; }
.stack button { margin-top: 1.25rem; align-self: flex-start; }

.row {
  display: flex;
  gap: .75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.inline { display: inline; }

input[type=text], input[type=password], input:not([type]), select, input[type=file] {
  background: var(--ice-900);
  border: 1px solid var(--ice-600);
  border-radius: var(--radius);
  color: var(--paper);
  padding: .6rem .7rem;
  font: inherit;
  font-size: .95rem;
  width: 100%;
  max-width: 24rem;
}

input[type=file] { padding: .45rem; font-size: .88rem; }
select { max-width: 14rem; }

input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--frost);
  outline-offset: 2px;
}

button, .button {
  display: inline-block;
  background: var(--ice-700);
  color: var(--paper);
  border: 1px solid var(--ice-600);
  border-radius: var(--radius);
  padding: .55rem 1.1rem;
  font: inherit;
  font-size: .93rem;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, border-color .15s;
}

button:hover, .button:hover { background: var(--ice-600); border-color: var(--frost-d); }

button.primary {
  background: var(--frost-d);
  border-color: var(--frost);
  color: var(--ice-900);
  font-weight: 600;
}
button.primary:hover { background: var(--frost); }

button.danger {
  background: transparent;
  border-color: var(--ember);
  color: var(--ember);
}
button.danger:hover { background: var(--ember); color: var(--ice-900); }

/* --- Meldungen ---------------------------------------------------------- */

.notices { margin-bottom: var(--gap); }

.notice {
  margin: 0 0 .6rem;
  padding: .75rem 1rem;
  border-radius: var(--radius);
  border-left: 3px solid var(--muted);
  background: var(--ice-800);
  font-size: .93rem;
}

.notice-ok    { border-left-color: var(--ok); }
.notice-error { border-left-color: var(--ember); }
.notice-warn  { border-left-color: var(--brass); }

.hint { color: var(--muted); font-size: .85rem; margin: .75rem 0 0; }

/* --- Tabellen ----------------------------------------------------------- */

.data {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: .9rem;
}

.data th {
  text-align: left;
  font-weight: 500;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--muted);
  padding: 0 .75rem .5rem 0;
  border-bottom: 1px solid var(--ice-600);
}

.data td {
  padding: .55rem .75rem .55rem 0;
  border-bottom: 1px solid rgba(30, 58, 77, .5);
  vertical-align: top;
}

.data tr:last-child td { border-bottom: 0; }
.row-fail td:first-child { box-shadow: inset 2px 0 0 var(--ember); padding-left: .6rem; }

.actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  margin-right: .5rem;
  vertical-align: baseline;
}
.dot-up   { background: var(--ok);    box-shadow: 0 0 0 3px rgba(111, 191, 139, .18); }
.dot-down { background: var(--ember); box-shadow: 0 0 0 3px rgba(212, 99, 74, .18); }

.tag {
  display: inline-block;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--brass);
  border: 1px solid rgba(201, 162, 39, .4);
  border-radius: 2px;
  padding: .05rem .4rem;
  margin-left: .5rem;
}

code {
  font-family: var(--face-mono);
  font-size: .85em;
  background: var(--ice-900);
  border: 1px solid var(--ice-600);
  border-radius: 2px;
  padding: .1rem .35rem;
}

/* --- Anmeldeseite ------------------------------------------------------- */

.gate {
  max-width: 24rem;
  margin: 3rem auto;
}
.gate .code {
  font-size: 3rem;
  color: var(--ice-600);
  margin: 0;
  line-height: 1;
}

/* --- Fusszeile ---------------------------------------------------------- */

footer {
  padding: 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: .82rem;
}
footer p { margin: .75rem 0 0; }

.rule {
  display: block;
  height: 1px;
  max-width: 62rem;
  margin: 0 auto;
  background: linear-gradient(90deg, transparent, var(--ice-600) 20%, var(--ice-600) 80%, transparent);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 34rem) {
  main { padding: 1.75rem 1rem 3rem; }
  .panel { padding: 1.1rem; }
  .data { font-size: .82rem; }
  .actions { flex-direction: column; gap: .35rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
