/* ── Unterricht App – Gemeinsame Styles ────────────────────────────────────── */

:root {
    --accent: #2563eb;
    --accent-light: #dbeafe;
    --bg: #f8fafc;
    --surface: #fff;
    --border: #e2e8f0;
    --text: #1e293b;
    --text-dim: #64748b;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-hover: 0 4px 14px rgba(0,0,0,0.1);
    --transition: 0.2s ease;
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); }

/* ── Navigation ────────────────────────────────────────────────────────────── */

nav {
    background: #1e293b; color: #fff;
    padding: 0 1.5rem; height: 52px;
    display: flex; align-items: center; gap: 1.5rem;
    position: sticky; top: 0; z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.nav-brand { color: #fff; text-decoration: none; font-weight: 800; font-size: 1.05rem; letter-spacing: -0.02em; }
.nav-links { display: flex; gap: 2px; }
.nav-links a { color: rgba(255,255,255,0.6); text-decoration: none; padding: 0.35rem 0.8rem; border-radius: 6px; font-size: 0.82rem; font-weight: 500; transition: all var(--transition); }
.nav-links a:hover { color: #fff; background: rgba(255,255,255,0.1); }
.nav-links a.active { color: #fff; background: rgba(255,255,255,0.15); font-weight: 600; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 0.8rem; font-size: 0.82rem; }
.nav-user { color: rgba(255,255,255,0.7); }
.nav-logout { color: rgba(255,255,255,0.5); text-decoration: none; font-size: 0.78rem; }
.nav-logout:hover { color: #fff; }

/* ── Layout ────────────────────────────────────────────────────────────────── */

.container { max-width: 1400px; margin: 0 auto; padding: 1.5rem; }
.container-md { max-width: 1200px; }
.container-sm { max-width: 960px; }
.container-xs { max-width: 900px; }

.page-header { margin-bottom: 1.5rem; display: flex; align-items: center; justify-content: space-between; }
.page-header h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em; }
.page-header p { color: var(--text-dim); font-size: 0.88rem; margin-top: 0.2rem; }

/* ── Cards ─────────────────────────────────────────────────────────────────── */

.card {
    background: var(--surface); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 1.2rem;
}
.card h2 { font-size: 1rem; font-weight: 700; margin-bottom: 0.8rem; }
.card h3 { font-size: 0.88rem; font-weight: 700; margin-bottom: 0.5rem; }

/* ── Badges ────────────────────────────────────────────────────────────────── */

.badge { display: inline-flex; padding: 0.1rem 0.45rem; border-radius: 5px; font-size: 0.7rem; font-weight: 600; color: #fff; }
.badge-um { background: #7c3aed; }
.badge-az { background: #0891b2; }

/* ── Progress Bars ─────────────────────────────────────────────────────────── */

.bar { background: #f1f5f9; border-radius: 99px; height: 6px; overflow: hidden; }
.fill { height: 100%; border-radius: 99px; transition: width 0.8s ease; }
.fill-gruen { background: linear-gradient(90deg, #16a34a, #22c55e); }
.fill-gelb { background: linear-gradient(90deg, #d97706, #f59e0b); }
.fill-rot { background: linear-gradient(90deg, #dc2626, #ef4444); }

/* ── Tables ────────────────────────────────────────────────────────────────── */

table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
th { background: #1e293b; color: #fff; padding: 0.55rem 0.7rem; text-align: left; font-size: 0.76rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
td { padding: 0.5rem 0.7rem; border-bottom: 1px solid #f1f5f9; font-size: 0.85rem; }
tr:hover td { background: #fafbfe; }

/* ── Filter Buttons ────────────────────────────────────────────────────────── */

.filter-bar { display: flex; gap: 0.3rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filter-btn {
    padding: 0.3rem 0.7rem; border-radius: 6px; border: 1.5px solid var(--border);
    background: var(--surface); color: var(--text-dim); font-size: 0.78rem; font-weight: 600;
    cursor: pointer; transition: all var(--transition); text-decoration: none;
}
.filter-btn:hover { border-color: #cbd5e1; background: #f1f5f9; }
.filter-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── Buttons ───────────────────────────────────────────────────────────────── */

.btn {
    padding: 0.3rem 0.7rem; border-radius: 6px; border: none; cursor: pointer;
    font-size: 0.78rem; font-weight: 600; transition: all var(--transition);
    text-decoration: none; color: #fff; display: inline-flex; align-items: center; gap: 0.3rem;
}
.btn-primary { background: var(--accent); }
.btn-primary:hover { background: #1d4ed8; }
.btn-success { background: var(--success); }
.btn-success:hover { background: #15803d; }
.btn-warning { background: var(--warning); }
.btn-warning:hover { background: #b45309; }
.btn-danger { background: var(--danger); }
.btn-outline { background: var(--surface); border: 1.5px solid var(--border); color: var(--text-dim); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* ── Forms ──────────────────────────────────────────────────────────────────── */

.form-row { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: end; margin-bottom: 0.6rem; }
.form-group { display: flex; flex-direction: column; gap: 0.2rem; }
.form-group label { font-size: 0.72rem; color: var(--text-dim); font-weight: 600; text-transform: uppercase; }
.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.35rem 0.5rem; border: 1.5px solid var(--border); border-radius: 6px;
    font-size: 0.83rem; font-family: inherit; outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }

/* ── Toast ──────────────────────────────────────────────────────────────────── */

.toast {
    position: fixed; bottom: 1.5rem; right: 1.5rem; background: #1e293b; color: #fff;
    padding: 0.6rem 1rem; border-radius: 8px; font-size: 0.82rem; font-weight: 500;
    box-shadow: 0 4px 14px rgba(0,0,0,0.2); z-index: 300;
    transform: translateY(20px); opacity: 0; transition: all 0.3s;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ── Empty State ───────────────────────────────────────────────────────────── */

.empty { text-align: center; padding: 3rem; color: var(--text-dim); font-size: 0.88rem; }

/* ── Placeholder (Sprint-Seiten) ───────────────────────────────────────────── */

.placeholder {
    text-align: center; padding: 4rem 2rem; background: var(--surface);
    border-radius: var(--radius); box-shadow: var(--shadow); margin-top: 1rem;
}
.placeholder-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.placeholder h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.4rem; }
.placeholder p { color: var(--text-dim); font-size: 0.88rem; }

/* ── Animations ────────────────────────────────────────────────────────────── */

@keyframes cardPop { from { opacity: 0; transform: translateY(12px); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ── Responsive ────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    nav { padding: 0 0.8rem; gap: 0.8rem; }
    .nav-links a { padding: 0.3rem 0.5rem; font-size: 0.75rem; }
    .container { padding: 1rem; }
}
