/* ==================================================================
   Menu Mage – Main Stylesheet
   ==================================================================
   Modern AI/SaaS Theme – Indigo Monochrome
   - Background: Indigo-tinted Off-White (Light) / Indigo-tinted Near-Black (Dark)
   - Primary: Indigo #645AFF · Accent: Lighter Indigo (monochrom)
   - Fonts: Fraunces (headings, serif) · Inter (body, sans-serif)
   - Light/Dark via prefers-color-scheme + [data-theme]-override
   - WCAG-AA-konforme Kontraste (>= 4.5:1 für Body, >= 3:1 für Large)
   ================================================================== */


/* =============================================================
   1. CSS-VARIABLEN (Design Tokens)
   ============================================================= */

:root {
    /* ── Brand (Indigo monochrom) ───────────────── */
    --primary:                #645AFF;            /* Brand Indigo */
    --primary-hover:          #5249E8;
    --primary-active:         #4640C8;
    --primary-soft:           #EEEDFE;            /* sehr helles Indigo */
    --primary-foreground:     #FFFFFF;

    --secondary:              #C9C5DD;            /* helles Indigo-Grau */
    --secondary-hover:        #B5B0D0;
    --secondary-foreground:   #1A1727;

    --accent:                 #8B82FF;            /* helleres Indigo (Akzent) */
    --accent-hover:           #756BFF;
    --accent-foreground:      #FFFFFF;

    /* ── Surfaces / Background (subtile Indigo-Tönung) ─ */
    --background:             #FAFAFC;            /* Off-White mit Indigo-Tint */
    --surface:                #FFFFFF;            /* Card-Hintergrund */
    --surface-elevated:       #FFFFFF;
    --surface-muted:          #F4F3F8;
    --muted:                  #EDECF3;
    --muted-foreground:       #6B6880;

    /* ── Text ────────────────────────────────────── */
    --foreground:             #1A1727;            /* Dark Indigo */
    --foreground-soft:        #2D2A3D;
    --foreground-subtle:      #56536B;

    /* ── Borders & Inputs ────────────────────────── */
    --border:                 #E4E2EE;
    --border-strong:          #C9C5DD;
    --input:                  #E4E2EE;
    --input-bg:               #FFFFFF;
    --input-foreground:       #1A1727;
    --ring:                   #645AFF;

    /* ── Status (Light) ──────────────────────────── */
    --success:                #15803D;
    --success-bg:             #ECFDF5;
    --success-border:         #A7F3D0;

    --warning:                #B45309;
    --warning-bg:             #FFFBEB;
    --warning-border:         #FCD34D;

    --destructive:            #DC2626;
    --destructive-hover:      #B91C1C;
    --destructive-bg:         #FEF2F2;
    --destructive-border:     #FCA5A5;
    --destructive-foreground: #FFFFFF;

    --info:                   #2563EB;
    --info-bg:                #EFF6FF;
    --info-border:            #BFDBFE;

    /* ── Shadows (Indigo-tinted, dezent) ────────── */
    --shadow-xs:  0 1px 2px hsl(245 30% 15% / 0.05);
    --shadow-sm:  0 1px 3px hsl(245 30% 15% / 0.08), 0 1px 2px hsl(245 30% 15% / 0.04);
    --shadow:     0 4px 12px hsl(245 30% 15% / 0.08), 0 2px 4px hsl(245 30% 15% / 0.05);
    --shadow-md:  0 8px 20px hsl(245 30% 15% / 0.10), 0 4px 8px hsl(245 30% 15% / 0.06);
    --shadow-lg:  0 16px 40px hsl(245 30% 15% / 0.12), 0 6px 12px hsl(245 30% 15% / 0.08);
    --shadow-xl:  0 24px 60px hsl(245 30% 15% / 0.15);
    --shadow-focus: 0 0 0 3px hsl(245 100% 67% / 0.25);

    /* ── Radius ──────────────────────────────────── */
    --radius-xs:  0.25rem;
    --radius-sm:  0.5rem;
    --radius:     0.75rem;
    --radius-md:  1rem;
    --radius-lg:  1.5rem;
    --radius-xl:  2rem;
    --radius-full: 9999px;

    /* ── Typografie ──────────────────────────────── */
   /* --font-heading: 'Fraunces', 'Georgia', 'Times New Roman', serif;*/
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono:    'JetBrains Mono', 'Fira Code', ui-monospace, monospace;

    --fs-xs:    0.75rem;     /* 12 px */
    --fs-sm:    0.875rem;    /* 14 px */
    --fs-base:  1rem;        /* 16 px */
    --fs-lg:    1.125rem;    /* 18 px */
    --fs-xl:    1.25rem;     /* 20 px */
    --fs-2xl:   1.5rem;      /* 24 px */
    --fs-3xl:   2rem;        /* 32 px */
    --fs-4xl:   2.5rem;      /* 40 px */
    --fs-5xl:   3.25rem;     /* 52 px */

    /* ── Layout ──────────────────────────────────── */
    --container-max: 1280px;
    --header-height: 4.5rem;

    /* ── Transitions ─────────────────────────────── */
    --transition-fast: 120ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition:      200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 320ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   2. DARK MODE (auto + manueller Override)
   ============================================================ */

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --background:           #0E0D14;
        --surface:              #16151E;
        --surface-elevated:     #1E1D2A;
        --surface-muted:        #1A1923;
        --muted:                #221F30;
        --muted-foreground:     #9C99B0;

        --foreground:           #F4F2FA;
        --foreground-soft:      #D8D4E5;
        --foreground-subtle:    #9C99B0;

        --primary:              #7770FF;
        --primary-hover:        #8B82FF;
        --primary-active:       #A29BFF;
        --primary-soft:         #2A2640;
        --primary-foreground:   #0E0D14;

        --secondary:            #2A283A;
        --secondary-hover:      #3D3B52;
        --secondary-foreground: #F4F2FA;

        --accent:               #A29BFF;
        --accent-hover:         #B8B2FF;
        --accent-foreground:    #0E0D14;

        --border:               #2A283A;
        --border-strong:        #3D3B52;
        --input:                #2A283A;
        --input-bg:             #16151E;
        --input-foreground:     #F4F2FA;
        --ring:                 #8B82FF;

        --success:              #34D399;
        --success-bg:           #064E3B;
        --success-border:       #047857;

        --warning:              #FBBF24;
        --warning-bg:           #422006;
        --warning-border:       #B45309;

        --destructive:          #F87171;
        --destructive-hover:    #FB7185;
        --destructive-bg:       #450A0A;
        --destructive-border:   #B91C1C;
        --destructive-foreground: #FFFFFF;

        --info:                 #60A5FA;
        --info-bg:              #1E3A8A;
        --info-border:          #2563EB;

        --shadow-xs: 0 1px 2px hsl(0 0% 0% / 0.40);
        --shadow-sm: 0 1px 3px hsl(0 0% 0% / 0.45), 0 1px 2px hsl(0 0% 0% / 0.30);
        --shadow:    0 4px 12px hsl(0 0% 0% / 0.50), 0 2px 4px hsl(0 0% 0% / 0.30);
        --shadow-md: 0 8px 20px hsl(0 0% 0% / 0.55), 0 4px 8px hsl(0 0% 0% / 0.35);
        --shadow-lg: 0 16px 40px hsl(0 0% 0% / 0.60), 0 6px 12px hsl(0 0% 0% / 0.40);
        --shadow-xl: 0 24px 60px hsl(0 0% 0% / 0.70);
        --shadow-focus: 0 0 0 3px hsl(245 100% 75% / 0.35);
    }
}

/* Manueller Dark-Mode-Override (überschreibt System-Setting) */
[data-theme="dark"] {
    --background:           #0E0D14;
    --surface:              #16151E;
    --surface-elevated:     #1E1D2A;
    --surface-muted:        #1A1923;
    --muted:                #221F30;
    --muted-foreground:     #9C99B0;

    --foreground:           #F4F2FA;
    --foreground-soft:      #D8D4E5;
    --foreground-subtle:    #9C99B0;

    --primary:              #7770FF;
    --primary-hover:        #8B82FF;
    --primary-active:       #A29BFF;
    --primary-soft:         #2A2640;
    --primary-foreground:   #0E0D14;

    --secondary:            #2A283A;
    --secondary-hover:      #3D3B52;
    --secondary-foreground: #F4F2FA;

    --accent:               #A29BFF;
    --accent-hover:         #B8B2FF;
    --accent-foreground:    #0E0D14;

    --border:               #2A283A;
    --border-strong:        #3D3B52;
    --input:                #2A283A;
    --input-bg:             #16151E;
    --input-foreground:     #F4F2FA;
    --ring:                 #8B82FF;

    --success:              #34D399;
    --success-bg:           #064E3B;
    --success-border:       #047857;

    --warning:              #FBBF24;
    --warning-bg:           #422006;
    --warning-border:       #B45309;

    --destructive:          #F87171;
    --destructive-hover:    #FB7185;
    --destructive-bg:       #450A0A;
    --destructive-border:   #B91C1C;
    --destructive-foreground: #FFFFFF;

    --info:                 #60A5FA;
    --info-bg:              #1E3A8A;
    --info-border:          #2563EB;

    --shadow-xs: 0 1px 2px hsl(0 0% 0% / 0.40);
    --shadow-sm: 0 1px 3px hsl(0 0% 0% / 0.45), 0 1px 2px hsl(0 0% 0% / 0.30);
    --shadow:    0 4px 12px hsl(0 0% 0% / 0.50), 0 2px 4px hsl(0 0% 0% / 0.30);
    --shadow-md: 0 8px 20px hsl(0 0% 0% / 0.55), 0 4px 8px hsl(0 0% 0% / 0.35);
    --shadow-lg: 0 16px 40px hsl(0 0% 0% / 0.60), 0 6px 12px hsl(0 0% 0% / 0.40);
    --shadow-xl: 0 24px 60px hsl(0 0% 0% / 0.70);
    --shadow-focus: 0 0 0 3px hsl(245 100% 75% / 0.35);
}


/* ============================================================
   3. RESET & BASE
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

html {
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--secondary-hover) var(--secondary);
}

body {
    font-family: var(--font-body);
    font-size: var(--fs-base);
    line-height: 1.6;
    color: var(--foreground);
    background-color: var(--background);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color var(--transition), color var(--transition);
    min-width: 18rem;
}

img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }

a { color: var(--primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--primary-hover); text-decoration: underline; }

::selection { background: var(--primary-soft); color: var(--foreground); }

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

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


/* ============================================================
   4. TYPOGRAFIE
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    color: var(--foreground);
    margin-bottom: 0.5em;
    letter-spacing: -0.01em;
}

h1 { font-size: var(--fs-4xl); font-weight: 700; }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); }
h5 { font-size: var(--fs-lg); }
h6 { font-size: var(--fs-base); }

p { margin-bottom: 1em; color: var(--foreground-soft); }
p:last-child { margin-bottom: 0; }

small { font-size: var(--fs-sm); color: var(--muted-foreground); }
strong, b { font-weight: 600; color: var(--foreground); }
code, pre, kbd, samp { font-family: var(--font-mono); font-size: 0.9em; }
code {
    background: var(--muted);
    padding: 0.15em 0.4em;
    border-radius: var(--radius-xs);
    border: 1px solid var(--border);
    color: var(--foreground);
}
pre {
    background: var(--surface);
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow-x: auto;
}
pre code { background: none; padding: 0; border: 0; }

hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 1.5rem 0;
}

ul, ol { padding-left: 1.5rem; margin-bottom: 1em; }
li { margin-bottom: 0.25em; }


/* ============================================================
   5. LAYOUT
   ============================================================ */

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.25rem;
}

.main-content {
    flex: 1 0 auto;
    padding: 2rem 0 4rem;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}
.page-header h1 { margin-bottom: 0; }
.page-header-actions { display: flex; gap: 0.625rem; flex-wrap: wrap; }

.section { padding: 4rem 0; }
.section-sm { padding: 2rem 0; }
.section-lg { padding: 6rem 0; }

.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }


/* ============================================================
   6. SITE HEADER & NAVIGATION
   ============================================================ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--background);
    border-bottom: 1px solid var(--border);
    backdrop-filter: saturate(180%) blur(8px);
    -webkit-backdrop-filter: saturate(180%) blur(8px);
}

.header-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.25rem;
    height: var(--header-height);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: var(--fs-xl);
    color: var(--foreground);
    text-decoration: none;
    flex-shrink: 0;
}
.header-logo:hover { text-decoration: none; color: var(--primary); }
.logo-icon {
    width: 1.875rem;          /* ~30 px – Header-Logo */
    height: 1.875rem;
    object-fit: contain;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
    margin-right:-0.25rem;
}
.logo-text { 
    letter-spacing: -0.05em;
    font-size: 1.3rem;
}

.header-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: transparent;
    cursor: pointer;
    margin-left: auto;
    transition: background var(--transition-fast);
}
.header-burger:hover { background: var(--muted); }
.header-burger span {
    display: block;
    width: 1.25rem;
    height: 2px;
    background: var(--foreground);
    margin: 0 auto;
    transition: transform var(--transition);
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex: 1 1 auto;
    overflow: hidden;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 0.95rem;
    color: var(--foreground-soft);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: var(--fs-sm);
    white-space: nowrap;
    transition: background var(--transition-fast), color var(--transition-fast);
}
.nav-link:hover { background: var(--muted); color: var(--foreground); text-decoration: none; }
.nav-link.active {
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex-shrink: 0;
    margin-left: auto;
}


/* ── Sprachschalter ─────────────────────────────── */
.lang-switch {
    display: inline-flex;
    background: var(--muted);
    border-radius: var(--radius-full);
    padding: 0.2rem;
}
.lang-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 1.85rem;
    padding: 0 0.7rem;
    border-radius: var(--radius-full);
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--muted-foreground);
    text-decoration: none;
    transition: background var(--transition-fast), color var(--transition-fast);
}
.lang-btn:hover { color: var(--foreground); text-decoration: none; }
.lang-btn.active {
    background: var(--background);
    color: var(--primary);
    box-shadow: var(--shadow-xs);
}


/* ── User-Menü ─────────────────────────────────── */
.user-menu { position: relative; }
.user-menu-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.5rem 0.3rem 0.3rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}
.user-menu-trigger:hover { background: var(--muted); border-color: var(--border-strong); }

.user-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-full);
    object-fit: cover;
    background: var(--primary-soft);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}
.user-avatar-fallback {
    background: var(--primary);
    color: white;
}

.user-name {
    font-size: var(--fs-sm);
    font-weight: 500;
    max-width: 8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-menu-caret {
    color: var(--muted-foreground);
    font-size: 0.75rem;
    transition: transform var(--transition-fast);
}
.user-menu-trigger[aria-expanded="true"] .user-menu-caret { transform: rotate(180deg); }

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 13rem;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 0.4rem;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
    z-index: 110;
}
.user-menu-dropdown.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.user-menu-dropdown a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--foreground);
    text-decoration: none;
    border-radius: var(--radius-xs);
    font-size: var(--fs-sm);
    transition: background var(--transition-fast);
}
.user-menu-dropdown a:hover { background: var(--muted); text-decoration: none; }
.user-menu-divider {
    height: 1px;
    background: var(--border);
    margin: 0.4rem 0;
}


/* ── Mobile-Sektionen im Burger-Menü (auf Desktop ausgeblendet) ─── */
.header-nav .nav-mobile-section {
    display: none;
}
/* Aktivierung erfolgt im Responsive-Block (≤ 900 px). */


/* ============================================================
   7. SITE FOOTER
   ============================================================ */

