/* ---------------------------------------------------------------------------
   Ankaufsystem TCG Shop Moers — Gestaltung.
;
   Dieselbe Sprache wie der Shop (custom/plugins/TcgMoersTheme): dunkle
   Rahmung, helle Buehne, Navy und Cyan, Bricolage Grotesque ueber Source
   Sans 3. Wer die Farben im Shop aendert, muss sie hier mitziehen — das
   Ankaufsystem haengt nicht an der Theme-Konfiguration, es ist eine eigene
   Anwendung.

   Vorher lagen rund 350 Zeilen CSS in vier <style>-Bloecken verteilt, jede
   Seite mit eigenen Werten. Alles steht jetzt hier.
--------------------------------------------------------------------------- */

:root {
    --navy:        #283583;
    --navy-hell:   #eef1f9;
    --cyan:        #2eaee4;
    --chrome:      #151a3b;
    --chrome-2:    #1e2550;

    --ink:         #14172a;
    --muted:       #5a6180;
    --linie:       #dfe3ef;
    --flaeche:     #ffffff;
    --flaeche-2:   #f7f8fc;
    --grund:       #f3f5fa;

    /* Ampel wie im Shop: gruen gut, gelb knapp, rot Problem. */
    --gruen:       #17604a;
    --gruen-hell:  #e3f3ec;
    --gelb:        #8a5a00;
    --gelb-hell:   #fff6da;
    --rot:         #b3261e;
    --rot-hell:    #fdeceb;

    --radius:      12px;
    --radius-s:    8px;

    --folie: linear-gradient(100deg, #2eaee4 0%, #6e5cf5 62%, #f05fb0 100%);

    --schrift:     'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
    --schrift-kopf:'Bricolage Grotesque', 'Source Sans 3', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    background-color: var(--grund);
    color: var(--ink);
    font-family: var(--schrift);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3 {
    font-family: var(--schrift-kopf);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin: 0;
}

a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ----------------------------------------------------------- Kopfbereich -- */

.ak-kopf {
    background-color: var(--navy);
    color: #fff;
    /* Dieselbe kraeftige Unterkante wie die Spielnavigation des Shops. */
    border-bottom: 4px solid #1f2a69;
    box-shadow: 0 6px 16px rgba(20, 23, 42, 0.14);
}

.ak-kopf-inner {
    max-width: 1100px;
    margin-inline: auto;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.ak-logo img { display: block; height: 42px; width: auto; }

.ak-zurueck {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 99px;
    color: #fff;
    font-size: 14.5px;
    font-weight: 700;
    white-space: nowrap;
}

.ak-zurueck:hover {
    background-color: #fff;
    border-color: #fff;
    color: var(--chrome);
    text-decoration: none;
}

/* ------------------------------------------------------------- Buehne ----- */

.ak-buehne {
    position: relative;
    overflow: hidden;
    background-color: var(--chrome);
    color: #fff;
    padding: 40px 0 44px;
}

/* Lichtschein aus der oberen linken Ecke, wie in den dunklen Baendern des
   Shops. Nimmt dem Navy die Flaechigkeit. */
.ak-buehne::before {
    content: "";
    position: absolute;
    inset: -40% -10% auto -10%;
    height: 320px;
    background:
        radial-gradient(60% 120% at 18% 0%, rgba(46, 174, 228, 0.22), transparent 70%),
        radial-gradient(45% 100% at 78% 10%, rgba(110, 92, 245, 0.18), transparent 72%);
    pointer-events: none;
}

.ak-buehne-inner {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin-inline: auto;
    padding-inline: 20px;
}

.ak-auge {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--cyan);
}

.ak-auge::before {
    content: "";
    width: 26px;
    height: 3px;
    border-radius: 2px;
    background: var(--folie);
    flex: 0 0 auto;
}

.ak-buehne h1 {
    color: #fff;
    font-size: clamp(30px, 3.4vw, 46px);
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.ak-buehne p {
    margin: 12px 0 0;
    max-width: 62ch;
    font-size: 16.5px;
    color: rgba(255, 255, 255, 0.72);
}

/* ------------------------------------------------------------ Inhalt ------ */

.ak-inhalt {
    flex: 1 1 auto;
    max-width: 1100px;
    width: 100%;
    margin-inline: auto;
    padding: 28px 20px 56px;
}

.ak-karte {
    background-color: var(--flaeche);
    border: 1px solid var(--linie);
    border-radius: var(--radius);
    box-shadow: 0 1px 2px rgba(20, 23, 42, 0.04);
    padding: 26px 28px;
    margin-bottom: 20px;
}

.ak-karte > h2 {
    font-size: 20px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--linie);
}

/* --------------------------------------------------- Formularsprache ------ */

label { display: block; margin-bottom: 6px; font-size: 13.5px; font-weight: 600; color: var(--muted); }

input[type="text"], input[type="email"], input[type="number"],
input[type="password"], input[type="date"], select, textarea {
    width: 100%;
    min-height: 46px;
    padding: 11px 14px;
    border: 1px solid var(--linie);
    border-radius: var(--radius-s);
    background-color: var(--flaeche);
    color: var(--ink);
    font-family: var(--schrift);
    font-size: 15px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:hover:not(:disabled):not(:focus), select:hover, textarea:hover { border-color: #ccd2e4; }

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(40, 53, 131, 0.15);
}

textarea { min-height: 110px; resize: vertical; }
select { padding-right: 38px; }

.ak-feldreihe {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
}

.ak-feld-breit { grid-column: 1 / -1; }

@media (max-width: 599.98px) {
    .ak-feldreihe { grid-template-columns: minmax(0, 1fr); }
}

/* Auswahlfelder. Vorher lagen Beschriftung und Knopf auseinander — die
   Beschriftung links, der Knopf am rechten Rand. Jetzt ist die ganze Zeile
   eine Flaeche, die man treffen kann. */
.ak-wahl { display: grid; gap: 8px; margin-top: 4px; }

.ak-wahl-option {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 14px;
    border: 1px solid var(--linie);
    border-radius: var(--radius-s);
    background-color: var(--flaeche);
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
    margin: 0;
    transition: border-color 0.14s ease, background-color 0.14s ease;
}

.ak-wahl-option:hover { border-color: #ccd2e4; background-color: var(--flaeche-2); }

.ak-wahl-option input[type="radio"],
.ak-wahl-option input[type="checkbox"] {
    width: 19px;
    height: 19px;
    min-height: 0;
    margin: 0;
    padding: 0;
    flex: 0 0 auto;
    accent-color: var(--navy);
    cursor: pointer;
}

.ak-wahl-option:has(input:checked) {
    border-color: var(--navy);
    background-color: var(--navy-hell);
}

/* --------------------------------------------------------------- Knoepfe -- */

.ak-knopf {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 13px 26px;
    border: 1px solid var(--navy);
    border-radius: var(--radius-s);
    background-color: var(--navy);
    color: #fff;
    font-family: var(--schrift);
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.ak-knopf:hover {
    background-color: #1f2a69;
    border-color: #1f2a69;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(40, 53, 131, 0.24);
    text-decoration: none;
    color: #fff;
}

.ak-knopf-still {
    background-color: transparent;
    border-color: var(--linie);
    color: var(--ink);
}

.ak-knopf-still:hover {
    background-color: var(--navy-hell);
    border-color: var(--navy);
    color: var(--navy);
    box-shadow: none;
}

.ak-knopf-klein { min-height: 38px; padding: 8px 16px; font-size: 14px; }

/* --------------------------------------------------------------- Tabelle -- */

.ak-tabelle-rahmen {
    border: 1px solid var(--linie);
    border-radius: var(--radius);
    overflow: hidden;
}

/* Breite Tabellen scrollen in sich, nie die Seite. */
.ak-tabelle-scroll { overflow-x: auto; }

table.ak-tabelle {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.ak-tabelle thead th {
    background-color: var(--chrome);
    color: #fff;
    font-family: var(--schrift);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: left;
    padding: 13px 16px;
    white-space: nowrap;
}

.ak-tabelle td { padding: 11px 16px; border-top: 1px solid var(--linie); vertical-align: middle; }

.ak-tabelle tbody tr:hover { background-color: var(--flaeche-2); }

/* Sprachzeile: trennt Deutsch von Englisch, ist aber keine Ware. */
.ak-tabelle .ak-sprachzeile td {
    background-color: var(--navy-hell);
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--navy);
    padding-block: 9px;
}

.ak-tabelle .ak-menge input { max-width: 110px; text-align: center; font-weight: 700; }

.ak-tabelle .ak-betrag {
    text-align: right;
    font-family: var(--schrift-kopf);
    font-weight: 800;
    white-space: nowrap;
}

.ak-flagge { width: 22px; height: auto; display: block; border-radius: 3px; }

/* Die Summe ist die Zahl, auf die alles zulaeuft. */
.ak-summe {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
    padding: 20px 24px;
    border-radius: var(--radius);
    background-color: var(--chrome);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.ak-summe::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: var(--folie);
}

.ak-summe-text { font-size: 16px; font-weight: 600; color: rgba(255, 255, 255, 0.82); }

.ak-summe-zahl {
    font-family: var(--schrift-kopf);
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.ak-hinweis { margin: 14px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); }

/* --------------------------------------------------------------- Meldung -- */

.ak-meldung {
    display: flex;
    gap: 11px;
    padding: 14px 16px;
    border-radius: var(--radius-s);
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 20px;
}

.ak-meldung-gut  { background-color: var(--gruen-hell); color: var(--gruen); }
.ak-meldung-warn { background-color: var(--gelb-hell);  color: var(--gelb); }
.ak-meldung-fehler { background-color: var(--rot-hell); color: var(--rot); }

/* Zustaende im Adminbereich, in derselben Ampel wie der Shop. */
.ak-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 11px;
    border-radius: 99px;
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
}

.ak-status::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: currentColor;
    flex: 0 0 auto;
}

.ak-status-offen      { background-color: var(--gelb-hell);  color: var(--gelb); }
.ak-status-bearbeitet { background-color: var(--gruen-hell); color: var(--gruen); }
.ak-status-abgelehnt  { background-color: var(--rot-hell);   color: var(--rot); }
.ak-status-neutral    { background-color: var(--flaeche-2);  color: var(--muted); }

/* ---------------------------------------------------------- Fussbereich --- */

.ak-fuss {
    background-color: var(--chrome);
    color: rgba(255, 255, 255, 0.62);
    margin-top: auto;
    padding: 26px 0;
    font-size: 14px;
}

.ak-fuss-inner {
    max-width: 1100px;
    margin-inline: auto;
    padding-inline: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
}

.ak-fuss a { color: rgba(255, 255, 255, 0.82); }
.ak-fuss a:hover { color: #fff; }
.ak-fuss-links { display: flex; flex-wrap: wrap; gap: 18px; }

/* ------------------------------------------------------------- Anmeldung -- */

.ak-anmeldung {
    max-width: 420px;
    margin: 60px auto;
}

/* --------------------------------------------------------------- Handy ---- */

@media (max-width: 599.98px) {
    .ak-karte { padding: 20px 16px; }
    .ak-kopf-inner { padding-inline: 16px; }
    .ak-inhalt { padding-inline: 16px; }
    .ak-summe { padding: 16px 18px; }
    .ak-summe-zahl { font-size: 26px; }
}

/* Wird vom Skript eingeblendet, sobald ein Spiel gewaehlt ist. */
.orderDetails { display: none; }

/* Bankverbindung nur bei Ueberweisung; das Skript schaltet sie um. */
#bankDetails { display: none; }

/* Nummerierte Schrittfolge auf der Bestaetigungsseite. */
.ak-schritte {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: schritt;
    display: grid;
    gap: 14px;
}

.ak-schritte li {
    counter-increment: schritt;
    display: grid;
    grid-template-columns: 30px 1fr;
    gap: 13px;
    align-items: start;
    font-size: 15px;
    color: var(--muted);
}

.ak-schritte li::before {
    content: counter(schritt);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--navy);
    color: #fff;
    font-family: var(--schrift-kopf);
    font-size: 14px;
    font-weight: 800;
}

.ak-schritte strong { display: block; color: var(--ink); font-weight: 700; }

/* ------------------------------------------------------- Adminbereich ----- */

.ak-aktionen { display: flex; flex-wrap: wrap; gap: 6px; }

/* Die Postenliste steht in der aufgeklappten Zeile und braucht keinen
   zweiten dunklen Tabellenkopf — sonst hat die Zeile zwei Koepfe. */
.ak-tabelle-innen thead th {
    background-color: var(--flaeche-2);
    color: var(--muted);
    border-bottom: 1px solid var(--linie);
}

.ak-tabelle-innen { border: 1px solid var(--linie); border-radius: var(--radius-s); overflow: hidden; }

.details-panel {
    padding: 18px;
    background-color: var(--flaeche-2);
}

.details-panel h4 {
    margin: 0 0 12px;
    font-family: var(--schrift-kopf);
    font-size: 15px;
    font-weight: 800;
}

/* Bearbeiten-Fenster */
#editModal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 50;
    background-color: rgba(20, 23, 42, 0.55);
    padding: 24px;
    overflow-y: auto;
}

#editModalContent {
    max-width: 720px;
    margin: 40px auto;
    background-color: var(--flaeche);
    border-radius: var(--radius);
    padding: 26px 28px;
    box-shadow: 0 24px 60px rgba(20, 23, 42, 0.3);
}

.close-modal {
    float: right;
    min-height: 36px;
    padding: 7px 16px;
    border: 1px solid var(--linie);
    border-radius: var(--radius-s);
    background-color: var(--flaeche);
    font-family: var(--schrift);
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
    cursor: pointer;
}

.close-modal:hover { background-color: var(--navy-hell); border-color: var(--navy); color: var(--navy); }

/* Die drei Knoepfe stapelten sich in der schmalen Spalte und machten jede
   Zeile 126 Pixel hoch. Nebeneinander bleibt die Zeile flach; die Tabelle
   scrollt ohnehin in sich. */
.ak-aktionen { flex-wrap: nowrap; }
.ak-tabelle td:has(.ak-aktionen) { white-space: nowrap; }

/* Adresse und Datum brauchen nicht umzubrechen — das Umbrechen hat die
   Zeilen unnoetig hoch gemacht. */
.ak-tabelle td { white-space: nowrap; }
.ak-tabelle td.ak-umbruch { white-space: normal; }

/* Der Adminbereich zeigt zwoelf Spalten; 1.100 Pixel reichen dafuer nicht.
   Die Buehne und der Kopf bleiben auf ihrer Breite, damit die Seiten nicht
   auseinanderlaufen. */
.ak-inhalt-breit { max-width: 1640px; }

/* Zwoelf Spalten brauchten 1.702 Pixel, verfuegbar sind 1.598. Der
   Innenabstand der Zellen macht davon allein 384 aus — in der Uebersicht
   faellt er knapper aus als auf der Kundenseite. */
.ak-inhalt-breit .ak-tabelle td,
.ak-inhalt-breit .ak-tabelle thead th { padding-inline: 11px; }

.ak-inhalt-breit .ak-tabelle thead th { font-size: 11px; letter-spacing: 0.06em; }

/* Bearbeiten-Fenster: Bruchstueck, das per AJAX geladen wird. */
.ak-fenster-kopf h2, .ak-fenster-kopf h3 {
    font-size: 20px;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--linie);
}

.ak-fenster-formular label { margin-top: 14px; }
.ak-fenster-formular .ak-knopf { margin-top: 20px; }

/* Sicherheitsnetz: die Flaggen trugen ihre Groesse frueher als style-Angabe
   in der Datei. Ohne Begrenzung laufen sie auf volle Zellenbreite. */
.ak-tabelle img { max-width: 24px; height: auto; }
