/* ==========================================================================
   SEPA-Portal – Hausverwaltung Müller GmbH
   --------------------------------------------------------------------------
   Verbindliches CI der HVM (Skill hvm-ci, Abschnitt 2 und 3):
   Farben aus dem Logo abgeleitet, Schrift system-ui/Helvetica Neue/Arial.
   Die HVM-Kennlinie (vierfarbiges Band) und die Fußzeile mit den
   handelsrechtlichen Pflichtangaben werden zentral in app/layout.php
   ausgegeben und hier gestylt.
   ========================================================================== */
:root {
    /* Verbindliche HVM-CI-Farben (Skill hvm-ci, Abschnitt 2) */
    --hvm-orange: #E6A83C;        /* Akzent: Kennlinie, Betreffmarker, Hervorhebungen */
    --hvm-anthracite: #87888A;    /* Überschriften, Sekundärtext, Fußzeile, Infoblock */
    --hvm-midgray: #9C9D9F;       /* Trennlinien, Falz-/Lochmarken, Nebenelemente */
    --hvm-lightgray: #D7D8DA;     /* Flächen, alternierende Tabellenzeilen */
    --hvm-outlinegray: #ECECEC;   /* Wasserzeichen Hausumriss */
    --hvm-black: #1A1A1A;         /* Textschwarz: Fließtext, Wortmarke */

    /* UI-Ableitung für Flächen mit hellem Text (kein CI-Wert, nur Kontrast-
       Absicherung für Buttons/Kopfzeile: gleicher Farbton, dunkler getönt) */
    --hvm-anthracite-surface: #5B5C5E;
    --hvm-anthracite-surface-dark: #47484A;
    --hvm-orange-dark: #CC8F26;

    --color-text: var(--hvm-black);
    --color-text-muted: var(--hvm-anthracite);
    --color-bg: #F7F7F7;
    --color-surface: #ffffff;
    --color-border: var(--hvm-lightgray);

    --color-success: #1e7e4a;
    --color-success-bg: #e3f3ea;
    --color-info: #1d5f8a;
    --color-info-bg: #e3eef5;
    --color-danger: #a12622;
    --color-danger-bg: #f8e7e6;
    --color-neutral: var(--hvm-anthracite);
    --color-neutral-bg: var(--hvm-lightgray);

    /* HVM-CI Abschnitt 3: HTML/Web-Schrift */
    --font-family: system-ui, "Helvetica Neue", Arial, sans-serif;
    --radius: 6px;
    --shadow: 0 1px 3px rgba(26, 26, 26, 0.08);

    /* HVM-Kennlinie: vier Segmente, Übergänge bei 40 / 60 / 67,5 % */
    --hvm-kennlinie: linear-gradient(
        to right,
        var(--hvm-anthracite) 0%, var(--hvm-anthracite) 40%,
        var(--hvm-midgray) 40%, var(--hvm-midgray) 60%,
        var(--hvm-orange) 60%, var(--hvm-orange) 67.5%,
        var(--hvm-lightgray) 67.5%, var(--hvm-lightgray) 100%
    );
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font-family);
    font-size: 15px;
    color: var(--color-text);
    background: var(--color-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--hvm-anthracite); }
a:hover { color: var(--hvm-black); }

/* --- HVM-Kennlinie (Abschnitt 5.1 und 9) --- */
.hvm-kennlinie {
    height: 4px;
    width: 100%;
    background: var(--hvm-kennlinie);
    flex-shrink: 0;
}
.hvm-kennlinie-footer { height: 3px; }

/* --- Header --- */
.site-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow);
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 32px;
    min-height: 68px;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--hvm-black);
    padding: 10px 0;
}
.brand-logo { height: 40px; width: auto; }
.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: var(--hvm-anthracite-surface);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-weight: 600; font-size: 15px; color: var(--hvm-black); }
.brand-sub { font-size: 12px; color: var(--hvm-anthracite); }