.site-footer {
    flex-shrink: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    margin-top: auto;
    padding: 3rem 0 1.5rem;
    color: var(--foreground-soft);
}
.footer-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.25rem;
}
.footer-top {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2.5rem;
}
.footer-col h3.footer-heading {
    font-family: var(--font-body);
    font-size: var(--fs-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--foreground);
    margin-bottom: 0.85rem;
}
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: var(--fs-xl);
    color: var(--foreground);
    margin-bottom: 0.65rem;
}
.footer-logo .logo-icon {
    width: 2.5rem;            /* ~40 px – Footer-Logo */
    height: 2.5rem;
}
.footer-tagline {
    color: var(--muted-foreground);
    font-size: var(--fs-sm);
    max-width: 32ch;
}
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 0.4rem; }
.footer-links a {
    color: var(--foreground-soft);
    font-size: var(--fs-sm);
    text-decoration: none;
    transition: color var(--transition-fast);
}
.footer-links a:hover { color: var(--primary); text-decoration: none; }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--fs-xs);
    color: var(--muted-foreground);
    flex-wrap: wrap;
    gap: 0.5rem;
}
.footer-version { font-family: var(--font-mono); }


/* ============================================================
   8. BUTTONS
   ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 1.1rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: var(--fs-sm);
    line-height: 1.2;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    user-select: none;
    transition:
        background var(--transition-fast),
        border-color var(--transition-fast),
        color var(--transition-fast),
        box-shadow var(--transition-fast),
        transform var(--transition-fast);
    white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:focus-visible { box-shadow: var(--shadow-focus); outline: none; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled, .btn.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none !important;
}

/* Varianten */
.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-sm);
}
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); color: white; }
.btn-primary:active:not(:disabled) { background: var(--primary-active); }

.btn-secondary {
    background: var(--secondary);
    color: var(--secondary-foreground);
}
.btn-secondary:hover:not(:disabled) { background: var(--secondary-hover); color: white; }

.btn-outline {
    background: transparent;
    border-color: var(--border-strong);
    color: var(--foreground);
}
.btn-outline:hover:not(:disabled) {
    background: var(--muted);
    border-color: var(--foreground-soft);
    color: var(--foreground);
}

.btn-ghost {
    background: transparent;
    color: var(--foreground-soft);
}
.btn-ghost:hover:not(:disabled) {
    background: var(--muted);
    color: var(--foreground);
}

.btn-destructive {
    background: var(--destructive);
    color: var(--destructive-foreground);
    box-shadow: var(--shadow-sm);
}
.btn-destructive:hover:not(:disabled) { background: var(--destructive-hover); color: var(--destructive-foreground); }

.btn-link {
    background: transparent;
    color: var(--primary);
    padding: 0.25rem 0.4rem;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.btn-link:hover:not(:disabled) { color: var(--primary-hover); text-decoration: underline; }

/* Größen */
.btn-sm  { padding: 0.4rem 0.75rem; font-size: var(--fs-xs); border-radius: var(--radius-xs); }
.btn-lg  { padding: 0.85rem 1.5rem; font-size: var(--fs-base); }
.btn-xl  { padding: 1.05rem 1.85rem; font-size: var(--fs-lg); }

.btn-block { display: flex; width: 100%; }
.btn-icon {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
}
.btn-icon.btn-sm { width: 1.85rem; height: 1.85rem; }
.btn-icon.btn-lg { width: 2.75rem; height: 2.75rem; }


/* ============================================================
   9. FORMS
   ============================================================ */

.form-group { margin-bottom: 1.1rem; }
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
    gap: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--foreground);
}
.form-label .required { color: var(--destructive); margin-left: 0.15rem; }

.form-input,
.form-select,
.form-textarea {
    display: block;
    width: 100%;
    padding: 0.65rem 0.85rem;
    font-family: var(--font-body);
    font-size: var(--fs-base);
    line-height: 1.4;
    color: var(--input-foreground);
    background: var(--input-bg);
    border: 1px solid var(--input);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--muted-foreground); }

.form-input:hover,
.form-select:hover,
.form-textarea:hover { border-color: var(--border-strong); }

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--shadow-focus);
    background: var(--background);
}
.form-textarea { min-height: 7.5rem; resize: vertical; line-height: 1.5; }

.form-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%236B6880' d='M6 8L0 0h12z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    padding-right: 2.25rem;
}


.form-input.is-invalid,
.form-select.is-invalid,
.form-textarea.is-invalid {
    border-color: var(--destructive);
}
.form-input.is-invalid:focus,
.form-select.is-invalid:focus,
.form-textarea.is-invalid:focus {
    box-shadow: 0 0 0 3px hsl(0 73% 50% / 0.20);
}

.form-help { display: block; margin-top: 0.35rem; font-size: var(--fs-xs); color: var(--muted-foreground); }
.form-error { display: block; margin-top: 0.35rem; font-size: var(--fs-xs); color: var(--destructive); }

/* Checkbox & Radio */
.form-check {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    cursor: pointer;
    user-select: none;
}
.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}
.form-check-label { font-size: var(--fs-sm); color: var(--foreground); }


/* ============================================================
   10. CARDS
   ============================================================ */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}
.card:hover { box-shadow: var(--shadow); }

.card-elevated {
    background: var(--surface-elevated);
    box-shadow: var(--shadow);
}
.card-hoverable { cursor: pointer; }
.card-hoverable:hover { transform: translateY(-2px); border-color: var(--border-strong); }

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}
.card-title { font-size: var(--fs-xl); margin-bottom: 0.2rem; }
.card-description { color: var(--muted-foreground); font-size: var(--fs-sm); margin: 0; }

.card-content { padding: 1.5rem; }
.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--surface-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}


/* ============================================================
   11. TABLES
   ============================================================ */

.table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-elevated);
}
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fs-sm);
}
.table th, .table td {
    padding: 0.85rem 1rem;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
}
.table th {
    background: var(--surface-muted);
    font-weight: 600;
    color: var(--foreground);
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--muted); }
.table-striped tbody tr:nth-child(odd) { background: var(--surface-muted); }
.table-actions { white-space: nowrap; text-align: right; }


/* ============================================================
   12. BADGES
   ============================================================ */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: var(--fs-xs);
    font-weight: 600;
    line-height: 1.4;
    border: 1px solid transparent;
}
.badge-primary     { background: var(--primary-soft); color: var(--primary); border-color: var(--border-strong); }
.badge-success     { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.badge-warning     { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }
.badge-destructive { background: var(--destructive-bg); color: var(--destructive); border-color: var(--destructive-border); }
.badge-info        { background: var(--info-bg); color: var(--info); border-color: var(--info-border); }
.badge-muted       { background: var(--muted); color: var(--muted-foreground); border-color: var(--border); }

/* Allergen-Badges (kleine, runde Marker) */
.allergen-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: var(--radius-full);
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid var(--warning-border);
    font-size: 0.7rem;
    font-weight: 700;
    margin-right: 0.15rem;
}
.diet-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-xs);
    font-size: var(--fs-xs);
    font-weight: 600;
}
.diet-vegetarian { background: hsl(140 50% 95%); color: hsl(140 60% 30%); }
.diet-vegan      { background: hsl(120 50% 95%); color: hsl(120 60% 28%); }
.diet-gluten     { background: hsl(35 80% 94%); color: hsl(35 75% 30%); }
.diet-spicy      { background: hsl(8 80% 95%); color: hsl(8 75% 38%); }
[data-theme="dark"] .diet-vegetarian, [data-theme="dark"] .diet-vegan,
[data-theme="dark"] .diet-gluten, [data-theme="dark"] .diet-spicy {
    background: var(--surface-muted);
    color: var(--foreground-soft);
}


/* ============================================================
   13. ALERTS / FLASH-MESSAGES
   ============================================================ */

.flash-messages {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    margin-bottom: 1.5rem;
}
.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--foreground);
    font-size: var(--fs-sm);
    line-height: 1.5;
}
.alert > span { flex: 1; }

.alert-success     { background: var(--success-bg); border-color: var(--success-border); color: var(--success); }
.alert-warning     { background: var(--warning-bg); border-color: var(--warning-border); color: var(--warning); }
.alert-error,
.alert-destructive { background: var(--destructive-bg); border-color: var(--destructive-border); color: var(--destructive); }
.alert-info        { background: var(--info-bg); border-color: var(--info-border); color: var(--info); }

.alert-close {
    background: transparent;
    border: 0;
    color: currentColor;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    padding: 0 0.25rem;
    opacity: 0.6;
    transition: opacity var(--transition-fast);
}
.alert-close:hover { opacity: 1; }


/* ============================================================
   14. AI ASSISTANT INTRO BOX
   ============================================================ */

.ai-assistant-intro {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.4rem 1.6rem;
    margin-bottom: 1.75rem;
    background:
        linear-gradient(135deg, var(--primary-soft) 0%, var(--surface) 100%);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}
.ai-assistant-intro::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
}
[data-theme="dark"] .ai-assistant-intro {
    background: linear-gradient(135deg, var(--primary-soft) 0%, var(--surface) 100%);
    border-color: var(--border-strong);
}
.ai-assistant-icon {
    font-size: 2.5rem;
    line-height: 1;
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
}
.ai-assistant-content { flex: 1; min-width: 0; }
.ai-assistant-title {
    font-size: var(--fs-lg);
    margin-bottom: 0.35rem;
    color: var(--foreground);
}
.ai-assistant-text {
    color: var(--foreground-soft);
    margin-bottom: 0.4rem;
    line-height: 1.6;
}
.ai-assistant-tips {
    color: var(--accent);
    font-size: var(--fs-sm);
    font-style: italic;
    margin-bottom: 0;
}
.ai-assistant-close {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    background: transparent;
    border: 0;
    color: var(--muted-foreground);
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-xs);
    transition: background var(--transition-fast), color var(--transition-fast);
}
.ai-assistant-close:hover { background: var(--muted); color: var(--foreground); }


/* ============================================================
   15. AUTH-CARD (Login / Register)
   ============================================================ */

.auth-container {
    max-width: 28rem;
    margin: 3rem auto;
    padding: 0 1rem;
}
.auth-card { padding: 2rem; }
.auth-card .card-header { padding: 0; border: 0; margin-bottom: 1.5rem; text-align: center; }
.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0;
    color: var(--muted-foreground);
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-top: 1px solid var(--border);
}
.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--muted-foreground);
    font-size: var(--fs-sm);
}


/* ============================================================
   16. HERO & LANDING
   ============================================================ */

.hero {
    padding: 5rem 0 4rem;
    text-align: center;
    background:
        radial-gradient(ellipse at top, var(--primary-soft) 0%, transparent 60%),
        var(--background);
}
.hero h1 {
    font-size: clamp(2rem, 5vw, var(--fs-5xl));
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.hero-tagline {
    font-size: var(--fs-lg);
    color: var(--foreground-soft);
    max-width: 38rem;
    margin: 0 auto 2rem;
    line-height: 1.6;
}
.hero-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}


/* Pricing-Cards */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 1.5rem;
    max-width: 60rem;
    margin: 0 auto;
}
.pricing-card {
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--surface-elevated);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    position: relative;
    transition: transform var(--transition), border-color var(--transition);
}
.pricing-card.featured {
    border-color: var(--primary);
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}
.pricing-card-badge {
    position: absolute;
    top: -0.7rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.04em;
}
.pricing-name {
    font-family: var(--font-heading);
    font-size: var(--fs-xl);
    margin-bottom: 0.4rem;
}
.pricing-price {
    font-family: var(--font-heading);
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0.6rem 0;
    line-height: 1;
}
.pricing-price small {
    font-size: var(--fs-base);
    color: var(--muted-foreground);
    font-weight: 400;
    margin-left: 0.2rem;
}
.pricing-features {
    list-style: none;
    text-align: left;
    margin: 1.5rem 0;
    padding: 0;
}
.pricing-features li {
    padding: 0.45rem 0;
    color: var(--foreground-soft);
    font-size: var(--fs-sm);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}
.pricing-features li::before {
    content: '✓';
    color: var(--success);
    font-weight: 700;
    flex-shrink: 0;
}

.pricing-testmode-alert {
    max-width: 42rem;
    margin: 0 auto 2rem;
}


.pricing-cta-note {
    display: block;
    font-size: 0.85rem;
}


/* ============================================================
   17. TEMPLATE PREVIEW CARDS
   ============================================================ */

.template-card {
    cursor: pointer;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--surface-elevated);
    transition: all var(--transition);
    position: relative;
}
.template-card:hover { border-color: var(--border-strong); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.template-card.is-selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft), var(--shadow-md);
}
.template-card.is-selected::after {
    content: '✓';
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    width: 1.85rem;
    height: 1.85rem;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    z-index: 2;
}

.template-preview {
    aspect-ratio: 3 / 4;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-muted);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}
.template-preview img { width: 100%; height: 100%; object-fit: cover; }
.template-info { padding: 0.85rem 1rem; }
.template-name { font-weight: 600; margin-bottom: 0.1rem; }
.template-style {
    font-size: var(--fs-xs);
    color: var(--muted-foreground);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}


/* ============================================================
   18. UPLOAD DROPZONE
   ============================================================ */

.dropzone {
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius);
    padding: 3rem 1.5rem;
    text-align: center;
    background: var(--surface);
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition);
}
.dropzone:hover,
.dropzone.is-dragover {
    border-color: var(--primary);
    background: var(--primary-soft);
}
.dropzone-icon {
    font-size: 3rem;
    margin-bottom: 0.85rem;
    color: var(--primary);
}
.dropzone-title { font-size: var(--fs-lg); margin-bottom: 0.4rem; }
.dropzone-hint { font-size: var(--fs-sm); color: var(--muted-foreground); }


/* ============================================================
   19. PROGRESS BAR
   ============================================================ */

.progress {
    width: 100%;
    height: 0.5rem;
    background: var(--muted);
    border-radius: var(--radius-full);
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: var(--radius-full);
    transition: width var(--transition);
}
.progress-bar.is-indeterminate {
    width: 30%;
    animation: progress-indeterminate 1.5s ease-in-out infinite;
}
@keyframes progress-indeterminate {
    0%   { margin-left: -30%; }
    100% { margin-left: 100%; }
}


/* ============================================================
   20. STEP-INDICATOR (Wizard)
   ============================================================ */

.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}
.step {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-full);
    background: var(--muted);
    color: var(--muted-foreground);
    font-size: var(--fs-sm);
    font-weight: 500;
}
.step-number {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: var(--radius-full);
    background: var(--background);
    color: var(--muted-foreground);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: var(--fs-xs);
    border: 1px solid var(--border);
}
.step.is-active {
    background: var(--primary-soft);
    color: var(--primary);
}
.step.is-active .step-number { background: var(--primary); color: white; border-color: var(--primary); }
.step.is-completed .step-number { background: var(--success); color: white; border-color: var(--success); }
.step-divider { color: var(--border); font-size: 1rem; }


/* ============================================================
   21. MODAL
   ============================================================ */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: hsl(245 30% 5% / 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}
.modal-backdrop.is-open { opacity: 1; pointer-events: auto; }
.modal {
    width: 100%;
    max-width: 32rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    transform: translateY(8px) scale(0.98);
    transition: transform var(--transition);
}
.modal-backdrop.is-open .modal { transform: translateY(0) scale(1); }
.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.modal-title { font-size: var(--fs-xl); margin: 0; }
.modal-close {
    background: transparent;
    border: 0;
    cursor: pointer;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted-foreground);
    border-radius: var(--radius-xs);
    font-size: 1.4rem;
    transition: background var(--transition-fast), color var(--transition-fast);
}
.modal-close:hover { background: var(--muted); color: var(--foreground); }
.modal-body { padding: 1.5rem; }
.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--surface-muted);
    display: flex;
    justify-content: flex-end;
    gap: 0.625rem;
    flex-wrap: wrap;
}


/* ============================================================
   22. EMPTY STATES & SKELETON
   ============================================================ */

.empty-state {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--muted-foreground);
}
.empty-state-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}
.empty-state-title { color: var(--foreground); margin-bottom: 0.5rem; }
.empty-state-text { max-width: 32rem; margin: 0 auto 1.25rem; }

.skeleton {
    background: linear-gradient(90deg, var(--muted) 0%, var(--surface-muted) 50%, var(--muted) 100%);
    background-size: 200% 100%;
    border-radius: var(--radius-xs);
    animation: skeleton-shimmer 1.6s ease-in-out infinite;
    color: transparent !important;
    user-select: none;
    pointer-events: none;
}
@keyframes skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}


