/*
 * CoE Core Design Tokens & Utility-Klassen.
 *
 * Extrahiert aus dem urspruenglich rein inline definierten Stylesheet in
 * templates/coe_app/base.html, damit App-Bereich (base.html) und
 * oeffentlicher Bereich (base_public.html) exakt dieselben Farben,
 * Schriften und Grundkomponenten (.btn, .card, .alert) nutzen, ohne
 * Werte doppelt pflegen zu muessen.
 *
 * base.html bleibt unveraendert (eigenes inline <style>), um das
 * bestehende, produktiv laufende App-Layout nicht zu riskieren.
 * base_public.html baut ausschliesslich auf dieser Datei auf.
 */

:root {
    --bg-dark: #090a0f;
    --bg-card: rgba(22, 25, 38, 0.65);
    --bg-card-hover: rgba(30, 35, 53, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-active: rgba(99, 102, 241, 0.5);
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --accent: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.45);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(at 10% 20%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 90% 80%, rgba(6, 182, 212, 0.12) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, var(--primary) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(99, 102, 241, 0.2);
    color: #818cf8;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    border: 1px solid rgba(99, 102, 241, 0.3);
    -webkit-text-fill-color: #818cf8;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.4rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #4338ca 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-lg {
    padding: 0.95rem 2rem;
    font-size: 1.05rem;
    border-radius: 12px;
}

.card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--glass-shadow);
}

.alert {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    backdrop-filter: blur(8px);
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fbbf24;
}

.text-center { text-align: center; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }

/* Details/Summary (Collapsible Sections) */
details.section-collapsible {
    cursor: pointer;
}

details.section-collapsible > summary {
    list-style: none;
    cursor: pointer;
    outline: none;
}

details.section-collapsible > summary::-webkit-details-marker {
    display: none;
}

details.section-collapsible > summary::before {
    content: "▼ ";
    display: inline-block;
    margin-right: 0.5rem;
    transition: transform 0.2s ease;
    font-size: 0.85rem;
    color: #818cf8;
}

details.section-collapsible[open] > summary::before {
    transform: rotate(0deg);
}

details.section-collapsible:not([open]) > summary::before {
    transform: rotate(-90deg);
}

details.section-collapsible > :not(summary) {
    animation: expandIn 0.3s ease-out;
}

@keyframes expandIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
