/* ==========================================================================
   DAAB Mitgliederverwaltung – zentrales Stylesheet
   Ruhige, kompakte Verwaltungssoftware-Optik (CRM/ERP-Anmutung)
   ========================================================================== */

:root {
    /* DAAB Markenfarben */
    --daab-text-dark: #101010;
    --daab-salbei-dark: #3b4e3e;
    --daab-salbei-medium: #6c8670;
    --daab-salbei-light: #d3efd7;
    --daab-salbei-xlight: #edf4ee;
    --daab-fokus-green: #cded21;
    --daab-berry: #c1006f;
    --daab-berry-dark: #8a0050;
    --daab-greige: #f7f5f2;
    --daab-mouse-gray: #767676;
    --daab-white: #ffffff;

    --color-primary: var(--daab-salbei-dark);
    --color-primary-dark: #2b3a2e;
    --color-primary-light: var(--daab-salbei-light);
    --color-accent: var(--daab-fokus-green);

    --color-bg: var(--daab-greige);
    --color-surface: var(--daab-white);
    --color-border: #e3ded5;
    --color-border-strong: #cac2b3;

    --color-text: var(--daab-text-dark);
    --color-text-muted: var(--daab-mouse-gray);
    --color-text-faint: #a3a3a3;

    --color-sidebar-bg: var(--daab-salbei-dark);
    --color-sidebar-bg-active: #2b3a2e;
    --color-sidebar-text: #dfe8e0;
    --color-sidebar-text-muted: #a9bcac;
    --color-sidebar-border: #4a5d4d;

    --color-success-bg: var(--daab-salbei-light);
    --color-success-text: var(--daab-salbei-dark);
    --color-warning-bg: #fdf3e0;
    --color-warning-text: #966214;
    --color-danger-bg: #f7dcec;
    --color-danger-text: var(--daab-berry);
    --color-info-bg: var(--daab-salbei-xlight);
    --color-info-text: var(--daab-salbei-dark);
    --color-neutral-bg: #ececec;
    --color-neutral-text: #545c68;

    --radius-sm: 4px;
    --radius-md: 7px;
    --radius-lg: 10px;

    --shadow-sm: 0 1px 2px rgba(20, 30, 45, 0.06);
    --shadow-md: 0 4px 14px rgba(20, 30, 45, 0.10);
    --shadow-lg: 0 12px 32px rgba(20, 30, 45, 0.16);

    --sidebar-width: 248px;
    --topbar-height: 58px;

    --font-sans: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 13.5px;
    line-height: 1.45;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5 { margin: 0; font-weight: 600; }
p { margin: 0 0 8px; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; }

/*
 * <select> hat browserseitig eine eigene Line-Height für Formularelemente,
 * die vom body-Wert (1.45) abweicht – dadurch wirken Selects sonst 1-2px
 * höher/niedriger als Text-Inputs mit identischem Padding. Einheitliche
 * Line-Height + feste Höhe sorgt dafür, dass alle Eingabefelder und
 * Dropdowns überall exakt gleich hoch sind.
 */
input, select, textarea { line-height: 1.3; }
input[type="text"], input[type="email"], input[type="tel"], input[type="date"],
input[type="number"], input[type="password"], input[type="search"], select,
.inline-input {
    height: 37px;
}
.filter-bar select, .filter-bar input[type="text"], .filter-bar input[type="search"], .filter-bar input[type="date"] {
    height: 33px;
}

/* ---------------------------------------------------------------------
   App shell / layout
   --------------------------------------------------------------------- */
.app-shell { display: flex; min-height: 100vh; }

.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin-left: var(--sidebar-width);
}

.content {
    flex: 1;
    padding: 20px 28px 40px;
    max-width: 1400px;
    width: 100%;
}

/* ---------------------------------------------------------------------
   Sidebar
   --------------------------------------------------------------------- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    /* Ton-in-Ton-Verlauf statt Flächenfarbe – dieselbe Farbfamilie wie
       --color-sidebar-bg/-active, nur mit sanftem Licht-/Tiefenverlauf. */
    background: linear-gradient(160deg, #47604a 0%, var(--color-sidebar-bg) 45%, var(--color-sidebar-bg-active) 100%);
    color: var(--color-sidebar-text);
    display: flex;
    flex-direction: column;
    z-index: 40;
    transition: transform 0.2s ease;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 20px 16px;
    border-bottom: 1px solid var(--color-sidebar-border);
}
.sidebar-brand-logo {
    width: 52px;
    height: auto;
    flex-shrink: 0;
    color: #fff;
}
.login-logo { width: 90px; height: auto; }
.sidebar-brand-sub {
    font-size: 11px;
    color: var(--color-sidebar-text-muted);
    line-height: 1.2;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 10px 10px 10px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    margin-bottom: 2px;
    border: none;
    background: none;
    color: var(--color-sidebar-text);
    border-radius: var(--radius-md);
    font-size: 13.2px;
    cursor: pointer;
    text-align: left;
}
.nav-link:hover { background: rgba(255,255,255,0.06); text-decoration: none; color: #fff; }
.nav-link.is-active { background: var(--color-sidebar-bg-active); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--daab-fokus-green); }
.nav-link .icon { flex-shrink: 0; width: 17px; height: 17px; }
.nav-label { flex: 1; }
.icon-chevron { transition: transform 0.15s ease; width: 14px; height: 14px; }