/* ============================================================
   23. SPINNER / LOADING
   ============================================================ */

.spinner {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: var(--radius-full);
    animation: spin 0.7s linear infinite;
}
.spinner-lg { width: 2.5rem; height: 2.5rem; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }


/* ============================================================
   24. QR-CODE & PUBLIC MENU
   ============================================================ */

.qr-display {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    padding: 1.25rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.qr-display img { width: 200px; height: 200px; }
.qr-caption {
    font-size: var(--fs-sm);
    color: var(--foreground-soft);
    text-align: center;
}


/* ============================================================
   25. UTILITIES
   ============================================================ */

.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-left   { text-align: left; }
.text-muted  { color: var(--muted-foreground); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-destructive { color: var(--destructive); }
.text-sm     { font-size: var(--fs-sm); }
.text-xs     { font-size: var(--fs-xs); }
.text-lg     { font-size: var(--fs-lg); }
.font-bold   { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.font-mono   { font-family: var(--font-mono); }
.font-heading { font-family: var(--font-heading); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }
.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }

.p-0 { padding: 0; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.w-full   { width: 100%; }
.max-w-sm { max-width: 24rem; }
.max-w-md { max-width: 32rem; }
.max-w-lg { max-width: 48rem; }

.flex         { display: flex; }
.inline-flex  { display: inline-flex; }
.flex-col     { flex-direction: column; }
.flex-wrap    { flex-wrap: wrap; }
.flex-1       { flex: 1; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.items-end    { align-items: flex-end; }
.justify-center  { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end     { justify-content: flex-end; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

.hidden    { display: none !important; }
.invisible { visibility: hidden; }
.relative  { position: relative; }
.absolute  { position: absolute; }
.sticky    { position: sticky; }

.rounded     { border-radius: var(--radius); }
.rounded-sm  { border-radius: var(--radius-sm); }
.rounded-lg  { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }
.shadow      { box-shadow: var(--shadow); }
.shadow-md   { box-shadow: var(--shadow-md); }
.shadow-lg   { box-shadow: var(--shadow-lg); }

.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}


/* ============================================================
   26. RESPONSIVE (Mobile First Adjustments)
   ============================================================ */

@media (max-width: 1024px) {
    .footer-top { grid-template-columns: 1fr 1fr; }
}

/* ── Mobile-Header & Burger-Menü (Theme/Sprache/User/Auth/Rest integriert) ─── */
@media (max-width: 900px) {

    /* — Layout-Reorder: Burger ganz rechts, Header-Actions links davor — */
    .header-container {
        gap: 0.5rem;
    }
    .header-burger {
        display: flex;
        order: 99;
        margin-left: 0;       /* Desktop-margin-left:auto entfernen */
    }
    .header-actions {
        margin-left: auto;    /* nimmt den verfügbaren Platz */
        gap: 0.4rem;
    }

    /* Desktop-Restaurant-Switcher ausblenden (wandert in das Burger-Menü) */
    .restaurant-switcher {
        display: none !important;
    }

    /* Desktop-Versionen von Theme / Sprache / User-Menü / Auth-Buttons
       ausblenden; sie wandern in das Burger-Menü. Im DOM bleiben sie
       für JS-Trigger (Theme-Toggle, Logout). */
    .header-actions > .theme-toggle,
    .header-actions > .lang-switch,
    .header-actions > .user-menu,
    .header-actions > .header-auth-btn {
        display: none !important;
    }

    /* — Burger-Hauptnav als Overlay-Dropdown — */
    .header-nav {
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--surface-elevated);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        align-items: stretch;
        padding: 0rem 0.8rem;
        gap: 0.2rem;
        max-height: 0;
        overflow: hidden;
        overflow-y: auto;
        transition: max-height var(--transition);
        box-shadow: var(--shadow-md);
        -webkit-overflow-scrolling: touch;
        z-index: 99;
    }
    .header-nav.is-open {
        max-height: calc(100vh - var(--header-height));
        overflow-y: auto;
    }
    .header-nav .nav-link {
        padding: 0.75rem 1rem;
        border-radius: var(--radius-sm);
        font-size: var(--fs-base);
    }

    /* — Mobile-Sektionen im Burger-Menü sichtbar machen
         (höhere Spezifität via .header-nav-Prefix, damit Basis-Regel
         .nav-mobile-section{display:none} sicher überschrieben wird) — */
    .header-nav .nav-mobile-section {
        display: flex;
        flex-direction: column;
        gap: 0.35rem;
        padding: 0.5rem 0.25rem;
    }
    .header-nav .nav-mobile-section + .nav-mobile-section,
    .header-nav .nav-mobile-section + .nav-link,
    .header-nav .nav-link + .nav-mobile-section {
        border-top: 1px solid var(--border);
        margin-top: 0.5rem;
        padding-top: 0.85rem;
    }

    .header-nav .nav-mobile-label {
        font-size: var(--fs-xs);
        font-weight: 600;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: var(--muted-foreground);
        padding: 0 0.25rem;
    }

    /* — Sprachschalter im Burger-Menü — */
    .header-nav .lang-switch-mobile {
        align-self: flex-start;
        padding: 0.25rem;
    }
    .header-nav .lang-switch-mobile .lang-btn {
        min-width: 3rem;
        height: 2.25rem;
        font-size: var(--fs-sm);
    }

    /* — Restaurant-Liste im Burger-Menü — */
    .nav-mobile-restaurant-list {
        display: flex;
        flex-direction: column;
        gap: 0.15rem;
    }
    .nav-mobile-restaurant-list .restaurant-switcher-item {
        padding: 0.6rem 0.7rem;
        font-size: var(--fs-base);
    }
    .nav-mobile-restaurant-list .restaurant-switcher-item-action {
        color: var(--foreground-soft);
        font-size: var(--fs-sm);
    }
    .nav-mobile-restaurant-list .restaurant-switcher-item-edit:hover,
    .nav-mobile-restaurant-list .restaurant-switcher-item-add:hover {
        background: var(--surface-muted, var(--muted));
        color: var(--primary);
        text-decoration: none;
    }

    /* — User-Block im Burger-Menü — */
    .nav-mobile-user-info {
        display: flex;
        align-items: center;
        gap: 0.7rem;
        padding: 0.4rem 0.5rem 0.5rem;
    }
    .nav-mobile-avatar {
        width: 2.5rem;
        height: 2.5rem;
        border-radius: var(--radius-full);
        object-fit: cover;
        flex-shrink: 0;
        background: var(--primary-soft);
        color: var(--primary);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        font-size: 1rem;
    }
    .nav-mobile-avatar-fallback {
        background: var(--primary);
        color: white;
    }
    .nav-mobile-user-text {
        display: flex;
        flex-direction: column;
        min-width: 0;
        line-height: 1.25;
    }
    .nav-mobile-user-name {
        font-weight: 600;
        font-size: var(--fs-base);
        color: var(--foreground);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .nav-mobile-user-email {
        font-size: var(--fs-xs);
        color: var(--muted-foreground);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .nav-mobile-user-link {
        font-weight: 500;
    }
    .nav-mobile-logout {
        color: var(--destructive);
    }
    .nav-mobile-logout:hover {
        background: var(--destructive-bg);
        color: var(--destructive);
    }

    /* — Auth-Buttons im Burger-Menü (für Gäste) — */
    .nav-mobile-auth {
        gap: 0.5rem !important;
    }
    .nav-mobile-auth-btn {
        width: 100%;
        justify-content: center;
        padding: 0.8rem 1rem;
        font-size: var(--fs-base);
    }

    /* — Theme-Toggle im Burger-Menü — */
    .nav-mobile-theme-btn {
        display: inline-flex;
        align-items: center;
        gap: 0.7rem;
        padding: 0.75rem 1rem;
        background: var(--muted);
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        color: var(--foreground);
        font-size: var(--fs-base);
        font-weight: 500;
        cursor: pointer;
        text-align: left;
        transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
    }
    .nav-mobile-theme-btn:hover {
        background: var(--surface);
        border-color: var(--border-strong);
        color: var(--primary);
    }
    .nav-mobile-theme-btn:focus-visible {
        outline: 2px solid var(--primary);
        outline-offset: 2px;
    }
    .nav-mobile-theme-icon {
        align-items: center;
        justify-content: center;
        width: 1.5rem;
        height: 1.5rem;
        flex-shrink: 0;
        color: var(--primary);
    }
    .nav-mobile-theme-icon svg {
        width: 100%;
        height: 100%;
    }
    .nav-mobile-theme-text {
        flex: 1 1 auto;
    }
}

@media (max-width: 768px) {
    h1 { font-size: var(--fs-3xl); }
    h2 { font-size: var(--fs-2xl); }
    h3 { font-size: var(--fs-xl); }

    .footer-top { grid-template-columns: 1fr; gap: 1.5rem; }
    .page-header { flex-direction: column; align-items: flex-start; }

    .ai-assistant-intro { flex-direction: column; padding: 1.1rem; }
    .ai-assistant-icon { width: 2.5rem; height: 2.5rem; font-size: 1.5rem; }

    .modal { max-width: calc(100vw - 2rem); }
    .pricing-card.featured { transform: none; }
}

@media (max-width: 480px) {
    .container { padding: 0 1rem; }
    .main-content { padding: 1.25rem 0 2rem; }
    .hero { padding: 3rem 0 2.5rem; }
    .auth-card { padding: 1.5rem; }
    .card-content { padding: 1.1rem; }
    .card-header  { padding: 1rem 1.1rem; }
}


/* ============================================================
   27. PRINT (für Speisekarten-Vorschau)
   ============================================================ */

@media print {
    .site-header,
    .site-footer,
    .ai-assistant-intro,
    .header-burger,
    .lang-switch,
    .header-actions { display: none !important; }

    body { background: white; color: black; }
    .main-content { padding: 0; }
    .card { border: 1px solid #ddd; box-shadow: none; }
    a { color: black; text-decoration: none; }
}


/* ============================================================
   28. THEME TOGGLE BUTTON
   ============================================================ */

.theme-toggle {
    position: relative;
    overflow: hidden;
}
.theme-toggle .theme-icon {
    display: inline-block;
    line-height: 1;
    transition: transform var(--transition), opacity var(--transition);
}
.theme-toggle .theme-icon-dark { display: none; }

[data-theme="dark"] .theme-toggle .theme-icon-light { display: none; }
[data-theme="dark"] .theme-toggle .theme-icon-dark { display: inline-block; }

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle .theme-icon-light { display: none; }
    :root:not([data-theme="light"]) .theme-toggle .theme-icon-dark { display: inline-block; }
}


/* ============================================================
   29. LANDING-PAGE EXTRAS
   ============================================================ */

.landing-section { padding: 4.5rem 0; }
.landing-section.landing-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.landing-section h2 {
    text-align: center;
    margin-bottom: 0.75rem;
    font-size: clamp(1.75rem, 3.5vw, var(--fs-4xl));
}
.landing-section .section-lede {
    text-align: center;
    color: var(--foreground-soft);
    font-size: var(--fs-lg);
    max-width: 42rem;
    margin: 0 auto 2.5rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 1.5rem;
}


.feature-card {
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem 1.5rem;
    transition: border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.cta-icon-area{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 13rem;
    height: auto;
    border-radius: 12px;
    padding: 4rem 0.5rem 1rem;
    margin-bottom: 1.25rem;
    overflow: hidden;
    background: #655bfd12;
    position: relative;
    box-shadow: 0px 2px 5px -2px;
    transform-style:preserve-3d;
    transition:transform 0.4s cubic-bezier(.2,.9,.3,1);
    will-change:transform;
    perspective:25rem;
}

.cta-icon{
    width: 100%;
    height: auto;
}

.cta-icon-area::before{
    background: linear-gradient(135deg, #FFF0 10%, #2C267617 20%, #FFFFFF19 50%, #2C267624 100%);
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) perspective(25rem) rotateX(0) rotateY(0) !important;
    width: 100%;
    height: 100%;
}

#features .feature-grid{
    grid-template-columns: repeat(auto-fit, minmax(min(22rem, 50%), 1fr));
}

#features .feature-card {
    text-align: center;
    transition: border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.feature-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}
.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius);
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

#features .feature-icon{
    background: transparent;
    font-size: 2.75rem;
  padding: 2.05rem;
}

.feature-card h3 { font-size: var(--fs-xl); margin-bottom: 0.4rem; }
.feature-card p { font-size: var(--fs-sm); margin-bottom: 0; }

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
    gap: 1.5rem;
    counter-reset: step;
}
.step-item {
    text-align: center;
    padding: 1.5rem 1rem;
    counter-increment: step;
    position: relative;
}
.step-item::before {
    content: counter(step);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-full);
    background: var(--primary);
    color: white;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: var(--fs-xl);
    margin-bottom: 0.85rem;
    box-shadow: var(--shadow-sm);
}
.step-item h3 { font-size: var(--fs-lg); margin-bottom: 0.3rem; }
.step-item p { font-size: var(--fs-sm); }

.cta-final {
    text-align: center;
    padding: 5rem 0;
    background:
        radial-gradient(ellipse at center, var(--primary-soft) 0%, transparent 60%),
        var(--background);
}
.cta-final h2 { margin-bottom: 0.5rem; }
.cta-final p { font-size: var(--fs-lg); color: var(--foreground-soft); margin-bottom: 1.75rem; }


/* ============================================================
   30. DASHBOARD
   ============================================================ */

/* ── Welcome-Header (Greeting + Subscription-Card) ── */
.dashboard-header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}
.dashboard-greeting h1 {
    font-size: var(--fs-3xl);
    margin-bottom: 0.25rem;
}
.dashboard-greeting p {
    color: var(--foreground-soft);
    margin: 0;
    font-size: var(--fs-base);
}

/* ── Subscription-Status-Card (oben rechts) ── */
.subscription-card {
    background: linear-gradient(135deg, var(--primary-soft) 0%, var(--accent-soft, var(--surface)) 100%);
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    padding: 0.85rem 1.1rem;
    min-width: 12rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
}
.subscription-card.is-free {
    background: var(--surface);
    border-color: var(--border);
}
.subscription-card.is-warning {
    background: var(--warning-bg);
    border-color: var(--warning-border);
}
.subscription-card-icon {
    font-size: 1.5rem;
    line-height: 1;
}
.subscription-card-body { flex: 1; min-width: 0; }
.subscription-card-label {
    font-size: var(--fs-xs);
    color: var(--foreground-soft);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}
.subscription-card-name {
    font-weight: 600;
    color: var(--primary);
    font-size: var(--fs-base);
    margin: 0;
}
.subscription-card.is-free .subscription-card-name { color: var(--foreground); }
.subscription-card-meta {
    font-size: var(--fs-xs);
    color: var(--foreground-soft);
    margin: 0;
}

