/* intern.HHC – globale Styles
   Farben aus dem intern.HHC-Logo: Navy #042a4f, Orange #f1741e (der Punkt in "INTERN.").
   Schriften liegen lokal unter /static/fonts (kein Google-Fonts-Abruf -> DSGVO, offline nutzbar). */

/* ── Schriften ─────────────────────────────────────────────────────────────── */
@font-face { font-family: 'Jost'; font-style: normal; font-weight: 300; font-display: swap; src: url('../fonts/jost-latin-300-normal.woff2') format('woff2'); }
@font-face { font-family: 'Jost'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/jost-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Jost'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/jost-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Jost'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/jost-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Lato'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/lato-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Lato'; font-style: italic; font-weight: 400; font-display: swap; src: url('../fonts/lato-latin-400-italic.woff2') format('woff2'); }
@font-face { font-family: 'Lato'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/lato-latin-700-normal.woff2') format('woff2'); }

/* ── Tokens ────────────────────────────────────────────────────────────────── */
:root {
    --navy: #042a4f;
    --navy-600: #0b3a68;
    --navy-050: #eaf0f6;
    --orange: #f1741e;
    --orange-600: #d65f0d;
    --paper: #f4f6f9;
    --surface: #ffffff;
    --line: #dde3ea;
    --line-strong: #c5ced8;
    --ink: #1b2734;
    --muted: #5d6b7a;

    --success: #1f8a5b;
    --success-bg: #e5f4ec;
    --danger: #c23b30;
    --danger-bg: #fbeae8;
    --warning: #b86e00;
    --warning-bg: #fdf1dc;
    --info: #1f6fa8;
    --info-bg: #e4f0f8;

    --font-display: 'Jost', 'Futura', 'Century Gothic', system-ui, sans-serif;
    --font-body: 'Lato', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;

    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 14px;
    --shadow-raise: 0 1px 2px rgba(4, 42, 79, 0.06), 0 6px 20px -8px rgba(4, 42, 79, 0.18);

    --sidebar-w: 264px;
    --topbar-h: 60px;
    --bottomnav-h: 62px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);

    /* Alte Variablennamen – werden von bestehenden Seiten noch verwendet */
    --primary-color: var(--navy);
    --secondary-color: var(--navy-600);
    --accent-color: var(--orange);
    --success-color: var(--success);
    --danger-color: var(--danger);
    --warning-color: #e0a100;
    --info-color: var(--info);
    --dark-color: var(--ink);
    --light-color: var(--paper);
    --border-color: var(--line);
    --text-color: var(--ink);
    --text-muted: var(--muted);
}

/* ── Basis ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

a { color: var(--navy-600); }
a:hover { color: var(--orange-600); }

img, svg { vertical-align: middle; }
[hidden] { display: none !important; }

:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
    border-radius: 2px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    color: var(--navy);
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 0.75rem;
    letter-spacing: 0;
}
h1 { font-size: 2.1rem; font-weight: 400; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }

svg.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ── App-Gerüst ────────────────────────────────────────────────────────────── */
.app { min-height: 100vh; }