.nav-group-toggle .icon-chevron { margin-left: auto; }
.nav-group.is-open .nav-group-toggle .icon-chevron { transform: rotate(180deg); }

.nav-submenu {
    display: none;
    padding-left: 27px;
    margin-bottom: 4px;
}
.nav-group.is-open .nav-submenu { display: block; }

.nav-sublink {
    display: block;
    padding: 7px 10px;
    font-size: 12.8px;
    color: var(--color-sidebar-text-muted);
    border-radius: var(--radius-sm);
}
.nav-sublink:hover { color: #fff; text-decoration: none; }
.nav-sublink.is-active { color: #fff; font-weight: 600; background: rgba(255,255,255,0.06); }

.sidebar-footer {
    padding: 12px 20px 16px;
    border-top: 1px solid var(--color-sidebar-border);
}
.sidebar-footer-note {
    font-size: 11px;
    color: var(--color-sidebar-text-muted);
}

/* ---------------------------------------------------------------------
   Topbar
   --------------------------------------------------------------------- */
.topbar {
    height: var(--topbar-height);
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 30;
}

.sidebar-toggle { display: none; }

/* ---------------------------------------------------------------------
   Such-Autocomplete-Flyout (initSucheFlyout() in app.js) – wird per JS an
   den .parentNode eines beliebigen Suchfelds mit [data-suche-typen]
   angehängt, das dafür dynamisch position:relative bekommt.
   --------------------------------------------------------------------- */
.suche-flyout {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 340px;
    overflow-y: auto;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md, 0 8px 24px rgba(0,0,0,0.12));
    z-index: 95;
    text-align: left;
}
.suche-flyout-gruppe:not(:last-child) {
    border-bottom: 1px solid var(--color-border);
}
.suche-flyout-gruppentitel {
    padding: 8px 12px 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--color-text-muted);
}
.suche-flyout-item {
    padding: 7px 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.suche-flyout-item:hover {
    background: var(--color-bg);
}
.suche-flyout-label {
    font-size: 13px;
    color: var(--color-text);
}
.suche-flyout-sub {
    font-size: 11.5px;
    color: var(--color-text-muted);
}
.suche-flyout-empty {
    padding: 10px 12px;
    font-size: 12.6px;
    color: var(--color-text-faint);
}

.topbar-search {
    flex: 1;
    max-width: 460px;
    position: relative;
    display: flex;
    align-items: center;
}
.topbar-search-icon {
    position: absolute;
    left: 11px;
    width: 15px;
    height: 15px;
    color: var(--color-text-faint);
}
.topbar-search input {
    width: 100%;
    padding: 8px 12px 8px 34px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg);
    font-size: 13px;
    color: var(--color-text);
}
.topbar-search input:focus { outline: none; border-color: var(--color-primary); background: var(--color-surface); }

.topbar-actions { display: flex; align-items: center; gap: 14px; margin-left: auto; }

.icon-btn {
    position: relative;
    border: none;
    background: none;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    cursor: pointer;
}
.icon-btn:hover { background: var(--color-bg); color: var(--color-text); }
.icon-btn .icon { width: 18px; height: 18px; }
.icon-btn-dot {
    position: absolute;
    top: 7px;
    right: 8px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--daab-berry);
    border: 1.5px solid var(--color-surface);
}

.topbar-user { position: relative; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 6px; border-radius: var(--radius-md); }
.topbar-user:hover { background: var(--color-bg); }
.topbar-user-meta { display: flex; flex-direction: column; line-height: 1.25; }
.topbar-user-name { font-size: 12.8px; font-weight: 600; }
.topbar-user-role { font-size: 11px; color: var(--color-text-muted); }
.topbar-user-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 170px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 6px;
    z-index: 50;
}
.topbar-user-menu.is-open { display: flex; flex-direction: column; gap: 2px; }
.topbar-user-menu button, .topbar-user-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 7px 10px;
    border: none;
    background: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--color-text);
    text-decoration: none;
    cursor: pointer;
    text-align: left;
}
.topbar-user-menu button:hover, .topbar-user-menu a:hover { background: var(--color-bg); }

.avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 12.5px; font-weight: 700; flex-shrink: 0;
}
.avatar-lg { width: 58px; height: 58px; font-size: 20px; }
.avatar-sm { width: 30px; height: 30px; font-size: 11.5px; }
.avatar-building { background: var(--daab-salbei-medium); }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar-clickable { cursor: pointer; }