/* ── Email-Verify-Banner (sticky oben) ── */
.verify-banner {
    background: var(--warning-bg);
    border: 1px solid var(--warning-border);
    color: var(--warning);
    border-radius: var(--radius);
    padding: 0.85rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.verify-banner-icon { font-size: 1.5rem; flex-shrink: 0; }
.verify-banner-text { flex: 1; font-size: var(--fs-sm); min-width: 0; }
.verify-banner-text strong { color: var(--warning); }
.verify-banner-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ── Onboarding-Banner ── */
.onboarding-banner {
    background:
        radial-gradient(circle at top right, var(--primary-soft) 0%, transparent 60%),
        var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem 2rem 1.75rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}
.onboarding-banner h2 {
    font-size: var(--fs-2xl);
    margin-bottom: 0.4rem;
}
.onboarding-banner p {
    color: var(--foreground-soft);
    margin-bottom: 1.25rem;
    max-width: 40rem;
}
.onboarding-steps {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.onboarding-step {
    flex: 1;
    min-width: 9rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    background: var(--background);
    border: 1px solid var(--border);
    font-size: var(--fs-sm);
    color: var(--foreground-soft);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.onboarding-step .step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem; height: 1.5rem;
    border-radius: var(--radius-full);
    background: var(--border);
    color: var(--foreground-soft);
    font-weight: 600;
    font-size: var(--fs-xs);
    flex-shrink: 0;
}
.onboarding-step.is-completed { color: var(--success); border-color: var(--success-border); background: var(--success-bg); }
.onboarding-step.is-completed .step-num { background: var(--success); color: white; }
.onboarding-step.is-active     { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); font-weight: 500; }
.onboarding-step.is-active     .step-num { background: var(--primary); color: white; }

/* ── Stats-Grid (4 Zähler-Cards) ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}
.stat-card-icon {
    width: 3rem; height: 3rem;
    border-radius: var(--radius);
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.stat-card-body { min-width: 0; }
.stat-card-number {
    font-family: var(--font-heading);
    font-size: var(--fs-3xl);
    font-weight: 700;
    color: var(--foreground);
    line-height: 1.1;
    margin: 0;
}
.stat-card-label {
    font-size: var(--fs-sm);
    color: var(--foreground-soft);
    margin: 0;
}

/* ── Quick-Actions-Grid (3 Aktions-Cards) ── */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.quick-action {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: 1.5rem;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: inherit;
    text-decoration: none;
    transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
    cursor: pointer;
}
.quick-action:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: var(--shadow);
    text-decoration: none;
}
.quick-action-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}
.quick-action-title {
    font-family: var(--font-heading);
    font-size: var(--fs-lg);
    font-weight: 600;
    color: var(--foreground);
    margin: 0 0 0.3rem;
}
.quick-action-text {
    font-size: var(--fs-sm);
    color: var(--foreground-soft);
    margin: 0 0 1rem;
    line-height: 1.5;
}
.quick-action-arrow {
    margin-top: auto;
    color: var(--primary);
    font-weight: 600;
    font-size: var(--fs-sm);
}

/* ── Two-Column-Section (Recent Articles + Recent Menus) ── */
.dashboard-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.dashboard-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.85rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.dashboard-section-header h2 {
    font-size: var(--fs-xl);
    margin: 0;
}
.dashboard-section-header .btn-link {
    font-size: var(--fs-sm);
}

/* ── Activity-List ── */
.activity-list {
    list-style: none;
    margin: 0;
    padding: 0;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.activity-list li {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.85rem;
    transition: background var(--transition-fast);
}
.activity-list li:last-child { border-bottom: 0; }
.activity-list li:hover { background: var(--surface); }
.activity-list a { color: inherit; text-decoration: none; flex: 1; min-width: 0; }
.activity-list a:hover { color: var(--primary); }

.activity-thumb {
    width: 2.5rem; height: 2.5rem;
    border-radius: var(--radius-sm);
    background: var(--primary-soft);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    overflow: hidden;
}
.activity-thumb img { width: 100%; height: 100%; object-fit: cover; }
.activity-content { flex: 1; min-width: 0; }
.activity-title {
    font-weight: 500;
    color: var(--foreground);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.activity-meta {
    font-size: var(--fs-xs);
    color: var(--foreground-soft);
    margin: 0;
}

/* ── Restaurants-Liste (Bottom-Sektion) ── */
.restaurants-list-compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 1rem;
}
.restaurant-mini-card {
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.restaurant-mini-card:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.restaurant-mini-logo {
    width: 3rem; height: 3rem;
    border-radius: var(--radius);
    background: var(--primary-soft);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    overflow: hidden;
}
.restaurant-mini-logo img { width: 100%; height: 100%; object-fit: contain; }
.restaurant-mini-body { flex: 1; min-width: 0; }
.restaurant-mini-name {
    font-weight: 600;
    color: var(--foreground);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.restaurant-mini-meta {
    font-size: var(--fs-xs);
    color: var(--foreground-soft);
    margin: 0;
}
.restaurant-mini-actions { display: flex; gap: 0.4rem; flex-shrink: 0; }
.restaurant-mini-actions .btn { padding: 0.35rem 0.6rem; font-size: var(--fs-xs); }

/* ── Mobile-Anpassungen ── */
@media (max-width: 768px) {
    .dashboard-header { grid-template-columns: 1fr; }
    .subscription-card { width: 100%; }
    .onboarding-banner { padding: 1.5rem 1.25rem; }
    .stat-card-number { font-size: var(--fs-2xl); }
    .stat-card-icon { width: 2.5rem; height: 2.5rem; font-size: 1.25rem; }
}


/* ============================================================
   31. RESTAURANTS & CATEGORIES (Phase 7)
   ============================================================ */

/* ── Restaurants-Grid (Liste) ───────────────────────────── */
.restaurants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}
.restaurant-card {
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
    position: relative;
}
.restaurant-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}
.restaurant-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.restaurant-card-logo {
    width: 4rem; height: 4rem;
    border-radius: var(--radius);
    background: var(--primary-soft);
    color: var(--primary);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.75rem;
    flex-shrink: 0;
    overflow: hidden;
}
.restaurant-card-logo img {
    width: 100%; height: 100%; object-fit: contain;
}
.restaurant-card-info { flex: 1; min-width: 0; }
.restaurant-card-name {
    font-family: var(--font-heading);
    font-size: var(--fs-xl);
    font-weight: 600;
    color: var(--foreground);
    margin: 0 0 0.25rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.restaurant-card-slug {
    font-size: var(--fs-xs);
    color: var(--foreground-soft);
    font-family: var(--font-mono);
    margin: 0;
}
.restaurant-card-meta {
    display: flex; flex-wrap: wrap; gap: 0.5rem;
    font-size: var(--fs-sm);
}
.restaurant-card-meta .badge { font-size: var(--fs-xs); }

.restaurant-card-stats {
    display: flex;
    gap: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border);
    font-size: var(--fs-sm);
    color: var(--foreground-soft);
}
.restaurant-card-stats > div { flex: 1; min-width: 0; }
.restaurant-card-stats strong { display: block; font-size: var(--fs-lg); color: var(--foreground); }

.restaurant-card-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: auto;
}
.restaurant-card-actions .btn {
    flex: 1;
    min-width: 6rem;
    font-size: var(--fs-sm);
    padding: 0.45rem 0.75rem;
}

/* ── "Hinzufügen"-Card (gestrichelt) ─────────────────────── */
.restaurant-card-add {
    border-style: dashed;
    border-color: var(--border-strong);
    background: transparent;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    color: var(--foreground-soft);
    min-height: 14rem;
    transition: all var(--transition-fast);
}
.restaurant-card-add:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-soft);
    transform: none;
}
.restaurant-card-add .add-icon {
    font-size: 2.5rem;
    line-height: 1;
}
.restaurant-card-add .add-label {
    font-weight: 600;
    margin-top: 0.5rem;
}

/* ── Logo-Dropzone (Modal) ───────────────────────────────── */
.logo-dropzone {
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--transition-fast), background var(--transition-fast);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 8rem;
    position: relative;
    overflow: hidden;
}
.logo-dropzone:hover,
.logo-dropzone.is-dragover {
    border-color: var(--primary);
    background: var(--primary-soft);
}
.logo-dropzone-preview {
    width: 12rem; height: 6rem;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
}
.logo-dropzone-preview img {
    width: 100%; height: 100%; object-fit: contain;
}
.logo-dropzone-icon {
    font-size: 2rem;
    color: var(--foreground-soft);
}
.logo-dropzone-text {
    font-size: var(--fs-sm);
    color: var(--foreground-soft);
}
.logo-dropzone-text strong { color: var(--primary); }
.logo-dropzone-progress {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border-radius: calc(var(--radius) - 2px);
}
.logo-dropzone.is-uploading .logo-dropzone-progress { display: flex; }

.logo-dropzone-remove {
    position: absolute;
    top: 0.4rem; right: 0.4rem;
    width: 1.75rem; height: 1.75rem;
    border-radius: var(--radius-full);
    background: var(--destructive);
    color: white;
    border: none;
    cursor: pointer;
    font-size: var(--fs-sm);
    line-height: 1;
    display: none;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-fast);
}
.logo-dropzone.has-image .logo-dropzone-remove { display: flex; }
.logo-dropzone-remove:hover { transform: scale(1.1); }

/* ── Color-Picker-Row (zwei Color-Inputs nebeneinander) ── */
.color-picker-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.color-picker-field {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.color-picker-field input[type="color"] {
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 2px;
    background: var(--background);
}
.color-picker-field input[type="text"] {
    flex: 1;
    border: 0;
    background: transparent;
    color: var(--foreground);
    font-family: var(--font-mono);
    font-size: var(--fs-sm);
    padding: 0;
    outline: none;
}

/* ── Categories-Liste (Drag-Sort) ────────────────────────── */
.categories-toolbar {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.categories-toolbar .form-group { margin-bottom: 0; flex: 1; min-width: 14rem; }
.categories-toolbar label { margin-bottom: 0.25rem; }

.categories-list {
    list-style: none;
    margin: 0;
    padding: 0;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.categories-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface-elevated);
    transition: background var(--transition-fast);
}
.categories-list li:last-child { border-bottom: 0; }
.categories-list li:hover { background: var(--surface); }

.drag-handle {
    cursor: grab;
    color: var(--foreground-soft);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    line-height: 1;
    user-select: none;
    flex-shrink: 0;
}
.drag-handle:hover {
    background: var(--surface);
    color: var(--primary);
}
.drag-handle:active { cursor: grabbing; }

.category-icon-display {
    width: 2.5rem; height: 2.5rem;
    border-radius: var(--radius-sm);
    background: var(--primary-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.category-info { flex: 1; min-width: 0; }
.category-name {
    font-weight: 500;
    color: var(--foreground);
    margin: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.category-name-en {
    font-size: var(--fs-xs);
    color: var(--foreground-soft);
    margin: 0;
    font-style: italic;
}
.category-articles {
    font-size: var(--fs-xs);
    color: var(--foreground-soft);
    background: var(--surface);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}
.category-actions {
    display: flex;
    gap: 0.3rem;
    flex-shrink: 0;
}
.category-actions .btn {
    padding: 0.35rem 0.55rem;
    font-size: var(--fs-sm);
}

/* SortableJS-Klassen */
.sortable-ghost { opacity: 0.4; background: var(--primary-soft) !important; }
.sortable-chosen { background: var(--surface) !important; }
.sortable-drag { box-shadow: var(--shadow-lg); border-radius: var(--radius); }

/* ── Modal-Anpassungen für Restaurant/Category-Forms ────── */
.modal-restaurant .modal-body,
.modal-category   .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

/* ── Form-Row (Zwei-Spalten-Felder) ─────────────────────── */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}
.form-row > .form-group { margin-bottom: 0; }

/* ── Suggestions (Kategorie-Vorschläge) ─────────────────── */
.category-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
}
.suggestion-chip {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--foreground-soft);
    border-radius: var(--radius-full);
    padding: 0.3rem 0.75rem;
    font-size: var(--fs-xs);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.suggestion-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-soft);
}

/* ── Empty-State für leere Kategorie-Liste ─────────────── */
.categories-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--foreground-soft);
    background: var(--surface-elevated);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
}
.categories-empty .empty-icon { font-size: 3rem; margin-bottom: 0.75rem; }

/* ── Mobile-Anpassungen ─────────────────────────────────── */
@media (max-width: 600px) {
    .restaurant-card-actions { flex-direction: column; }
    .restaurant-card-actions .btn { width: 100%; }
    .color-picker-row { grid-template-columns: 1fr; }
    .categories-list li { flex-wrap: wrap; }
    .category-actions { width: 100%; justify-content: flex-end; padding-top: 0.5rem; }
}


/* ============================================================
   32. PDF-UPLOAD (Phase 8)
   ============================================================ */

.pdf-upload-card { margin-bottom: 1.5rem; }

/* ── Dropzone ───────────────────────────────────────────── */
.pdf-dropzone {
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 3rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
    position: relative;
}
.pdf-dropzone:hover,
.pdf-dropzone:focus,
.pdf-dropzone.is-dragover {
    border-color: var(--primary);
    background: var(--primary-soft);
    outline: none;
}
.pdf-dropzone.is-dragover { transform: scale(1.01); }
.pdf-dropzone.is-disabled { opacity: 0.6; pointer-events: none; }

.pdf-dropzone-icon {
    font-size: 3.5rem;
    line-height: 1;
    margin-bottom: 0.75rem;
}
.pdf-dropzone-title {
    font-family: var(--font-heading);
    font-size: var(--fs-xl);
    color: var(--foreground);
    margin: 0 0 0.5rem;
}
.pdf-dropzone-hint {
    font-size: var(--fs-sm);
    color: var(--foreground-soft);
    margin: 0 0 0.5rem;
}

/* ── Status-Box (während Verarbeitung) ─────────────────── */
.pdf-status-box {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    transition: border-left-color var(--transition-fast);
}
.pdf-status-box.is-success { border-left-color: var(--success); }
.pdf-status-box.is-failed  { border-left-color: var(--destructive); }
.pdf-status-box.is-pending { border-left-color: var(--warning); }

.pdf-status-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}
.pdf-status-icon {
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
}
.pdf-status-text { flex: 1; min-width: 0; }
.pdf-status-title {
    font-family: var(--font-heading);
    font-size: var(--fs-lg);
    font-weight: 600;
    color: var(--foreground);
    margin: 0 0 0.25rem;
    word-wrap: break-word;
}
.pdf-status-subtitle {
    font-size: var(--fs-sm);
    color: var(--foreground-soft);
    margin: 0;
}

.pdf-progress {
    height: 8px;
    background: var(--border);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-top: 0.5rem;
}
.pdf-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent, var(--primary)));
    border-radius: var(--radius-full);
    transition: width 0.4s ease;
    position: relative;
    overflow: hidden;
}
.pdf-status-box.is-pending .pdf-progress-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: pdf-progress-shimmer 1.5s infinite;
}
.pdf-status-box.is-success .pdf-progress-bar { background: var(--success); }
.pdf-status-box.is-failed  .pdf-progress-bar { background: var(--destructive); }

@keyframes pdf-progress-shimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.pdf-progress-info {
    margin-top: 0.85rem;
    font-size: var(--fs-sm);
    color: var(--foreground-soft);
}
.pdf-progress-info strong { color: var(--foreground); }
.pdf-progress-info .btn { margin-left: 0.5rem; }

/* ── Mobile-Anpassungen ─────────────────────────────────── */
@media (max-width: 600px) {
    .pdf-dropzone { padding: 2rem 1rem; }
    .pdf-dropzone-icon { font-size: 2.5rem; }
    .pdf-status-header { flex-direction: column; gap: 0.5rem; }
}


/* ============================================================
   33. ARTICLES (Phase 9)
   ============================================================ */

/* ── Toolbar oben (Bildgrößen-Slider, Suche, Filter) ───── */
.articles-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}
.articles-toolbar > * { flex-shrink: 0; }
.articles-toolbar .form-group { margin-bottom: 0; flex: 1; min-width: 14rem; }
.articles-toolbar .toolbar-spacer { flex: 1; }
.articles-toolbar .form-label { margin-bottom: 0.2rem; font-size: var(--fs-xs); }

.image-size-control {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 16rem;
}
.image-size-control input[type="range"] {
    flex: 1;
    cursor: pointer;
}
.image-size-control .size-label {
    font-size: var(--fs-xs);
    color: var(--foreground-soft);
    font-family: var(--font-mono);
    min-width: 2.5rem;
    text-align: right;
}

.articles-search {
    flex: 1;
    min-width: 16rem;
    position: relative;
}
.articles-search input {
    width: 100%;
    padding-left: 2.25rem;
}
.articles-search::before {
    content: '🔍';
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    pointer-events: none;
    z-index: 1;
}

/* ── Bulk-Action-Bar (erscheint wenn Artikel ausgewählt sind) ── */
.bulk-action-bar {
    display: none;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    background: var(--primary-soft);
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    position: sticky;
    top: 0.5rem;
    z-index: 10;
    box-shadow: var(--shadow-sm);
}
.bulk-action-bar.is-visible { display: flex; }
.bulk-action-bar .selected-count {
    font-weight: 600;
    color: var(--primary);
    flex-shrink: 0;
}
.bulk-action-bar .bulk-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.bulk-action-bar .bulk-buttons .btn { padding: 0.4rem 0.8rem; font-size: var(--fs-sm); }