.main-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.main-nav a {
    color: var(--hvm-anthracite);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: var(--radius);
    font-size: 14px;
    border-bottom: 2px solid transparent;
}
.main-nav a:hover {
    color: var(--hvm-black);
    border-bottom-color: var(--hvm-orange);
}

.user-menu {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}
.user-email { color: var(--hvm-black); }
.user-role {
    background: var(--hvm-lightgray);
    color: var(--hvm-anthracite);
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

/* --- Main --- */
.site-main {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 28px 24px 48px;
}

h1 { font-size: 22px; margin: 0 0 4px; color: var(--hvm-anthracite); font-weight: 700; }
h2 { font-size: 17px; margin: 0 0 12px; color: var(--hvm-anthracite); font-weight: 700; }
.page-sub { color: var(--color-text-muted); margin: 0 0 24px; font-size: 14px; }

/* --- Karten --- */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 24px;
}
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    border-top: 3px solid var(--hvm-orange);
    padding: 18px 20px;
}
.stat-value { font-size: 26px; font-weight: 700; color: var(--hvm-black); }
.stat-label { font-size: 13px; color: var(--color-text-muted); margin-top: 4px; }

/* --- Tabellen --- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}
th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--hvm-anthracite);
    font-weight: 700;
    background: var(--hvm-outlinegray);
}
tr:hover td { background: #fafafa; }
td.num, th.num { text-align: right; white-space: nowrap; }

/* --- Badges --- */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.badge-success { background: var(--color-success-bg); color: var(--color-success); }
.badge-info    { background: var(--color-info-bg);    color: var(--color-info); }
.badge-danger  { background: var(--color-danger-bg);  color: var(--color-danger); }
.badge-neutral { background: var(--color-neutral-bg); color: var(--hvm-anthracite); }

/* --- Buttons ---
   Primäraktion in HVM Orange (Akzentfarbe) mit Textschwarz für sicheren
   Kontrast; Orange wird laut CI nie für Fließtext verwendet, hier als
   UI-Hervorhebung auf Buttons ist das die vorgesehene Verwendung. */