/* ---------------------------------------------------------------------
   Breadcrumbs / Page header
   --------------------------------------------------------------------- */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--color-text-muted);
    margin-bottom: 14px;
}
.breadcrumbs a { color: var(--color-text-muted); display: flex; align-items: center; }
.breadcrumbs a:hover { color: var(--color-primary); text-decoration: none; }
.icon-sm { width: 13px; height: 13px; }
.icon-muted { color: var(--color-text-faint); }
.breadcrumb-current { color: var(--color-text); font-weight: 600; }

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.page-header h1 { font-size: 21px; margin-bottom: 3px; }
.page-header-sub { color: var(--color-text-muted); font-size: 13px; }
.page-header-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.2;
}
.btn .icon { width: 15px; height: 15px; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-secondary { background: var(--color-surface); border-color: var(--color-border-strong); color: var(--color-text); }
.btn-secondary:hover { background: var(--color-bg); }
.btn-ghost { background: none; color: var(--color-text-muted); border-color: var(--color-border-strong); }
.btn-ghost:hover { background: var(--color-bg); color: var(--color-text); }
.btn-danger { background: var(--color-danger-text); color: #fff; }
.btn-danger:hover { background: var(--daab-berry-dark); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------------------------------------------------------------------
   Badges / status
   --------------------------------------------------------------------- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2.5px 9px;
    border-radius: 100px;
    font-size: 11.3px;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.5;
}
.badge-success { background: var(--color-success-bg); color: var(--color-success-text); }
.badge-warning { background: var(--color-warning-bg); color: var(--color-warning-text); }
.badge-danger { background: var(--color-danger-bg); color: var(--color-danger-text); }
.badge-info { background: var(--color-info-bg); color: var(--color-info-text); }
.badge-neutral { background: var(--color-neutral-bg); color: var(--color-neutral-text); }

/* Kompakte <select>-Variante im Badge-Look (z. B. Post-/E-Mail-Sperre im
   Seitenkopf) – Dropdown statt reinem Anzeige-Badge, gleiche Optik. */
.badge-select {
    display: inline-flex;
    align-items: center;
    padding: 2.5px 24px 2.5px 9px;
    border-radius: 100px;
    border: none;
    font-size: 11.3px;
    font-weight: 600;
    font-family: inherit;
    white-space: nowrap;
    line-height: 1.5;
    cursor: pointer;
    background-color: var(--color-neutral-bg);
    color: var(--color-neutral-text);
    background-position: right 7px center;
    background-size: 11px;
}
.badge-select.is-danger { background-color: var(--color-danger-bg); color: var(--color-danger-text); }

.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; }
.dot-success { background: var(--color-success-text); }
.dot-warning { background: var(--color-warning-text); }
.dot-danger { background: var(--color-danger-text); }
.dot-neutral { background: var(--color-text-faint); }

/* ---------------------------------------------------------------------
   Cards / KPI
   --------------------------------------------------------------------- */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}
/* Innerhalb eines .stack (z. B. zweispaltige Dashboard-Layouts) übernimmt
   dessen flex-gap den Abstand – doppelten Abstand vermeiden. */
.stack > .card {
    margin-bottom: 0;
}
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--color-border);
}
.card-header h3 { font-size: 14.5px; }
.card-header-sub { font-size: 12px; color: var(--color-text-muted); margin-top: 2px; }
.card-body { padding: 16px 18px; }
.card-body.no-padding { padding: 0; }

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}
.kpi-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    box-shadow: var(--shadow-sm);
}
.kpi-card-label {
    font-size: 12px;
    color: #575757;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.kpi-card-label .icon { width: 16px; height: 16px; color: var(--color-text-faint); }
.kpi-card-value { font-size: 25px; font-weight: 700; letter-spacing: -0.3px; }
.kpi-card-delta { font-size: 11.5px; margin-top: 6px; color: var(--color-text-muted); }
.kpi-card-delta.up { color: var(--color-success-text); }
.kpi-card-delta.down { color: var(--color-danger-text); }
.kpi-trend-icon { width: 18px; height: 18px; color: var(--color-text-muted); }
.kpi-trend-icon.up { color: var(--color-success-text); }
.kpi-trend-icon.down { color: var(--color-danger-text); }
.kpi-card.accent-warning { border-left: 3px solid var(--color-warning-text); }
.kpi-card.accent-danger { border-left: 3px solid var(--color-danger-text); }

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 16px;
}
@media (max-width: 1100px) { .dashboard-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------------
   Tables
   --------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.data-table thead th {
    text-align: left;
    padding: 10px 14px;
    font-size: 11.3px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--color-text-muted);
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}
/* .text-right hatte gegen die Regel oben (2 Elemente + 0 Klassen zusaetzlich
   vs. 1 Klasse) nie eine Chance - ein rechtsbuendiger Tabellenkopf blieb
   optisch immer linksbuendig, obwohl die Klasse gesetzt war. */