/* ── Kategorie-Block (jede Kategorie ein eigener Block) ──── */
.category-block {
    margin-bottom: 2.5rem;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.category-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.category-block-header h2 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: var(--fs-xl);
    color: var(--foreground);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.category-block-header .category-count {
    font-size: var(--fs-xs);
    background: var(--primary-soft);
    color: var(--primary);
    padding: 0.2rem 0.7rem;
    border-radius: var(--radius-full);
    font-weight: 500;
}

/* ── Articles-Tabelle ──────────────────────────────────── */
.articles-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fs-sm);
}
.articles-table thead {
    background: var(--surface);
}
.articles-table th {
    padding: 0.65rem 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: var(--fs-xs);
    color: var(--foreground-soft);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.articles-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.articles-table tbody tr {
    transition: background var(--transition-fast);
}
.articles-table tbody tr:hover {
    background: var(--surface);
}
.articles-table tbody tr.is-inactive {
    opacity: 0.55;
}
.articles-table tbody tr:last-child td {
    border-bottom: 0;
}

/* Spalten-Breiten */
.articles-table th.col-checkbox,
.articles-table td.col-checkbox { width: 2.5rem; text-align: center; }
.articles-table th.col-image,
.articles-table td.col-image    { width: var(--article-image-size, 80px); }
.articles-table th.col-price,
.articles-table td.col-price    { width: 7rem; text-align: right; }
.articles-table th.col-actions,
.articles-table td.col-actions  { width: 8rem; text-align: right; }

/* ── Produktbild in Tabelle (Größe via CSS-Variable) ───── */
.article-image {
    width: var(--article-image-size, 80px);
    height: var(--article-image-size, 80px);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--foreground-soft);
    font-size: 1.5rem;
    transition: width var(--transition-fast), height var(--transition-fast);
}
.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ── Diät-Badges (kleine Icons hinter dem Namen) ─────── */
.diet-badges {
    display: inline-flex;
    gap: 0.25rem;
    margin-left: 0.4rem;
    font-size: 0.85rem;
}
.diet-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: var(--radius-full);
    background: var(--surface);
    cursor: help;
}
.diet-badge[data-type="vegetarian"] { background: #d4edda; color: #155724; }
.diet-badge[data-type="vegan"]      { background: #c3e6cb; color: #0f5132; }
.diet-badge[data-type="gluten_free"] { background: #fff3cd; color: #856404; }
.diet-badge[data-type="lactose_free"] { background: #cfe2ff; color: #084298; }
.diet-badge[data-type="spicy"]       { background: #f8d7da; color: #842029; }

/* ── Allergen-Codes (klein und kompakt in Tabellenspalte) ── */
.allergens-list {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.2rem;
    font-size: var(--fs-xs);
    color: var(--foreground-soft);
}
.allergen-code {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 0.1rem 0.4rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
}

/* ── Allergen/Zusatzstoff-Picker im Modal (Multi-Select-Chips) ── */
.chips-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.6rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-height: 12rem;
    overflow-y: auto;
}
.chip-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    padding: 0.35rem 0.7rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: var(--fs-sm);
    transition: all var(--transition-fast);
    user-select: none;
}
.chip-item:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
}
.chip-item.is-selected {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.chip-item .chip-code {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: var(--fs-xs);
    opacity: 0.8;
}
.chip-item .chip-label { font-size: var(--fs-xs); }

/* ── Image-Slot im Modal ──────────────────────────────── */
.article-image-slot {
    width: 100%;
    aspect-ratio: 1;
    max-width: 240px;
    margin: 0 auto;
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.article-image-slot:hover { border-color: var(--primary); background: var(--primary-soft); }
.article-image-slot.is-uploading { opacity: 0.6; }
.article-image-slot img {
    width: 100%; height: 100%; object-fit: cover;
}
.article-image-slot-empty {
    text-align: center;
    color: var(--foreground-soft);
}
.article-image-slot-empty .icon {
    font-size: 2.5rem;
    line-height: 1;
    margin-bottom: 0.4rem;
    display: block;
}
.article-image-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.6rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Image-Generation-Spinner ──────────────────────────── */
.ai-spinner-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: white;
    border-radius: calc(var(--radius) - 2px);
    z-index: 2;
    text-align: center;
    padding: 1rem;
}
.ai-spinner-overlay.is-visible { display: flex; }
.ai-spinner-overlay .spinner {
    width: 2.5rem; height: 2.5rem;
    border-width: 3px;
    margin-bottom: 0.6rem;
}

/* ── Empty-State je Kategorie ──────────────────────────── */
.category-empty {
    padding: 2rem 1.5rem;
    text-align: center;
    color: var(--foreground-soft);
    font-size: var(--fs-sm);
}

/* ── Drag-Sort innerhalb der Tabellenzeilen ───────────── */
.articles-table .drag-handle-row {
    cursor: grab;
    color: var(--foreground-soft);
    text-align: center;
    user-select: none;
}
.articles-table .drag-handle-row:active { cursor: grabbing; }
.articles-table .sortable-ghost { opacity: 0.4; background: var(--primary-soft); }
.articles-table .sortable-chosen { background: var(--surface) !important; }

/* ── Mobile-Anpassungen ─────────────────────────────────── */
@media (max-width: 768px) {
    .articles-table th.col-actions,
    .articles-table td.col-actions { width: auto; }
    .articles-table .desc-cell { display: none; }
    .articles-toolbar { flex-direction: column; align-items: stretch; }
    .image-size-control { width: 100%; }
    .articles-search { width: 100%; min-width: 0; }
}

/* ════════════════════════════════════════════════════════════════════
   34. SPEISEKARTEN-WIZARD (Phase 10)
   ════════════════════════════════════════════════════════════════════ */

/* ── Wizard-Schritt-Indikator ─────────────────────────────────────── */
.wizard-steps {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow-x: auto;
}
.wizard-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    color: var(--foreground-soft);
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background-color 0.15s, color 0.15s;
}
.wizard-step .step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: var(--surface);
    color: var(--foreground-soft);
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--border);
}
.wizard-step.is-done {
    color: var(--success, #10b981);
}
.wizard-step.is-done .step-number {
    background: var(--success, #10b981);
    color: white;
    border-color: transparent;
}
.wizard-step.is-done .step-number::before {
    content: "✓";
}
.wizard-step.is-done .step-number-text {
    display: none;
}
.wizard-step.is-active {
    background: var(--primary-soft, #EEEDFE);
    color: var(--primary);
    font-weight: 600;
}
.wizard-step.is-active .step-number {
    background: var(--primary);
    color: white;
    border-color: transparent;
}

/* Verbindungslinien zwischen den Steps */
.wizard-steps .wizard-step:not(:last-child)::after {
    content: "";
    display: inline-block;
    width: 1.5rem;
    height: 1px;
    background: var(--border);
    margin-left: 0.25rem;
}

/* ── Wizard-Panel (eigentlicher Schritt-Content) ──────────────────── */
.wizard-panel {
    display: none;
}
.wizard-panel.is-active {
    display: block;
}
.wizard-buttons {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}
.wizard-buttons:has(> :only-child) {
    justify-content: flex-end;
}

/* ── Quoten-Karte auf menus.php ──────────────────────────────────── */
.quota-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.quota-info { display: flex; flex-direction: column; gap: 0.25rem; }
.quota-title {
    margin: 0;
    font-size: 0.9rem;
    color: var(--foreground-soft);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.quota-text {
    margin: 0;
    font-size: 1rem;
    color: var(--foreground);
}
.quota-bar-wrapper {
    width: 100%;
    height: 0.5rem;
    background: var(--surface);
    border-radius: 999px;
    overflow: hidden;
}
.quota-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent, var(--primary)) 100%);
    border-radius: 999px;
    transition: width 0.4s ease;
}

/* ── Template-Picker (Schritt 3) ──────────────────────────────────── */
.template-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.template-card {
    display: flex;
    flex-direction: column;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
    background: var(--card);
}
.template-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg, 0 6px 20px rgba(0,0,0,0.08));
}
.template-card.is-selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft, #EEEDFE);
}
.template-preview {
    height: 120px;
    background: linear-gradient(135deg, #645AFF 0%, #2D2A3D 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}
.template-style-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
}
.template-info {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.template-info h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--foreground);
}
.template-info p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--foreground-soft);
    line-height: 1.45;
}

/* ── Artikel-Pick-Items (Schritt 2) ───────────────────────────────── */
.article-pick-group {
    background: var(--card);
    padding: 0.75rem;
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
}
.article-pick-item {
    transition: background-color 0.1s;
    margin: 0;
}
.article-pick-item:hover {
    background: var(--primary-soft, #EEEDFE);
}

/* ── Modal Large für Vorschau ─────────────────────────────────────── */
.modal-large {
    max-width: 95vw;
    width: 95vw;
    height: 95vh;
    display: flex;
    flex-direction: column;
}

/* ── Form-Section Title (für Wizard-Schritt 4) ────────────────────── */
.form-section-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--foreground-soft);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border);
}

/* ── grid-2 (Wizard-Schritt 4 Optionen) ───────────────────────────── */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
@media (max-width: 768px) {
    .grid-2 { grid-template-columns: 1fr; gap: 1rem; }
}

/* ── Required-Marker ──────────────────────────────────────────────── */
.required {
    color: var(--destructive);
    margin-left: 0.15rem;
}

/* ── Mobile-Anpassungen für Wizard ────────────────────────────────── */
@media (max-width: 640px) {
    .wizard-steps {
        padding: 0.6rem;
        gap: 0.4rem;
    }
    .wizard-step {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
    .wizard-step .step-label {
        display: none;
    }
    .wizard-step.is-active .step-label {
        display: inline;
    }
    .wizard-steps .wizard-step:not(:last-child)::after {
        width: 0.75rem;
    }
    .wizard-buttons {
        flex-direction: column;
    }
    .wizard-buttons .btn {
        width: 100%;
    }
    .template-picker {
        grid-template-columns: 1fr;
    }
}

/* ════════════════════════════════════════════════════════════════════
   35. STATISTIK-DASHBOARD + QR-DOWNLOADS (Phase 11)
   ════════════════════════════════════════════════════════════════════ */

/* ── Stats-Grid (Kachel-Layout) ─────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: transform 0.15s, box-shadow 0.15s;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg, 0 6px 20px rgba(0,0,0,0.08));
}
.stat-card .card-content {
    padding: 1.25rem 1rem;
    text-align: center;
}
.stat-icon {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    line-height: 1;
}
.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--foreground);
    line-height: 1.1;
    margin-bottom: 0.2rem;
    font-variant-numeric: tabular-nums;
}
.stat-label {
    font-size: 0.8rem;
    color: var(--foreground-soft);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.stat-card-primary  .stat-value { color: var(--primary); }
.stat-card-accent   .stat-value { color: var(--accent, var(--primary)); }
.stat-card-success  .stat-value { color: var(--success, #10b981); }
.stat-card-info     .stat-value { color: var(--info, #3b82f6); }

/* ── Bar-Chart (Tagesdiagramm) ──────────────────────────────────────── */
.stat-bar-wrapper {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: flex-end;
    cursor: help;
    min-width: 0;
}
.stat-bar {
    width: 100%;
    background: linear-gradient(180deg, var(--primary) 0%, var(--accent, var(--primary)) 100%);
    border-radius: 2px 2px 0 0;
    transition: filter 0.15s;
    min-height: 2px;
}
.stat-bar-wrapper:hover .stat-bar {
    filter: brightness(1.15);
}

/* ── QR-Download-Buttons-Gruppe ─────────────────────────────────────── */
.qr-download-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

/* ── Badge-Variante "info" (für Status "veröffentlicht") ────────────── */
.badge-info {
    background: rgba(59, 130, 246, 0.15);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.35);
}
[data-theme="dark"] .badge-info {
    background: rgba(59, 130, 246, 0.18);
    color: #60a5fa;
    border-color: rgba(96, 165, 250, 0.35);
}

/* ── Mobile-Optimierungen ───────────────────────────────────────────── */
@media (max-width: 640px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
    .stat-icon  { font-size: 1.4rem; }
    .stat-value { font-size: 1.5rem; }
    .stat-label { font-size: 0.7rem; }
    .qr-download-group { flex-direction: column; }
    .qr-download-group .btn { width: 100%; justify-content: center; }
}

/* ════════════════════════════════════════════════════════════════════
   36. PRICING / BILLING / QUOTAS (Phase 12)
   ════════════════════════════════════════════════════════════════════ */

/* ── Pricing-Page Container ────────────────────────────────────────── */
.pricing-page {
    max-width: 72rem;
    margin: 0 auto;
}
.pricing-header {
    text-align: center;
    margin-bottom: 2rem;
}
.pricing-header h1 {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}
.pricing-subtitle {
    font-size: 1.05rem;
    color: var(--foreground-soft);
    margin: 0;
}

/* ── Laufzeit-Switch (Tabs) ────────────────────────────────────────── */
.billing-switch {
    display: inline-flex;
    gap: 0.25rem;
    padding: 0.25rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 999px;
    margin: 0 auto 2.5rem;
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.05));
    max-width: 60rem;
}
.billing-switch {
    display: flex;
    justify-content: center;
}
.billing-tab {
    padding: 0.55rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    background: transparent;
    border: none;
    color: var(--foreground-soft);
    border-radius: 999px;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.15s;
}
.billing-tab:hover {
    color: var(--foreground);
    background: hsl(245 100% 75% / 0.15);
}
.billing-tab.is-active {
    background: var(--primary);
    color: white;
}
.badge-discount, .sub-billing-tab .sub-discount {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    background: #FF0060;
    color: white;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.is-active .badge-discount, .is-active .sub-discount {
    background: #fff;
    color:var(--primary);
}

/* ── Pricing-Grid (3 Karten nebeneinander) ─────────────────────────── */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}
@media (max-width: 1024px) {
    .pricing-grid { grid-template-columns: 1fr; gap: 1rem; max-width: 30rem; margin-left: auto; margin-right: auto; }
}

/* ── Pricing-Karte ─────────────────────────────────────────────────── */
.pricing-card {
    position: relative;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg, 16px);
    padding: 2rem 1.75rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.15s, box-shadow 0.15s;
}
.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg, 0 10px 30px rgba(0,0,0,0.1));
}
.pricing-card-popular {
    border-color: var(--primary);
    border-width: 2px;
    box-shadow: var(--shadow-md, 0 4px 16px rgba(92, 64, 51, 0.12));
}
.pricing-card-badge {
    position: absolute;
    top: -0.85rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 0.3rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
}
.pricing-card.is-current {
    border-color: var(--success, #10b981);
}

/* ── Karte: Header + Preis + Features ──────────────────────────────── */
.pricing-card-header {
    text-align: center;
    margin-bottom: 1.5rem;
}
.pricing-card-name {
    font-family: var(--font-h, var(--font-family));
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: var(--primary);
}
.pricing-card-desc {
    margin: 0;
    color: var(--foreground-soft);
    font-size: 0.9rem;
    line-height: 1.5;
}
.pricing-card-price {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: none;        /* Nur die aktive Variante anzeigen */
}
.pricing-card-price.is-active {
    display: block;
}
.pricing-currency {
    font-size: 1.5rem;
    color: var(--foreground-soft);
    vertical-align: top;
    line-height: 1;
}
.pricing-amount {
    font-size: 3rem;
    font-weight: 700;
    color: var(--foreground);
    line-height: 1;
}
.pricing-decimals {
    font-size: 1.25rem;
    color: var(--foreground-soft);
    vertical-align: top;
    line-height: 1;
}
.pricing-per {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--foreground-soft);
}
.pricing-total-hint {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: var(--foreground-soft);
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    flex: 1;
}
.pricing-features li {
    padding: 0.5rem 0;
    font-size: 0.95rem;
    line-height: 1.5;
    border-bottom: 1px dashed var(--border);
}
.pricing-features li:last-child {
    border-bottom: none;
}