.btn {
    display: inline-block;
    padding: 9px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--hvm-orange);
    background: var(--hvm-orange);
    color: var(--hvm-black);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
}
.btn:hover { background: var(--hvm-orange-dark); border-color: var(--hvm-orange-dark); }
.btn-secondary {
    background: var(--color-surface);
    color: var(--hvm-anthracite);
    border-color: var(--hvm-midgray);
    font-weight: 600;
}
.btn-secondary:hover { background: var(--hvm-outlinegray); color: var(--hvm-black); }
.btn-danger {
    background: var(--color-danger);
    border-color: var(--color-danger);
    color: #fff;
}
.btn-danger:hover { background: #7f1e1b; }
.btn-ghost {
    background: transparent;
    border-color: var(--hvm-midgray);
    color: var(--hvm-anthracite);
    font-weight: 400;
}
.btn-ghost:hover { background: var(--hvm-outlinegray); color: var(--hvm-black); }
.btn-sm { padding: 5px 10px; font-size: 13px; }
button.linklike {
    background: none;
    border: none;
    color: var(--hvm-anthracite);
    cursor: pointer;
    padding: 0;
    font: inherit;
    text-decoration: underline;
}
button.linklike:hover { color: var(--hvm-black); }

/* --- Formulare --- */
label { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 4px; color: var(--hvm-anthracite); }
input[type="text"], input[type="email"], input[type="password"],
input[type="date"], select, textarea {
    width: 100%;
    max-width: 480px;
    padding: 9px 12px;
    border: 1px solid var(--hvm-midgray);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: var(--hvm-black);
}
input:focus, select:focus, textarea:focus {
    outline: 2px solid var(--hvm-orange);
    outline-offset: 0;
    border-color: var(--hvm-orange);
}
.form-actions { margin-top: 20px; display: flex; gap: 10px; }
.inline-form { display: inline-flex; align-items: center; gap: 6px; }
.inline-form input[type="date"] { width: auto; padding: 5px 8px; font-size: 13px; }
.hint { font-size: 13px; color: var(--color-text-muted); margin-top: 6px; }

/* --- Flash-Meldungen --- */
.flash {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 14px;
    border: 1px solid transparent;
}
.flash-success { background: var(--color-success-bg); color: var(--color-success); border-color: var(--color-success); }
.flash-error   { background: var(--color-danger-bg);  color: var(--color-danger);  border-color: var(--color-danger); }
.flash-info    { background: var(--color-info-bg);    color: var(--color-info);    border-color: var(--color-info); }

/* --- Auth-Seiten (Login, Registrierung, Einladung) ---
   Dezentes Hausumriss-Wasserzeichen im Hintergrund, analog zum
   Briefbogen-CI (Abschnitt 5.2), in Umrissgrau, hinter dem Inhalt. */
.auth-page {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.auth-page::before {
    content: "";
    position: absolute;
    right: -60px;
    bottom: -60px;
    width: 420px;
    height: 340px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 160'%3E%3Cpath d='M10 90 L100 15 L190 90 M30 90 V150 H170 V90' fill='none' stroke='%23ECECEC' stroke-width='9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
}
.auth-wrap {
    max-width: 420px;
    width: 100%;
    margin: 48px auto;
    position: relative;
}
.auth-wrap .card { padding: 32px; }
.auth-title { text-align: center; margin-bottom: 8px; color: var(--hvm-anthracite); }
.auth-sub { text-align: center; color: var(--color-text-muted); font-size: 14px; margin-bottom: 20px; }
.auth-wrap input { max-width: 100%; }
.auth-wrap .btn { width: 100%; margin-top: 20px; }
.auth-links { text-align: center; margin-top: 16px; font-size: 14px; }

/* --- Onboarding --- */
.steps { list-style: none; padding: 0; margin: 0; }
.steps li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--color-border);
}
.steps li:last-child { border-bottom: none; }
.step-status {
    width: 26px; height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    background: var(--hvm-lightgray);
    color: var(--hvm-anthracite);
}
.step-done { background: var(--color-success-bg); color: var(--color-success); }

/* --- Footer --- */
.site-footer {
    border-top: 1px solid var(--color-border);
    background: var(--color-surface);
    margin-top: auto;
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: var(--hvm-anthracite);
    text-align: center;
}

code.copy {
    background: var(--hvm-outlinegray);
    color: var(--hvm-black);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 13px;
    word-break: break-all;
}

@media (max-width: 720px) {
    .header-inner { gap: 12px; padding-bottom: 10px; }
    .user-menu { margin-left: 0; flex-wrap: wrap; }
}

/* ==========================================================================
   Produktauftritt "Lexware-Einzug" (alle Firmen ohne HVM-CI). Betreiber:
   Müller Holding AG. Eigene, zurückhaltende Gestaltung: Senfgold als Akzent,
   Anthrazit für Überschriften, keine fremden CI-Elemente.
   ========================================================================== */
