/* Arda License – Portal-Design
   (c) 2026 Mario Dwuletzki (Thaliruth). Alle Rechte vorbehalten.

   Darkmode nach Vorgabe: dunkler Hintergrund, weiße Schrift, Überschriften
   in kontrastreichem Gelb, Schaltflächen in dunklem Blau mit weißer Schrift.
   Responsiv und barrierefrei (WCAG 2.2 AA): großzügige Schrift, deutlich
   sichtbarer Tastaturfokus, ausreichende Kontraste. */

:root {
    --hintergrund: #121212;
    --flaeche: #1e1e1e;
    --flaeche-hell: #2a2a2a;
    --text: #ffffff;
    --text-gedimmt: #c7c7c7;
    --ueberschrift: #ffd54f;   /* kontrastreiches Gelb */
    --knopf: #1e3a8a;          /* dunkles Blau */
    --knopf-hover: #2b4eb3;
    --rand: #3a3a3a;
    --fehler: #ff8a80;
    --erfolg: #a5d6a7;
    --fokus: #ffd54f;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--hintergrund);
    color: var(--text);
    font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
    font-size: 1.06rem;
    line-height: 1.6;
}

/* Sprunglink: erst bei Tastaturfokus sichtbar */
.sprunglink {
    position: absolute;
    left: -9999px;
    background: var(--knopf);
    color: #fff;
    padding: 0.75rem 1.25rem;
    z-index: 10;
}
.sprunglink:focus { left: 0.5rem; top: 0.5rem; }

/* Deutlicher Tastaturfokus überall */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
    outline: 3px solid var(--fokus);
    outline-offset: 2px;
}

header {
    background: var(--flaeche);
    border-bottom: 2px solid var(--rand);
    padding: 0.75rem 1rem;
}

.portalname {
    color: var(--ueberschrift);
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

nav a {
    display: block;
    padding: 0.55rem 1rem;
    background: var(--knopf);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
}
nav a:hover { background: var(--knopf-hover); }
nav a[aria-current="page"] {
    background: var(--ueberschrift);
    color: #121212;
    font-weight: 700;
}

main {
    max-width: 60rem;
    margin: 0 auto;
    padding: 1rem;
}

h1, h2, h3 { color: var(--ueberschrift); line-height: 1.3; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.35rem; margin-top: 2rem; }

a { color: #8ab4f8; }

/* Statusmeldungen (Live-Region) */
#statusmeldung { max-width: 60rem; margin: 0 auto; padding: 0 1rem; }
.meldung {
    padding: 0.9rem 1.1rem;
    border-radius: 8px;
    margin: 0.75rem 0 0;
    font-weight: 600;
}
.meldung.erfolg { background: #1b3320; color: var(--erfolg); border: 2px solid var(--erfolg); }
.meldung.fehler { background: #3a1f1d; color: var(--fehler); border: 2px solid var(--fehler); }

/* Formulare */
form { margin: 1rem 0; }
fieldset {
    border: 2px solid var(--rand);
    border-radius: 8px;
    padding: 1rem;
    margin: 0 0 1.25rem;
}
legend { color: var(--ueberschrift); font-weight: 700; padding: 0 0.5rem; }

label { display: block; font-weight: 600; margin: 0.9rem 0 0.3rem; }
.hinweis { color: var(--text-gedimmt); font-size: 0.95rem; margin: 0.2rem 0 0; }

input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="date"], input[type="url"], select, textarea {
    width: 100%;
    max-width: 28rem;
    padding: 0.7rem;
    font-size: 1.05rem;
    background: var(--flaeche-hell);
    color: var(--text);
    border: 2px solid var(--rand);
    border-radius: 6px;
}

input[type="checkbox"], input[type="radio"] {
    width: 1.35rem;
    height: 1.35rem;
    accent-color: var(--knopf);
    vertical-align: middle;
    margin-right: 0.5rem;
}
.auswahlzeile label { display: inline; font-weight: 400; }
.auswahlzeile { margin: 0.5rem 0; }

button, .knopf {
    display: inline-block;
    background: var(--knopf);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.75rem 1.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
    text-decoration: none;
}
button:hover, .knopf:hover { background: var(--knopf-hover); }

button.gefahr { background: #7f1d1d; }
button.gefahr:hover { background: #9a2626; }

/* Der einmalig angezeigte Lizenzschlüssel */
.schluessel-anzeige {
    font-family: Consolas, "Courier New", monospace;
    font-size: 1.5rem;
    letter-spacing: 0.08em;
    background: var(--flaeche);
    border: 2px solid var(--ueberschrift);
    border-radius: 8px;
    padding: 1.25rem;
    margin: 1rem 0;
    word-break: break-all;
}

/* Tabellen */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background: var(--flaeche);
}
caption {
    text-align: left;
    color: var(--ueberschrift);
    font-weight: 700;
    padding: 0.5rem 0;
}
th, td {
    text-align: left;
    padding: 0.7rem 0.8rem;
    border-bottom: 1px solid var(--rand);
    vertical-align: top;
}
th { color: var(--ueberschrift); }

/* Kennzahlen-Kacheln der Übersicht */
.kacheln {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 1rem;
    margin: 1rem 0;
    padding: 0;
    list-style: none;
}
.kacheln li {
    background: var(--flaeche);
    border: 2px solid var(--rand);
    border-radius: 8px;
    padding: 1rem;
}
.kacheln .zahl {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--ueberschrift);
}

footer {
    max-width: 60rem;
    margin: 2rem auto 0;
    padding: 1rem;
    color: var(--text-gedimmt);
    border-top: 1px solid var(--rand);
}

/* Kleine Bildschirme (iPhone usw.) */
@media (max-width: 40rem) {
    nav ul { flex-direction: column; }
    nav a { width: 100%; }
    body { font-size: 1.1rem; }
    th, td { padding: 0.5rem; }
    .tabellen-rollbereich { overflow-x: auto; }
}

/* Karten-Listen: barrierefreie Alternative zu Tabellen – jede Angabe trägt
   ihre Bezeichnung direkt im Text, der Screenreader liest beides zusammen. */
.liste-karten { list-style: none; margin: 1rem 0; padding: 0; }
.liste-karten > li {
    background: var(--flaeche);
    border: 2px solid var(--rand);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}
.liste-karten p { margin: 0.3rem 0; }
.liste-karten h3 { margin: 0 0 0.5rem; }

/* Modale Rückmeldungs- und Bestätigungs-Dialoge (Marios Vorgabe:
   Rückmeldungen mit direktem Screenreader-Fokus) */
dialog.meldung-dialog {
    background: var(--flaeche);
    color: var(--text);
    border: 3px solid var(--erfolg);
    border-radius: 10px;
    padding: 1.5rem;
    max-width: 34rem;
    font-size: 1.05rem;
}
dialog.meldung-dialog.fehler { border-color: var(--fehler); }
dialog.meldung-dialog h2 { margin-top: 0; }
dialog.meldung-dialog button { margin-right: 0.75rem; }
dialog.meldung-dialog::backdrop { background: rgba(0, 0, 0, 0.72); }

/* Hinweise, die ÜBER dem Eingabefeld stehen */
.hinweis-oben { color: var(--text-gedimmt); font-size: 0.95rem; margin: 0.1rem 0 0.35rem; }

/* GET-Formulare, deren Knopf wie ein normaler Knopf in einer Reihe steht */
form.knopfzeile { display: inline-block; margin: 0 0.5rem 0 0; }