/* ── CTA: Buttons in der Karte ─────────────────────────────────────── */
.pricing-cta {
    margin-top: auto;
}
.pricing-cta .billing-variant {
    display: none;
}
.pricing-cta .billing-variant.is-active {
    display: flex;
}

.pricing-tax-note {
    font-size: 0.85rem;
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

/* ── Quota-Anzeige (in billing.php) ────────────────────────────────── */
.quota-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}
.quota-item {
    padding: 1rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.quota-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.quota-icon {
    font-size: 1.25rem;
}
.quota-numbers {
    font-size: 0.95rem;
    color: var(--foreground-soft);
    margin-bottom: 0.5rem;
}
.quota-numbers strong {
    color: var(--foreground);
    font-size: 1.1rem;
}
.quota-bar-wrapper {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}
.quota-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent, var(--primary)));
    transition: width 0.4s;
    border-radius: 3px;
}

/* ── Aktueller Plan (Box in billing.php) ───────────────────────────── */
.plan-current-box {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}
.plan-current-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ── Pay-per-Use-Modal ─────────────────────────────────────────────── */
.pay-modal-summary {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin: 1rem 0;
}
.pay-modal-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    font-size: 0.95rem;
}
.pay-modal-summary-row.is-total {
    font-weight: 700;
    font-size: 1.1rem;
    border-top: 1px solid var(--border);
    margin-top: 0.5rem;
    padding-top: 0.85rem;
    color: var(--primary);
}
.pay-modal-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

/* ── Form-Helpers ──────────────────────────────────────────────────── */
.required {
    color: var(--destructive, #ef4444);
}
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
@media (max-width: 600px) {
    .grid-2 { grid-template-columns: 1fr; }
}

/* ── Mobile-Optimierung Pricing ────────────────────────────────────── */
@media (max-width: 600px) {
    .pricing-header h1 { font-size: 1.75rem; }
    .pricing-card { padding: 1.5rem 1.25rem; }
    .pricing-amount { font-size: 2.5rem; }
    .billing-switch { width: 100%; flex-direction: column; gap: 0.25rem; padding: 0.5rem; border-radius: var(--radius); }
    .billing-tab { width: 100%; justify-content: center; border-radius: var(--radius); }
    .plan-current-box { flex-direction: column; }
    .plan-current-actions { width: 100%; }
}

/* ════════════════════════════════════════════════════════════════════
   37. ADMIN-BEREICH (Phase 12D-2)
   ════════════════════════════════════════════════════════════════════ */

.admin-page {
    max-width: 80rem;
    margin: 0 auto;
}
.admin-h1 {
    font-size: 1.5rem;
    margin: 0 0 1rem;
    color: var(--primary);
}

/* ── Sub-Navigation (Tabs) ─────────────────────────────────────────── */
.admin-subnav {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.4rem;
    margin-bottom: 1.5rem;
}
.admin-subnav-link {
    padding: 0.5rem 0.85rem;
    font-size: 0.9rem;
    color: var(--foreground-soft);
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}
.admin-subnav-link:hover {
    background: var(--muted, rgba(0,0,0,0.05));
    color: var(--foreground);
}
.admin-subnav-link.is-active {
    background: var(--primary);
    color: #fff;
}
.admin-subnav-link.is-active:hover {
    background: var(--primary-hover);
    color: #fff;
}

/* ── KPI-Kacheln ───────────────────────────────────────────────────── */
.admin-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}
.admin-kpi {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
}
.admin-kpi-label {
    font-size: 0.85rem;
    color: var(--foreground-soft);
    margin-bottom: 0.4rem;
    font-weight: 500;
}
.admin-kpi-value {
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--foreground);
    line-height: 1.1;
    margin-bottom: 0.25rem;
}
.admin-kpi-value.is-warn {
    color: var(--accent, #f59e0b);
}
.admin-kpi-sub {
    font-size: 0.8rem;
    color: var(--foreground-soft);
}

/* ── Toolbar (Filter + Suche) ──────────────────────────────────────── */
.admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.admin-filter-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}
.admin-filter-tabs {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}
.admin-filter-tab {
    padding: 0.4rem 0.85rem;
    font-size: 0.85rem;
    color: var(--foreground-soft);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 999px;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.admin-filter-tab:hover {
    border-color: var(--primary);
    color: var(--foreground);
}
.admin-filter-tab.is-active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ── Summary-Row über Tabellen ─────────────────────────────────────── */
.admin-summary-row {
    display: flex;
    gap: 1.5rem;
    padding: 0.75rem 1rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.95rem;
}

/* ── Plans-Admin-Liste ─────────────────────────────────────────────── */
.plans-admin-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.plan-admin-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.plan-admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--muted, rgba(0,0,0,0.03));
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 0.5rem;
}
.plan-admin-tier {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    border-radius: 999px;
    letter-spacing: 0.05em;
}
.plan-admin-body {
    padding: 1rem;
}

/* ── KV-Table (Detail-View Schlüssel/Wert-Tabelle) ────────────────── */
.kv-table {
    width: 100%;
    border-collapse: collapse;
}
.kv-table th, .kv-table td {
    padding: 0.4rem 0;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}
.kv-table th {
    width: 40%;
    color: var(--foreground-soft);
    font-weight: 500;
}
.kv-table tr:last-child th, .kv-table tr:last-child td {
    border-bottom: none;
}

/* ── Form-Label-Small ─────────────────────────────────────────────── */
.form-label-sm {
    font-size: 0.8rem;
    color: var(--foreground-soft);
    margin-bottom: 0.25rem;
}

/* ── Badge-Farben ──────────────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--muted, rgba(0,0,0,0.08));
    color: var(--foreground);
    border-radius: 999px;
    line-height: 1.5;
}
.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: #047857;
}
.badge-warn {
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
}
.badge-info {
    background: rgba(59, 130, 246, 0.15);
    color: #1d4ed8;
}

/* Dark-Mode-Anpassung */
:root[data-theme="dark"] .badge-success {
    background: rgba(16, 185, 129, 0.25);
    color: #6ee7b7;
}
:root[data-theme="dark"] .badge-warn {
    background: rgba(245, 158, 11, 0.25);
    color: #fcd34d;
}
:root[data-theme="dark"] .badge-info {
    background: rgba(59, 130, 246, 0.25);
    color: #93c5fd;
}

/* ── Mobile-Anpassungen ────────────────────────────────────────────── */
@media (max-width: 768px) {
    .admin-h1 { font-size: 1.25rem; }
    .admin-subnav { padding: 0.25rem; gap: 0.15rem; }
    .admin-subnav-link { padding: 0.4rem 0.6rem; font-size: 0.8rem; }
    .admin-kpi-value { font-size: 1.5rem; }
    .admin-summary-row { flex-direction: column; gap: 0.5rem; }
    .plan-admin-header { flex-direction: column; align-items: flex-start; }
    .table-wrapper { overflow-x: auto; }
}

/* ════════════════════════════════════════════════════════════════════
   38. PROFIL-SEITE (Phase 13)
   ════════════════════════════════════════════════════════════════════ */

/* ── 2-Spalten-Layout für Stammdaten + Passwort ────────────────────── */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
    max-width: 60rem;
    margin: 0 auto;
}
@media (max-width: 900px) {
    .profile-grid {
        grid-template-columns: 1fr;
        max-width: 32rem;
    }
}

/* ── Passwort-Stärke-Anzeige ───────────────────────────────────────── */
.pw-strength {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.25rem;
}
.pw-strength-bar {
    flex: 1;
    height: 6px;
    background: var(--border, rgba(0,0,0,0.1));
    border-radius: 3px;
    overflow: hidden;
}
.pw-strength-fill {
    height: 100%;
    width: 0;
    background: var(--destructive, #dc2626);
    transition: width 0.25s, background 0.25s;
    border-radius: 3px;
}
.pw-strength-label {
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 5rem;
    text-align: right;
}

/* ─────────────────────────────────────────────────────────
   Restaurant-Switcher (Header)
   =========================================================
   Dropdown-Pill links neben dem Logo.
   Funktioniert in Light- und Dark-Mode (nutzt CSS-Variablen).
   ───────────────────────────────────────────────────────── */

.restaurant-switcher {
    position: relative;
    margin-left: 0.5rem;
    margin-right: auto;
}

.restaurant-switcher-trigger,
.restaurant-switcher-empty {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--foreground);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    text-decoration: none;
    max-width: 16rem;
}

.restaurant-switcher-trigger:hover,
.restaurant-switcher-empty:hover {
    background: var(--surface-muted);
    border-color: var(--primary);
}

.restaurant-switcher-trigger:focus-visible,
.restaurant-switcher-empty:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.restaurant-switcher-logo {
    width: 1.5rem;
    height: 1.5rem;
    object-fit: contain;
    border-radius: var(--radius-xs);
    flex-shrink: 0;
}

.restaurant-switcher-logo-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-muted);
    font-size: 0.95rem;
    line-height: 1;
}

.restaurant-switcher-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 10rem;
}

.restaurant-switcher-caret {
    margin-left: 0.1rem;
    font-size: 0.7rem;
    color: var(--foreground-subtle);
    transition: transform 0.15s;
}

.restaurant-switcher.is-open .restaurant-switcher-caret {
    transform: rotate(180deg);
}

/* Dropdown-Panel */
.restaurant-switcher-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 0.4rem);
    left: 0;
    min-width: 16rem;
    max-width: 22rem;
    max-height: 24rem;
    overflow-y: auto;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 0.4rem;
    z-index: 1000;
}

.restaurant-switcher.is-open .restaurant-switcher-dropdown {
    display: block;
}

/* Items im Dropdown */
.restaurant-switcher-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.5rem 0.6rem;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    color: var(--foreground);
    text-align: left;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.12s;
}

.restaurant-switcher-item:hover {
    background: var(--surface-muted);
}

.restaurant-switcher-item.is-active {
    background: var(--primary-soft);
    font-weight: 600;
}

.restaurant-switcher-item.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

.restaurant-switcher-item-logo {
    width: 1.5rem;
    height: 1.5rem;
    object-fit: contain;
    border-radius: var(--radius-xs);
    flex-shrink: 0;
}

.restaurant-switcher-item-logo-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-muted);
    font-size: 0.95rem;
    line-height: 1;
}

.restaurant-switcher-item-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.restaurant-switcher-item-check {
    color: var(--primary);
    font-weight: 700;
    flex-shrink: 0;
}

/* "Neues Restaurant"-Eintrag */
.restaurant-switcher-item-add {
    color: var(--foreground-soft);
}

.restaurant-switcher-item-add:hover {
    color: var(--primary);
    background: var(--primary-soft);
}

.restaurant-switcher-item-add .restaurant-switcher-item-logo-fallback {
    background: transparent;
    border: 1px dashed var(--border-strong);
    font-weight: 700;
}

/* Trenner */
.restaurant-switcher-divider {
    height: 1px;
    background: var(--border);
    margin: 0.4rem 0;
}

/* Mobile: Switcher schmaler, Logo-Text wird kürzer */
@media (max-width: 720px) {
    .restaurant-switcher {
        margin-left: 0.3rem;
    }
    .restaurant-switcher-name {
        max-width: 7rem;
    }
    .restaurant-switcher-trigger,
    .restaurant-switcher-empty {
        padding: 0.35rem 0.6rem;
        font-size: 0.85rem;
    }
}

/* ─────────────────────────────────────────────────────────────────── */
/* IMPORT-HUB (PDF / Website / CSV)                                    */
/* ─────────────────────────────────────────────────────────────────── */

/* — Tab-Navigation — */
.import-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.import-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.25rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    color: var(--foreground-soft);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
    border-radius: 0;
}

.import-tab:hover {
    color: var(--foreground);
    background: var(--card);
}

.import-tab.is-active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: transparent;
    font-weight: 600;
}

.import-tab:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
}

.import-tab-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.import-tab-badge {
    margin-left: 0.4rem;
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
}

/* — Tab-Inhalt — */
.import-tab-panel {
    animation: importTabFadeIn 0.2s ease;
}