body.theme-product {
    --hvm-orange: #E3AC48;
    --hvm-orange-dark: #C9932F;
    --hvm-anthracite: #2E2D2E;
    --hvm-anthracite-surface: #2E2D2E;
    --hvm-midgray: #9F9F9F;
    --hvm-lightgray: #E8E6E1;
    --hvm-outlinegray: #F3F1EC;
    --color-text-muted: #6B6B6B;
    --color-bg: #FBF9F4;
    --font-family: Carlito, Calibri, "Segoe UI", system-ui, sans-serif;
}
body.theme-product .btn { color: #2E2D2E; }
body.theme-product h1, body.theme-product h2 { color: #2E2D2E; }
body.theme-product .stat-card { border-top-color: #E3AC48; }
body.theme-product th { background: #F3F1EC; color: #6B6B6B; }
.brand-seam { height: 1px; background: #DDDBD6; position: relative; flex-shrink: 0; }
.brand-seam span { position: absolute; left: 0; top: -1px; height: 3px; width: 140px; background: #E3AC48; }
.brand-dot { width: 12px; height: 12px; border-radius: 50%; background: #E3AC48; display: inline-block; flex-shrink: 0; }
.nav-admin { font-weight: 700; }

/* --- Auth-Erweiterungen (2FA, Registrierung) --- */
.auth-wide { max-width: 620px; }
.code-input { font-size: 22px; letter-spacing: 4px; font-family: "Courier New", monospace; text-align: center; max-width: 260px; }
.recovery-codes { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; margin: 12px 0 20px; }
.recovery-codes code { display: block; background: var(--hvm-outlinegray); padding: 8px 10px; border-radius: 4px; font-size: 15px; text-align: center; letter-spacing: 1px; }
.setup-steps { padding-left: 20px; margin: 0 0 16px; }
.setup-steps li { margin-bottom: 12px; }
.qr-box { width: 196px; height: 196px; margin: 10px 0; background: #fff; border: 1px solid var(--color-border); padding: 4px; }
.qr-box img, .qr-box canvas { display: block; }
.checkbox-label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; color: var(--color-text); margin: 14px 0; }
.checkbox-label input { margin-top: 3px; }
.inline-check { font-weight: 400; font-size: 13px; margin: 0; display: inline-flex; gap: 4px; align-items: center; }
.form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-row > div { flex: 1 1 200px; }
.form-row input { max-width: 100%; }
.badge-warn { background: #FBF0D9; color: #8A5A00; }
.placeholder { color: var(--color-danger); font-weight: 600; }
.breadcrumb { font-size: 13px; color: var(--color-text-muted); margin: 0 0 8px; }
.check-list { list-style: none; padding: 0; margin: 0 0 12px; }
.check-list li { padding: 6px 0 6px 26px; position: relative; }
.check-list li::before { content: "\2713"; position: absolute; left: 0; color: var(--hvm-orange); font-weight: 700; }
.check-list.plain li::before { content: "\2022"; }
.table-sm { font-size: 13px; }
.table-sm th, .table-sm td { padding: 6px 8px; }

/* --- Footer mit Betreiberangaben --- */
.footer-legal { border-top: 1px solid var(--color-border); }
.footer-legal a { color: var(--hvm-anthracite); }
.footer-disclaimer { color: var(--color-text-muted); }

/* Testmodus-Banner (Stripe-Testschlüssel hinterlegt) */
.flash-warn { background: #fff4d6; color: #7a5300; border-color: #e3ac48; }
.testmode-banner { border-left: 6px solid #e3ac48; letter-spacing: 0.01em; }
.testmode-banner a { color: inherit; text-decoration: underline; margin-left: 6px; }

/* Schritt-für-Schritt-Anleitungen in den Einstellungen */
.guide { margin: 12px 0 16px; padding: 14px 18px; background: var(--color-info-bg); border-radius: 8px; font-size: 0.93rem; }
.guide summary { cursor: pointer; font-weight: 600; }
.guide ol { margin: 10px 0 0 18px; padding: 0; }
.guide li { margin: 4px 0; }
.guide .path { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.88em; background: rgba(255,255,255,0.7); padding: 1px 5px; border-radius: 4px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 8px 0 12px; font-size: 0.95rem; }
.kv dt { color: var(--color-muted, #666); }
.kv dd { margin: 0; }

/* Bildmarke: goldenes Euro auf Anthrazit-Kachel */
.brand-euro { width: 34px; height: 34px; border-radius: 9px; display: inline-block; flex-shrink: 0; }

.brand-image { height: 48px; width: auto; display: block; flex-shrink: 0; }

/* ==========================================================================
   Diagramme (Adminbereich), HTML/CSS ohne Skripte, siehe app/admin_charts.php
   ========================================================================== */
.admin-subnav { margin: -6px 0 18px; font-size: 14px; line-height: 1.9; }
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 20px 28px; }
.chart-grid .chart-wide { grid-column: 1 / -1; }
.chart { margin: 0; padding: 0; min-width: 0; }
.chart-title { font-size: 14px; font-weight: 700; color: var(--hvm-anthracite); margin: 0 0 10px; }
.chart-empty { font-size: 13px; color: var(--color-text-muted); margin: 0; padding: 18px 0; border-bottom: 1px solid var(--color-border); }
.chart-scroll { overflow-x: auto; overflow-y: hidden; }
.chart-cols { display: flex; align-items: stretch; gap: 6px; min-width: calc(var(--n) * 40px); padding: 0 10px; }
.chart-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.chart-plot { width: 100%; height: 190px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; border-bottom: 1px solid var(--color-border); }
.chart-bar { display: block; width: 68%; max-width: 44px; min-height: 0; border-radius: 4px 4px 0 0; }
.chart-value { font-size: 13px; font-weight: 600; color: var(--hvm-anthracite); margin-bottom: 4px; white-space: nowrap; }
.chart-value-zero { color: var(--color-text-muted); font-weight: 400; }
.chart-label { font-size: 12px; color: var(--color-text-muted); margin-top: 6px; white-space: nowrap; }
.chart-rowlist { display: flex; flex-direction: column; gap: 8px; }
.chart-row { display: grid; grid-template-columns: minmax(120px, 36%) 1fr max-content; align-items: center; gap: 10px; }
.chart-row .chart-label { margin: 0; text-align: right; white-space: normal; font-size: 13px; color: var(--hvm-anthracite); }
.chart-track { display: block; height: 18px; background: #f1efea; border-radius: 4px; overflow: hidden; }
.chart-hbar { display: block; height: 100%; border-radius: 4px; }
.chart-row .chart-value { margin: 0; min-width: 2.5em; }

/* ==========================================================================
   Responsive: Tablet und Handy
   ========================================================================== */
@media (max-width: 900px) {
    .header-inner { flex-wrap: wrap; gap: 8px 16px; padding: 0 16px 8px; }
    .main-nav { order: 3; width: 100%; gap: 2px; }
    .main-nav a { padding: 7px 10px; font-size: 13px; }
    .user-menu { margin-left: auto; }
    .site-main { padding: 20px 16px 40px; }
}
@media (max-width: 720px) {
    h1 { font-size: 20px; }
    .card { padding: 16px; margin-bottom: 16px; }
    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .stat-card { padding: 12px 14px; }
    .stat-value { font-size: 22px; }
    .user-menu .user-email { display: none; }
    .inline-form { display: flex; flex-wrap: wrap; }
    .form-actions { flex-wrap: wrap; }
    table { font-size: 13px; }
    th, td { padding: 8px 8px; }
    .flash { font-size: 14px; }
    .chart-plot { height: 150px; }
    .chart-cols { gap: 3px; min-width: calc(var(--n) * 26px); }
    .chart-col:nth-child(even) .chart-label { visibility: hidden; }
    .chart-value { font-size: 10px; }
    .chart-label { font-size: 11px; }
    .chart-cols { padding: 0 12px; }
    .chart-row { grid-template-columns: minmax(96px, 40%) 1fr max-content; gap: 8px; }
    .chart-row .chart-label { font-size: 12px; }
}
@media (max-width: 480px) {
    .card-grid { grid-template-columns: 1fr; }
    .brand-image { height: 40px; }
}

/* ==========================================================================
   Profilmenü (runder Avatar rechts oben, aufklappbar ohne Skriptpflicht)
   ========================================================================== */
.profile-menu { position: relative; }
.profile-menu > summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 4px 6px 4px 4px; border-radius: 999px; border: 1px solid transparent; }
.profile-menu > summary::-webkit-details-marker { display: none; }
.profile-menu > summary:hover, .profile-menu[open] > summary { border-color: var(--color-border); background: var(--color-neutral-bg); }
.avatar { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; background: var(--hvm-anthracite); color: #fff; border: 2px solid var(--hvm-orange); flex-shrink: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-initials { font-size: 13px; font-weight: 700; letter-spacing: 0.5px; }
.avatar-lg { width: 96px; height: 96px; }
.avatar-lg .avatar-initials { font-size: 30px; }
.menu-caret { font-size: 11px; color: var(--color-text-muted); }
.profile-dropdown { position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0,0.12); padding: 6px; z-index: 50; }
.profile-head { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 12px; border-bottom: 1px solid var(--color-border); margin-bottom: 6px; }
.profile-head .user-role { align-self: flex-start; margin-top: 4px; }
.profile-dropdown a { display: block; padding: 9px 12px; border-radius: 6px; color: var(--hvm-anthracite); text-decoration: none; font-size: 14px; }
.profile-dropdown a:hover { background: var(--color-neutral-bg); color: var(--hvm-black); }
.profile-dropdown a.menu-logout { border-top: 1px solid var(--color-border); margin-top: 6px; border-radius: 0 0 6px 6px; }

/* Kennzahlen (Dashboard): fünf Karten in einer Reihe, zweizeilige Beschriftung, Ampelfarben */
.stat-row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stat-row .stat-card { display: flex; flex-direction: column; min-width: 0; }
.stat-row .stat-value { font-size: 28px; line-height: 1.1; }
.stat-row .stat-label { line-height: 1.35; }
.stat-sub { display: block; color: var(--hvm-anthracite); font-weight: 600; margin-top: 2px; }
.stat-ok { color: var(--color-success); }
.stat-warn { color: #b7791f; }
.stat-danger { color: var(--color-danger); }
.stat-muted { color: var(--color-text-muted); }
@media (max-width: 1100px) { .stat-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) { .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stat-row .stat-value { font-size: 24px; } .user-menu .menu-caret { display: none; } }
@media (max-width: 480px) { .stat-row { grid-template-columns: 1fr; } }

/* ==========================================================================
   Hilfe-Center (hilfe.php)
   ========================================================================== */
.help-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; align-items: start; }
.help-nav { position: sticky; top: 12px; }
.help-nav h2 { font-size: 14px; margin: 14px 0 8px; }
.help-search { display: flex; flex-direction: column; gap: 6px; }
.help-search input { max-width: none; }
.help-topics { list-style: none; margin: 0; padding: 0; }
.help-topics li a { display: block; padding: 7px 10px; border-radius: 6px; color: var(--hvm-anthracite); text-decoration: none; font-size: 14px; }
.help-topics li a:hover, .help-topics li a.active { background: var(--color-neutral-bg); color: var(--hvm-black); }
.help-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.help-tile { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--color-border); border-radius: var(--radius); text-decoration: none; color: var(--hvm-anthracite); background: var(--color-surface); }
.help-tile:hover { border-color: var(--hvm-orange); }
.help-article h3 { font-size: 15px; margin: 18px 0 6px; }
.help-article ol, .help-article ul { margin: 6px 0 12px 20px; }
.help-article li { margin-bottom: 4px; }
.help-faq-item { border-bottom: 1px solid var(--color-border); padding: 8px 0; }
.help-faq-item summary { cursor: pointer; font-weight: 600; }
.help-answer { padding: 8px 0 4px 14px; }
.help-msg { border: 1px solid var(--color-border); border-radius: var(--radius); padding: 10px 12px; margin-top: 8px; background: var(--color-surface); }
.help-msg-support { background: var(--color-neutral-bg); border-left: 3px solid var(--hvm-orange); }
@media (max-width: 900px) { .help-layout { grid-template-columns: 1fr; } .help-nav { position: static; } }