.data-table thead th.text-right { text-align: right; }
.data-table tbody td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}
.data-table tbody tr.is-clickable { cursor: pointer; }
.data-table tbody tr.is-clickable:hover { background: var(--color-primary-light); }
.data-table tbody tr:last-child td { border-bottom: none; }
.cell-primary { font-weight: 600; color: var(--color-text); }
.cell-muted { color: var(--color-text-muted); }
/* Bewusst KEIN display:flex auf der Zelle selbst (Chrome streckt eine <td>
   mit display:flex nicht auf die durch eine umbrechende Nachbarspalte
   vergrößerte Zeilenhöhe) und auch keine inline-flex/vertical-align-
   Kombination für den Avatar (das große Inline-Element zusammen mit
   zweizeilig umbrechendem Namenstext verhindert in Chrome ebenfalls die
   Zentrierung). Stattdessen wird der Avatar unabhängig vom Textfluss per
   position:absolute + margin:auto vertikal zentriert; der Name bleibt
   normaler (mehrzeiliger) Zellinhalt, den vertical-align:middle der Zelle
   selbst zuverlässig zentriert. */
.cell-name-wrap {
    position: relative;
    padding-left: 54px !important;
    vertical-align: middle;
}
.cell-name-wrap .avatar {
    position: absolute;
    left: 14px;
    top: 0;
    bottom: 0;
    margin-top: auto;
    margin-bottom: auto;
}
.cell-nowrap { white-space: nowrap; }
.text-right { text-align: right; }
.table-empty { padding: 40px 20px; text-align: center; color: var(--color-text-muted); }

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

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
    padding: 12px 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    margin-bottom: 14px;
}
.filter-bar label { font-size: 11.5px; color: var(--color-text-muted); display: block; margin-bottom: 3px; }
.filter-group { display: flex; flex-direction: column; }
.filter-bar select, .filter-bar input[type="text"], .filter-bar input[type="search"], .filter-bar input[type="date"] {
    padding: 6.5px 10px;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-sm);
    font-size: 12.6px;
    font-family: inherit;
    color: var(--color-text);
    background-color: var(--color-surface);
    min-width: 150px;
}
.filter-bar-search { flex: 1; min-width: 200px; }
.filter-bar-search input { width: 100%; min-width: 0; }
.filter-reset { margin-left: auto; }

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 4px 4px;
    font-size: 12.5px;
    color: var(--color-text-muted);
}
.pagination-pages { display: flex; gap: 4px; }
.pagination-pages a, .pagination-pages span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 28px; height: 28px; border-radius: var(--radius-sm);
    color: var(--color-text-muted);
}
.pagination-pages a:hover { background: var(--color-bg); text-decoration: none; }
.pagination-pages .is-current { background: var(--color-primary); color: #fff; font-weight: 600; }

/* ---------------------------------------------------------------------
   Tabs
   --------------------------------------------------------------------- */
.tabs {
    display: flex;
    gap: 2px;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 18px;
    overflow-x: auto;
}
.tab-link {
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-muted);
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    cursor: pointer;
    background: none;
    border-top: none; border-left: none; border-right: none;
}
.tab-link:hover { color: var(--color-text); text-decoration: none; }
.tab-link.is-active { color: var(--color-primary); border-bottom-color: var(--daab-fokus-green); }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

/* ---------------------------------------------------------------------
   Detail header
   --------------------------------------------------------------------- */
.detail-header {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.detail-header-main { display: flex; gap: 16px; flex: 1; min-width: 260px; }
.detail-header-info h1 { font-size: 19px; margin-bottom: 4px; }
.detail-header-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--color-text-muted); margin-top: 6px; }
.detail-header-meta span { display: inline-flex; align-items: center; gap: 5px; }
.detail-header-meta .icon { width: 13px; height: 13px; }
.detail-header-badges { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.detail-header-actions { display: flex; gap: 8px; flex-wrap: wrap; align-self: flex-start; }

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px 24px;
}
.info-field.full-width { grid-column: 1 / -1; }
.info-field label {
    display: block;
    font-size: 11.3px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #5a5a5a;
    margin-bottom: 3px;
}
.info-field div, .info-field .info-value { font-size: 13.5px; color: var(--color-text); }

/*
 * Für Felder, die direkt in einem .info-field (statt einem .form-group)
 * inline editierbar sind – z. B. in der Übersicht statt in einem Modal.
 * Rechter Innenabstand ist groß genug für den Dropdown-Pfeil bei <select>.
 */
.inline-input {
    padding: 8px 30px 8px 10px;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    background-color: var(--color-surface);
    color: var(--color-text);
    width: 100%;
}
.inline-input:disabled { background-color: var(--color-bg); color: var(--color-text-muted); cursor: not-allowed; }