@keyframes importTabFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* — Website-Status-Box — */
.web-status-box {
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

/* — Website-Vorschau-Block — */
.web-preview-category {
    margin-bottom: 2rem;
}

.web-preview-category:last-child {
    margin-bottom: 0;
}

.web-preview-cat-title {
    margin: 0 0 0.75rem;
    font-size: 1.15rem;
    color: var(--foreground);
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.web-preview-cat-en {
    color: var(--foreground-soft);
    font-weight: 400;
    font-size: 0.9rem;
}

.web-preview-count {
    color: var(--foreground-soft);
    font-weight: 400;
    font-size: 0.85rem;
}

.web-preview-table {
    margin-bottom: 0;
}

.web-preview-img-cell {
    width: 80px;
    text-align: center;
    vertical-align: top;
}

.web-preview-img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: var(--radius);
    background: var(--muted);
    display: block;
}

.web-preview-no-img {
    display: inline-block;
    width: 64px;
    height: 64px;
    line-height: 64px;
    background: var(--muted);
    color: var(--foreground-soft);
    border-radius: var(--radius);
    text-align: center;
    font-size: 1.5rem;
}

.web-preview-desc {
    font-size: 0.85rem;
    margin-top: 0.25rem;
    line-height: 1.4;
}

.web-preview-flags {
    margin-top: 0.35rem;
    font-size: 1rem;
    line-height: 1;
}

/* — Spinner für Loading-States — */
.spinner {
    display: inline-block;
    width: 1.4em;
    height: 1.4em;
    border: 2.5px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* — Mobile-Anpassungen — */
@media (max-width: 600px) {
    .import-tab {
        padding: 0.7rem 0.9rem;
        font-size: 0.85rem;
    }

    .import-tab-icon {
        font-size: 1rem;
    }

    .import-tab-badge {
        display: none;
    }

    .web-preview-img,
    .web-preview-no-img {
        width: 48px;
        height: 48px;
        line-height: 48px;
    }

    .web-preview-img-cell {
        width: 60px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   PHASE 14: Article-Modal-Polishing
   - Tooltips (data-tooltip)
   - Kompakter Image-Slot
   - Magic-Wand-Button im Beschreibungsfeld
   - Error-Modal (klick-zu-schließen)
   - Modal-Layout 2-spaltig auf großen Screens
   ═══════════════════════════════════════════════════════════════ */

/* ── Tooltip via data-tooltip ─────────────────────────────────── */
/* CSS-only-Variante deaktiviert – Tooltips werden jetzt vom
   JS-Manager (MenuMage.tooltip) gerendert. Die Pseudo-Elemente
   würden sonst an Modal-/Viewport-Rändern abgeschnitten. */
[data-tooltip]:hover::after,
[data-tooltip]:hover::before,
[data-tooltip]:focus-visible::after,
[data-tooltip]:focus-visible::before,
[data-tooltip-pos]:hover::after,
[data-tooltip-pos]:hover::before,
[data-tooltip-pos]:focus-visible::after,
[data-tooltip-pos]:focus-visible::before {
    display: none !important;
    content: none !important;
}

/* Single-Tooltip im body (vom JS-Manager gesetzt) */
.mm-tooltip {
    position: absolute;
    z-index: 10000;
    pointer-events: none;
    background: var(--surface-elevated);
    color: var(--foreground);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.8rem;
    font-size: var(--fs-xs);
    line-height: 1.4;
    font-weight: normal;
    width: max-content;
    max-width: min(20rem, calc(100vw - 1.5rem));
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    text-align: left;
    opacity: 0;
    transform: translateY(2px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}
.mm-tooltip.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Pfeil – nutzt CSS-Variable --mm-tooltip-arrow-x für die
   horizontale Position relativ zum Tooltip-Body. */
.mm-tooltip::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: 0.4rem solid transparent;
    left: var(--mm-tooltip-arrow-x, 50%);
    transform: translateX(-50%);
}
.mm-tooltip[data-placement="top"]::before {
    bottom: -0.78rem;
    border-top-color: var(--border-strong);
}
.mm-tooltip[data-placement="bottom"]::before {
    top: -0.78rem;
    border-bottom-color: var(--border-strong);
}

/* ── Kompakter Article-Image-Slot ─────────────────────────────── */
/* Override: kleiner als die alte Vollbreiten-Variante */
.article-image-slot.is-compact {
    aspect-ratio: 1;
    max-width: 160px;
    margin: 0;
    border-radius: var(--radius-sm);
}
.article-image-slot.is-compact .article-image-slot-empty .icon {
    font-size: 1.8rem;
    margin-bottom: 0.2rem;
}
.article-image-slot.is-compact .article-image-slot-empty span:not(.icon) {
    font-size: var(--fs-xs);
    line-height: 1.2;
    display: block;
}

.article-image-actions.is-compact {
    margin-top: 0.5rem;
    gap: 0.35rem;
    justify-content: flex-start;
}
.article-image-actions.is-compact .btn {
    padding: 0.35rem 0.6rem;
    font-size: var(--fs-xs);
}

/* 2-spaltiges Modal-Layout auf großen Screens */
.article-modal-grid {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 1.5rem;
    align-items: start;
}
.article-modal-grid > .article-image-col {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.article-modal-grid > .article-fields-col {
    min-width: 0;   /* verhindert Overflow */
}
.article-modal-grid > .article-fields-col .form-group {
    margin-bottom: 0.85rem;
}

/* Vollbreiten-Block UNTER dem Grid (z. B. Serving-Style-Eingabe).
   Wird nicht in der schmalen Bildspalte angezeigt, sondern bekommt
   die volle Modalbreite, damit Eingabefeld und Buttons nicht
   beschnitten werden. */
.article-modal-fullrow {
    margin-top: 0.25rem;
}

@media (max-width: 960px) {
    .article-modal-grid {
        grid-template-columns: 1fr;
    }
    .article-image-slot.is-compact {
        max-width: 240px;
        margin: 0 auto;
    }
    .article-modal-grid > .article-image-col {
        align-items: center;
    }
    .article-image-actions.is-compact {
        justify-content: center;
    }
}

/* Bei breiterer Bildspalte darf der Image-Slot fast die volle
   Spalten-Breite nutzen – sieht gleichzeitig produktbild-würdig
   aus und lässt etwas Luft an den Rändern. */
.article-image-slot.is-compact {
    max-width: 100%;
}

/* AI-Spinner-Overlay im kompakten Slot etwas kleiner */
.article-image-slot.is-compact .ai-spinner-overlay span:not(.spinner) {
    font-size: var(--fs-xs);
}
.article-image-slot.is-compact .ai-spinner-overlay .spinner {
    width: 1.6rem;
    height: 1.6rem;
    border-width: 2.5px;
    margin-bottom: 0.3rem;
}

/* ── Serving-Style-Block kompakter ────────────────────────────── */
.ai-serving-style.is-compact {
    margin-top: 0.6rem;
    padding: 0.6rem;
}
.ai-serving-style.is-compact .form-label {
    font-size: var(--fs-sm);
}
.ai-serving-style.is-compact .form-help {
    font-size: 0.75rem;
}

/* ── Magic-Wand-Button im Label ───────────────────────────────── */
/* Der Zauberstab steht UNMITTELBAR neben dem Label-Text, nicht am
   rechten Rand. justify-content: flex-start sorgt dafür, dass die
   beiden Elemente eng beieinander liegen. */
.label-with-action {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.6rem;
    margin-bottom: 0.35rem;
}
.label-with-action .form-label {
    margin: 0;
}

/* Auffälliger Wand-Button: Akzent-Verlauf, größere Click-Fläche,
   sanfter Glow + dezente "Wackel"-Animation beim ersten Page-Load,
   damit der User ihn überhaupt wahrnimmt. */
.btn-wand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: 2.2rem;
    height: 2.2rem;
    padding: 0;
    border-radius: var(--radius-full);
    border: 0;
    background: linear-gradient(135deg, var(--primary, #5C4033), var(--accent, #B85C38));
    color: #fff;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(184, 92, 56, 0.35),
                0 0 0 2px rgba(184, 92, 56, 0.18);
    /* sanfte Aufmerksamkeits-Animation: 3× wackeln, dann ruhig */
    animation: mm-wand-attention 1.2s ease-in-out 3;
}
.btn-wand:hover {
    transform: rotate(-15deg) scale(1.08);
    box-shadow: 0 4px 12px rgba(184, 92, 56, 0.55),
                0 0 0 3px rgba(184, 92, 56, 0.28);
    filter: brightness(1.08);
}
.btn-wand:active {
    transform: rotate(-15deg) scale(0.95);
}
.btn-wand:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    animation: none;
    box-shadow: none;
}

/* Wand-Variante MIT Label-Text (z. B. "Vorschlag") – mehr Breite,
   gleiche optische Sprache. Wird mit Klasse .btn-wand-labeled aktiviert. */
.btn-wand.btn-wand-labeled {
    width: auto;
    height: 2.2rem;
    padding: 0 0.85rem 0 0.7rem;
    border-radius: var(--radius-full, 999px);
    font-size: 0.85rem;
    font-weight: 600;
}
.btn-wand.btn-wand-labeled:hover {
    transform: scale(1.05);
}
.btn-wand.btn-wand-labeled:active {
    transform: scale(0.97);
}

/* Aufmerksamkeits-Animation: kurz nach links/rechts wackeln */
@keyframes mm-wand-attention {
    0%, 100% { transform: rotate(0deg); }
    20%      { transform: rotate(-12deg); }
    40%      { transform: rotate(10deg); }
    60%      { transform: rotate(-6deg); }
    80%      { transform: rotate(4deg); }
}

/* Reduced-motion respektieren */
@media (prefers-reduced-motion: reduce) {
    .btn-wand { animation: none !important; }
}

/* Loading-State */
.btn-wand.is-loading {
    pointer-events: none;
    color: transparent;
    position: relative;
    animation: none;
}
.btn-wand.is-loading::before {
    content: '';
    position: absolute;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    animation: btn-wand-spin 0.7s linear infinite;
}
@keyframes btn-wand-spin {
    to { transform: rotate(360deg); }
}

/* Allergene/Zusatzstoffe-Picker etwas kompakter im Modal */
.modal-article .chips-picker {
    max-height: 8.5rem;
    padding: 0.5rem;
    gap: 0.3rem;
}
.modal-article .chip-item {
    padding: 0.25rem 0.55rem;
}

/* Modal-Body etwas weniger Padding, damit mehr passt */
.modal-article .modal-body {
    padding: 1.1rem 1.25rem;
}
.modal-article .modal-body > .form-group {
    margin-bottom: 0.85rem;
}

/* ── Error-Modal (klick-zu-schließen) ─────────────────────────── */
.modal-error {
    max-width: 30rem;
}
.modal-error .modal-header {
    border-bottom: 0;
    padding-bottom: 0.5rem;
}
.modal-error .modal-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}
.error-modal-icon {
    font-size: 1.4rem;
    line-height: 1;
}
.modal-error .modal-body {
    padding-top: 0.4rem;
}
.modal-error .modal-body p {
    margin: 0 0 0.5rem;
    line-height: 1.55;
}
.modal-error .modal-footer {
    justify-content: flex-end;
}

.error-modal-items {
    margin: 0.6rem 0 0;
    padding: 0.7rem 0.9rem 0.7rem 2rem;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    list-style: disc;
    font-size: var(--fs-sm);
    line-height: 1.6;
}
.error-modal-items li {
    margin: 0.15rem 0;
}

/* Severity-spezifische Akzentfarbe */
.modal-error-warning .modal-title {
    color: #b45309;   /* warmes Bernstein */
}
:root[data-theme="dark"] .modal-error-warning .modal-title,
.dark .modal-error-warning .modal-title {
    color: #fbbf24;
}
.modal-error-error .modal-title {
    color: var(--destructive);
}
.modal-error-info .modal-title {
    color: var(--primary);
}

/* ── Beschreibungs-Modal (Zauberstab) ─────────────────────────── */
.desc-wand-modal-intro {
    margin: 0 0 1rem;
    color: var(--foreground-soft);
    font-size: var(--fs-sm);
    line-height: 1.55;
}
.desc-wand-dish-display {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.8rem;
    font-weight: 600;
}
.desc-wand-loading {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--foreground-soft);
    font-size: var(--fs-xs);
    margin-top: 0.35rem;
}
.desc-wand-loading .spinner {
    width: 0.9rem;
    height: 0.9rem;
    border-width: 2px;
}

/* ═══════════════════════════════════════════════════════════════
   ENDE Phase 14
   ═══════════════════════════════════════════════════════════════ */

/* ── "Just-added"-Highlight für KI-vorgeschlagene Chips/Diät ──── */
/* Wird beim Hinzufügen via Diät-Zauberstab an Chip / Form-Check
   gesetzt und nach 2.4s wieder entfernt. */
.chip-item.is-just-added {
    animation: mm-just-added-pulse 1s ease-in-out 2;
    box-shadow: 0 0 0 3px var(--primary-soft, rgba(184, 92, 56, 0.3));
}
.form-check.is-just-added {
    animation: mm-just-added-glow 1s ease-in-out 2;
    border-radius: var(--radius-sm);
}
@keyframes mm-just-added-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.06); }
}
@keyframes mm-just-added-glow {
    0%, 100% { background: transparent; }
    50%      { background: var(--primary-soft, rgba(184, 92, 56, 0.18)); }
}

/* Wand-Button bei den Diät-Eigenschaften (Re-Use des Stils) */
.diet-row-with-wand {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.6rem;
    margin-bottom: 0.35rem;
}
.diet-row-with-wand .form-label {
    margin: 0;
}

/* ── Inline-Bubble-Hinweis nahe am Anker-Element ─────────────── */
/* Wird vom JS-Manager (MenuMage.toastAt) im body platziert. */
.mm-bubble {
    position: absolute;
    z-index: 9998;
    background: var(--surface-elevated);
    color: var(--foreground);
    border: 1px solid var(--border-strong);
    border-left-width: 4px;
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.85rem 0.6rem 0.9rem;
    font-size: var(--fs-sm);
    line-height: 1.4;
    width: max-content;
    max-width: min(22rem, calc(100vw - 1.5rem));
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.18s ease, transform 0.18s ease;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}
.mm-bubble.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.mm-bubble.is-leaving {
    opacity: 0;
    transform: translateY(-2px);
}

.mm-bubble-text {
    flex: 1;
    min-width: 0;
}
.mm-bubble-icon {
    flex-shrink: 0;
    font-size: 1rem;
    line-height: 1.4;
}
.mm-bubble-close {
    flex-shrink: 0;
    background: transparent;
    border: 0;
    color: var(--foreground-soft);
    font-size: 1.1rem;
    line-height: 1;
    padding: 0 0.1rem;
    margin: -0.1rem -0.2rem 0 0;
    cursor: pointer;
    border-radius: var(--radius-xs);
    transition: color 0.15s, background 0.15s;
}
.mm-bubble-close:hover {
    color: var(--foreground);
    background: var(--muted);
}

/* Severity-Akzentfarbe links */
.mm-bubble-success { border-left-color: var(--success, #10b981); }
.mm-bubble-error   { border-left-color: var(--destructive, #ef4444); }
.mm-bubble-warning { border-left-color: #f59e0b; }
.mm-bubble-info    { border-left-color: var(--primary); }

/* Pfeil – nutzt CSS-Variable wie der Tooltip */
.mm-bubble::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: 0.45rem solid transparent;
    left: var(--mm-bubble-arrow-x, 50%);
    transform: translateX(-50%);
}
.mm-bubble[data-placement="top"]::before {
    bottom: -0.88rem;
    border-top-color: var(--border-strong);
}
.mm-bubble[data-placement="bottom"]::before {
    top: -0.88rem;
    border-bottom-color: var(--border-strong);
}

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

.theme-toggle:hover {
    color: var(--accent);
    background: var(--muted);
}

.theme-toggle .theme-icon {
    width: 20px;
    height: 20px;
    display: inline-block;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Light-Mode: Mond zeigen, Sonne verstecken */
:root:not([data-theme="dark"]) .theme-icon-light { display: inline-block; }
:root:not([data-theme="dark"]) .theme-icon-dark  { display: none; }

/* Dark-Mode: Sonne zeigen, Mond verstecken */
:root[data-theme="dark"] .theme-icon-light { display: none; }
:root[data-theme="dark"] .theme-icon-dark  { display: inline-block; }

/* ============================================================
   Sektion 40: Header — Globale Hover-Konventionen
   ============================================================
   Im gesamten Header gilt:
   • Keine Text-Unterstreichungen, auch nicht beim Hover.
   • Hover-Textfarbe bei klickbaren Elementen → --primary-hover.
     (Aktive Elemente mit .active behalten ihre eigene Farbe.)
   ============================================================ */

/* — Niemals Underline im Header — */
.site-header a,
.site-header a:hover,
.site-header a:focus,
.site-header a:active,
.site-header a:visited {
    text-decoration: none !important;
}


/* — Einheitliche Hover-Farbe für klickbare Elemente — */
.site-header .nav-link:not(.active):hover,
.site-header .nav-mobile-user-link:not(.active):not(.nav-mobile-logout):hover,
.site-header .restaurant-switcher-trigger:hover,
.site-header .restaurant-switcher-empty:hover,
.site-header .restaurant-switcher-item:not(.is-active):hover,
.site-header .restaurant-switcher-item:not(.is-active):hover .restaurant-switcher-item-name,
.site-header .user-menu-trigger:hover,
.site-header .user-menu-dropdown a:not(.is-active):hover,
.site-header .lang-btn:not(.active):hover {
    color: var(--primary-hover);
}

/* — Restaurant-Switcher: Add-Eintrag erbt die einheitliche Hover-Farbe — */
.site-header .restaurant-switcher-item-add:hover {
    color: var(--primary-hover);
    background: var(--primary-soft);
}

.site-header #restaurantSwitcher:hover .restaurant-switcher-name {
    color: var(--foreground) !important;
    background: var(--primary-soft);
}
.site-header .restaurant-switcher-item-add:hover
.restaurant-switcher-item-logo-fallback {
    border-color: var(--primary-hover);
    color: var(--primary-hover);
}

/* ------------------------------------------------------------
   Sektion 41: Sub-Navigation (Tabs in menus/categories/articles)
   ------------------------------------------------------------ */
.subnav-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    padding: 0;
    flex-wrap: wrap;
    -webkit-overflow-scrolling: touch;
}

.subnav-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius) var(--radius) 0 0;
    color: var(--foreground-soft);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    white-space: nowrap;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.subnav-tab:hover {
    color: var(--foreground);
    background: var(--muted);
    text-decoration: none;
}

.subnav-tab.is-active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: transparent;
}

.subnav-tab.is-active:hover {
    background: transparent;
}

.subnav-tab-icon {
    font-size: 1rem;
    line-height: 1;
}

@media (max-width: 600px) {
    .subnav-tab {
        padding: 0.625rem 0.875rem;
        font-size: 0.9rem;
    }
}

/* ------------------------------------------------------------
   Sektion 42: Page-Header mit mehreren Action-Buttons
   ------------------------------------------------------------ */
.page-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .page-header-actions {
        width: 100%;
    }
    .page-header-actions .btn {
        flex: 1 1 auto;
        justify-content: center;
    }
}

/* ------------------------------------------------------------
   Sektion 43: Developer-Flag-Buttons im Header
   ------------------------------------------------------------ */
/* ------------------------------------------------------------
   Sektion 43: Developer-Flag-Buttons im Header
   ------------------------------------------------------------ */
.dev-flag-wrap {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px;
    border-radius: var(--radius);
    background: var(--muted);
}

.dev-flag-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: calc(var(--radius) - 2px);
    padding: 0;
    position: relative;
    transition: background 0.15s ease, transform 0.15s ease;
}

.dev-flag-btn svg {
    width: 16px;
    height: 16px;
}

