/* =======================================
   SaMe99 — neues Design (November 2026)
   Wird NACH style.css geladen und überschreibt gezielt:
   Farbwelten, Schrift, Kopfzeile, Fuß, Kopfbilder, Start-Werte.
   ======================================= */

/* ---------- Farbwelten ----------
   data-theme="fw-<name>" am <html>. Ohne Attribut gilt Creme.
   --c1/--c2/--c3 sind die drei Töne für die bewegten Hintergründe. */
:root {
    --bg: #F1EADB;
    --surface: #F8F3E7;
    --surface-alt: #E9E0CE;
    --text: #2B241C;
    --text-muted: #6B5F50;
    --header: #F1EADB;
    --header-rgb: 241, 234, 219;
    --header-text: #2B241C;
    --accent: #8A5A3C;
    --accent-hover: #774D34;
    --accent-soft: rgba(138,90,60, 0.11);
    --on-accent: #FFFFFF;
    --danger: #9C4A35;
    --danger-soft: rgba(156,74,53, 0.11);
    --ok: #2F6B3A;
    --ok-soft: rgba(47,107,58, 0.13);
    --border: #E2D8C3;
    --shadow-sm: none;
    --shadow-md: 0 6px 18px rgba(37, 30, 22, 0.07);
    --shadow-lg: 0 16px 36px rgba(37, 30, 22, 0.13);
    --c1: #8A5A3C;
    --c2: #C9A27A;
    --c3: #6F7F5E;
    --logo-filter: brightness(0) opacity(0.82);
    color-scheme: light;
}
[data-theme="fw-creme"] {
    --bg: #F1EADB;
    --surface: #F8F3E7;
    --surface-alt: #E9E0CE;
    --text: #2B241C;
    --text-muted: #6B5F50;
    --header: #F1EADB;
    --header-rgb: 241, 234, 219;
    --header-text: #2B241C;
    --accent: #8A5A3C;
    --accent-hover: #774D34;
    --accent-soft: rgba(138,90,60, 0.11);
    --on-accent: #FFFFFF;
    --danger: #9C4A35;
    --danger-soft: rgba(156,74,53, 0.11);
    --ok: #2F6B3A;
    --ok-soft: rgba(47,107,58, 0.13);
    --border: #E2D8C3;
    --shadow-sm: none;
    --shadow-md: 0 6px 18px rgba(37, 30, 22, 0.07);
    --shadow-lg: 0 16px 36px rgba(37, 30, 22, 0.13);
    --c1: #8A5A3C;
    --c2: #C9A27A;
    --c3: #6F7F5E;
    --logo-filter: brightness(0) opacity(0.82);
    color-scheme: light;
}
[data-theme="fw-beige"] {
    --bg: #E6DCCB;
    --surface: #EFE7D8;
    --surface-alt: #DDD1BD;
    --text: #2E2720;
    --text-muted: #675B4C;
    --header: #E6DCCB;
    --header-rgb: 230, 220, 203;
    --header-text: #2E2720;
    --accent: #70553E;
    --accent-hover: #604935;
    --accent-soft: rgba(112,85,62, 0.11);
    --on-accent: #FFFFFF;
    --danger: #9C4A35;
    --danger-soft: rgba(156,74,53, 0.11);
    --ok: #2F6B3A;
    --ok-soft: rgba(47,107,58, 0.13);
    --border: #D5C8B2;
    --shadow-sm: none;
    --shadow-md: 0 6px 18px rgba(37, 30, 22, 0.07);
    --shadow-lg: 0 16px 36px rgba(37, 30, 22, 0.13);
    --c1: #7A5C43;
    --c2: #B08968;
    --c3: #A0473E;
    --logo-filter: brightness(0) opacity(0.82);
    color-scheme: light;
}
[data-theme="fw-salbei"] {
    --bg: #E3E8DD;
    --surface: #EDF0E8;
    --surface-alt: #D8DED1;
    --text: #1F2A22;
    --text-muted: #56635A;
    --header: #E3E8DD;
    --header-rgb: 227, 232, 221;
    --header-text: #1F2A22;
    --accent: #506752;
    --accent-hover: #455947;
    --accent-soft: rgba(80,103,82, 0.11);
    --on-accent: #FFFFFF;
    --danger: #9C4A35;
    --danger-soft: rgba(156,74,53, 0.11);
    --ok: #2F6B3A;
    --ok-soft: rgba(47,107,58, 0.13);
    --border: #CFD6C8;
    --shadow-sm: none;
    --shadow-md: 0 6px 18px rgba(37, 30, 22, 0.07);
    --shadow-lg: 0 16px 36px rgba(37, 30, 22, 0.13);
    --c1: #5F7A61;
    --c2: #9DB098;
    --c3: #B98B5E;
    --logo-filter: brightness(0) opacity(0.82);
    color-scheme: light;
}
[data-theme="fw-bordeauxhell"] {
    --bg: #F2E9E1;
    --surface: #F9F2EA;
    --surface-alt: #EADDD3;
    --text: #2A1418;
    --text-muted: #6E565A;
    --header: #F2E9E1;
    --header-rgb: 242, 233, 225;
    --header-text: #2A1418;
    --accent: #7B1E33;
    --accent-hover: #6A1A2C;
    --accent-soft: rgba(123,30,51, 0.11);
    --on-accent: #FFFFFF;
    --danger: #9C4A35;
    --danger-soft: rgba(156,74,53, 0.11);
    --ok: #2F6B3A;
    --ok-soft: rgba(47,107,58, 0.13);
    --border: #E3D4C8;
    --shadow-sm: none;
    --shadow-md: 0 6px 18px rgba(37, 30, 22, 0.07);
    --shadow-lg: 0 16px 36px rgba(37, 30, 22, 0.13);
    --c1: #7B1E33;
    --c2: #B85C5C;
    --c3: #A8895B;
    --logo-filter: brightness(0) opacity(0.82);
    color-scheme: light;
}
[data-theme="fw-nebel"] {
    --bg: #ECE9E3;
    --surface: #F4F2EE;
    --surface-alt: #E0DCD5;
    --text: #1B1C1E;
    --text-muted: #5E625F;
    --header: #ECE9E3;
    --header-rgb: 236, 233, 227;
    --header-text: #1B1C1E;
    --accent: #2F5D62;
    --accent-hover: #285054;
    --accent-soft: rgba(47,93,98, 0.11);
    --on-accent: #FFFFFF;
    --danger: #9C4A35;
    --danger-soft: rgba(156,74,53, 0.11);
    --ok: #2F6B3A;
    --ok-soft: rgba(47,107,58, 0.13);
    --border: #D6D2CA;
    --shadow-sm: none;
    --shadow-md: 0 6px 18px rgba(37, 30, 22, 0.07);
    --shadow-lg: 0 16px 36px rgba(37, 30, 22, 0.13);
    --c1: #2F5D62;
    --c2: #8FB3A8;
    --c3: #D9965F;
    --logo-filter: brightness(0) opacity(0.82);
    color-scheme: light;
}
[data-theme="fw-porzellan"] {
    --bg: #ECEEF2;
    --surface: #F6F7F9;
    --surface-alt: #DEE2E9;
    --text: #14213D;
    --text-muted: #58627A;
    --header: #ECEEF2;
    --header-rgb: 236, 238, 242;
    --header-text: #14213D;
    --accent: #2B4C9B;
    --accent-hover: #254185;
    --accent-soft: rgba(43,76,155, 0.11);
    --on-accent: #FFFFFF;
    --danger: #9C4A35;
    --danger-soft: rgba(156,74,53, 0.11);
    --ok: #2F6B3A;
    --ok-soft: rgba(47,107,58, 0.13);
    --border: #D3D8E2;
    --shadow-sm: none;
    --shadow-md: 0 6px 18px rgba(37, 30, 22, 0.07);
    --shadow-lg: 0 16px 36px rgba(37, 30, 22, 0.13);
    --c1: #2B4C9B;
    --c2: #7A9BD8;
    --c3: #C9A227;
    --logo-filter: brightness(0) opacity(0.82);
    color-scheme: light;
}
[data-theme="fw-bluete"] {
    --bg: #F5EAE7;
    --surface: #FBF3F1;
    --surface-alt: #EDDDDA;
    --text: #2A1E24;
    --text-muted: #6F5A62;
    --header: #F5EAE7;
    --header-rgb: 245, 234, 231;
    --header-text: #2A1E24;
    --accent: #A64162;
    --accent-hover: #8F3854;
    --accent-soft: rgba(166,65,98, 0.11);
    --on-accent: #FFFFFF;
    --danger: #9C4A35;
    --danger-soft: rgba(156,74,53, 0.11);
    --ok: #2F6B3A;
    --ok-soft: rgba(47,107,58, 0.13);
    --border: #E6D3CF;
    --shadow-sm: none;
    --shadow-md: 0 6px 18px rgba(37, 30, 22, 0.07);
    --shadow-lg: 0 16px 36px rgba(37, 30, 22, 0.13);
    --c1: #B4476B;
    --c2: #E39AA4;
    --c3: #6E7FA8;
    --logo-filter: brightness(0) opacity(0.82);
    color-scheme: light;
}
[data-theme="fw-graphit"] {
    --bg: #F3F3F0;
    --surface: #FBFBF9;
    --surface-alt: #E5E5E1;
    --text: #17181A;
    --text-muted: #5F6267;
    --header: #F3F3F0;
    --header-rgb: 243, 243, 240;
    --header-text: #17181A;
    --accent: #17181A;
    --accent-hover: #141516;
    --accent-soft: rgba(23,24,26, 0.11);
    --on-accent: #FFFFFF;
    --danger: #9C4A35;
    --danger-soft: rgba(156,74,53, 0.11);
    --ok: #2F6B3A;
    --ok-soft: rgba(47,107,58, 0.13);
    --border: #D9D9D4;
    --shadow-sm: none;
    --shadow-md: 0 6px 18px rgba(37, 30, 22, 0.07);
    --shadow-lg: 0 16px 36px rgba(37, 30, 22, 0.13);
    --c1: #17181A;
    --c2: #6B6E73;
    --c3: #A9ACB0;
    --logo-filter: brightness(0) opacity(0.82);
    color-scheme: light;
}
[data-theme="fw-kakao"] {
    --bg: #17110D;
    --surface: #1F1712;
    --surface-alt: #281E17;
    --text: #F3E9DC;
    --text-muted: #B3A292;
    --header: #17110D;
    --header-rgb: 23, 17, 13;
    --header-text: #F3E9DC;
    --accent: #B07A4F;
    --accent-hover: #BB8D68;
    --accent-soft: rgba(176,122,79, 0.16);
    --on-accent: #14110F;
    --danger: #D08A72;
    --danger-soft: rgba(208,138,114, 0.16);
    --ok: #A9D6B1;
    --ok-soft: rgba(169,214,177, 0.14);
    --border: #36291F;
    --shadow-sm: none;
    --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.5);
    --c1: #B07A4F;
    --c2: #D9B48A;
    --c3: #F0DFC4;
    --logo-filter: none;
    color-scheme: dark;
}
[data-theme="fw-bordeaux"] {
    --bg: #160A0E;
    --surface: #1E0E13;
    --surface-alt: #2A141A;
    --text: #F6E9E6;
    --text-muted: #BFA3A6;
    --header: #160A0E;
    --header-rgb: 22, 10, 14;
    --header-text: #F6E9E6;
    --accent: #B75F71;
    --accent-hover: #C17585;
    --accent-soft: rgba(183,95,113, 0.16);
    --on-accent: #14110F;
    --danger: #D08A72;
    --danger-soft: rgba(208,138,114, 0.16);
    --ok: #A9D6B1;
    --ok-soft: rgba(169,214,177, 0.14);
    --border: #3A1C24;
    --shadow-sm: none;
    --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.5);
    --c1: #A3324A;
    --c2: #D98C8C;
    --c3: #E8CFA6;
    --logo-filter: none;
    color-scheme: dark;
}
[data-theme="fw-daemmerung"] {
    --bg: #0E0D13;
    --surface: #14131A;
    --surface-alt: #1D1C25;
    --text: #EEEAF2;
    --text-muted: #A69FB3;
    --header: #0E0D13;
    --header-rgb: 14, 13, 19;
    --header-text: #EEEAF2;
    --accent: #8E7CC3;
    --accent-hover: #9E8ECB;
    --accent-soft: rgba(142,124,195, 0.16);
    --on-accent: #14110F;
    --danger: #D08A72;
    --danger-soft: rgba(208,138,114, 0.16);
    --ok: #A9D6B1;
    --ok-soft: rgba(169,214,177, 0.14);
    --border: #2A2833;
    --shadow-sm: none;
    --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.5);
    --c1: #8E7CC3;
    --c2: #E58F7B;
    --c3: #F2C6A0;
    --logo-filter: none;
    color-scheme: dark;
}
[data-theme="fw-tiefsee"] {
    --bg: #07131A;
    --surface: #0B1A20;
    --surface-alt: #13252C;
    --text: #E6F0EF;
    --text-muted: #94ABAD;
    --header: #07131A;
    --header-rgb: 7, 19, 26;
    --header-text: #E6F0EF;
    --accent: #2E9CA6;
    --accent-hover: #4BAAB2;
    --accent-soft: rgba(46,156,166, 0.16);
    --on-accent: #14110F;
    --danger: #D08A72;
    --danger-soft: rgba(208,138,114, 0.16);
    --ok: #A9D6B1;
    --ok-soft: rgba(169,214,177, 0.14);
    --border: #1D343B;
    --shadow-sm: none;
    --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.5);
    --c1: #2E9CA6;
    --c2: #7FD1AE;
    --c3: #F2E8C6;
    --logo-filter: none;
    color-scheme: dark;
}
[data-theme="fw-glut"] {
    --bg: #130D0B;
    --surface: #1A1210;
    --surface-alt: #251A16;
    --text: #F5EDE6;
    --text-muted: #B5A398;
    --header: #130D0B;
    --header-rgb: 19, 13, 11;
    --header-text: #F5EDE6;
    --accent: #E4572E;
    --accent-hover: #E86F4B;
    --accent-soft: rgba(228,87,46, 0.16);
    --on-accent: #14110F;
    --danger: #D08A72;
    --danger-soft: rgba(208,138,114, 0.16);
    --ok: #A9D6B1;
    --ok-soft: rgba(169,214,177, 0.14);
    --border: #33251F;
    --shadow-sm: none;
    --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.5);
    --c1: #E4572E;
    --c2: #F0A35E;
    --c3: #F7D9A6;
    --logo-filter: none;
    color-scheme: dark;
}
[data-theme="fw-wald"] {
    --bg: #0B110D;
    --surface: #101812;
    --surface-alt: #19231D;
    --text: #E9EFE6;
    --text-muted: #9DAD9C;
    --header: #0B110D;
    --header-rgb: 11, 17, 13;
    --header-text: #E9EFE6;
    --accent: #6FA47A;
    --accent-hover: #83B18D;
    --accent-soft: rgba(111,164,122, 0.16);
    --on-accent: #14110F;
    --danger: #D08A72;
    --danger-soft: rgba(208,138,114, 0.16);
    --ok: #A9D6B1;
    --ok-soft: rgba(169,214,177, 0.14);
    --border: #24312A;
    --shadow-sm: none;
    --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.5);
    --c1: #6FA47A;
    --c2: #C8D5A0;
    --c3: #D98F5C;
    --logo-filter: none;
    color-scheme: dark;
}

