/* style.css – Zentrales Stylesheet der App. Farben/Radius als CSS-Variablen
   in :root definiert, damit sich das Farbschema an einer Stelle anpassen
   lässt. Bewusst schlicht gehalten (kein Framework), da es sich um ein
   internes Verwaltungswerkzeug handelt. */
:root {
    --color-bg: #f4f6f8;
    --color-surface: #ffffff;
    --color-border: #dde3e8;
    --color-text: #202b36;
    --color-muted: #667080;
    --color-primary: #2f6f4f;
    --color-primary-dark: #21593e;
    --color-danger: #b3402a;
    --radius: 6px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.5;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 24px 20px 60px;
}

h1 { font-size: 1.5rem; margin-bottom: 1rem; }
h2 { font-size: 1.15rem; margin-top: 2rem; }

/* Kopfleiste: zeigt App-Name + AK-Badge (aktueller Arbeitskreis, siehe src/header.php), Navigation, eingeloggte Person */
.topbar {
    background: var(--color-primary);
    color: #fff;
}
.topbar-inner {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    flex-wrap: wrap;
    gap: 10px;
}
.brand { color: #fff; font-weight: 700; text-decoration: none; font-size: 1.1rem; }
.ak-badge { font-weight: 400; font-size: 0.85rem; background: rgba(255,255,255,0.18); padding: 2px 9px; border-radius: 20px; margin-left: 8px; }
.logo-preview { max-height: 60px; max-width: 200px; display: block; margin: 8px 0; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 6px; background: #fff; }
.topbar nav a {
    color: #eafaf1;
    text-decoration: none;
    margin-right: 16px;
    font-size: 0.95rem;
}
.topbar nav a:hover { text-decoration: underline; }
.topbar-user { color: #eafaf1; font-size: 0.9rem; display: flex; gap: 12px; align-items: center; }
.topbar-user a { color: #fff; }

/* Weißer Kasten mit Rand – Standard-Container für Formulare und Info-Blöcke */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}

/* Listen-/Übersichtstabellen (Teilnehmer, Termine, Bescheinigungen) */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
}
th, td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.95rem;
}
th { background: #eef2f0; font-weight: 600; }
tr:last-child td { border-bottom: none; }

.actions a, .actions button.linklike {
    margin-right: 10px;
    font-size: 0.9rem;
}

form.inline { display: inline; }

/* Formularfelder */
label { display: block; font-weight: 600; margin: 14px 0 4px; font-size: 0.9rem; }
input[type=text], input[type=email], input[type=tel], input[type=date],
input[type=password], input[type=number], select, textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    background: #fff;
    color: var(--color-text);
}
.form-row { max-width: 480px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-weight: 400; }
.feld-inaktiv { opacity: 0.45; }
.checkbox-row input { width: auto; }

/* Buttons: .btn ist der Standard-Stil (primäre Farbe), Varianten .btn-secondary/.btn-danger/.btn-small kombinierbar */
.btn {
    display: inline-block;
    background: var(--color-primary);
    color: #fff;
    border: none;
    padding: 9px 16px;
    border-radius: var(--radius);
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    margin-top: 16px;
}
.btn:hover { background: var(--color-primary-dark); }
.btn-secondary { background: #566270; }
.btn-secondary:hover { background: #3f4854; }
.btn-danger { background: var(--color-danger); }
.btn-danger:hover { background: #8f331f; }
.btn-small { padding: 5px 10px; font-size: 0.85rem; margin-top: 0; }

.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; flex-wrap: wrap; gap: 10px; }

/* Flash-Meldungen (Erfolg/Fehler), siehe src/functions.php::flash()/get_flashes() */
.flash { padding: 10px 14px; border-radius: var(--radius); margin-bottom: 14px; font-size: 0.9rem; }
.flash-success { background: #e2f3e9; color: #205c3b; border: 1px solid #b9e0c8; }
.flash-error { background: #fbe7e3; color: #7d2e1c; border: 1px solid #f0c1b6; }

.muted { color: var(--color-muted); font-size: 0.9rem; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 0.78rem; background: #eef2f0; color: #3a4a41; }
.pill-referent { background: #fdf1d6; color: #7a5b0e; }

/* Zentrierte, schmale Box für Login-/Registrierungsformular */
.login-wrap { max-width: 380px; margin: 60px auto; }
