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

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: #f0f2f5;
    color: #1a1a1a;
    font-size: 15px;
}

/* ── Navbar ─────────────────────────────────────────────────────────── */
.navbar {
    background: #1565C0;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    min-height: 56px;
    flex-wrap: wrap;          /* viele Menüpunkte: umbrechen statt seitlich überstehen */
    column-gap: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.navbar-brand { font-size: 18px; font-weight: 700; letter-spacing: .5px; }
.navbar-links { display: flex; gap: 8px; flex-wrap: wrap; padding: 6px 0; }
.navbar-links a {
    color: rgba(255,255,255,.85);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 6px;
    transition: background .15s;
}
.navbar-links a:hover, .navbar-links a.active { background: rgba(255,255,255,.18); color: white; }
.navbar-user { font-size: 13px; opacity: .8; }

/* ── Layout ─────────────────────────────────────────────────────────── */
.page { max-width: none; margin: 24px 0; padding: 0 24px; }

.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,.1);
    padding: 28px;
    margin-bottom: 24px;
}
.card-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #1565C0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Login ──────────────────────────────────────────────────────────── */
.login-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #f0f2f5;
}
.login-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,.12);
    padding: 40px;
    width: 100%;
    max-width: 380px;
}
.login-card h1 {
    font-size: 22px;
    font-weight: 700;
    color: #1565C0;
    margin-bottom: 8px;
}
.login-card .subtitle {
    font-size: 13px;
    color: #666;
    margin-bottom: 28px;
}

/* ── Formular ───────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
}
.form-group input, .form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color .15s;
    outline: none;
}
.form-group input:focus, .form-group select:focus { border-color: #1565C0; }

/* ── Buttons ────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s, transform .1s;
    text-decoration: none;
}
.btn:hover { opacity: .88; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary   { background: #1565C0; color: white; }
.btn-success   { background: #2E7D32; color: white; }
.btn-danger    { background: #C62828; color: white; }
.btn-secondary { background: #e0e0e0; color: #333; }
.btn-sm        { padding: 6px 14px; font-size: 13px; }
.btn-block     { width: 100%; justify-content: center; }

/* ── Tabelle ────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
    text-align: left;
    padding: 10px 14px;
    background: #f5f7ff;
    color: #1565C0;
    font-weight: 700;
    border-bottom: 2px solid #e0e7ff;
}
td { padding: 10px 14px; border-bottom: 1px solid #f0f0f0; }
tr:hover td { background: #fafbff; }
tr:last-child td { border-bottom: none; }

/* ── Status-Banner ──────────────────────────────────────────────────── */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}
.alert-error   { background: #FFEBEE; color: #B71C1C; border: 1px solid #FFCDD2; }
.alert-success { background: #E8F5E9; color: #2E7D32; border: 1px solid #A5D6A7; }
.alert-info    { background: #E3F2FD; color: #1565C0; border: 1px solid #90CAF9; }

/* ── Loading ────────────────────────────────────────────────────────── */
.spinner {
    display: inline-block;
    width: 18px; height: 18px;
    border: 3px solid rgba(21,101,192,.2);
    border-top-color: #1565C0;
    border-radius: 50%;
    animation: spin .7s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-row td { text-align: center; color: #999; padding: 32px; }

/* ── Badge ──────────────────────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}
.badge-blue   { background: #E3F2FD; color: #1565C0; }
.badge-green  { background: #E8F5E9; color: #2E7D32; }
.badge-orange { background: #FFF3E0; color: #E65100; }
.badge-gray   { background: #ECEFF1; color: #455A64; }
.badge-red    { background: #FFEBEE; color: #C62828; }

/* ── Modal ──────────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.45);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000;
}
.modal {
    background: white;
    border-radius: 14px;
    padding: 32px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 8px 40px rgba(0,0,0,.2);
}
.modal h2 { font-size: 18px; font-weight: 700; margin-bottom: 20px; color: #1a1a1a; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; }

/* Langer Eintragstext: nur die ersten 3 Zeilen, Klick klappt auf/zu */
.ausschnitt {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
    cursor: pointer;
}
.ausschnitt.offen { display: block; -webkit-line-clamp: unset; line-clamp: unset; }