.section-title {
    font-size: 13.5px;
    font-weight: 700;
    margin: 22px 0 12px;
    padding-top: 4px;
}
.section-title:first-child { margin-top: 0; }

/* ---------------------------------------------------------------------
   Forms
   --------------------------------------------------------------------- */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px 20px;
}
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full-width { grid-column: 1 / -1; }
.form-group label { font-size: 12.5px; font-weight: 600; color: var(--color-text); }
.form-group .req { color: var(--color-danger-text); margin-left: 2px; }
.form-group .hint { font-size: 11.3px; color: var(--color-text-muted); }
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
    padding: 8px 10px;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    background-color: var(--color-surface);
    color: var(--color-text);
    width: 100%;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(205, 237, 33, 0.45);
}

/*
 * Einheitlicher Dropdown-Pfeil für alle <select>-Elemente: das native
 * Browser-Icon wird ersetzt, damit der Abstand des Pfeils zum rechten Rand
 * exakt dem oberen/unteren Innenabstand des jeweiligen Selects entspricht.
 */
/*
 * <input list=...> (Autocomplete-Textfelder wie Beruf/Merkmal) bekommen
 * denselben Chevron wie <select> – der native Datalist-Pfeil lässt sich in
 * Chrome nicht per CSS umlackieren, ohne seine Klickfläche zu verlieren.
 * appareance:none entfernt daher den nativen Pfeil komplett; app.js öffnet
 * die Vorschlagsliste beim Klick stattdessen programmatisch über
 * showPicker() (siehe initAutocompleteDatalists()), damit ein Klick wie
 * gewohnt die komplette Liste zeigt und nicht nur die beim Tippen gefilterte.
 */
select,
input[list] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7.5l5 5 5-5' stroke='%23767676' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 14px;
    background-position: right 8px center;
    padding-right: 30px;
}
/* appearance:none allein entfernt bei <input list> nicht das native
   Chrome-Dreieck (das ist kein Formularelement-Rendering, sondern eine
   eigene Datalist-Dekoration) – es muss zusätzlich explizit ausgeblendet
   werden. Der Klick wird stattdessen per JS über showPicker() nachgebaut
   (siehe initAutocompleteDatalists() in app.js). */
input[list]::-webkit-calendar-picker-indicator { display: none !important; }
.form-group select {
    background-position: right 8px center;
    padding-right: 30px;
}
.filter-bar select {
    background-position: right 6.5px center;
    padding-right: 27px;
}
.form-group textarea { resize: vertical; min-height: 76px; }

/* Spracheingabe-Button neben einem Formularfeld-Label (z. B. "Kontakt
   erfassen" → Beschreibung) – Aufnahme selbst ist rein simuliert, siehe
   spracheingabeSimulieren() in app.js. Teilt sich die Puls-Animation mit
   dem Mikrofon-Button des Chat-Widgets (siehe @keyframes chat-widget-mic-pulse). */
.mic-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
    border: 1px solid var(--color-border-strong); background: var(--color-surface);
    color: var(--color-text-muted); cursor: pointer; padding: 0;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.mic-btn .icon { width: 13px; height: 13px; }
.mic-btn:hover { border-color: var(--color-primary); color: var(--color-primary); background: var(--color-info-bg); }
.mic-btn.is-recording { border-color: var(--color-danger-text); color: var(--color-danger-text); animation: chat-widget-mic-pulse 1.1s ease-in-out infinite; }

/* ---------------------------------------------------------------------
   Minimaler Rich-Text-Editor (contenteditable + execCommand) für
   Nachrichtenfelder, die mehr als Klartext erlauben sollen.
   --------------------------------------------------------------------- */
.rte-toolbar {
    display: flex; gap: 4px; flex-wrap: wrap;
    padding: 6px; border: 1px solid var(--color-border-strong); border-bottom: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    background: var(--color-bg);
}
.rte-toolbar button {
    background: none; border: 1px solid transparent; border-radius: var(--radius-sm);
    width: 30px; height: 28px; cursor: pointer; color: var(--color-text); font-size: 13px;
    display: flex; align-items: center; justify-content: center;
}
.rte-toolbar button:hover { background: var(--color-surface); border-color: var(--color-border-strong); }
.rte-toolbar .rte-sep { width: 1px; background: var(--color-border-strong); margin: 3px 4px; }
.rte-editor {
    border: 1px solid var(--color-border-strong); border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    padding: 12px 14px; font-size: 13px; font-family: inherit; color: var(--color-text);
    background: var(--color-surface); overflow-y: auto;
}
.rte-editor:focus { outline: none; border-color: var(--color-primary); }
.rte-editor:empty::before { content: attr(data-placeholder); color: var(--color-text-faint); }
.rte-editor p { margin: 0 0 10px; }
.rte-editor ul, .rte-editor ol { margin: 0 0 10px 20px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; }
.checkbox-row input { width: 15px; height: 15px; }
.checkbox-row label { font-weight: 500; font-size: 13px; }

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}
fieldset.form-fieldset { border: none; padding: 0; margin: 0 0 22px; }
fieldset.form-fieldset legend { font-size: 13.5px; font-weight: 700; margin-bottom: 12px; padding: 0; }