.sidebar {
    position: fixed; inset: 0 auto 0 0;
    width: var(--sidebar-w);
    background: var(--navy);
    color: #d5dfea;
    display: flex; flex-direction: column;
    z-index: 1150;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.sidebar-brand {
    display: block;
    padding: 22px 22px 18px;
}
.sidebar-brand img { width: 100%; max-width: 210px; height: auto; display: block; }

.sidebar-nav { padding: 4px 12px 16px; flex: 1; }

.nav-group + .nav-group { margin-top: 18px; }
.nav-group .nav-link + .nav-link { margin-top: 2px; }
.nav-group-label {
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: #8ea3b9;
    padding: 0 12px 6px;
}
.nav-link {
    position: relative;
    display: flex; align-items: center; gap: 12px;
    padding: 7px 10px;
    border-radius: 10px;
    color: #d5dfea;
    text-decoration: none;
    font-size: 0.97rem;
    transition: background 0.15s, color 0.15s;
}
.nav-icon {
    flex: none;
    width: 30px; height: 30px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.nav-icon .icon { width: 18px; height: 18px; stroke-width: 1.9; }
.nav-link:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.nav-link.active { background: rgba(255, 255, 255, 0.11); color: #fff; font-weight: 700; }
/* Der orange Punkt aus "INTERN." markiert die aktuelle Seite */
.nav-link.active::after {
    content: '';
    position: absolute; right: 12px; top: 50%;
    width: 7px; height: 7px; margin-top: -3.5px;
    background: var(--orange);
}

.sidebar-foot {
    padding: 14px 24px 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.85rem;
    color: #8ea3b9;
}
.install-btn {
    display: none;
    align-items: center; gap: 10px;
    width: 100%;
    margin-bottom: 12px;
    padding: 9px 12px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--radius);
    color: #fff;
    font: inherit; font-size: 0.92rem;
    cursor: pointer;
}
.install-btn:hover { border-color: var(--orange); }
.install-btn.visible { display: flex; }
.install-hint { display: none; margin-bottom: 12px; line-height: 1.45; }
.install-hint.visible { display: block; }

.main-wrap {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex; flex-direction: column;
}

.topbar {
    position: sticky; top: 0; z-index: 1100;
    height: var(--topbar-h);
    display: flex; align-items: center; gap: 12px;
    padding: 0 28px;
    background: rgba(244, 246, 249, 0.92);
    backdrop-filter: saturate(1.4) blur(8px);
    -webkit-backdrop-filter: saturate(1.4) blur(8px);
    border-bottom: 1px solid transparent;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar-menu, .topbar-brand { display: none; }
.topbar-menu {
    width: 42px; height: 42px;
    align-items: center; justify-content: center;
    background: none; border: 0; border-radius: var(--radius);
    color: var(--navy); cursor: pointer;
}
.topbar-menu:hover { background: var(--navy-050); }
.topbar-menu .icon { width: 24px; height: 24px; }
.topbar-brand img { height: 30px; width: auto; display: block; }

.topbar-user { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.topbar-user .user-link {
    display: flex; align-items: center; gap: 10px;
    padding: 4px 10px 4px 4px;
    border-radius: 999px;
    color: var(--ink); text-decoration: none;
}
.topbar-user .user-link:hover { background: var(--surface); color: var(--navy); }
.user-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    object-fit: cover; background: var(--navy-050);
    border: 1px solid var(--line);
}
.user-name { font-weight: 700; font-size: 0.95rem; }
.topbar-logout {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: var(--radius);
    color: var(--muted);
}
.topbar-logout:hover { background: var(--surface); color: var(--danger); }

.sidebar-overlay {
    position: fixed; inset: 0;
    background: rgba(4, 22, 40, 0.45);
    opacity: 0; visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 1140;
}

.container {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 24px 28px 48px;
    flex: 1;
}

.footer {
    padding: 20px 28px calc(20px + var(--safe-bottom));
    color: var(--muted);
    font-size: 0.85rem;
}
.footer-container { max-width: 1320px; margin: 0 auto; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer a { color: var(--muted); }

/* Untere Navigationsleiste (nur Handy) */
.bottom-nav { display: none; }

/* Tablet/kleiner Laptop: Seitenleiste als Schublade */
@media (max-width: 1100px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        box-shadow: none;
    }
    .sidebar.open { transform: translateX(0); box-shadow: 8px 0 30px rgba(0, 0, 0, 0.25); }
    .sidebar-overlay.open { opacity: 1; visibility: visible; }
    .main-wrap { margin-left: 0; }
    .topbar { background: rgba(255, 255, 255, 0.94); border-bottom-color: var(--line); padding: 0 12px 0 8px; }
    .topbar-menu, .topbar-brand { display: flex; }
}

@media (max-width: 768px) {
    .container { padding: 18px 16px 32px; }
    .user-name { display: none; }
    .topbar-user .user-link { padding: 3px; }
    .footer { display: none; }

    .bottom-nav {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 1120;
        display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
        height: calc(var(--bottomnav-h) + var(--safe-bottom));
        padding-bottom: var(--safe-bottom);
        background: rgba(255, 255, 255, 0.97);
        border-top: 1px solid var(--line);
    }
    .bottom-nav a, .bottom-nav button {
        position: relative;
        display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
        background: none; border: 0; font: inherit;
        font-size: 0.7rem; color: var(--muted);
        text-decoration: none; cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    .bottom-nav .icon { width: 23px; height: 23px; }
    .bottom-nav .active { color: var(--navy); font-weight: 700; }
    .bottom-nav .active::before {
        content: ''; position: absolute; top: 0; left: 50%;
        width: 6px; height: 6px; margin-left: -3px; background: var(--orange);
    }
    .main-wrap { padding-bottom: calc(var(--bottomnav-h) + var(--safe-bottom)); }
}

/* Hinweis "Als App installieren" (Startseite, nur Handy) */
.install-banner {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 12px 12px 14px;
    margin-bottom: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 4px solid var(--orange);
    border-radius: var(--radius-lg);
    animation: modal-in 0.25s ease-out;
}
.install-banner-icon { width: 44px; height: 44px; border-radius: 11px; flex: none; }
.install-banner-text { flex: 1; min-width: 0; font-size: 0.9rem; line-height: 1.4; color: var(--muted); }
.install-banner-text strong { display: block; color: var(--navy); font-size: 0.98rem; }
.install-banner-text svg.icon { width: 17px; height: 17px; color: #2563c9; vertical-align: -3px; }
.install-banner-text b { color: var(--ink); }
.install-banner .btn { flex: none; }
.install-banner-close {
    flex: none; width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    background: none; border: 0; border-radius: var(--radius);
    color: var(--muted); cursor: pointer;
}
.install-banner-close:hover { background: var(--paper); color: var(--ink); }

/* ── Seitenkopf ────────────────────────────────────────────────────────────── */
.page-header {
    display: flex; justify-content: space-between; align-items: flex-end;
    gap: 1rem; flex-wrap: wrap;
    margin-bottom: 1.75rem;
}
.page-header h1 { margin: 0; }
.page-header p { margin: 0.35rem 0 0; color: var(--muted); }

/* Seitentitel mit Icon-Kachel */
.page-title { display: flex; align-items: center; gap: 16px; }
.page-title h1 { margin: 0; }
.page-title p { margin: 0.2rem 0 0; color: var(--muted); }
.page-icon {
    --c: var(--navy); --t: var(--navy-050);
    flex: none;
    width: 54px; height: 54px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    background: var(--t); color: var(--c);
}
.page-icon .icon { width: 30px; height: 30px; stroke-width: 1.6; }
@media (max-width: 768px) {
    .page-title { gap: 12px; }
    .page-icon { width: 44px; height: 44px; border-radius: 12px; }
    .page-icon .icon { width: 24px; height: 24px; }
}

/* Eingabefeld mit Icon */
.input-icon { position: relative; }
.input-icon > .icon {
    position: absolute; left: 12px; top: 50%; margin-top: -10px;
    color: var(--muted); pointer-events: none;
}
.input-icon > .form-control { padding-left: 2.6rem; }
.input-icon:focus-within > .icon { color: var(--navy); }

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.6rem 1.15rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.95rem; font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn .icon { width: 18px; height: 18px; }

.btn-primary { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-primary:hover:not(:disabled) { background: var(--navy-600); border-color: var(--navy-600); color: #fff; }

.btn-secondary { background: var(--surface); color: var(--navy); border-color: var(--line-strong); }
.btn-secondary:hover:not(:disabled) { border-color: var(--navy); color: var(--navy); background: var(--surface); }

.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-success:hover:not(:disabled) { background: #187049; border-color: #187049; color: #fff; }

.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: #a43026; border-color: #a43026; color: #fff; }

.btn-accent { background: var(--orange); color: #fff; border-color: var(--orange); }
.btn-accent:hover:not(:disabled) { background: var(--orange-600); border-color: var(--orange-600); color: #fff; }

.btn-sm { padding: 0.38rem 0.8rem; font-size: 0.86rem; }
.btn-large { padding: 0.9rem 1.8rem; font-size: 1.05rem; }

/* ── Karten ────────────────────────────────────────────────────────────────── */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.card-header {
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--line);
}
.card-title { font-size: 1.25rem; margin: 0; }

/* ── Meldungen ─────────────────────────────────────────────────────────────── */
.flash-messages { margin-bottom: 1.5rem; }
.alert {
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    padding: 0.85rem 1.1rem;
    margin-bottom: 0.75rem;
    border-radius: var(--radius);
    border: 1px solid;
    font-size: 0.95rem;
}
.alert-success { background: var(--success-bg); color: #145a3b; border-color: #b9e0cb; }
.alert-error, .alert-danger { background: var(--danger-bg); color: #7d241c; border-color: #f0c4bf; }
.alert-info { background: var(--info-bg); color: #164f78; border-color: #bcd8ec; }
.alert-warning { background: var(--warning-bg); color: #7a4a00; border-color: #f2d6a4; }
.alert-close { background: none; border: none; font-size: 1.4rem; line-height: 1; cursor: pointer; color: inherit; opacity: 0.6; }
.alert-close:hover { opacity: 1; }

/* ── Tabellen ──────────────────────────────────────────────────────────────── */
.table {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow-x: auto;
}
.table table, table.table { width: 100%; border-collapse: collapse; }
.table th {
    padding: 0.8rem 1rem;
    text-align: left;
    font-family: var(--font-display);
    font-weight: 500; font-size: 0.92rem;
    color: var(--muted);
    background: #f8fafc;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.table td { padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #fafbfd; }
.table td .btn + .btn { margin-left: 0.35rem; }

/* ── Formulare ─────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.15rem; }
.form-label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 700; font-size: 0.9rem;
    color: var(--ink);
}
.form-control {
    width: 100%;
    padding: 0.6rem 0.85rem;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--ink);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(4, 42, 79, 0.12); }
.form-control:disabled { background: #eef1f5; color: var(--muted); cursor: not-allowed; }
textarea.form-control { resize: vertical; min-height: 90px; }
select.form-control { appearance: none; padding-right: 2.2rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%235d6b7a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 0.85rem center; }

/* ── Modal ─────────────────────────────────────────────────────────────────── */
.modal {
    display: none;
    position: fixed; inset: 0;
    background: rgba(4, 22, 40, 0.5);
    z-index: 2000;
    align-items: center; justify-content: center;
    padding: 16px;
}
.modal.active { display: flex; }
.modal-content {
    background: var(--surface);
    border-radius: var(--radius-lg);
    max-width: 600px; width: 100%;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    box-shadow: 0 24px 60px -12px rgba(4, 22, 40, 0.45);
    animation: modal-in 0.18s ease-out;
}
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(0.99); } }
.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.15rem 1.4rem;
    border-bottom: 1px solid var(--line);
}
.modal-header h3 { margin: 0; font-size: 1.25rem; }
.modal-close {
    width: 36px; height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    background: none; border: none; border-radius: var(--radius);
    font-size: 1.5rem; line-height: 1;
    color: var(--muted); cursor: pointer;
}
.modal-close:hover { background: var(--paper); color: var(--navy); }
.modal-body { padding: 1.4rem; }
.modal-footer {
    display: flex; justify-content: flex-end; gap: 0.6rem; flex-wrap: wrap;
    padding: 1rem 1.4rem;
    border-top: 1px solid var(--line);
    background: #fafbfd;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
@media (max-width: 560px) {
    .modal { align-items: flex-end; padding: 0; }
    .modal-content { max-height: 92vh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding-bottom: var(--safe-bottom); }
}

/* ── Badges ────────────────────────────────────────────────────────────────── */
.badge, .status-badge {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.8rem; font-weight: 700;
    background: var(--navy-050); color: var(--navy);
}
.badge-success, .status-badge.aktiv, .status-badge.active { background: var(--success-bg); color: var(--success); }
.badge-warning, .status-badge.anwärter, .status-badge.trainee { background: var(--warning-bg); color: var(--warning); }
.badge-info, .status-badge.alumni { background: var(--info-bg); color: var(--info); }
.badge-danger, .status-badge.inaktiv, .status-badge.out { background: var(--danger-bg); color: var(--danger); }

/* ── Laden ─────────────────────────────────────────────────────────────────── */
/* Container behalten die Klasse nach dem Laden – Layout nur, solange der Spinner drin ist */
.loading:has(> .spinner) {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 0.75rem;
    padding: 2.5rem 1rem;
    color: var(--muted);
}
.spinner {
    width: 32px; height: 32px;
    border: 3px solid var(--navy-050);
    border-top-color: var(--navy);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Bestehende Seitenbausteine (Mitglieder, Rollen, Status) ──────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 1.75rem; }
.stat-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr)); gap: 1.25rem; }

.filters-section {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}
.filters-section .form-group { margin-bottom: 0; }

.detail-header {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 1.25rem; margin-bottom: 1.5rem; }

.info-section, .management-section {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}
.info-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.65rem 0; border-bottom: 1px solid var(--line); }
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--muted); }
.info-value { text-align: right; }

.management-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(350px, 100%), 1fr)); gap: 1.5rem; }
.item-list { list-style: none; }
.item-list li {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.85rem 1rem; margin-bottom: 0.5rem;
    background: var(--paper); border-radius: var(--radius);
}
.item-actions { display: flex; gap: 0.5rem; }

.history-list { list-style: none; }
.history-item { padding: 0.75rem 1rem; margin-bottom: 0.5rem; background: var(--paper); border-radius: var(--radius); border-left: 3px solid var(--navy); }
.history-date { font-size: 0.85rem; color: var(--muted); font-weight: 700; }

.action-buttons { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 1.5rem; flex-wrap: wrap; }

/* ── Hilfsklassen ──────────────────────────────────────────────────────────── */
.text-muted { color: var(--muted); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-primary { color: var(--navy); }
.text-center { text-align: center; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2rem; }

@media (max-width: 768px) {
    h1 { font-size: 1.75rem; }
    .page-header { align-items: flex-start; }
    .action-buttons .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