/* Farbtupfer im Auswahlmenü */
.theme-swatch-fw-creme { background: linear-gradient(90deg, #8A5A3C 0 34%, #C9A27A 34% 67%, #6F7F5E 67%); }
.theme-swatch-fw-beige { background: linear-gradient(90deg, #7A5C43 0 34%, #B08968 34% 67%, #A0473E 67%); }
.theme-swatch-fw-salbei { background: linear-gradient(90deg, #5F7A61 0 34%, #9DB098 34% 67%, #B98B5E 67%); }
.theme-swatch-fw-bordeauxhell { background: linear-gradient(90deg, #7B1E33 0 34%, #B85C5C 34% 67%, #A8895B 67%); }
.theme-swatch-fw-nebel { background: linear-gradient(90deg, #2F5D62 0 34%, #8FB3A8 34% 67%, #D9965F 67%); }
.theme-swatch-fw-porzellan { background: linear-gradient(90deg, #2B4C9B 0 34%, #7A9BD8 34% 67%, #C9A227 67%); }
.theme-swatch-fw-bluete { background: linear-gradient(90deg, #B4476B 0 34%, #E39AA4 34% 67%, #6E7FA8 67%); }
.theme-swatch-fw-graphit { background: linear-gradient(90deg, #17181A 0 34%, #6B6E73 34% 67%, #A9ACB0 67%); }
.theme-swatch-fw-kakao { background: linear-gradient(90deg, #B07A4F 0 34%, #D9B48A 34% 67%, #F0DFC4 67%); }
.theme-swatch-fw-bordeaux { background: linear-gradient(90deg, #A3324A 0 34%, #D98C8C 34% 67%, #E8CFA6 67%); }
.theme-swatch-fw-daemmerung { background: linear-gradient(90deg, #8E7CC3 0 34%, #E58F7B 34% 67%, #F2C6A0 67%); }
.theme-swatch-fw-tiefsee { background: linear-gradient(90deg, #2E9CA6 0 34%, #7FD1AE 34% 67%, #F2E8C6 67%); }
.theme-swatch-fw-glut { background: linear-gradient(90deg, #E4572E 0 34%, #F0A35E 34% 67%, #F7D9A6 67%); }
.theme-swatch-fw-wald { background: linear-gradient(90deg, #6FA47A 0 34%, #C8D5A0 34% 67%, #D98F5C 67%); }

/* ---------- Schrift ---------- */
:root {
    --font-display: 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif;
    --font-body: 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif;
    --radius-md: 14px;
    --radius-lg: 20px;
}

body {
    -webkit-font-smoothing: antialiased;
}

::selection {
    color: var(--on-accent);
}

/* Text auf Akzentflächen: je Farbwelt hell oder dunkel, damit er lesbar bleibt */
.login-btn:hover,
.login-btn:active,
.tank-diesel-box,
.file-dropzone-filename,
.copy-code-btn.copied,
.mfa-setup-btn-primary:hover,
.mfa-setup-btn-primary:active,
.geraet-wol,
.settings-tab.is-active {
    color: var(--on-accent);
}

/* ---------- Kopfzeile: hell, mit feiner Linie statt dunklem Balken ---------- */
.main-header {
    background-color: var(--bg);
    border-bottom: 1px solid var(--border);
}

.logo {
    font-weight: 600;
    letter-spacing: -0.01em;
}

.centered-header-image {
    opacity: 1;
}

/* Das mitgelieferte Eichhörnchen ist weiß (für den früheren dunklen Balken).
   In hellen Farbwelten wird es dunkel eingefärbt, sonst wäre es unsichtbar.
   Gilt nur für die Standardbilder, nicht für selbst hochgeladene Logos. */
.centered-header-image[src^="Bilder/Eichh"],
.footer-icon[src^="Bilder/Eichh"] {
    filter: var(--logo-filter, none);
}

.policy-header {
    border-bottom: 1px solid var(--border);
}

.main-nav a {
    color: var(--text-muted);
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--text);
}

.main-nav a::after {
    background: var(--text);
}

.main-nav .auth-nav-item .auth-link {
    border-color: var(--border);
    font-weight: 500;
}

.main-nav .auth-nav-item .auth-link:hover {
    background-color: var(--surface-alt);
    border-color: var(--text-muted);
}

.theme-toggle {
    border-color: var(--border);
}

.theme-toggle:hover {
    background-color: var(--surface-alt);
}

/* ---------- Auswahl der Farbwelt ---------- */
.fw-schalter {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
}

.fw-schalter input {
    appearance: none;
    -webkit-appearance: none;
    flex: none;
    width: 46px;
    height: 26px;
    margin: 0;
    border-radius: 999px;
    border: 1px solid var(--text-muted);
    background: transparent;
    position: relative;
    cursor: pointer;
}

.fw-schalter input::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: transform 0.15s ease;
}

.fw-schalter input:checked {
    background: var(--text);
    border-color: var(--text);
}

.fw-schalter input:checked::after {
    transform: translateX(20px);
    background: var(--bg);
}

.fw-schalter input:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 2px;
}

.fw-hinweis {
    padding: 0 10px 6px;
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--text-muted);
    max-width: 260px;
}

.theme-menu {
    min-width: 250px;
}

.theme-swatch {
    width: 30px;
    border-radius: 999px;
    border-color: var(--border);
}

.theme-option {
    font-weight: 500;
}

.theme-option.is-active {
    color: var(--text);
    font-weight: 700;
    background: var(--surface-alt);
}

.theme-group-label {
    font-weight: 600;
}

/* ---------- Bewegter Kopfbereich je Seite ---------- */
.kopfbild {
    position: relative;
    overflow: hidden;
    height: clamp(230px, 34vw, 420px);
    border-bottom: 1px solid var(--border);
    touch-action: pan-y;
}

.kopfbild.flach {
    height: clamp(170px, 19vw, 240px);
}

.kopfbild canvas,
.fuss-gras canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.kopfbild-text {
    position: absolute;
    left: max(1rem, calc((100% - 1200px) / 2 + 2rem));
    right: 1rem;
    bottom: clamp(16px, 3vw, 32px);
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
    text-shadow: 0 0 14px var(--bg), 0 0 4px var(--bg);
}

.kopfbild-klein {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.kopfbild-gross {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 200;
    font-size: clamp(2.2rem, 7vw, 5.6rem);
    line-height: 1.04;
    letter-spacing: -0.045em;
    font-variant-numeric: tabular-nums;
    color: var(--text);
    overflow-wrap: anywhere;
}

/* Anmeldung: der Hintergrund füllt das ganze Fenster hinter der Anmeldekarte */
.kopfbild.kopfbild-fest {
    position: fixed;
    inset: 0;
    height: auto;
    border-bottom: 0;
    z-index: 0;
}

.kopfbild-fest ~ main,
.kopfbild-fest ~ footer {
    position: relative;
    z-index: 1;
}

.kopfbild-fest ~ .main-footer {
    background-color: var(--bg);
}

/* Unter einem Kopfbild braucht der Inhalt keine erzwungene Mindesthöhe mehr */
.kopfbild:not(.kopfbild-fest) ~ .centered-page,
.kopfbild:not(.kopfbild-fest) ~ .content-area .centered-page {
    min-height: 0;
    justify-content: flex-start;
}

.kopfbild:not(.kopfbild-fest) ~ .content-area {
    padding-top: 2.25rem;
}

.section-title {
    font-weight: 500;
    font-size: 1.3rem;
    letter-spacing: -0.01em;
    margin-bottom: 1.6rem;
}

.buttons-gruppen-titel {
    font-weight: 500;
    color: var(--text-muted);
}

/* ---------- Start: Werte als ruhige Zeile statt Karten ---------- */
.dash-row {
    max-width: none;
    gap: 0;
    justify-content: flex-start;
    border-top: 1px solid var(--text);
    margin-bottom: 2.5rem;
}

.dash-widget {
    align-items: flex-start;
    max-width: none;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    box-shadow: none;
    padding: 1rem 1rem 1rem 0;
}

.dash-widget:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--text);
}

.dash-widget-icon {
    display: none;
}

.dash-widget-value {
    font-weight: 300;
    font-size: 2rem;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.dash-widget-value,
.dash-widget-value-sm {
    line-height: 2.4rem;
}

.dash-widget-value-sm {
    font-size: 1.5rem;
}

.dash-widget-label {
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0;
}

/* Müll-Kachel (Daten von Home Assistant, nur für Angemeldete) */
.dash-muell {
    cursor: default;
}

.dash-muell:hover {
    border-color: var(--border);
}

.dash-muell .dash-widget-label {
    overflow-wrap: anywhere;
}

.dash-muell.ist-bald {
    border-bottom-color: var(--accent);
}

.dash-muell.ist-bald .dash-widget-value {
    color: var(--accent);
    font-weight: 500;
}

@media (max-width: 768px) {
    .dash-row {
        gap: 0;
    }

    .dash-widget {
        padding: 0.8rem 0.35rem 0.8rem 0;
    }

    .dash-widget-value {
        font-size: 1.12rem;
    }

    .dash-widget-value-sm {
        font-size: 0.92rem;
    }

    .dash-widget-value,
    .dash-widget-value-sm {
        line-height: 1.6rem;
    }

    .dash-widget-label {
        font-size: 0.7rem;
        text-align: left;
    }
}

/* ---------- Kacheln ---------- */
.buttonLogo {
    background-color: var(--surface);
    border-radius: 16px;
}

/* Kachel für eine interne Seite: Symbol und Name statt eines Logo-Bildes. */
.buttonLogo.button-intern {
    flex-direction: column;
    gap: 0.6rem;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    padding: 10px;
}

.buttonLogo.button-intern span {
    white-space: nowrap;
}

.buttonLogo.button-intern i {
    font-size: 2.4rem;
    line-height: 1;
    color: var(--accent);
}

@media (max-width: 768px) {
    .buttonLogo.button-intern {
        gap: 0.3rem;
        padding: 6px;
        font-size: 0.62rem;
    }

    .buttonLogo.button-intern i {
        font-size: 1.5rem;
    }
}

.buttonLogo:hover {
    transform: translateY(-2px);
    box-shadow: none;
    border-color: var(--text);
}

/* ---------- Fuß mit Gräser-Streifen ---------- */
.main-footer {
    background-color: var(--bg);
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    position: relative;
    flex-wrap: wrap;
}

.fuss-gras {
    flex: 0 0 calc(100% + 2.2rem);
    height: 96px;
    margin: -1.1rem -1.1rem 0.5rem;
    position: relative;
    overflow: hidden;
    touch-action: pan-y;
}

.main-footer.hat-gras .footer-icon {
    position: absolute;
    left: 50%;
    top: 46px;
    transform: translateX(-50%);
    max-height: 42px;
    opacity: 1;
    z-index: 1;
}

/* ---------- Untere Menüleiste (Handy/Tablet): flächig statt durchscheinend ---------- */
.bottom-nav {
    background: var(--bg);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-top: 1px solid var(--border);
    box-shadow: none;
}

.bottom-nav-item {
    color: var(--text-muted);
}

.bottom-nav-item.is-active {
    color: var(--text);
}

.bottom-nav-item.is-active::before {
    background: var(--text);
}

@media (prefers-reduced-motion: reduce) {
    .fw-schalter input::after {
        transition: none;
    }
}

/* =======================================
   Innere Bausteine (November 2026)
   Statt Kästen mit Rahmen und Schatten: schlichte Listen auf dem
   Seitenhintergrund, getrennt durch feine Linien. Zahlen groß und dünn,
   Beschriftungen klein und gedämpft.
   ======================================= */

/* ---------- Tanken ---------- */
.tank-grid {
    display: block;
    max-width: 760px;
}
.tank-card,
.tank-card:hover {
    background: none;
    border: 0;
    border-top: 1px solid var(--border);
    border-radius: 0;
    box-shadow: none;
    padding: 1.75rem 0 2rem;
}
.tank-card:last-child { border-bottom: 1px solid var(--border); }
.tank-card-head { margin-bottom: 1.1rem; }
.tank-card-title {
    font-size: 1.15rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}
.tank-status-badge {
    background: none !important;
    border: 0;
    padding: 0;
    font-weight: 500;
    font-size: 0.8rem;
}
.tank-status-badge::before {
    content: '';
    display: inline-block;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: currentColor;
    margin-right: 6px;
    vertical-align: 1px;
}
.tank-price-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0 1.5rem;
}
.tank-price {
    flex-direction: column-reverse;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 2px;
    padding: 0;
    border: 0;
}
.tank-price-value {
    font-size: clamp(1.4rem, 4vw, 2rem);
    font-weight: 300;
    letter-spacing: -0.02em;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}
.tank-price:first-child .tank-price-value { color: var(--accent); }
.tank-price-label {
    font-size: 0.78rem;
    color: var(--text-muted);
}
.tank-chart {
    border-top: 0;
    margin-top: 1.4rem;
    padding-top: 0;
}
.tank-chart-detail {
    background: none;
    padding: 4px 0 0;
    text-align: left;
}
.tank-guenstigster {
    border-top: 0;
    padding-top: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.tank-statistik,
.tank-anstieg {
    background: none;
    border: 0;
    border-left: 2px solid var(--border);
    border-radius: 0;
    padding: 0.1rem 0 0.1rem 0.9rem;
}
.tank-anstieg { border-left-color: var(--danger); }
.tank-statistik-titel,
.tank-anstieg-titel {
    font-size: 0.74rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}
.tank-anstieg-tipp { font-weight: 500; }
.tank-tipp {
    background: none;
    border-left: 2px solid var(--ok);
    border-radius: 0;
    text-align: left;
    padding: 0.1rem 0 0.1rem 0.9rem;
    font-weight: 500;
}
.tank-verlauf-link { border-top: 0; justify-content: flex-start; }
@media (min-width: 700px) {
    .tank-auswertung {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.25rem;
        margin-top: 1rem;
    }
    .tank-auswertung > * { margin-top: 0 !important; }
}

/* ---------- Einstellungen ---------- */
.settings-tabs {
    background: none;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    padding: 0;
    gap: 0.25rem;
}
.settings-tab {
    border-radius: 0;
    font-weight: 500;
    padding: 12px 14px;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.settings-tab.is-active,
.settings-tab.is-active:hover {
    background: none;
    color: var(--text);
    border-bottom-color: var(--accent);
    box-shadow: none;
}
.settings-form-card,
.dl-upload-card {
    background: none;
    border: 0;
    border-top: 1px solid var(--border);
    border-radius: 0;
    box-shadow: none;
    padding: 1.75rem 0 0.5rem;
    max-width: 640px;
    margin: 0 auto 1.5rem !important;
}
.settings-form-card h2,
.dl-upload-card h2 {
    font-size: 1.15rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}
.settings-form-card h2 .ti { color: var(--text-muted); font-size: 1.05em; }
.settings-btn-row .add-form-toggle-btn,
.add-form-toggle-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
    font-weight: 500;
}
.settings-btn-row .add-form-toggle-btn:hover,
.add-form-toggle-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: none;
}
.settings-form-card input[type="text"],
.settings-form-card input[type="email"],
.settings-form-card input[type="password"],
.settings-form-card input[type="url"],
.settings-form-card input[type="number"],
.settings-form-card select,
.settings-form-card textarea {
    background: var(--surface);
    border-color: var(--border);
}

/* ---------- Downloads ---------- */
.file-dropzone {
    background: none;
    border: 1px dashed var(--text-muted);
    border-radius: var(--radius-md);
}
.dl-list {
    gap: 0;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    border-top: 1px solid var(--border);
}
.dl-item,
.dl-item:hover {
    background: none;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    box-shadow: none;
    padding: 0.85rem 0.25rem;
}
.dl-icon {
    background: none;
    color: var(--text-muted);
}
.dl-name { font-weight: 500; }
.dl-btn {
    background: none;
    border-color: transparent;
    border-radius: 50%;
    color: var(--text-muted);
}
.dl-btn:hover {
    background: var(--accent-soft);
    border-color: transparent;
    color: var(--accent);
}
.dl-btn-delete:hover {
    background: var(--danger-soft);
    color: var(--danger);
}
.dl-search {
    background: none;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
}

/* ---------- Datenmatrix ---------- */
.dm-table-wrap {
    border: 0;
    border-top: 1px solid var(--text);
    border-radius: 0;
    background: none;
}
.dm-table thead th,
.dm-table thead .dm-col-unternehmen,
.dm-table thead .dm-col-check {
    background: var(--bg);
    font-weight: 500;
    font-size: 0.74rem;
    letter-spacing: 0.06em;
}
.dm-table .dm-col-unternehmen,
.dm-table .dm-col-check {
    background: var(--bg);
    box-shadow: none;
}
.dm-table td { border-bottom-color: var(--border); }
.dm-table tbody tr:hover,
.dm-table tbody tr:hover .dm-col-check,
.dm-table tbody tr:hover .dm-col-unternehmen {
    background: var(--surface);
}
.dm-icon-btn {
    background: none;
    border-color: var(--border);
    border-radius: 50%;
}
.dm-sticky-kopf { background: var(--bg); }
.empty-state {
    background: none;
    border: 0;
}

/* ---------- Lange Überschriften im Kopfbild ----------
   Das Skript in _kopfbild.php verkleinert die Zeile, bis sie in eine
   Zeile passt; die Grenze hier ist nur die Untergrenze. */
.kopfbild-gross.ist-lang { white-space: nowrap; }
.tank-prognose {
    border-left: 2px solid var(--ok);
    padding: 0.1rem 0 0.1rem 0.9rem;
    margin-top: 0.75rem;
}
@media (min-width: 700px) {
    .tank-auswertung { grid-template-columns: repeat(3, 1fr); }
}
.tank-anstieg-haupt { font-size: 0.95rem; }

/* ---------- Drag & Drop (sortieren.js) ---------- */
.dnd-griff {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    align-self: stretch;
    margin: -0.25rem 0.25rem -0.25rem -0.4rem;
    color: var(--text-muted);
    cursor: grab;
    touch-action: none;
    user-select: none;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
}
.dnd-griff:hover,
.dnd-griff:focus-visible { color: var(--text); background: var(--accent-soft); outline: none; }
body.dnd-aktiv,
body.dnd-aktiv * { cursor: grabbing !important; user-select: none; }
li.dnd-zieht > .settings-button-row {
    background: var(--surface);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-sm);
    position: relative;
    z-index: 5;
}
.dnd-hinweis {
    position: fixed;
    left: 50%;
    bottom: calc(84px + env(safe-area-inset-bottom));
    transform: translate(-50%, 12px);
    background: var(--text);
    color: var(--bg);
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.85rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 2000;
}
.dnd-hinweis.sichtbar { opacity: 1; transform: translate(-50%, 0); }
.dnd-hinweis.fehler { background: var(--danger); color: #fff; }

/* ---------- Heimnetz: Verlauf je Gerät ---------- */
.hn-verlauf {
    width: 100%;
    max-width: 760px;
    margin: 3rem auto 0;
}
.hn-verlauf-liste {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--border);
}
.hn-verlauf-zeile {
    display: grid;
    grid-template-columns: 170px 1fr 8.5rem;
    text-align: left;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border);
}
.hn-verlauf-name {
    display: flex;
    flex-direction: column;
    font-weight: 500;
    min-width: 0;
}
.hn-verlauf-name small {
    font-weight: 400;
    font-size: 0.78rem;
    color: var(--text-muted);
}
.hn-verlauf-name small.hn-aus { color: var(--danger); }
.hn-balken {
    position: relative;
    height: 10px;
    border-radius: 5px;
    background: repeating-linear-gradient(90deg, var(--border) 0 1px, transparent 1px calc(100% / 7));
    box-shadow: inset 0 0 0 1px var(--border);
    overflow: hidden;
}
.hn-abschnitt {
    position: absolute;
    top: 0;
    bottom: 0;
}
.hn-abschnitt.an { background: var(--c3, var(--ok)); }
.hn-abschnitt.aus { background: repeating-linear-gradient(135deg, var(--danger) 0 2px, transparent 2px 5px); opacity: 0.7; }
.hn-verlauf-zahl {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}
.hn-verlauf-achse {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--text-muted);
    padding: 0.4rem 0 0;
    margin-left: calc(170px + 1rem);
    margin-right: calc(8.5rem + 1rem);
}
@media (max-width: 600px) {
    .hn-verlauf-zeile { grid-template-columns: 1fr auto; row-gap: 0.4rem; }
    .hn-balken { grid-column: 1 / -1; grid-row: 2; }
    .hn-verlauf-achse { margin: 0; }
}

/* ---------- E-Mail-Vorlagen: Vorschau ---------- */
.mail-vorlage-pruefen {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}
.mail-vorlage-pruefen .add-form-toggle-btn { flex: 1 1 auto; }
.mail-vorschau {
    margin-top: 1rem;
    border-top: 1px solid var(--border);
    padding-top: 0.8rem;
}
.mail-vorschau-betreff {
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0 0 0.5rem;
}
.mail-vorschau iframe {
    width: 100%;
    height: 420px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
}

/* ---------- Vertraute Geräte: das eigene Gerät ---------- */
.geraete-eintrag.ist-dieses { box-shadow: inset 2px 0 0 var(--accent); padding-left: 0.75rem; }
.geraete-badge-dieses { background: var(--accent-soft); color: var(--accent); }

/* ---------- Push-Benachrichtigungen ---------- */
.push-themen { display: flex; flex-direction: column; gap: 0.45rem; }
.push-themen label { display: flex; align-items: center; gap: 0.55rem; font-size: 0.92rem; }
.push-geraete { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.push-geraete li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--border);
}
.push-geraete li > span { display: flex; flex-direction: column; gap: 2px; }
.push-geraete small { color: var(--text-muted); font-size: 0.78rem; }

/* ---------- Einstellungen: Listen (Buttons, Gruppen, Tankstellen) ---------- */
.settings-button-list {
    gap: 0;
    border-top: 1px solid var(--border);
}
.settings-button-row-wrap {
    background: none;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    overflow: visible;
}
.settings-button-row { padding: 0.65rem 0.25rem; }
.settings-thumb { background: none; }
.settings-row-title { font-weight: 500; }
.settings-badge {
    font-weight: 500;
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
}
.settings-badge-gruppe { color: var(--accent); border-color: var(--accent-soft); }
.icon-btn {
    background: none;
    border-color: transparent;
    border-radius: 50%;
    color: var(--text-muted);
}
.icon-btn:hover:not(:disabled) {
    background: var(--accent-soft);
    border-color: transparent;
    color: var(--accent);
}
.icon-btn-danger:hover:not(:disabled) { background: var(--danger-soft); color: var(--danger); }
.edit-toggle:checked ~ .settings-edit-panel { background: var(--surface); border-radius: var(--radius-sm); }
.settings-untergruppe-titel { margin-top: 1.1rem; }

/* ---------- Tanken: Auswertung einmal oben ---------- */
.tank-ueberblick {
    max-width: 760px;
    margin: 0 auto 1.5rem;
}
.tank-ueberblick-titel {
    font-size: 1.15rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    margin: 0 0 0.9rem;
}
.tank-ueberblick-titel span { color: var(--text-muted); font-weight: 400; }
.tank-ueberblick .tank-auswertung > * { margin-top: 0.75rem; }

/* Aktuelle Seite im „Mehr"-Menü markieren */
.bottom-more-item.is-active { color: var(--accent); font-weight: 600; }

/* ---------- Desktop-Menü: „Mehr ▾" (Datenmatrix, Gast-WLAN) ---------- */
.nav-mehr { position: relative; }
.nav-mehr summary {
    list-style: none;
    cursor: pointer;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-muted);
    padding: 6px 0;
    user-select: none;
}
.nav-mehr summary::-webkit-details-marker { display: none; }
.nav-mehr summary::after { content: ' ▾'; font-size: 0.75em; }
.nav-mehr summary:hover,
.nav-mehr summary.active { color: var(--text); }
.nav-mehr summary.active { box-shadow: inset 0 -2px 0 var(--accent); }
.nav-mehr-liste {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    min-width: 170px;
    display: flex !important;
    flex-direction: column;
    align-items: stretch !important;
    gap: 0 !important;
    padding: 6px !important;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    z-index: 300;
}
.nav-mehr-liste a {
    display: block;
    padding: 8px 12px !important;
    border-radius: var(--radius-sm);
}
.nav-mehr-liste a::after { display: none; }
.nav-mehr-liste a:hover,
.nav-mehr-liste a.active { background: var(--accent-soft); }
@media (min-width: 1000px) and (pointer: fine), (min-width: 1500px) {
    .main-nav ul { gap: 1.25rem; }
}
/* Maus-Geräte mit mittelbreitem Fenster: Eichhörnchen neben „SaMe99" statt in
   der Mitte, damit das Menü oben Platz hat (siehe RESPONSIVE in style.css). */
@media (min-width: 1000px) and (max-width: 1450px) and (pointer: fine) {
    .main-header { justify-content: flex-start; padding-left: 1.5rem; padding-right: 1.5rem; }
    .centered-header-image {
        position: static;
        transform: none;
        margin-left: 12px;
        max-height: 28px;
    }
    .main-nav { margin-left: auto; }
    .main-nav ul { gap: 1rem; }
}

/* =======================================
   Einstellungen: einheitliche Knöpfe, Felder, Meldungen (18.11.2026)
   Hauptaktion = gefüllt (Speichern, Anlegen, Einrichten, Hochladen …)
   Nebenaktion = Umriss (Test, Sichern, Ein-/Ausklappen …)
   ======================================= */
.login-btn,
.mfa-setup-btn.mfa-setup-btn-primary:not(.add-form-toggle-btn) {
    background: var(--accent);
    color: var(--on-accent, #fff);
    border: 1px solid var(--accent);
    border-radius: 999px;
    font-family: inherit;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 11px 22px;
    box-shadow: none;
}
.login-btn:hover,
.mfa-setup-btn.mfa-setup-btn-primary:not(.add-form-toggle-btn):hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: var(--on-accent, #fff);
}
.mfa-setup-btn:not(.mfa-setup-btn-primary),
.mfa-setup-btn.add-form-toggle-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
    font-weight: 500;
}
.mfa-setup-btn:not(.mfa-setup-btn-primary):hover,
.mfa-setup-btn.add-form-toggle-btn:hover {
    background: none;
    border-color: var(--accent);
    color: var(--accent);
}
.mfa-setup-btn:disabled,
.login-btn:disabled { opacity: 0.5; cursor: default; }
.geraete-loeschen-btn:hover { border-color: var(--danger) !important; color: var(--danger) !important; }
/* Ausklapp-Knopf, dessen Karte gerade offen ist */
.add-form-toggle-btn.ist-offen,
.add-form-toggle-btn.ist-offen:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}
/* Mehrere Knöpfe nebeneinander */
.mail-vorlage-pruefen .mfa-setup-btn,
.push-knoepfe .mfa-setup-btn {
    width: auto;
    flex: 1 1 auto;
    margin-top: 0;
}
.push-knoepfe { margin-top: 1rem; flex-wrap: wrap; }

/* Felder: Beschriftung ruhiger, Abstand zwischen den Feldgruppen */
.settings-form label { font-weight: 500; }
.mail-methode-bereich:not([hidden]),
.mail-vorlage-bereich:not([hidden]) {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.settings-form-card input:focus,
.settings-form-card select:focus,
.settings-form-card textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Umschalter OAuth2 / App-Passwort: Segment-Schalter */
.mail-methode-wahl {
    display: flex;
    gap: 3px;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: 999px;
    margin-bottom: 0.75rem;
}
.mail-methode-wahl .mail-methode-btn {
    border: 0;
    border-radius: 999px;
    background: none;
    font-weight: 500;
    padding: 9px 14px;
}
.mail-methode-wahl .mail-methode-btn.is-active {
    background: var(--accent-soft);
    color: var(--accent);
}
/* Auswahl der Vorlage: Chips */
.mail-vorlagen-wahl .mail-methode-btn {
    border: 1px solid var(--border);
    border-radius: 999px;
    background: none;
    font-weight: 500;
    padding: 7px 14px;
}
.mail-vorlagen-wahl .mail-methode-btn.is-active {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
}
.mail-vorlage-reset {
    align-self: flex-start;
    background: none;
    border: 0;
    padding: 0;
    color: var(--text-muted);
    text-decoration: underline;
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
}
.mail-vorlage-reset:hover { color: var(--accent); }
.mail-vorlage-fixblock-hinweis { background: none !important; border: 1px dashed var(--border); }
/* Quill-Editor an die Farbwelt anpassen (auch dunkel) */
.settings-form-card .ql-toolbar.ql-snow,
.settings-form-card .ql-container.ql-snow { border-color: var(--border); }
.settings-form-card .ql-toolbar.ql-snow {
    background: var(--surface-alt);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.settings-form-card .ql-snow .ql-stroke { stroke: var(--text); }
.settings-form-card .ql-snow .ql-fill { fill: var(--text); }
.settings-form-card .ql-snow .ql-picker { color: var(--text); }
.settings-form-card .ql-editor { color: var(--text); }
.settings-form-card .ql-editor.ql-blank::before { color: var(--text-muted); }

/* Verbindungsstatus Google */
.mail-oauth-status {
    background: none;
    padding: 0;
    font-weight: 500;
    font-size: 0.9rem;
}
.mail-oauth-status::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    flex: 0 0 auto;
}
.mail-oauth-status-ok { background: none; color: var(--ok); }

/* Meldungen in Karten: linksbündig, volle Breite, feiner Rand links */
.settings-form-card .settings-meldung,
.settings-list .settings-meldung,
.settings-meldung.dl-meldung {
    max-width: none;
    margin: 0 0 1rem;
    text-align: left;
    border-left: 3px solid currentColor;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.settings-meldung.dl-meldung { max-width: 640px; margin: 0 auto 1rem; }

/* Listen „Vorhandene …" (Benutzer, Tankstellen, Buttons) wie die Karten */
.settings-list {
    max-width: 640px;
    margin: 0 auto 1.5rem;
    border-top: 1px solid var(--border);
    padding-top: 1.75rem;
}
.settings-list h2 {
    text-align: left;
    font-size: 1.15rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}
.settings-empty { text-align: left; }
.user-liste {
    gap: 0;
    border-top: 1px solid var(--border);
}
.user-card {
    background: none;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    padding: 0.9rem 0.25rem;
}
.user-mini-btn { background: none; font-weight: 500; }
.user-mini-btn:hover { border-color: var(--accent); color: var(--accent); background: none; }
.user-mini-btn-danger:hover { border-color: var(--danger); color: var(--danger); }
.user-edit-panel { background: var(--surface); border-radius: var(--radius-sm); border-top: 0; padding: 0.9rem 1rem; }
/* Rechte-Auswahl in zwei Spalten, wenn Platz ist */
@media (min-width: 640px) {
    .user-rechte-checks { display: grid !important; grid-template-columns: 1fr 1fr; gap: 0.35rem 1.25rem; }
}
.user-rechte-checks > p { grid-column: 1 / -1; }

/* ---------- Einstellungen: Übersicht + Unterseiten ---------- */
.einst-suche, .einst-gruppe, .einst-kopf, .einst-aktionen, #einst-suche-leer {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}
.einst-suche {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.6rem 1rem;
    background: var(--surface);
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}
.einst-suche:focus-within { border-color: var(--accent); }
.einst-suche input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: none;
    outline: none;
    padding: 0;
    font: inherit;
    color: var(--text);
}
.einst-suche input::-webkit-search-cancel-button { cursor: pointer; }
.einst-gruppe { margin-bottom: 1.75rem; }
.einst-gruppe[hidden], .einst-liste li[hidden] { display: none; }
.einst-gruppe-titel {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin: 0 0 0.35rem 0.25rem;
}
.einst-liste { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.einst-liste li { border-bottom: 1px solid var(--border); }
.einst-zeile {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-height: 50px;
    padding: 0.7rem 0.25rem;
    color: var(--text);
    text-decoration: none;
}
.einst-zeile:hover { color: var(--accent); }
.einst-zeile:hover .einst-zeile-pfeil { transform: translateX(2px); }
.einst-zeile-icon { flex: 0 0 auto; font-size: 1.25rem; color: var(--text-muted); }
.einst-zeile-name { flex: 1 1 auto; min-width: 0; }
.einst-zeile-wert {
    max-width: 45%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.88rem;
    color: var(--text-muted);
}
.einst-zeile-wert.ist-ok { color: var(--ok); }
.einst-zeile-wert.ist-warn { color: var(--danger); }
.einst-zeile-pfeil { flex: 0 0 auto; color: var(--text-muted); opacity: 0.6; transition: transform 0.15s; }

.einst-kopf { margin-bottom: 1.25rem; }
.einst-zurueck {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: none;
}
.einst-zurueck:hover { color: var(--accent); }
.einst-kopf h2 {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin: 0.4rem 0 0.5rem;
    font-size: 1.6rem;
    font-weight: 300;
    letter-spacing: -0.01em;
}
.einst-aktionen { margin-bottom: 1.25rem; }
.einst-aktionen .add-form-toggle-btn { width: auto; }

.info-knopf {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin-left: 0.2rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--text-muted);
    font-size: 1.05rem;
    vertical-align: middle;
    cursor: pointer;
}
.info-knopf:hover, .info-knopf.ist-offen { color: var(--accent); background: var(--accent-soft); }
.erklaerung {
    background: var(--accent-soft);
    border-radius: 10px;
    padding: 0.7rem 0.9rem;
    color: var(--text) !important;
    font-size: 0.9rem;
    line-height: 1.5;
}
.erklaerung[hidden] { display: none !important; }
.einst-toast {
    position: fixed;
    left: 50%;
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 1000;
    max-width: min(92vw, 480px);
    padding: 0.7rem 1.1rem;
    border-radius: 999px;
    background: var(--text);
    color: var(--bg);
    font-size: 0.9rem;
    box-shadow: var(--shadow-lg);
    transition: opacity 0.4s;
}
.einst-toast.ist-fehler { background: var(--danger); color: #fff; }
.einst-toast.weg { opacity: 0; }
@media (pointer: fine) and (min-width: 1000px), (min-width: 1500px) { .einst-toast { bottom: 2rem; } }

/* ---------- Downloads: Suche + Hochladen in einer Leiste ---------- */
.dl-leiste {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 700px;
    margin: 0 auto 1.25rem;
}
.dl-leiste .dl-search-wrap { flex: 1 1 auto; margin: 0; min-width: 0; }
.dl-upload-form { margin: 0 0 0 auto; flex: 0 0 auto; }
.dl-upload-knopf {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    background: var(--accent);
    color: var(--on-accent);
    font-weight: 500;
    font-size: 0.95rem;
    white-space: nowrap;
    cursor: pointer;
}
.dl-upload-knopf:hover { background: var(--accent-hover); }
.dl-upload-knopf input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.dl-upload-form.laedt .dl-upload-knopf { opacity: 0.7; pointer-events: none; }
.dl-upload-form.mit-js .dl-upload-senden { display: none; }
.dl-upload-senden { margin-left: 0.5rem; }
.dl-ablage {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--header-rgb), 0.85);
    pointer-events: none;
}
.dl-ablage[hidden] { display: none; }
.dl-ablage div {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    padding: 2rem 3rem;
    border: 2px dashed var(--accent);
    border-radius: 18px;
    color: var(--accent);
    font-size: 1.1rem;
}
.dl-ablage .ti { font-size: 2.2rem; }

/* ---------- Tanken: aufgeräumt (eine Zeile je Station, Rest zuklappbar) ---------- */
.tank-empfehlung, .tank-liste, .tank-mehr, .tank-fuss {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}
.tank-empfehlung {
    margin-bottom: 1.25rem;
    padding: 0.1rem 0 0.1rem 0.9rem;
    border-left: 2px solid var(--border);
    font-weight: 500;
}
.tank-empfehlung.ist-gut { border-left-color: var(--ok); color: var(--ok); }
.tank-empfehlung[hidden] { display: none; }
.tank-liste { border-top: 1px solid var(--border); margin-bottom: 1.5rem; }
.tank-zeile { border-bottom: 1px solid var(--border); }
.tank-zeile > summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 56px;
    padding: 0.75rem 0.25rem;
    list-style: none;
    cursor: pointer;
}
.tank-zeile > summary::-webkit-details-marker { display: none; }
.tank-zeile-name {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    font-weight: 500;
}
.tank-zeile-status { font-size: 0.8rem; font-weight: 400; background: none !important; padding: 0 !important; border: 0 !important; align-self: flex-start; }
.tank-zeile-status.tank-status-zu { color: var(--danger); }
.tank-zeile-status.tank-status-unbekannt { color: var(--text-muted); }
.tank-zeile-preis {
    font-size: 1.35rem;
    font-weight: 300;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}
.tank-zeile.ist-beste .tank-zeile-preis { color: var(--accent); font-weight: 400; }
.tank-zeile-pfeil { color: var(--text-muted); transition: transform 0.2s; }
.tank-zeile[open] .tank-zeile-pfeil, .tank-mehr[open] > summary .ti { transform: rotate(180deg); }
.tank-zeile-inhalt { padding: 0 0.25rem 1.25rem; }
.tank-zeile-sorten {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.tank-zeile-sorten strong { color: var(--text); font-weight: 500; margin-left: 0.3rem; }
.tank-zeile-inhalt .tank-chart { margin-top: 1rem; }
.tank-zeile-inhalt .tank-guenstigster { margin-top: 0.75rem; }
.tank-zeile-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.25rem;
    margin-top: 0.75rem;
    font-size: 0.9rem;
}
.tank-zeile-links a { color: var(--accent); text-decoration: none; }
.tank-zeile-links .tank-verlauf-link { padding: 0; margin: 0; width: auto; }
.tank-zeile.tank-skeleton { padding: 1.1rem 0; }
.tank-mehr { margin-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.tank-mehr[hidden] { display: none; }
.tank-mehr > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 0.25rem;
    list-style: none;
    cursor: pointer;
    font-weight: 500;
}
.tank-mehr > summary::-webkit-details-marker { display: none; }
.tank-mehr > summary span span { color: var(--text-muted); font-weight: 400; }
.tank-mehr > summary .ti { color: var(--text-muted); transition: transform 0.2s; }
.tank-mehr .tank-auswertung { padding: 0 0.25rem 1.25rem; }
.tank-mehr .tank-auswertung > * { margin-top: 0.75rem; }
.tank-fuss {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}
.tank-fuss a { color: inherit; }

/* Einstellungen → Tankbuch: Verbindungstest */
.tb-testliste { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.9rem; word-break: break-word; }
.tb-testliste li.ist-ok { color: var(--ok); }
.tb-testliste li.ist-fehler { color: var(--danger); }