/* ---------------------------------------------------------------------
   Tags
   --------------------------------------------------------------------- */
.tag-list { display: flex; flex-wrap: wrap; gap: 7px; }
.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--color-info-bg);
    color: var(--color-info-text);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
}
.tag-remove {
    background: none; border: none; cursor: pointer; color: inherit;
    display: flex; align-items: center; opacity: 0.6; padding: 0;
}
.tag-remove:hover { opacity: 1; }
.tag-remove .icon { width: 11px; height: 11px; }
.kommunikation-star {
    background: none; border: none; cursor: pointer; color: var(--color-text-muted);
    display: flex; align-items: center; opacity: 0.7; padding: 0;
}
.kommunikation-star:hover { opacity: 1; }
.kommunikation-star.is-favorit { opacity: 1; color: #a8790a; }
.kommunikation-star .icon { width: 12px; height: 12px; }
.tag-add-form { display: flex; gap: 8px; margin-top: 12px; align-items: center; flex-wrap: wrap; }
.tag-add-form select {
    min-width: 220px;
    padding: 6.5px 27px 6.5px 10px;
    background-position: right 6.5px center;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-sm);
    font-size: 12.6px;
    background-color: var(--color-surface);
    color: var(--color-text);
}

/* ---------------------------------------------------------------------
   Timeline
   --------------------------------------------------------------------- */
.timeline { position: relative; padding-left: 22px; }
.timeline::before {
    content: ""; position: absolute; left: 5px; top: 4px; bottom: 4px; width: 2px; background: var(--color-border);
}
.timeline-item { position: relative; padding-bottom: 20px; }
.timeline-item::before {
    content: ""; position: absolute; left: -22px; top: 3px; width: 9px; height: 9px; border-radius: 50%;
    background: var(--color-primary); border: 2px solid var(--color-surface); box-shadow: 0 0 0 1px var(--color-border);
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-date { font-size: 11.5px; color: var(--color-text-muted); margin-bottom: 2px; }
.timeline-text { font-size: 13px; }

/* ---------------------------------------------------------------------
   Alerts
   --------------------------------------------------------------------- */
.alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    font-size: 13px;
    margin-bottom: 16px;
}
.alert .icon { width: 17px; height: 17px; flex-shrink: 0; margin-top: 1px; }
.alert-info { background: var(--color-info-bg); color: var(--color-info-text); }
.alert-warning { background: var(--color-warning-bg); color: var(--color-warning-text); }
.alert-danger { background: var(--color-danger-bg); color: var(--color-danger-text); }
.alert-success { background: var(--color-success-bg); color: var(--color-success-text); }

/* ---------------------------------------------------------------------
   Modal
   --------------------------------------------------------------------- */