/* Grundfarben ? immer aktiv, nicht nur bei Hover oder is-active */
.dev-flag-btn[data-color="green"] svg { color: #22c55e; }
.dev-flag-btn[data-color="blue"]  svg { color: #3b82f6; }

.dev-flag-btn:hover {
    background: var(--card);
    transform: translateY(-1px);
}

.dev-flag-btn:disabled {
    opacity: 0.5;
    cursor: wait;
    transform: none;
}

/* Aktiv-Status: Hintergrund + kleiner Indikator-Strich unten */
.dev-flag-btn.is-active {
    background: var(--card);
    box-shadow: var(--shadow-sm);
}

.dev-flag-btn.is-active::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 3px;
    border-radius: 2px;
}

.dev-flag-btn.is-active[data-color="green"]::after { background: #22c55e; }
.dev-flag-btn.is-active[data-color="blue"]::after  { background: #3b82f6; }

/* Dark-Mode: leicht hellere Farbt�ne f�r besseren Kontrast */
:root[data-theme="dark"] .dev-flag-btn[data-color="green"] svg { color: #4ade80; }
:root[data-theme="dark"] .dev-flag-btn[data-color="blue"]  svg { color: #60a5fa; }
:root[data-theme="dark"] .dev-flag-btn.is-active[data-color="green"]::after { background: #4ade80; }
:root[data-theme="dark"] .dev-flag-btn.is-active[data-color="blue"]::after  { background: #60a5fa; }

/* Dark-Mode: leicht hellere Farbtöne für besseren Kontrast */
:root[data-theme="dark"] .dev-flag-btn[data-color="green"]:hover svg,
:root[data-theme="dark"] .dev-flag-btn.is-active[data-color="green"] svg {
    color: #4ade80;
}
:root[data-theme="dark"] .dev-flag-btn.is-active[data-color="green"]::after {
    background: #4ade80;
}
:root[data-theme="dark"] .dev-flag-btn[data-color="blue"]:hover svg,
:root[data-theme="dark"] .dev-flag-btn.is-active[data-color="blue"] svg {
    color: #60a5fa;
}
:root[data-theme="dark"] .dev-flag-btn.is-active[data-color="blue"]::after {
    background: #60a5fa;
}

/* ------------------------------------------------------------
   Sektion 44: Header-Outline bei aktivem Developer-Flag
   ------------------------------------------------------------ */
.site-header.dev-border-green {
    outline: 5px solid #22c55e;
    outline-offset: -5px;
}
.site-header.dev-border-blue {
    outline: 5px solid #3b82f6;
    outline-offset: -5px;
}

:root[data-theme="dark"] .site-header.dev-border-green {
    outline-color: #4ade80;
}
:root[data-theme="dark"] .site-header.dev-border-blue {
    outline-color: #60a5fa;
}

/* ------------------------------------------------------------
   Sektion 45: Wartungs-Block für Nicht-Developer
   ------------------------------------------------------------ */
.dev-maintenance {
    max-width: 600px;
    margin: 4rem auto;
    padding: 3rem 2rem;
    text-align: center;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.dev-maintenance-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    background: var(--muted);
    color: var(--accent);
}

.dev-maintenance-icon svg {
    width: 40px;
    height: 40px;
}

.dev-maintenance-title {
    margin: 0 0 0.75rem;
    font-size: 1.5rem;
    color: var(--foreground);
}

.dev-maintenance-text {
    margin: 0 0 2rem;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--foreground-soft);
}

@media (max-width: 600px) {
    .dev-maintenance {
        margin: 2rem 1rem;
        padding: 2rem 1.25rem;
    }
    .dev-maintenance-icon {
        width: 64px;
        height: 64px;
    }
    .dev-maintenance-icon svg {
        width: 32px;
        height: 32px;
    }
    .dev-maintenance-title {
        font-size: 1.25rem;
    }
}


.contact-hero {
    text-align: center;
    margin: 0 auto 2.5rem;
    max-width: 720px;
}

.contact-hero-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--muted);
    color: var(--primary);
    margin-bottom: 1rem;
}

.contact-hero-icon svg {
    width: 36px;
    height: 36px;
}

.contact-hero-title {
    margin: 0 0 .5rem;
    font-size: 1.875rem;
    line-height: 1.2;
    color: var(--foreground);
}

.contact-hero-subtitle {
    margin: 0;
    font-size: 1.05rem;
    color: var(--foreground-soft);
    line-height: 1.5;
}

@media (max-width: 600px) {
    .contact-hero-title { font-size: 1.5rem; }
    .contact-hero-icon  { width: 56px; height: 56px; }
    .contact-hero-icon svg { width: 28px; height: 28px; }
}

/* ------------------------------------------------------------
   Layout: Info-Card + Form
   ------------------------------------------------------------ */
.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
    max-width: 1100px;
    margin: 0 auto;
}

@media (max-width: 900px) {
    .contact-grid { grid-template-columns: 1fr; }
}

/* Info-Card (linke Spalte) */
.contact-info-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.contact-info-title {
    margin: 0 0 1rem;
    font-size: 1.125rem;
    color: var(--foreground);
}

.contact-info-row {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .75rem 0;
    border-top: 1px solid var(--border);
}

.contact-info-row:first-of-type {
    border-top: none;
    padding-top: 0;
}

.contact-info-icon {
    font-size: 1.125rem;
    line-height: 1.2;
    flex-shrink: 0;
}

.contact-info-label {
    font-size: .8125rem;
    color: var(--foreground-soft);
    margin-bottom: 2px;
}

.contact-info-value {
    color: var(--foreground);
    font-weight: 500;
    word-break: break-word;
}

.contact-info-value a {
    color: var(--primary);
    text-decoration: none;
}

.contact-info-value a:hover { text-decoration: underline; }

.contact-info-tip {
    margin-top: 1rem;
    padding: .75rem .875rem;
    background: var(--muted);
    border-radius: var(--radius);
    font-size: .875rem;
    color: var(--foreground-soft);
    line-height: 1.5;
}

/* Form-Card (rechte Spalte) */
.contact-form-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
}

.contact-form-title {
    margin: 0 0 1.25rem;
    font-size: 1.25rem;
    color: var(--foreground);
}

.contact-char-count {
    text-align: right;
    font-size: .8125rem;
    color: var(--foreground-soft);
    margin-top: .25rem;
}

/* Honeypot: fÃ¼r Menschen unsichtbar, fÃ¼r Bots aber crawlbar */
.contact-honeypot {
    position: absolute !important;
    left: -9999px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

@media (max-width: 600px) {
    .contact-form-card { padding: 1.25rem; }
    .contact-info-card { padding: 1.25rem; }
}

/* ------------------------------------------------------------
   Eigene Tickets (Tabelle + Unread-Marker)
   ------------------------------------------------------------ */
.my-tickets-section { max-width: 1100px; margin-left: auto; margin-right: auto; }

.my-tickets-heading {
    margin: 0 0 .25rem;
    font-size: 1.25rem;
    color: var(--foreground);
}

.tickets-table tbody tr.ticket-row:hover {
    background: var(--muted);
}

.unread-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    margin-left: .375rem;
    vertical-align: middle;
    box-shadow: 0 0 0 2px var(--card);
    animation: unread-pulse 1.6s ease-in-out infinite;
}

@keyframes unread-pulse {
    0%, 100% { transform: scale(1);   opacity: 1;   }
    50%      { transform: scale(1.3); opacity: .75; }
}

/* ------------------------------------------------------------
   Ticket-Detail-Modal
   ------------------------------------------------------------ */
.ticket-detail-meta {
    display: flex;
    gap: .75rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.ticket-detail-meta-item {
    font-size: .875rem;
    color: var(--foreground-soft);
}

.ticket-detail-subject {
    margin: .25rem 0 1rem;
    font-size: 1.125rem;
    color: var(--foreground);
    font-weight: 600;
}

/* Einzelne Nachricht (User vs Admin) */
.ticket-msg {
    margin: .75rem 0;
    padding: .875rem 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    line-height: 1.55;
}

.ticket-msg-user {
    background: var(--card);
    border-left: 3px solid var(--foreground-soft);
}

.ticket-msg-admin {
    background: var(--muted);
    border-left: 3px solid var(--primary);
}

.ticket-msg-meta {
    font-size: .8125rem;
    color: var(--foreground-soft);
    margin-bottom: .5rem;
}

.ticket-msg-text {
    color: var(--foreground);
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

/* Reopen-Form im Modal */
.ticket-reopen-form {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--muted);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border);
}

.ticket-reopen-form .form-label {
    display: block;
    margin-bottom: .5rem;
    color: var(--foreground);
}

/* Modal-Lg-Variante: etwas breiter fÃ¼r Tickets */
.modal.modal-lg {
    max-width: 760px;
    width: 92vw;
}

@media (max-width: 600px) {
    .ticket-msg { padding: .75rem; }
    .modal.modal-lg { width: 96vw; }
}

.plan-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(10, 0, 15, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.plan-icon svg {
    width: 60%;
    height: 60%;
    display: block;
}

/* Free: Outline-Stern in primary, weiÃer Kreis */
.plan-icon-free {
    background: #645AFF20;
    color: var(--primary);
}

/* Premium: Filled Stern in primary, weiÃer Kreis */
.plan-icon-premium {
    background: #645AFF20;
    color: var(--primary);
}

/* Pro: WeiÃer Stern, primary Kreis, Glow */
.plan-icon-pro {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(10, 0, 15, 0.1);
}

/* GrÃ¶Ãenmodifier */
.plan-icon-md { width: 3.5rem;  height: 3.5rem; }
.plan-icon-lg { width: 4.5rem;  height: 4.5rem; }

/* In Plan-Karten: zentriert oben, mit Abstand zum Plan-Namen.
   Direkter Kind-Selektor verhindert, dass z. B. das Icon in
   einer Subscription-Card auch zentriert wird. */
.pricing-card > .plan-icon {
    display: flex;
    margin: 0 auto 1rem;
}

/* Optional: leichter Hover-Lift in den Plan-Karten */
.pricing-card:hover > .plan-icon {
    transform: translateY(-2px);
}




/* ============================================================
   Trigger-/Onboarding-System (Hilfe-Launcher + Chat-Popup)
   Variablen passend zum Indigo-Theme; Light/Dark automatisch.
   ============================================================ */

/* ── Schwebender Hilfe-Launcher (unten rechts) ───────────── */
.mm-help-launcher {
    position: fixed; right: 1.25rem; bottom: 1.25rem;
    width: 52px; height: 52px; border-radius: var(--radius-full, 9999px);
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--primary); color: white; border: none; cursor: pointer;
    box-shadow: var(--shadow-lg);
    z-index: 850; transition: transform .15s ease, filter .15s ease, background .15s ease;
}
.mm-help-launcher:hover { transform: translateY(-2px); background: var(--primary-hover, var(--primary)); }
.mm-help-launcher:focus-visible { outline: none; box-shadow: var(--shadow-lg), var(--shadow-focus); }

/* ── Launcher-Popover ────────────────────────────────────── */
.mm-help-popover {
    position: fixed; right: 1.25rem; bottom: 5.5rem; width: 264px;
    background: var(--surface); color: var(--foreground);
    border: 1px solid var(--border); border-radius: var(--radius-md, 1rem);
    box-shadow: var(--shadow-lg);
    padding: 1rem; z-index: 860;
    transform: scale(.85); opacity: 0; transform-origin: bottom right;
    pointer-events: none; transition: transform .16s ease, opacity .16s ease;
}
.mm-help-popover.is-open { transform: scale(1); opacity: 1; pointer-events: auto; }
.mm-help-popover-title { font-weight: 700; margin-bottom: .65rem; color: var(--foreground); }
.mm-help-toggle { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: .9rem; }
.mm-help-toggle-label { font-size: .9rem; font-weight: 600; color: var(--foreground); }
.mm-help-hint { font-size: .8rem; color: var(--foreground-subtle); margin-top: .45rem; line-height: 1.4; }

/* Toggle-Schalter */
.mm-switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: 0 0 auto; }
.mm-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.mm-switch-track { position: absolute; inset: 0; background: var(--border-strong, var(--border)); border-radius: 999px; transition: background .2s ease; }
.mm-switch-track::after {
    content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
    border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: transform .2s ease;
}
.mm-switch input:checked + .mm-switch-track { background: var(--primary); }
.mm-switch input:checked + .mm-switch-track::after { transform: translateX(18px); }

/* ── Chat-Popup (Trigger) – zentriert auf dem Bildschirm ─── */
.mm-trigger-card {
    position: fixed; top: 50%; left: 50%;
    width: 380px; max-width: calc(100vw - 2rem);
    background: var(--surface); color: var(--foreground);
    border: 1px solid var(--border); border-radius: var(--radius-lg, 1.5rem);
    padding: 1.1rem 1.15rem 1rem; z-index: 1500;
    transform: translate(-50%, -50%) scale(.6); opacity: 0;
    /* Großzügiger Schatten + sanfte Abdunklung des Hintergrunds (Spotlight) */
    box-shadow: var(--shadow-xl, var(--shadow-lg)), 0 0 0 100vmax rgba(20, 18, 40, .42);
    transition: transform .24s cubic-bezier(.18,.89,.32,1.28), opacity .2s ease;
}
.mm-trigger-card.is-open { transform: translate(-50%, -50%) scale(1); opacity: 1; }

.mm-trigger-close {
    position: absolute; top: .5rem; left: .55rem; width: 28px; height: 28px;
    border: none; background: transparent; color: var(--foreground-subtle);
    font-size: 1.5rem; line-height: 1; cursor: pointer; border-radius: var(--radius-sm, .5rem);
}
.mm-trigger-close:hover { background: var(--muted); color: var(--foreground); }

.mm-trigger-head { display: flex; align-items: center; gap: .7rem; padding: 0 0 .8rem .25rem; }
.mm-trigger-headtext { order: 1; display: flex; flex-direction: column; line-height: 1.25; }
.mm-trigger-avatar {
    order: 2; margin-left: auto; width: 44px; height: 44px; flex: 0 0 auto;
    border-radius: 50%; overflow: hidden; background: var(--primary);
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 0 0 3px var(--primary-soft, color-mix(in srgb, var(--primary) 18%, transparent));
}
.mm-trigger-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mm-trigger-avatar.is-fallback::after { content: "💬"; font-size: 1.2rem; }
.mm-trigger-name { font-weight: 700; font-size: .95rem; color: var(--foreground); }
.mm-trigger-typinglabel { font-size: .76rem; color: var(--foreground-subtle); }

.mm-trigger-body { padding-left: .25rem; }
.mm-trigger-title { font-weight: 700; margin-bottom: .4rem; color: var(--foreground); }
.mm-trigger-bubble {
    background: var(--muted); color: var(--foreground);
    border-radius: 4px 14px 14px 14px; padding: .75rem .9rem;
    font-size: .93rem; line-height: 1.55; cursor: default; min-height: 1.5rem;
}
.mm-trigger-dots { display: inline-flex; gap: 4px; vertical-align: middle; }
.mm-trigger-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--foreground-subtle); opacity: .35; animation: mmDots 1s infinite ease-in-out; }
.mm-trigger-dots i:nth-child(2) { animation-delay: .15s; }
.mm-trigger-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes mmDots { 0%,100% { opacity: .25; transform: translateY(0); } 50% { opacity: .9; transform: translateY(-3px); } }

.mm-trigger-actions { display: flex; justify-content: flex-end; padding-top: .85rem; }

@media (max-width: 600px) {
    .mm-help-popover { right: .75rem; left: .75rem; width: auto; }
    .mm-help-launcher { right: .9rem; bottom: .9rem; }
}

/* Bewegungsreduzierung respektieren */
@media (prefers-reduced-motion: reduce) {
    .mm-trigger-card { transition: opacity .12s linear; }
    .mm-trigger-card,
    .mm-trigger-card.is-open { transform: translate(-50%, -50%); }
    .mm-help-popover { transition: opacity .12s linear; transform: none; }
    .mm-help-popover.is-open { transform: none; }
    .mm-trigger-dots i { animation: none; }
}