.modal-backdrop {
    position: fixed; inset: 0; background: rgba(15, 23, 32, 0.5);
    display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal-backdrop.is-open { display: flex; }
.modal {
    background: var(--color-surface); border-radius: var(--radius-lg);
    width: 100%; max-width: 520px; max-height: 88vh; overflow-y: auto;
    box-shadow: var(--shadow-lg);
}
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid var(--color-border);
}
.modal-header h3 { font-size: 15px; }
.modal-body { padding: 20px; }
.modal-footer {
    display: flex; justify-content: flex-end; gap: 10px;
    padding: 14px 20px; border-top: 1px solid var(--color-border);
}
.modal-close { background: none; border: none; cursor: pointer; color: var(--color-text-muted); }
.modal-summary-list { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; }
.modal-summary-row { display: flex; justify-content: space-between; font-size: 13px; padding: 6px 0; border-bottom: 1px dashed var(--color-border); }
.modal-summary-row:last-child { border-bottom: none; }
.modal-loading { display: flex; align-items: center; gap: 10px; color: var(--color-text-muted); font-size: 13px; padding: 6px 0; }
.spinner {
    width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid var(--color-border); border-top-color: var(--color-primary);
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------------
   Toasts
   --------------------------------------------------------------------- */
/* oben statt unten rechts, da der KI-Assistent (.chat-widget) den unteren
   rechten Bildschirmbereich dauerhaft belegt */
.toast-stack {
    position: fixed; top: 20px; right: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 200;
}
.toast {
    background: var(--daab-salbei-dark); color: #fff; padding: 12px 16px; border-radius: var(--radius-md);
    font-size: 13px; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px;
    min-width: 240px; animation: toast-in 0.2s ease;
}
.toast .icon { width: 16px; height: 16px; color: var(--daab-fokus-green); flex-shrink: 0; }
.toast.toast-warning { background: var(--color-danger-text); }
.toast.toast-warning .icon { color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------------------------------------------------------------------
   KI-Assistent (Chat-Widget) — schwebender Avatar unten rechts, öffnet
   einen Chat-Dialog. Übernommen aus dem Projekt "SYN Syneriqo": der Avatar
   (Orb-Animation, Größe, Positionierung, Verhalten) unverändert, nur die
   Chatbox (Panel/Header/Bubbles/Formular) auf die hiesigen Design-Tokens
   umgestellt statt Syneriqos eigenem hellem Farbschema zu folgen.
   Wird komplett per JS in initChatWidget() (assets/js/app.js) in <body>
   eingehängt, damit keine Seite einzeln angepasst werden muss.
   --------------------------------------------------------------------- */
.chat-widget {
    position: fixed;
    right: clamp(16px, 4vw, 28px);
    bottom: clamp(16px, 4vw, 28px);
    z-index: 90;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.chat-widget__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.chat-widget.is-open .chat-widget__backdrop {
    opacity: 1;
    pointer-events: auto;
}

/* -- Launcher-Button (Avatar-Orb) -------------------------------------- */
.chat-widget__launcher {
    position: relative;
    width: 192px;
    height: 192px;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}
.chat-widget__launcher:hover, .chat-widget__launcher:focus-visible { transform: scale(1.06); }
.chat-widget__launcher:active { transform: scale(0.97); }

.chat-widget__orb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    transition: opacity 0.2s ease;
}
.chat-widget__orb--dim { opacity: 0; }
.chat-widget--on-light .chat-widget__orb--bright { opacity: 0; }
.chat-widget--on-light .chat-widget__orb--dim { opacity: 1; }

/* Das Schließen-Icon überblendet den Avatar, sobald das Panel offen ist;
   seine Farbe folgt wie der Avatar selbst dem tatsächlichen Hintergrund
   hinter dem Widget (Sidebar = dunkel → helle Farbe; Content-Bereich =
   hell → dunkle Farbe), siehe checkBackground() in app.js. */
.chat-widget__launcher-close {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-sidebar-text);
    opacity: 0;
    transition: opacity 0.15s ease, color 0.15s ease;
}
.chat-widget__launcher-close .icon { width: 28.8px; height: 28.8px; }
.chat-widget.is-open .chat-widget__launcher-close { opacity: 1; }
.chat-widget--on-light .chat-widget__launcher-close { color: var(--color-text); }

/* -- Dialog-Panel (die eigentliche "Chatbox" — an das Projektdesign angepasst) */
.chat-widget__panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    width: min(513px, calc(100vw - 32px));
    height: min(600px, calc(100vh - 160px));
    display: flex;
    flex-direction: column;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transform-origin: bottom right;
    opacity: 0;
    transform: translateY(12px) scale(0.96);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.chat-widget.is-open .chat-widget__panel {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.chat-widget__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
}
.chat-widget__header-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.chat-widget__title-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.chat-widget__title {
    font-weight: 600; font-size: 0.9375rem; color: var(--color-text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chat-widget__subtitle {
    font-size: 0.75rem; color: var(--color-text-muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.chat-widget__close {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 50%; border: none;
    background: transparent; color: var(--color-text-muted); cursor: pointer; flex-shrink: 0;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.chat-widget__close .icon { width: 18px; height: 18px; }
.chat-widget__close:hover { background: var(--color-border); color: var(--color-text); }

/* -- Nachrichtenverlauf -------------------------------------------------- */
.chat-widget__messages {
    flex: 1; overflow-y: auto; padding: 16px;
    display: flex; flex-direction: column; gap: 12px;
}
.chat-widget__row { display: flex; }
.chat-widget__row--assistant { justify-content: flex-start; }
.chat-widget__row--user { justify-content: flex-end; }

.chat-widget__bubble {
    max-width: 85%; padding: 0.625rem 0.875rem; border-radius: var(--radius-md);
    font-size: 0.875rem; line-height: 1.5; border: 1px solid var(--color-border);
}
.chat-widget__row--assistant .chat-widget__bubble {
    background: var(--color-info-bg); border-color: transparent; color: var(--color-text);
    border-top-left-radius: 4px;
}
.chat-widget__row--user .chat-widget__bubble {
    background: var(--color-bg); color: var(--color-text); border-top-right-radius: 4px;
}

.chat-widget__typing { display: inline-flex; gap: 4px; padding: 0.1875rem 0; }
.chat-widget__typing span {
    width: 6px; height: 6px; border-radius: 50%; background: var(--color-text-muted);
    animation: chat-widget-typing 1.1s ease-in-out infinite;
}
.chat-widget__typing span:nth-child(2) { animation-delay: 0.15s; }
.chat-widget__typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes chat-widget-typing {
    0%, 60%, 100% { opacity: 0.25; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-2px); }
}

/* Vorschlags-Chips direkt nach der Begrüßung */
.chat-widget__quick-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 4px; }
.chat-widget__quick-btn {
    display: inline-flex; align-items: center; font-family: inherit;
    font-size: 0.8125rem; font-weight: 600; line-height: 1.3; color: var(--color-text);
    background: var(--color-surface); border: 1px solid var(--color-border-strong);
    border-radius: 100px; padding: 0.4375rem 0.75rem; cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}
.chat-widget__quick-btn:hover {
    border-color: var(--color-primary); color: var(--color-primary); background: var(--color-info-bg);
}

/* -- Eingabeformular ------------------------------------------------------ */
.chat-widget__form {
    display: flex; align-items: flex-end; gap: 8px; padding: 12px;
    border-top: 1px solid var(--color-border); flex-shrink: 0;
}
.chat-widget__input {
    flex: 1; resize: none; max-height: 120px;
    border: 1px solid var(--color-border-strong); border-radius: var(--radius-md);
    background: var(--color-bg); color: var(--color-text); font-family: inherit;
    font-size: 0.875rem; padding: 0.625rem 0.75rem; line-height: 1.4;
}
.chat-widget__input::placeholder { color: var(--color-text-muted); }
.chat-widget__input:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 1px; }
.chat-widget__input:disabled { opacity: 0.6; }

.chat-widget__mic {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%;
    border: 1px solid var(--color-border-strong); background: var(--color-surface);
    color: var(--color-text-muted); cursor: pointer; flex-shrink: 0;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.chat-widget__mic .icon { width: 16px; height: 16px; }
.chat-widget__mic:hover { border-color: var(--color-primary); color: var(--color-primary); background: var(--color-info-bg); }
.chat-widget__mic:disabled { opacity: 0.5; cursor: not-allowed; }
.chat-widget__mic.is-recording { border-color: var(--color-danger-text); color: var(--color-danger-text); animation: chat-widget-mic-pulse 1.1s ease-in-out infinite; }

@keyframes chat-widget-mic-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(193, 0, 111, 0.35); }
    50% { box-shadow: 0 0 0 6px rgba(193, 0, 111, 0); }
}

.chat-widget__send {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%; border: none;
    background: var(--color-primary); color: #fff; cursor: pointer; flex-shrink: 0;
    transition: background-color 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}
.chat-widget__send .icon { width: 16px; height: 16px; }
.chat-widget__send:hover { background: var(--color-primary-dark); }
.chat-widget__send:active { transform: translateY(1px); }
.chat-widget__send:disabled { opacity: 0.5; cursor: not-allowed; }

@media (max-width: 480px) {
    .chat-widget { right: 8px; bottom: 8px; }
    .chat-widget__launcher { width: 120px; height: 120px; }
    .chat-widget__launcher-close .icon { width: 18px; height: 18px; }
    .chat-widget__panel {
        width: calc(100vw - 16px);
        height: calc(100vh - 144px);
        bottom: calc(100% + 8px);
    }
}

/* ---------------------------------------------------------------------
   Empty / placeholder module states
   --------------------------------------------------------------------- */
.module-placeholder {
    background: var(--color-surface);
    border: 1px dashed var(--color-border-strong);
    border-radius: var(--radius-lg);
    padding: 48px 30px;
    text-align: center;
    color: var(--color-text-muted);
}
.module-placeholder .icon { width: 34px; height: 34px; color: var(--color-text-faint); margin-bottom: 14px; }
.module-placeholder h2 { font-size: 16px; color: var(--color-text); margin-bottom: 6px; }
.module-placeholder p { max-width: 460px; margin: 0 auto 16px; font-size: 13px; }
.module-placeholder-list { display: inline-block; text-align: left; font-size: 12.8px; margin-top: 6px; }
.module-placeholder-list li { padding: 3px 0; color: var(--color-text-muted); }

/* ---------------------------------------------------------------------
   Utility
   --------------------------------------------------------------------- */
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.text-muted { color: var(--color-text-muted); }
.text-sm { font-size: 12px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-8 { gap: 8px; }
.items-center { align-items: center; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.divider { border: none; border-top: 1px solid var(--color-border); margin: 16px 0; }

/* ---------------------------------------------------------------------
   Print (Packlisten / Versandetiketten)
   --------------------------------------------------------------------- */
@media print {
    .sidebar, .topbar, .page-header-actions, .no-print { display: none !important; }
    .app-main { margin-left: 0 !important; }
    .content { max-width: none; padding: 0; }
    body { background: #fff; }
}

/* ---------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------- */
@media (max-width: 960px) {
    .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
    .sidebar.is-open { transform: translateX(0); }
    .app-main { margin-left: 0; }
    .sidebar-toggle { display: flex; }
    .content { padding: 16px; }
    .topbar { padding: 0 14px; }
    .topbar-user-meta { display: none; }
}
