:root {
    color-scheme: light dark;
    accent-color: var(--primary);

    &:has(> head > meta[name="color-scheme"][content="dark"]) {
        color-scheme: dark;
    }
    &:has(> head > meta[name="color-scheme"][content="light"]) {
        color-scheme: light;
    }
    --primary: #059669;
    --primary-hover: #047857;
    --emerald-cta: #00c47c;
    --mint-bg: #cdeee0;
    --mint-soft: #f0fdf4;
    --accent: #0d9488;
    --highlight: #0284c7;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #0ea5e9;

    /* Harmonized 7-Level Typography Scale (High-Density Scannable) */
    --fs-xs: 0.72rem;     /* 11.5px: Badges, Tips, Scales, Sub-Pills */
    --fs-sm: 0.78rem;     /* 12.5px: Sublines, Descriptions, Previous values */
    --fs-base: 0.84rem;   /* 13.5px: Standard Body Text, Form Labels, Table Cells */
    --fs-md: 0.94rem;     /* 15px: Subheaders (H3), Section Titles */
    --fs-lg: 1.05rem;     /* 16.8px: Card Values, Emphasized Intermediate Totals */
    --fs-xl: 1.18rem;     /* 18.8px: Modal Titles (H2), KPI Values */
    --fs-2xl: 1.35rem;    /* 21.6px: Page Headings (H1), Hero Titles */
    --fs-3xl: 1.65rem;    /* 26.4px: Big Hero KPIs */

    /* Central Design Tokens & Gradients (Swiss Private Banking Dark Mode Option) */
    --primary-gradient: linear-gradient(135deg, #00c47c 0%, #059669 100%);
    --primary-glow: rgba(5, 150, 105, 0.22);
    --hero-gradient: linear-gradient(135deg, #34d399 0%, #059669 55%, #0284c7 100%);
    --card-glass: rgba(17, 24, 39, 0.82);
    --card-glass-hover: rgba(30, 41, 59, 0.9);
    --card-glass-active: rgba(5, 150, 105, 0.14);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(16, 185, 129, 0.38);
    --border-active: rgba(16, 185, 129, 0.5);

    /* Dark Mode Defaults (Optional Toggle) */
    --bg: #0b1120;
    --card-bg: #111827;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;

    /* Harmonized Design System Radius */
    --radius: 14px;          /* Cards, Modals, Widgets, Containers */
    --radius-input: 10px;    /* Form Controls: inputs, selects, custom dropdowns */
    --radius-btn: 999px;     /* Pill Buttons (analog thun-notar.ch) */
    --radius-sm: 6px;        /* Tags, Badges, Chips */

    --shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.38), 0 2px 6px -1px rgba(0, 0, 0, 0.25);
    --header-bg: rgba(11, 17, 32, 0.92);

    /* Secondary Elements for Dark Mode */
    --rest-box-bg: rgba(255, 255, 255, 0.03);
    --category-bg: rgba(255, 255, 255, 0.06);
    --progress-track: rgba(255, 255, 255, 0.08);
    --input-bg: rgba(255, 255, 255, 0.04);
    --input-border: rgba(255, 255, 255, 0.11);
}

body.light-mode {
    color-scheme: light;
    --bg: #f3fbf7;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #475569;
    --shadow: 0 2px 12px -2px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.04);
    --header-bg: rgba(255, 255, 255, 0.96);

    --primary: #059669;
    --primary-hover: #047857;
    --emerald-cta: #00c47c;
    --mint-bg: #cdeee0;
    --mint-soft: #f0fdf4;
    --primary-gradient: linear-gradient(135deg, #00c47c 0%, #059669 100%);
    --primary-glow: rgba(5, 150, 105, 0.14);
    --hero-gradient: linear-gradient(135deg, #059669 0%, #0d9488 55%, #0284c7 100%);
    --card-glass: #ffffff;
    --card-glass-hover: #ffffff;
    --card-glass-active: rgba(5, 150, 105, 0.08);
    --border-subtle: #e2e8f0;
    --border-hover: rgba(5, 150, 105, 0.4);
    --border-active: rgba(5, 150, 105, 0.55);

    /* Secondary Elements for Light Mode */
    --rest-box-bg: #f8fafc;
    --category-bg: #f0fdf4;
    --progress-track: #e2e8f0;
    --input-bg: #ffffff;
    --input-border: #cbd5e1;
}

/* --- PROGRESSIVE DISCLOSURE: FOKUS-MODUS (STANDARD) VS. EXPERTEN-MODUS --- */
body:not(.expert-mode) .expert-only {
    display: none !important;
}
body.expert-mode .standard-only {
    display: none !important;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: clip;
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.25s, color 0.25s;
}

/* --- LOGIN / LANDING SCREEN --- */
.login-page {
    display: block;
    width: 100%;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text-main);
    overflow-x: hidden;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    padding: 30px 20px;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.logo-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.branding {
    margin-bottom: 1.2rem;
    display: flex;
    justify-content: center;
}

.app-logo {
    width: 110px;
    height: 110px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-radius: 24px;
}

.login-form {
    margin-top: 0;
}

.nav-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.app-name-small {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.hero-title {
    font-weight: 900;
    font-size: 2.2rem;
    line-height: 1.1;
    color: var(--text-main);
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 300px;
    margin: 0 auto;
}

.input-group {
    margin-bottom: 1rem;
}

input, select, textarea {
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius-input);
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s;
}

select {
    appearance: none;
    -webkit-appearance: none;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

button {
    width: auto;
    padding: 10px 16px;
    border-radius: var(--radius-btn);
    border: none;
    background: var(--primary);
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.login-form button,
.btn-block {
    width: 100%;
}

button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.error-msg {
    color: var(--danger);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

/* --- DASHBOARD --- */
html {
    background-color: var(--bg);
    transition: background-color 0.3s;
}

nav {
    position: sticky;
    top: 0;
    padding-top: env(safe-area-inset-top, 0px);
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    background: var(--header-bg);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    z-index: 9000;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand h1 {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
}

.stats {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    padding: 6px 16px;
    border-radius: 50px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

#total-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
}

#total-stat .label {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    display: block;
    line-height: 1.1;
}

#total-stat .value,
#total-stat span:not(.label) {
    font-weight: 800;
    font-size: 1.0rem;
    color: var(--text-main);
    line-height: 1.2;
}

/* Light mode */
body.light-mode .stats {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(0, 0, 0, 0.09) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06) !important;
}

body.light-mode #total-stat .label {
    color: #94a3b8 !important;
}

body.light-mode #total-stat .value,
body.light-mode #total-stat span:not(.label) {
    color: #0f172a !important;
}


.nav-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    padding: 0 !important;
    border-radius: var(--radius-btn);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.btn-icon svg {
    width: 18px !important;
    height: 18px !important;
    stroke: currentColor;
    display: block;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Theme-like Slide Menu Trigger */
.menu-trigger {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    padding: 0 !important;
    border-radius: 10px !important;
    background: rgba(30, 41, 59, 0.75) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #f1f5f9 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
    backdrop-filter: blur(12px) !important;
    box-sizing: border-box !important;
}

.menu-trigger svg {
    width: 18px !important;
    height: 18px !important;
    stroke: currentColor !important;
    display: block !important;
    transition: stroke 0.2s ease !important;
}

.menu-trigger:hover {
    background: rgba(30, 41, 59, 0.95) !important;
    border-color: rgba(139, 92, 246, 0.45) !important;
    box-shadow: 0 4px 14px var(--primary-glow) !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
}

/* Prorated Rest-Months Harmonious Table Badge */
.rest-prorated-pill {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    font-size: 0.68rem;
    padding: 2px 7px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
    margin-top: 4px;
    margin-left: auto;
    width: fit-content;
    white-space: nowrap;
    line-height: 1.3;
    transition: all 0.2s ease;
}

.rest-prorated-pill .pill-label {
    color: var(--text-muted);
    font-weight: 500;
    opacity: 0.85;
}

.rest-prorated-pill .pill-val.pos {
    color: #10b981;
    font-weight: 600;
}

.rest-prorated-pill .pill-val.neg {
    color: #ef4444;
    font-weight: 600;
}

.rest-prorated-pill .pill-val.neutral {
    color: var(--text-muted);
    font-weight: 600;
}

/* Table Cell Sub-Notes (Dezente Hinweise auf neuer Zeile ohne Klammern) */
.cell-subnote {
    display: block;
    font-size: 0.69rem;
    font-weight: 500;
    line-height: 1.35;
    margin-top: 2px;
    white-space: nowrap;
    opacity: 0.88;
    letter-spacing: 0.01em;
}

.cell-subnote.note-ahv {
    color: #38bdf8;
}

.cell-subnote.note-pk-rente {
    color: #818cf8;
}

.cell-subnote.note-steuern {
    color: #f87171;
}

.cell-subnote.note-darlehen {
    color: #fb923c;
}

.cell-subnote.note-ao {
    color: #fbbf24;
}

.cell-subnote.note-pk {
    color: #a78bfa;
}

.cell-subnote.note-einkauf {
    color: #c084fc;
    opacity: 0.82;
}

.cell-subnote.note-firma {
    color: #38bdf8;
}

/* --- UNIFIED PAGE CONTAINER & SPACING SYSTEM (DRY AUDIT) --- */
.overview-section,
.community-container {
    width: 100% !important;
    max-width: 1220px !important;
    margin: 0 auto !important;
    padding: 18px 18px 24px 18px !important;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-sizing: border-box !important;
}

.chart-section {
    width: 100%;
    padding: 16px 22px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 28px;
    border: 1px solid var(--border-subtle);
    position: relative;
    overflow: hidden;
}

.chart-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.5), transparent);
    opacity: 0.6;
}

.search-section {
    width: 100%;
    padding: 0; /* Handled by overview-section */
}

/* ==========================================================================
   SEMANTIC UTILITIES & UNIFIED DRY CARD SYSTEM
   ========================================================================== */
.color-positive { color: var(--success) !important; }
.color-warning  { color: var(--warning) !important; }
.color-danger   { color: var(--danger) !important; }
.color-info     { color: var(--info) !important; }
.color-primary  { color: var(--primary) !important; }
.color-muted    { color: var(--text-muted) !important; }
.color-main     { color: var(--text-main) !important; }

/* Base Glassmorphic Card */
.card-base {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 14px 16px;
    box-sizing: border-box;
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

body.light-mode .card-base {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* 1. Breakdown / Comparison Card (e.g. Sparpotenzial, Summary) */
.breakdown-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-sizing: border-box;
}

body.light-mode .breakdown-card {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.breakdown-card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.breakdown-card-title {
    font-size: var(--fs-base);
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.breakdown-card-highlight {
    font-size: var(--fs-xl);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.breakdown-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: var(--fs-base);
}

.breakdown-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.breakdown-row-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: var(--fs-base);
}

.breakdown-row-values {
    display: flex;
    align-items: center;
    gap: 12px;
    font-variant-numeric: tabular-nums;
}

.breakdown-val-old {
    color: var(--text-muted);
    text-decoration: line-through;
    font-size: var(--fs-sm);
}

.breakdown-val-current {
    font-weight: 700;
    color: var(--text-main);
    font-size: var(--fs-base);
}

.breakdown-val-diff {
    font-weight: 700;
    min-width: 85px;
    text-align: right;
    font-size: var(--fs-base);
}

.breakdown-card-divider {
    border-top: 1px dashed var(--border-subtle);
    padding-top: 10px;
    margin-top: 2px;
}

.breakdown-card-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--fs-base);
}

.breakdown-total-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--info);
    font-weight: 700;
}

.breakdown-total-val {
    color: var(--info);
    font-size: var(--fs-md);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

/* 2. Interactive Slider Card */
.slider-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    box-sizing: border-box;
}

body.light-mode .slider-card {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.slider-card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.slider-card-title {
    font-size: var(--fs-base);
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.slider-card-val {
    font-size: var(--fs-lg);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.slider-card-scale {
    display: flex;
    justify-content: space-between;
    font-size: var(--fs-xs);
    color: var(--text-muted);
    margin-top: -2px;
}

.slider-card-desc {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    line-height: 1.4;
}

/* 3. Insight & Lever Card (Portfolio Hebel & Modal Hebel) */
.insight-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

body.light-mode .insight-card {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.insight-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
}

.insight-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.insight-card-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: var(--fs-base);
    font-weight: 700;
}

.insight-card-badge {
    font-size: var(--fs-xs);
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

.insight-card-desc {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    line-height: 1.45;
}

.insight-card-action {
    margin-top: auto;
    font-size: var(--fs-sm);
    font-weight: 600;
    padding: 8px 12px;
    border-radius: var(--radius-btn);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 4. Setting Toggle Card */
.setting-toggle-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    box-sizing: border-box;
}

body.light-mode .setting-toggle-card {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
}

.setting-toggle-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.setting-toggle-card-title {
    font-size: var(--fs-base);
    font-weight: 700;
    color: var(--text-main);
}

.setting-toggle-card-desc {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    line-height: 1.45;
}

/* --- CARDS (COMPACT SCANNABLE SWISS FINTECH LAYOUT) --- */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 13px 15px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-subtle);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.overview-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 18px 22px !important;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-subtle);
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.card:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
}

.card.over-budget {
    border: 1.5px solid var(--danger);
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.2);
    z-index: 5;
}

.card-header {
    margin-bottom: 10px;
}

.card-top-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.card-inline-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    opacity: 0.35;
    transition: opacity 0.18s ease;
}

.card:hover .card-inline-actions {
    opacity: 1;
}

.rest-inline {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    flex-shrink: 0;
    text-align: right;
}

.rest-inline-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.rest-inline .rest {
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}

.card.over-budget .rest-inline .rest {
    color: var(--danger);
}

.btn-card-edit, .btn-card-delete {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
    padding: 0 !important;
    border-radius: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    transition: all 0.15s ease !important;
}

.btn-card-edit {
    background: transparent !important;
    border: 1px solid transparent !important;
    color: var(--text-muted) !important;
}

.btn-card-delete {
    background: transparent !important;
    border: 1px solid transparent !important;
    color: #ef4444 !important;
}

.btn-card-edit:hover {
    background: rgba(139, 92, 246, 0.15) !important;
    border-color: rgba(139, 92, 246, 0.35) !important;
    color: var(--text-main) !important;
}

.btn-card-delete:hover {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
    color: #ef4444 !important;
}

.card h3 {
    font-size: 0.94rem;
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category {
    font-size: 0.65rem;
    background: var(--category-bg);
    border: 1px solid var(--border-subtle);
    padding: 1px 6px;
    border-radius: 5px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.progress-container {
    margin-bottom: 10px;
}

.progress-bg {
    background: var(--progress-track);
    height: 6px;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 5px;
}

.bar {
    background: linear-gradient(90deg, var(--accent) 0%, var(--primary) 100%);
    height: 100%;
    width: 0%;
    border-radius: 999px;
    transition: width 0.6s cubic-bezier(0.65, 0, 0.35, 1);
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.74rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.card-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rest-box {
    display: none;
}

.actions {
    display: flex;
    gap: 6px;
    align-items: center;
    width: 100%;
}

.actions input {
    flex: 1;
    height: 32px;
    font-size: 0.8rem;
    padding: 0 10px;
    border-radius: 8px;
}

.actions button {
    width: auto;
    height: 32px;
    padding: 0 12px;
    font-size: 0.8rem;
}

.actions button.btn-quick-add {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    padding: 0 !important;
    border-radius: 8px;
    background: var(--primary);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.18s ease;
    flex-shrink: 0;
}

.actions button.btn-quick-add:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.actions button.btn-toggle {
    width: 100% !important;
    height: 32px !important;
    padding: 0 14px !important;
    font-size: 0.78rem !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    outline: none !important;
    border: none !important;
}

.obligation-status-pill {
    width: 100%;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px dashed var(--border-subtle);
}

/* --- PHYSICS --- */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
}

/* --- UNIFIED DESIGN SYSTEM: MODALS, FORMS & BUTTONS --- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99990;
    padding: 20px;
    box-sizing: border-box;
}

.modal.active {
    display: flex !important;
}

.modal-content {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    width: 100%;
    max-width: 600px;
    max-height: calc(100vh - 40px);
    height: auto;
    display: flex;
    flex-direction: column;
    border-radius: var(--radius);
    padding: 0 !important;
    overflow: hidden !important;
    border: 1px solid var(--input-border);
    box-shadow: var(--shadow);
    color: var(--text-main);
    box-sizing: border-box;
}

.admin-modal-content {
    max-width: 950px;
    width: 95%;
    max-height: calc(100vh - 40px);
    height: 90vh;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.admin-modal-content .modal-header,
.admin-modal-content .settings-tabs-wrapper {
    flex-shrink: 0 !important;
}

.admin-modal-content .admin-modal-body {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

.admin-modal-content .modal-footer {
    flex-shrink: 0 !important;
    min-height: 56px !important;
    background: var(--card-bg, #111827) !important;
    border-top: 1px solid var(--input-border) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    z-index: 10 !important;
}

.settings-tabs-wrapper {
    flex-shrink: 0;
    border-bottom: 1px solid var(--input-border);
    background: rgba(255, 255, 255, 0.02);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.settings-tabs {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
}

.settings-tabs::-webkit-scrollbar {
    display: none;
}

.modal-body {
    padding: 20px 24px;
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

.admin-modal-body {
    padding: 16px 20px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px !important;
    margin: 0 !important;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--input-border);
}

.modal-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.close-btn, .btn-close-icon, .slide-menu-close {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #ffffff;
    width: 34px;
    height: 34px;
    min-width: 34px;
    max-width: 34px;
    min-height: 34px;
    max-height: 34px;
    padding: 0;
    border-radius: 50%;
    aspect-ratio: 1 / 1;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

body.light-mode .close-btn,
body.light-mode .btn-close-icon,
body.light-mode .slide-menu-close {
    background: rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.14);
    color: #0f172a;
}

.close-btn svg, .btn-close-icon svg, .slide-menu-close svg {
    display: block;
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 2.2px;
    pointer-events: none;
}

.close-btn:hover, .btn-close-icon:hover, .slide-menu-close:hover {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: rgba(239, 68, 68, 0.5) !important;
    color: #ef4444 !important;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 24px 20px !important;
    margin-top: 0 !important;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid var(--input-border);
    flex-shrink: 0 !important;
}

/* --- UNIFIED FORM CONTROLS & INPUTS --- */
input[type="text"],
input[type="number"],
input[type="date"],
input[type="month"],
input[type="password"],
select,
.app-select,
.form-control,
.form-select {
    width: 100%;
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 12px !important;
    border-radius: var(--radius-input, 10px);
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.88rem !important;
    line-height: normal;
    box-sizing: border-box !important;
    transition: all 0.2s ease;
}

select,
.app-select,
.form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 32px;
    cursor: pointer;
}

select option,
.app-select option {
    background-color: #1e293b;
    color: #f8fafc;
}

body.light-mode select option,
body.light-mode .app-select option {
    background-color: #ffffff;
    color: #0f172a;
}

input:focus, select:focus, .form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

/* --- UNIFIED BUTTON SYSTEM --- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    padding: 0 18px;
    background: var(--primary);
    color: #ffffff !important;
    border: none;
    border-radius: var(--radius-btn, 10px);
    font-family: inherit;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    white-space: nowrap;
    box-sizing: border-box;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    padding: 0 16px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-main);
    border-radius: var(--radius-btn, 10px);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    white-space: nowrap;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    color: var(--text-main);
    transform: translateY(-1px);
}
body.light-mode .btn-secondary:hover {
    background: rgba(0, 0, 0, 0.05);
}

.btn-danger, .btn-trash {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    background: #ef4444 !important;
    border: none !important;
    color: #ffffff !important;
    border-radius: var(--radius-btn, 10px);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    white-space: nowrap;
    box-sizing: border-box;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.25);
}

.btn-danger:hover, .btn-trash:hover {
    background: #dc2626 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Button Sizes & Variants */
.btn-sm,
.btn-xs,
.btn-action-inline {
    height: 24px !important;
    min-height: 24px !important;
    padding: 0 10px !important;
    font-size: 0.76rem !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    line-height: normal !important;
    box-sizing: border-box !important;
}

.btn-pill {
    border-radius: 9999px !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
}

.btn-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-btn, 10px);
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-main);
    cursor: pointer;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.btn-icon.btn-sm {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    border-radius: 6px !important;
}

.btn-icon.btn-xs {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    border-radius: 5px !important;
}

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

.btn-primary-large {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: white;
    border-radius: 15px;
    font-weight: 700;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 10px 15px -3px rgba(139, 92, 246, 0.3);
}

.btn-primary-large:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(139, 92, 246, 0.4);
}

.modal-subheader,
.settings-subheader {
    margin: 20px 0 12px 0;
    padding: 0;
    background: transparent !important;
    border-left: none !important;
    border-radius: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-shadow: none !important;
}

.settings-section {
    display: none;
    flex-direction: column;
    gap: 28px;
}

.settings-section[style*="display: block"],
.settings-section[style*="display: flex"] {
    display: flex !important;
    flex-direction: column;
    gap: 28px;
}

.settings-section.section-budget {
    gap: 24px !important;
}

.settings-section > div:first-child > .modal-subheader:first-child,
.settings-section > div:first-child > .settings-subheader:first-child,
.settings-section > .modal-subheader:first-child,
.settings-section > .settings-subheader:first-child,
.settings-section > .modal-subheader:first-of-type,
.settings-section > .settings-subheader:first-of-type,
.section-unternehmen > .modal-subheader:first-child,
.section-unternehmen > .modal-subheader:first-of-type,
.section-unternehmen > input + .modal-subheader,
#company-sections-wrapper .modal-subheader:first-of-type,
.modal-body > .modal-subheader:first-child,
.modal-body > .settings-subheader:first-child,
.modal-body > .modal-subheader:first-of-type,
.modal-body > .settings-subheader:first-of-type {
    margin-top: 0 !important;
}

.settings-group {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.modal-subheader,
.settings-subheader {
    margin: 0 !important;
    padding: 0;
    background: transparent !important;
    border-left: none !important;
    border-radius: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-shadow: none !important;
}

.modal-subheader.has-subtitle {
    align-items: flex-start;
}

.modal-subheader-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.modal-subheader-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

.modal-subheader-subtitle {
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--text-muted);
    line-height: 1.45;
}

.modal-subheader-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* --- UPDATED ADMIN UI & FLOATING TOOLTIPS --- */
.admin-table-header {
    display: grid;
    gap: 10px;
    padding: 6px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0;
    margin: 0;
    align-items: center;
    box-sizing: border-box;
    white-space: nowrap;
}

.admin-th-col {
    display: flex;
    align-items: center;
    min-width: 0;
    box-sizing: border-box;
}

.admin-th-col.is-center {
    justify-content: center;
    text-align: center;
}

.admin-th-col.admin-th-text > span {
    display: inline-flex;
    align-items: center;
    padding: 0 4px;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-th-col.admin-th-badge-wrap {
    justify-content: center;
}

.admin-th-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0 4px;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: help;
    transition: color 0.15s ease;
    box-shadow: none;
}

.admin-th-badge svg {
    color: #94a3b8;
    opacity: 0.75;
    flex-shrink: 0;
    transition: transform 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.admin-th-badge:hover {
    background: transparent;
    border: none;
    color: #ffffff;
    box-shadow: none;
}

.admin-th-badge:hover svg {
    color: #c084fc;
    opacity: 1;
    transform: scale(1.15);
}

.admin-th-empty {
    visibility: hidden;
}

/* --- CUSTOM MODERN FLOATING TOOLTIPS --- */
[data-tooltip] {
    cursor: help;
}

[data-tooltip]::before,
[data-tooltip]::after {
    display: none !important;
}

#global-app-tooltip {
    position: fixed;
    z-index: 9999999;
    padding: 7px 12px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
    color: #f8fafc;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.35;
    max-width: 280px;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s cubic-bezier(0.16, 1, 0.3, 1), transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateY(-3px);
    text-align: center;
    box-sizing: border-box;
}

#global-app-tooltip.global-tooltip-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.admin-item {
    display: grid;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid var(--input-border);
    align-items: center;
    box-sizing: border-box;
    transition: background-color 0.15s ease;
}
.admin-item:hover {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
}
.admin-item:last-child {
    border-bottom: none;
    padding-bottom: 6px;
}
.admin-item .switch,
.admin-item .btn-danger {
    margin: 0 auto;
}

.admin-item input[type="text"], .admin-item input[type="number"], .admin-item input[type="date"], .admin-item select, .admin-item .custom-search-select-btn {
    padding: 0 10px;
    font-size: 0.88rem;
    height: 36px;
    min-height: 36px;
    box-sizing: border-box;
}

.admin-item select {
    padding-right: 28px;
    background-position: right 4px center;
    background-size: 16px;
}

/* --- TOGGLE SWITCH --- */
.switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0,0,0,0.1);
  transition: .3s;
  border-radius: 20px;
}
.light-mode .slider {
    background-color: rgba(0,0,0,0.15);
}
.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
input:checked + .slider {
  background-color: var(--primary);
}
input:checked + .slider:before {
  transform: translateX(16px);
}

.btn-toggle {
    width: 100% !important;
    height: 42px !important;
    padding: 0 20px !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    border: none !important;
    outline: none !important;
    cursor: pointer !important;
    background: #8b5cf6 !important;
    color: #ffffff !important;
    box-shadow: none !important;
    transition: background 0.15s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transform: none !important;
}

.btn-toggle:hover {
    background: #7c3aed !important;
    transform: none !important;
}

.btn-toggle.paid {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

.btn-toggle.paid:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    transform: none !important;
}

/* Nav Icon Styling */
.btn-icon {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(0,0,0,0.05);
}

.btn-icon:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

/* --- SEARCH SECTION --- */
.search-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-container {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    right: 18px;
    left: auto;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    z-index: 2;
}

#budget-search {
    padding-left: 18px;
    padding-right: 48px;
    background: var(--card-bg);
    border: 1px solid var(--input-border);
    box-shadow: var(--shadow);
    height: 50px;
    border-radius: 15px;
}

/* White Trash Icon */
.admin-item .btn-danger {
    background: #ef4444;
    color: white !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-item .btn-danger svg, .admin-item .btn-danger i {
    color: white !important;
}

/* Monochromatic Nav Buttons */
.btn-icon svg {
    color: var(--text-main);
}

.btn-icon:hover svg {
    color: white;
}

.chart-container {
    width: 250px;
    height: 250px;
    flex-shrink: 0;
}

.chart-legend {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.legend-item {
    display: flex;
    flex-direction: column;
}

.legend-item .label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
}

.legend-item .value {
    font-size: 1.1rem;
    font-weight: 800;
}

.legend-item .percent {
    font-size: 0.8rem;
    color: var(--primary);
}

.btn-toggle {
    background: var(--input-bg);
    color: var(--text-main);
    border: 1px solid var(--input-border);
    height: 48px;
    padding: 0 20px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-toggle.paid {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.3);
}

.grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
    gap: 12px;
    padding: 0;
}

/* --- MONTH PICKER --- */
.month-picker {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 10px 0 0 0;
}

.btn-month {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--input-bg) !important;
    color: var(--text-main) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-month:hover:not(:disabled) {
    background: var(--primary) !important;
    color: white !important;
}

.btn-month:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.current-month-display {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.month-name {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-main);
    text-transform: capitalize;
}

.badge-today {
    font-size: 0.65rem;
    background: var(--primary);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
    text-transform: uppercase;
    margin-top: -4px;
}

.history-view-only {
    padding: 8px 16px;
    background: #f1f5f9;
    color: var(--text-muted);
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* --- SCANNER & RECEIPTS --- */
.scanner-view {
    position: relative;
    margin: 0 auto;
    border-radius: 15px;
    width: 100%;
    aspect-ratio: 3/4;
    background: #000;
    overflow: hidden;
}

#scanner-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scan-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    border: 20px solid rgba(0,0,0,0.3);
    box-sizing: border-box;
    pointer-events: none;
}

.scan-line {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 4px;
    background: var(--primary);
    box-shadow: 0 0 15px var(--primary);
    animation: scanMove 2s infinite ease-in-out;
}

@keyframes scanMove {
    0% { top: 0; }
    50% { top: 100%; }
    100% { top: 0; }
}

.scanner-controls {
    padding: 20px;
    background: transparent;
}

.scan-processing {
    width: 100%;
    min-height: 300px;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 100;
}

.scan-processing span {
    font-weight: 800;
    color: var(--primary);
    font-size: 1.1rem;
    letter-spacing: -0.01em;
    animation: pulseText 1.5s infinite ease-in-out;
}

@keyframes pulseText {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.98); }
}

.scan-processing .spinner {
    width: 60px;
    height: 60px;
    border-width: 5px;
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.2);
}

.scan-result-form {
    padding: 0;
    background: transparent;
}

.receipts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 10px 0;
}

.receipt-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--rest-box-bg);
    border-radius: 12px;
    border: 1px solid var(--input-border);
}

.receipt-info h4 { margin: 0; font-size: 1rem; }
.receipt-info span { font-size: 0.75rem; color: var(--text-muted); }
.receipt-meta { text-align: right; }
.receipt-amount { font-weight: 800; font-size: 1.1rem; color: var(--text-main); }

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.scan-close {
    position: absolute;
    top: 15px; right: 15px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    color: white !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 200;
    border: none;
    transition: all 0.2s;
}

.scan-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

/* --- FILTER BAR --- */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0;
    font-size: 1.0rem;
    color: white;
    font-weight: 700;
}

.item-count {
    opacity: 0.9;
    /* padding-left: 16px; */
}

.sort-control {
    display: flex;
    align-items: center;
    gap: 4px;
}

.sort-control select {
    background: none;
    border: none;
    color: white;
    font-weight: 700;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
}

#budget-search {
    width: 100%;
}



.scan-result-form {
    padding: 0;
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.scan-result-form .input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.scan-result-form .input-group label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-main);
}

.receipt-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    background: #f1f5f9;
}

.receipt-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}

.receipt-thumb:hover img {
    transform: scale(1.1);
}

.receipt-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--input-border);
}

.receipt-info {
    flex: 1;
}

/* Essential Scanner Styles */
#scanner-video {
    width: 100%;
    max-height: 70vh;
    background: #000;
    display: block;
    object-fit: cover;
}

.scanner-view {
    position: relative;
    background: #000;
    overflow: hidden;
    min-height: 200px;
}

.scan-processing {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    gap: 20px;
    color: var(--primary);
    font-weight: 600;
}

.dashboard-page {
    background: var(--bg) !important;
    color: var(--text-main);
    min-height: 100vh;
}

#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.search-clear {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    width: auto;
    padding: 0 5px;
    z-index: 3;
}

.search-clear:hover {
    color: var(--primary);
    background: none;
    transform: translateY(-50%) scale(1.1);
}

.history-icon {
    color: var(--text-muted);
    opacity: 0.5;
    transition: all 0.2s;
}

.card:hover .history-icon {
    opacity: 1;
    color: var(--primary);
    transform: rotate(-15deg);
}

/* Multi-Year Navigation & Segmented Controls */
.year-toggle-group {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    padding: 3px;
    border-radius: 12px;
    border: 1px solid var(--input-border);
    gap: 3px;
}

.year-toggle-btn, .btn-subyear-toggle {
    padding: 6px 14px;
    font-size: 0.84rem;
    font-weight: 700;
    border-radius: 9px;
    color: var(--text-muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
    cursor: pointer;
    white-space: nowrap;
}

.year-toggle-btn:hover, .btn-subyear-toggle:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.06);
}

.year-toggle-btn.active, .btn-subyear-toggle.active {
    background: var(--primary);
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.35);
}

.year-toggle-btn .badge-sub, .btn-subyear-toggle .badge-sub {
    font-size: 0.70rem;
    opacity: 0.85;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.18);
    font-weight: 600;
}

.modal-year-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 0;
    margin-bottom: -14px !important;
    background: rgba(255, 255, 255, 0.03);
    padding: 8px 14px;
    border-radius: 12px;
    border: 1px solid var(--input-border);
}

.dashboard-year-nav-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: -8px;
    margin-bottom: -10px;
}

.badge-inherited {
    font-size: 0.70rem;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.12);
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.badge-override {
    font-size: 0.70rem;
    color: #10b981;
    background: rgba(16, 185, 129, 0.12);
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.badge-lk {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 5px;
    border-radius: 4px;
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.3);
    letter-spacing: 0.5px;
    line-height: 1.2;
    cursor: default;
    user-select: none;
}

body.light-mode .badge-lk {
    background: rgba(139, 92, 246, 0.12);
    color: #7c3aed;
    border-color: rgba(139, 92, 246, 0.25);
}

/* --- CUSTOM NAV ICON COLORS --- */
.btn-icon.logout {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.05));
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
}
.btn-icon.logout:hover {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.btn-icon.settings {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.05));
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.2);
}
.btn-icon.settings:hover {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.btn-icon.camera {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(139, 92, 246, 0.05));
    color: #8b5cf6;
    border-color: rgba(139, 92, 246, 0.2);
}
.btn-icon.camera:hover {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.btn-icon.receipts {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.05));
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.2);
}
.btn-icon.receipts:hover {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.btn-icon.fire {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(239, 68, 68, 0.05));
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.2);
}
.btn-icon.fire:hover {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: white;
}

.btn-icon.budget {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.15), rgba(20, 184, 166, 0.05));
    color: #14b8a6;
    border-color: rgba(20, 184, 166, 0.2);
}
.btn-icon.budget:hover {
    background: linear-gradient(135deg, #14b8a6, #0d9488);
    color: white;
}

.btn-icon.taxes {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.05));
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
}
.btn-icon.taxes:hover {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.btn-icon.calendar {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(6, 182, 212, 0.05));
    color: #06b6d4;
    border-color: rgba(6, 182, 212, 0.2);
}
.btn-icon.calendar:hover {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
}

/* --- SKELETON LOADER --- */
@keyframes pulse-skeleton {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

.skeleton {
    animation: pulse-skeleton 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    background: var(--input-bg);
    border-radius: var(--radius);
}

.skeleton-text {
    height: 20px;
    background: var(--input-bg);
    border-radius: 4px;
    margin-bottom: 10px;
}

.skeleton-chart {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: transparent;
    border: 30px solid var(--input-bg);
    margin: 0 auto;
    animation: pulse-skeleton 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.skeleton-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--input-border);
    animation: pulse-skeleton 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.skeleton-card .s-header {
    height: 24px;
    width: 60%;
    background: var(--input-bg);
    border-radius: 4px;
    margin-bottom: 10px;
}

.skeleton-card .s-category {
    height: 16px;
    width: 30%;
    background: rgba(139, 92, 246, 0.2);
    border-radius: 10px;
    margin-bottom: 20px;
}

.skeleton-card .s-bar {
    height: 10px;
    width: 100%;
    background: var(--input-bg);
    border-radius: 5px;
    margin-bottom: 30px;
}

.skeleton-card .s-footer {
    height: 40px;
    width: 100%;
    background: var(--input-bg);
    border-radius: var(--radius);
}

/* --- REUSABLE WIDGETS, CARDS & TABLES DESIGN SYSTEM --- */
.widget-card, .tax-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius);
    padding: 0 !important;
    box-shadow: var(--shadow);
    border: 1px solid var(--input-border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden !important;
}

.widget-header {
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--input-border);
    padding: 15px 20px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 0 !important;
    box-sizing: border-box;
}

.widget-title, .section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.widget-body {
    padding: 15px 20px !important;
    box-sizing: border-box;
}

.widget-table-card .widget-body {
    padding: 0 !important;
}

.widget-body > div > .accounts-table,
.widget-body > .accounts-table,
.widget-body > .app-table,
.widget-body > .tax-table,
.widget-body > div > .app-table,
.widget-body > div > .tax-table,
.widget-body > div[style*="overflow"] {
    margin-top: 0 !important;
}

.widget-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Unified Tables */
.app-table, .tax-table, .cal-table, .accounts-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
    background: transparent;
}

.app-table th, .tax-table th, .accounts-table th, .cal-table th {
    text-align: left;
    padding: 12px 8px !important;
    font-size: 0.70rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--input-border);
    white-space: nowrap;
}

.app-table th:first-child, .tax-table th:first-child, .accounts-table th:first-child,
.app-table td:first-child, .tax-table td:first-child, .accounts-table td:first-child {
    padding-left: 20px !important;
}

.app-table th:last-child, .tax-table th:last-child, .accounts-table th:last-child,
.app-table td:last-child, .tax-table td:last-child, .accounts-table td:last-child {
    padding-right: 20px !important;
}

.tax-table td:last-child,
.app-table:not(:has(th)) td:last-child,
.app-table td:nth-child(2):last-child {
    text-align: right !important;
    font-variant-numeric: tabular-nums;
}

.app-table td, .tax-table td, .accounts-table td, .cal-table td {
    padding: 12px 8px !important;
    border-bottom: 1px solid var(--input-border);
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.86rem;
    white-space: nowrap;
}

.tax-table td:first-child,
.app-table:not(:has(th)) td:first-child {
    white-space: normal;
    word-break: break-word;
    line-height: 1.35;
}

/* DRY Profit & Loss Color System */
.pnl-pos,
.text-success,
.pnl-green {
    color: var(--success, #10b981) !important;
}

.pnl-neg,
.text-danger,
.pnl-red {
    color: var(--danger, #ef4444) !important;
}

.pnl-neutral {
    color: var(--text-muted, #94a3b8) !important;
}

/* Remove bottom border from the very last row in cards/tables */
.app-table tr:last-child td,
.tax-table tr:last-child td,
.no-bottom-border td,
.no-bottom-border {
    border-bottom: none !important;
}

/* Metric Display Boxes */
.metric-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 18px;
    background: var(--rest-box-bg);
    border-radius: 16px;
    border: 1px solid var(--input-border);
    transition: all 0.2s ease;
}

.metric-box:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
}

.metric-value {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}

.metric-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 4px;
}

/* Pills & Badges */
.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.badge-pill.primary { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; border: 1px solid rgba(139, 92, 246, 0.3); }
.badge-pill.success { background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-pill.warning { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-pill.danger  { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }

/* --- BANK SYNC STYLES --- */
.btn-icon.bank-sync:hover {
    background: rgba(16, 185, 129, 0.3) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

#bank-dropzone:hover {
    border-color: #10b981 !important;
    background: rgba(16, 185, 129, 0.08) !important;
}

.bank-pill {
    transition: transform 0.2s ease;
}

.bank-pill:hover {
    transform: translateY(-1px);
}

/* --- SLIDE-IN NAVIGATION MENU --- */
.slide-menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-menu-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.slide-menu-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 340px;
    max-width: 88vw;
    height: 100vh;
    background: #0f172a;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: -15px 0 35px rgba(0, 0, 0, 0.5);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.slide-menu-drawer.active {
    transform: translateX(0);
}

.slide-menu-header {
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-subtle);
}

.slide-menu-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.08rem;
    color: var(--text-main);
}

/* SLIDE MENU USER PROFILE */
.slide-menu-user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    margin: 0 0 6px 0;
    background: rgba(139, 92, 246, 0.09);
    border: 1px solid rgba(139, 92, 246, 0.22);
    border-radius: 12px;
    box-sizing: border-box;
}

.user-profile-avatar-wrap {
    position: relative;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.user-profile-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
}

.user-online-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #10b981;
    border: 2px solid #0f172a;
}

.user-profile-info {
    flex: 1;
    min-width: 0;
}

.user-profile-name {
    font-size: 0.88rem;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-profile-email {
    font-size: 0.72rem;
    color: #c4b5fd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

body.light-mode .slide-menu-user-profile {
    background: rgba(139, 92, 246, 0.06);
    border: 1px solid rgba(139, 92, 246, 0.18);
}

body.light-mode .user-profile-name {
    color: #0f172a;
}

body.light-mode .user-profile-email {
    color: #6d28d9;
}

body.light-mode .user-online-dot {
    border-color: #ffffff;
}

.slide-menu-body {
    padding: 12px 14px;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.slide-menu-section-title {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    padding: 6px 8px 2px 8px;
}

.slide-menu-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-main);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    text-align: left;
    transition: all 0.18s ease;
    width: 100%;
    box-sizing: border-box;
}

.slide-menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
    transform: translateX(2px);
}

.slide-menu-item.active {
    background: rgba(124, 58, 237, 0.14);
    border-color: rgba(124, 58, 237, 0.3);
}

.slide-menu-item .icon-wrap,
.slide-tool-tile .icon-wrap {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--primary);
    flex-shrink: 0;
    transition: all 0.18s ease;
}

.slide-menu-item .icon-wrap svg,
.slide-tool-tile .icon-wrap svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    display: block;
}

/* Compact 3x2 Tools Grid inside Slide Menu */
.slide-menu-tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 4px;
}

.slide-tool-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 6px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    text-align: center;
}

.slide-tool-tile:hover {
    background: rgba(124, 58, 237, 0.1);
    border-color: rgba(124, 58, 237, 0.3);
    transform: translateY(-1px);
}

body.light-mode .slide-tool-tile {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #0f172a;
}

body.light-mode .slide-tool-tile:hover {
    background: rgba(109, 40, 217, 0.06);
    border-color: rgba(109, 40, 217, 0.25);
}

/* Top Navbar Fokus / Experte Pill & Bottom Hint Bar */
.nav-mode-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
}

.nav-mode-pill:hover {
    color: var(--text-main);
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.07);
}

.nav-mode-pill.active {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.35);
    color: #38bdf8;
}

body.light-mode .nav-mode-pill {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #475569;
}

body.light-mode .nav-mode-pill.active {
    background: rgba(2, 132, 199, 0.1);
    border-color: rgba(2, 132, 199, 0.3);
    color: #0284c7;
}

.expert-hint-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 11px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--border-subtle);
    margin-top: 6px;
}

body.light-mode .expert-hint-bar {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.expert-hint-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.expert-hint-badge {
    font-size: 0.66rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 7px;
    border-radius: 5px;
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.25);
}

body.light-mode .expert-hint-badge {
    background: rgba(2, 132, 199, 0.1);
    color: #0284c7;
    border-color: rgba(2, 132, 199, 0.25);
}

.expert-hint-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 12px;
    border-radius: 8px;
    background: rgba(124, 58, 237, 0.14);
    border: 1px solid rgba(124, 58, 237, 0.32);
    color: #c4b5fd;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
}

.expert-hint-btn:hover {
    background: var(--primary);
    color: #ffffff;
}

body.light-mode .expert-hint-btn {
    background: rgba(109, 40, 217, 0.1);
    border-color: rgba(109, 40, 217, 0.25);
    color: #6d28d9;
}

body.light-mode .expert-hint-btn:hover {
    background: #6d28d9;
    color: #ffffff;
}

/* Domain specific semantic icon badges (Dark Mode defaults) */
.slide-menu-item .icon-wrap.budget, .slide-tool-tile .icon-wrap.budget {
    background: rgba(139, 92, 246, 0.14);
    border-color: rgba(139, 92, 246, 0.28);
    color: #a78bfa;
}
.slide-menu-item .icon-wrap.portfolio, .slide-tool-tile .icon-wrap.portfolio {
    background: rgba(99, 102, 241, 0.14);
    border-color: rgba(99, 102, 241, 0.28);
    color: #818cf8;
}
.slide-menu-item .icon-wrap.taxes, .slide-tool-tile .icon-wrap.taxes {
    background: rgba(14, 165, 233, 0.14);
    border-color: rgba(14, 165, 233, 0.28);
    color: #38bdf8;
}
.slide-menu-item .icon-wrap.fire, .slide-tool-tile .icon-wrap.fire {
    background: rgba(249, 115, 22, 0.14);
    border-color: rgba(249, 115, 22, 0.28);
    color: #fb923c;
}
.slide-menu-item .icon-wrap.calendar, .slide-tool-tile .icon-wrap.calendar {
    background: rgba(20, 184, 166, 0.14);
    border-color: rgba(20, 184, 166, 0.28);
    color: #2dd4bf;
}
.slide-menu-item .icon-wrap.nutrition, .slide-tool-tile .icon-wrap.nutrition {
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(16, 185, 129, 0.28);
    color: #34d399;
}
.slide-menu-item .icon-wrap.company, .slide-tool-tile .icon-wrap.company {
    background: rgba(14, 165, 233, 0.14);
    border-color: rgba(14, 165, 233, 0.28);
    color: #38bdf8;
}
.slide-menu-item .icon-wrap.community, .slide-tool-tile .icon-wrap.community {
    background: rgba(99, 102, 241, 0.14);
    border-color: rgba(99, 102, 241, 0.28);
    color: #818cf8;
}
.slide-menu-item .icon-wrap.bank, .slide-tool-tile .icon-wrap.bank {
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(16, 185, 129, 0.28);
    color: #34d399;
}
.slide-menu-item .icon-wrap.receipts, .slide-tool-tile .icon-wrap.receipts {
    background: rgba(59, 130, 246, 0.14);
    border-color: rgba(59, 130, 246, 0.28);
    color: #60a5fa;
}
.slide-menu-item .icon-wrap.scanner, .slide-tool-tile .icon-wrap.scanner {
    background: rgba(244, 114, 182, 0.14);
    border-color: rgba(244, 114, 182, 0.28);
    color: #f472b6;
}
.slide-menu-item .icon-wrap.achievements, .slide-tool-tile .icon-wrap.achievements {
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.28);
    color: #fbbf24;
}
.slide-menu-item .icon-wrap.referral, .slide-tool-tile .icon-wrap.referral {
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(16, 185, 129, 0.28);
    color: #34d399;
}
.slide-menu-item .icon-wrap.intro, .slide-tool-tile .icon-wrap.intro {
    background: rgba(139, 92, 246, 0.14);
    border-color: rgba(139, 92, 246, 0.28);
    color: #a78bfa;
}
.slide-menu-item .icon-wrap.settings, .slide-tool-tile .icon-wrap.settings {
    background: rgba(148, 163, 184, 0.14);
    border-color: rgba(148, 163, 184, 0.28);
    color: #cbd5e1;
}
.slide-menu-item .icon-wrap.admin, .slide-tool-tile .icon-wrap.admin {
    background: rgba(139, 92, 246, 0.14);
    border-color: rgba(139, 92, 246, 0.28);
    color: #a78bfa;
}
.slide-menu-item .icon-wrap.debug, .slide-tool-tile .icon-wrap.debug {
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.28);
    color: #f87171;
}
.slide-menu-item .icon-wrap.pricing, .slide-tool-tile .icon-wrap.pricing {
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(16, 185, 129, 0.28);
    color: #34d399;
}

.slide-menu-item.active .icon-wrap {
    transform: scale(1.03);
}

.slide-menu-item .item-text .title {
    font-weight: 600;
    font-size: 0.85rem;
}

.slide-menu-item .item-text .sub {
    font-size: 0.72rem;
    color: #94a3b8;
}

.slide-menu-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.slide-menu-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #ef4444;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.slide-menu-logout:hover {
    background: rgba(239, 68, 68, 0.25);
}

/* --- HIGH CONTRAST & MOBILE-FRIENDLY DASHBOARD NAVIGATION --- */
.unified-dashboard-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 16px;
    padding: 6px 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    gap: 12px;
    margin: 0 auto;
    max-width: 100%;
    flex-wrap: wrap;
    position: relative;
    z-index: 20;
    box-sizing: border-box;
}

body.light-mode .unified-dashboard-nav {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.nav-month-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-tabs-group {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.35);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

body.light-mode .nav-tabs-group {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.08);
}

.nav-month-select {
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
    padding: 6px 10px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

body.light-mode .nav-month-select {
    color: #0f172a;
}

.nav-month-group .custom-search-select-btn {
    background: transparent !important;
    border: none !important;
    padding: 4px 6px !important;
}

.nav-month-group .cs-btn-label {
    color: #ffffff !important;
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.01em;
}

body.light-mode .nav-month-group .cs-btn-label {
    color: #0f172a !important;
}

.nav-month-group .cs-arrow {
    color: rgba(255, 255, 255, 0.7);
    stroke-width: 2.8;
}

body.light-mode .nav-month-group .cs-arrow {
    color: rgba(0, 0, 0, 0.6);
}

.nav-month-group .cs-reset-btn {
    display: none !important;
}

.nav-month-group .custom-search-select-menu {
    left: 50% !important;
    transform: translateX(-50%) !important;
    min-width: 220px !important;
}

.nav-today-badge {
    background: #8b5cf6;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-today-btn {
    background: rgba(139, 92, 246, 0.25);
    border: 1px solid rgba(139, 92, 246, 0.6);
    color: #e0e7ff;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 20px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-today-btn:hover,
.nav-today-btn:active {
    background: #8b5cf6;
    color: #ffffff;
    border-color: #8b5cf6;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.5);
}

.nav-arrow-btn {
    padding: 0 !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    color: #ffffff !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

body.light-mode .nav-arrow-btn {
    background: rgba(0, 0, 0, 0.06) !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
    color: #0f172a !important;
}

.nav-arrow-btn:hover,
.nav-arrow-btn:active {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
    transform: scale(1.05);
}

.nav-divider {
    width: 1px;
    height: 28px;
    background: rgba(255, 255, 255, 0.15);
    margin: 0 4px;
}

body.light-mode .nav-divider {
    background: rgba(0, 0, 0, 0.12);
}

.carousel-tab-btn {
    background: transparent;
    border: none;
    color: #cbd5e1;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 9px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

body.light-mode .carousel-tab-btn {
    color: #475569;
}

.carousel-tab-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

body.light-mode .carousel-tab-btn:hover {
    color: #0f172a;
    background: rgba(0, 0, 0, 0.06);
}

.carousel-tab-btn.active {
    background: #8b5cf6 !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.45) !important;
}

@media (max-width: 768px) {
    .unified-dashboard-nav {
        display: flex;
        flex-direction: column;
        width: 100%;
        border-radius: 14px;
        padding: 8px;
        gap: 8px;
        box-sizing: border-box;
    }
    .nav-month-group {
        display: flex;
        width: 100%;
        justify-content: space-between;
        align-items: center;
        gap: 6px;
    }
    .nav-tabs-group {
        display: grid !important;
        grid-template-columns: 1fr 1fr 1fr !important;
        width: 100% !important;
        justify-content: stretch !important;
        gap: 4px !important;
        padding: 4px !important;
        box-sizing: border-box !important;
    }
    .nav-divider {
        display: none;
    }
    .carousel-tab-btn {
        width: 100% !important;
        min-height: 40px !important;
        justify-content: center !important;
        padding: 8px 4px !important;
        font-size: 0.84rem !important;
        box-sizing: border-box !important;
        display: flex !important;
        align-items: center !important;
        text-align: center !important;
    }
    .nav-arrow-btn {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
    }
}

/* --- CUSTOM SEARCHABLE SELECT DROPDOWN (DRY & UNIFIED) --- */
.custom-search-select-wrapper {
    position: relative;
    width: 100%;
}

.custom-search-select-wrapper.open {
    z-index: 100000;
}

.custom-search-select-btn {
    width: 100%;
    height: 36px;
    min-height: 36px;
    background: var(--input-bg);
    color: var(--text-main);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-input, 10px);
    padding: 0 12px;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.custom-search-select-btn:hover {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
}

.custom-search-select-wrapper.open .custom-search-select-btn {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.cs-btn-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: inherit;
}

.cs-btn-icons {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.cs-arrow {
    color: var(--text-muted);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.custom-search-select-wrapper.open .cs-arrow {
    transform: rotate(180deg);
    color: var(--primary);
}

.cs-reset-btn {
    display: none !important;
}

.custom-search-select-option.reset-option {
    color: var(--text-muted);
    font-style: italic;
    border-bottom: 1px dashed rgba(255,255,255,0.1);
    margin-bottom: 4px;
    padding-bottom: 8px;
}

.custom-search-select-option.reset-option:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
}

.custom-search-select-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    min-width: 240px;
    max-height: 240px;
    background: #1e293b;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-input);
    box-shadow: 0 20px 45px rgba(0,0,0,0.9);
    z-index: 100000;
    padding: 8px;
    flex-direction: column;
}

#intro-wizard-modal .modal-content {
    max-height: calc(100vh - 40px);
    height: auto;
    overflow: visible !important;
}

#intro-wizard-modal .modal-body {
    overflow-y: auto;
    overflow-x: visible;
    padding-bottom: 30px;
}

.custom-search-select-wrapper.open .custom-search-select-menu {
    display: flex;
}

.custom-search-select-search-input {
    width: 100%;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(0,0,0,0.4);
    color: #fff;
    font-size: 0.82rem;
    font-family: inherit;
    margin-bottom: 6px;
    outline: none;
}

.custom-search-select-options {
    overflow-y: auto;
    max-height: 200px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.custom-search-select-option {
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    color: var(--text-main);
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
}

.custom-search-select-option:hover,
.custom-search-select-option.selected {
    background: rgba(139, 92, 246, 0.25);
    color: #fff;
}

/* --- CAROUSEL & SETTINGS TABS --- */
.carousel-container { align-items: flex-start !important; }
.carousel-container::-webkit-scrollbar { display: none; }
.carousel-item { flex: 0 0 100%; min-height: auto; display: flex; align-items: flex-start !important; scroll-snap-align: center; }
.carousel-item > div { width: 100%; min-height: auto; margin-bottom: 0 !important; border-radius: var(--radius); }
.carousel-dots-wrapper { display: flex; justify-content: center; align-items: center; gap: 15px; margin-top: 10px; }
.carousel-dots { display: flex; gap: 8px; }
.carousel-dot { width: 8px; height: 8px; border-radius: 50%; background-color: var(--text-muted); opacity: 0.3; transition: all 0.3s ease; cursor: pointer; }
.carousel-dot.active { opacity: 1; background-color: var(--text-main); transform: scale(1.2); }

.tab-btn {
    flex: 1;
    background: transparent !important;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 14px 10px;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    border-radius: 0;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    text-align: center;
    transform: none !important;
    box-shadow: none !important;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--text-main) !important;
    border-bottom-color: transparent !important;
    transform: none !important;
}

body.light-mode .tab-btn:hover {
    background: rgba(0, 0, 0, 0.04) !important;
    color: var(--text-main) !important;
}

.tab-btn.active {
    font-weight: 700;
    color: var(--text-main) !important;
    background: rgba(139, 92, 246, 0.14) !important;
    border-bottom: 2px solid var(--primary, #8b5cf6) !important;
    transform: none !important;
}

.tab-btn.active.tab-allgemein { background: rgba(59, 130, 246, 0.14) !important; color: #3b82f6 !important; border-bottom: 2px solid #3b82f6 !important; }
.tab-btn.active.tab-unternehmen { background: rgba(14, 165, 233, 0.14) !important; color: #38bdf8 !important; border-bottom: 2px solid #38bdf8 !important; }
.tab-btn.active.tab-budget { background: rgba(139, 92, 246, 0.14) !important; color: #8b5cf6 !important; border-bottom: 2px solid #8b5cf6 !important; }
.tab-btn.active.tab-konten { background: rgba(16, 185, 129, 0.14) !important; color: #10b981 !important; border-bottom: 2px solid #10b981 !important; }
.tab-btn.active.tab-portfolio { background: rgba(139, 92, 246, 0.14) !important; color: #8b5cf6 !important; border-bottom: 2px solid #8b5cf6 !important; }
.tab-btn.active.tab-ernaehrung { background: rgba(16, 185, 129, 0.14) !important; color: #10b981 !important; border-bottom: 2px solid #10b981 !important; }
.tab-btn.active.tab-kalender { background: rgba(6, 182, 212, 0.14) !important; color: #06b6d4 !important; border-bottom: 2px solid #06b6d4 !important; }
.tab-btn.active.tab-fire { background: rgba(245, 158, 11, 0.14) !important; color: #f59e0b !important; border-bottom: 2px solid #f59e0b !important; }
.tab-btn.active.tab-steuern { background: rgba(239, 68, 68, 0.14) !important; color: #ef4444 !important; border-bottom: 2px solid #ef4444 !important; }

/* ROZE Super Admin Modal Tabs */
#super-admin-modal .tab-btn.active,
.tab-btn.active.tab-admin-users {
    background: rgba(139, 92, 246, 0.14) !important;
    color: #c4b5fd !important;
    border-bottom: 2px solid #8b5cf6 !important;
}

#super-admin-modal #btn-admin-tab-community.tab-btn.active,
.tab-btn.active.tab-admin-community {
    background: rgba(59, 130, 246, 0.14) !important;
    color: #60a5fa !important;
    border-bottom: 2px solid #3b82f6 !important;
}

#super-admin-modal #btn-admin-tab-system.tab-btn.active,
.tab-btn.active.tab-admin-system {
    background: rgba(6, 182, 212, 0.14) !important;
    color: #22d3ee !important;
    border-bottom: 2px solid #06b6d4 !important;
}

/* Company Staff Switcher Tabs */
.staff-tab-btn.active {
    background: rgba(14, 165, 233, 0.14) !important;
    color: #38bdf8 !important;
    border-bottom: 2px solid #38bdf8 !important;
}

/* Light Mode support */
body.light-mode .tab-btn.active {
    background: rgba(139, 92, 246, 0.10) !important;
    color: #7c3aed !important;
    border-bottom: 2px solid #7c3aed !important;
}

body.light-mode #super-admin-modal .tab-btn.active,
body.light-mode .tab-btn.active.tab-admin-users {
    background: rgba(139, 92, 246, 0.10) !important;
    color: #6d28d9 !important;
    border-bottom: 2px solid #8b5cf6 !important;
}

body.light-mode #super-admin-modal #btn-admin-tab-community.tab-btn.active,
body.light-mode .tab-btn.active.tab-admin-community {
    background: rgba(59, 130, 246, 0.10) !important;
    color: #2563eb !important;
    border-bottom: 2px solid #2563eb !important;
}

body.light-mode #super-admin-modal #btn-admin-tab-system.tab-btn.active,
body.light-mode .tab-btn.active.tab-admin-system {
    background: rgba(6, 182, 212, 0.10) !important;
    color: #0891b2 !important;
    border-bottom: 2px solid #0891b2 !important;
}

body.light-mode .staff-tab-btn.active {
    background: rgba(14, 165, 233, 0.10) !important;
    color: #0284c7 !important;
    border-bottom: 2px solid #0284c7 !important;
}

/* --- PORTFOLIO SETTINGS CARD STYLES (3-ROW ULTRA CLEAN) --- */
.portfolio-position-card {
    background: var(--card-bg);
    border: 1px solid var(--input-border);
    border-radius: 16px;
    padding: 16px 18px;
    /* margin-bottom: 14px; */
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.15);
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.portfolio-position-card:hover {
    border-color: rgba(139, 92, 246, 0.45);
}
.portfolio-position-card.inactive {
    opacity: 0.55;
}

/* Zeile 1: Name & Actions */
.pos-row-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
}
.pos-name-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.pos-actions-container {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

/* Zeile 2: Stammdaten (3 Spalten) */
.pos-row-meta {
    display: grid;
    grid-template-columns: 1.2fr 1.5fr 1.3fr;
    gap: 12px;
    width: 100%;
}

/* Zeile 3: Finanzdaten (5 Spalten) */
.pos-row-metrics {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.pos-field-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.pos-field-box label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pos-field-box input {
    width: 100%;
    padding: 8px 12px;
    font-size: 0.88rem;
    border-radius: var(--radius-input);
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    color: var(--text-main);
    font-family: inherit;
    box-sizing: border-box;
}
.pos-field-box input:focus {
    border-color: var(--primary);
    outline: none;
}

/* --- LOANS SETTINGS CARD (HARMONIOUS 2-ROW DESIGN) --- */
.loan-admin-card, .extraordinary-admin-card {
    background: var(--card-bg, rgba(255, 255, 255, 0.02));
    border: 1px solid var(--input-border);
    border-left: 3px solid #ef4444;
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.extraordinary-admin-card {
    border-left-color: #f59e0b;
}
.loan-admin-card:hover {
    border-color: rgba(239, 68, 68, 0.45);
}
.extraordinary-admin-card:hover {
    border-color: rgba(245, 158, 11, 0.45);
}
.loan-admin-card.inactive, .extraordinary-admin-card.inactive {
    opacity: 0.5;
}
.loan-admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
}
.loan-admin-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px 14px;
    align-items: end;
    width: 100%;
}
@media (max-width: 768px) {
    .loan-admin-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 480px) {
    .loan-admin-grid {
        grid-template-columns: 1fr;
    }
}
.loan-admin-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}
.loan-admin-field label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.loan-admin-field input,
.loan-admin-field select,
.loan-admin-field .custom-search-select-btn {
    width: 100%;
    height: 38px;
    min-height: 38px;
    box-sizing: border-box;
    font-size: 0.88rem;
    border-radius: var(--radius-input, 8px);
}

/* --- SHARED DASHBOARD KPI CARDS (PORTFOLIO, FIRE, TAXES, COMPANY) --- */
.kpi-card-grid, .portfolio-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.kpi-card, .portfolio-kpi-card {
    background: var(--card-bg);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 13px 16px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 6px;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}
.kpi-card::before, .portfolio-kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1.5px;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.35), transparent);
    opacity: 0.5;
}
.kpi-card:hover, .portfolio-kpi-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
}
.kpi-card-label, .portfolio-kpi-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: flex;
    align-items: center;
    justify-content: space-between;
    line-height: 1.2;
}
.kpi-icon-badge {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.kpi-card-val, .portfolio-kpi-val {
    font-size: var(--fs-xl);
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.15;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}
.kpi-card-sub, .portfolio-kpi-sub {
    font-size: var(--fs-xs);
    font-weight: 500;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.25;
}

/* --- FIRE KENNZAHLEN STYLES --- */
.fire-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--input-border);
    margin-bottom: 10px;
}

.fire-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.fire-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    background: var(--rest-box-bg);
    border-radius: 15px;
    border: 1px solid var(--input-border);
}

.fire-metric-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 5px;
}

.fire-metric-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

/* --- CALENDAR TABLE STYLES --- */
.cal-month-header {
    background: rgba(255,255,255,0.03);
    border-top: 2px solid var(--input-border);
    border-bottom: 1px solid var(--input-border);
}
.cal-month-header td {
    padding: 15px 20px !important;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text-main);
}
.cal-month-header.first {
    border-top: none;
}
.cal-row {
    border-bottom: 1px dashed rgba(255,255,255,0.05);
    transition: background 0.2s;
}
.cal-row:hover {
    background: rgba(255,255,255,0.02);
}
.cal-row td {
    padding: 15px 20px !important;
    color: var(--text-main);
    font-size: 0.95rem;
}
.col-day {
    width: 50px;
    text-align: right;
    font-weight: 800;
    color: var(--text-muted) !important;
    padding-left: 20px !important;
    padding-right: 15px !important;
    border-right: 1px dotted rgba(255,255,255,0.1);
}
.col-name {
    font-weight: 600;
    padding-left: 15px !important;
}
.col-amount {
    width: 100px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    padding-right: 20px !important;
}
.light-mode .cal-month-header { background: rgba(0,0,0,0.03); }
.light-mode .cal-row { border-bottom: 1px dashed rgba(0,0,0,0.05); }
.light-mode .cal-row:hover { background: rgba(0,0,0,0.02); }
.light-mode .col-day { border-color: rgba(0,0,0,0.1); }

/* --- CENTRAL CUSTOM SWITCH COMPONENT --- */
.custom-switch-container {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

.custom-switch-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
    user-select: none;
}

.custom-switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 22px;
    margin: 0;
    flex-shrink: 0;
}

.custom-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.custom-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: 0.3s ease;
    border-radius: 20px;
}

.custom-switch-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.3s ease;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.custom-switch input:checked + .custom-switch-slider {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.custom-switch input:checked + .custom-switch-slider:before {
    transform: translateX(16px);
}

/* ==========================================================================
   ADVANCED PORTFOLIO STYLES: LOTS, REBALANCING, NEWS & MACRO RISKS
   ========================================================================== */

/* Tranchen / Lots Manager in Position Cards */
.pos-lots-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(20, 184, 166, 0.12);
    border: 1px solid rgba(20, 184, 166, 0.25);
    color: #14b8a6;
    padding: 5px 12px;
    border-radius: var(--radius-btn);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 10px;
}
.pos-lots-toggle-btn:hover {
    background: rgba(20, 184, 166, 0.22);
    transform: translateY(-1px);
}

.pos-lots-section {
    margin-top: 12px;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
}
.pos-lots-section.hidden {
    display: none;
}

.lots-list-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    margin-bottom: 10px;
}
.lots-list-table th {
    text-align: left;
    color: var(--text-muted);
    font-size: 0.72rem;
    padding: 4px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-transform: uppercase;
}
.lots-list-table td {
    padding: 6px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.lot-input {
    width: 100%;
    padding: 5px 8px;
    border-radius: var(--radius-input);
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    color: var(--text-main);
    font-size: 0.82rem;
}
.btn-lot-delete {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    border-radius: var(--radius-btn);
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}
.btn-lot-delete:hover {
    background: #ef4444;
    color: white;
}
.btn-add-lot {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(139, 92, 246, 0.15);
    border: 1px dashed rgba(139, 92, 246, 0.4);
    color: #a78bfa;
    padding: 6px 14px;
    border-radius: var(--radius-btn);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-add-lot:hover {
    background: rgba(139, 92, 246, 0.28);
    border-color: #a78bfa;
    color: white;
}

/* Rebalancing & Target Allocation Widget */
.rebalance-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.rebalance-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.rebalance-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}
.rebalance-bar-container {
    position: relative;
    height: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.rebalance-bar-fill {
    height: 100%;
    border-radius: var(--radius-sm);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.rebalance-target-marker {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #ffffff;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
    z-index: 2;
}

/* Rebalancing Recommendations Box */
.rebalance-recommend-box {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.rebalance-recommend-header {
    font-weight: 700;
    font-size: 0.95rem;
    color: #14b8a6;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.rebalance-recommend-title {
    display: flex;
    align-items: center;
    gap: 6px;
}
.rebalance-rate-badge {
    color: #2dd4bf;
    background: rgba(20, 184, 166, 0.18);
    border: 1px solid rgba(20, 184, 166, 0.35);
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.90rem;
}
.rebalance-recommend-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 12px;
}
.rebalance-items-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.rebalance-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    border-left-width: 3px;
    border-left-style: solid;
}
.rebalance-item-label {
    font-weight: 600;
}
.rebalance-item-amount-wrap {
    display: flex;
    align-items: baseline;
    gap: 6px;
}
.rebalance-item-amount {
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 700;
}
.rebalance-item-pct {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
}
.rebalance-footer-tip {
    font-size: 0.74rem;
    color: var(--text-muted);
    margin-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 8px;
}

/* Portfolio Live Market Status Bar */
.portfolio-live-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    padding: 10px 14px;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}
.portfolio-live-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.84rem;
}
.live-indicator-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    flex-shrink: 0;
    transition: all 0.3s;
}
.live-indicator-title {
    color: var(--text-main);
    font-weight: 600;
}
.live-indicator-sep {
    color: var(--text-muted);
}
.live-indicator-meta {
    color: var(--text-muted);
    font-size: 0.78rem;
}
.live-indicator-time {
    color: var(--text-main);
}
.live-indicator-spinner {
    display: none;
    color: #14b8a6;
    font-size: 0.75rem;
    font-weight: 600;
}
.btn-refresh-quotes {
    font-size: 0.78rem;
    padding: 5px 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 6px;
    font-weight: 600;
    color: #14b8a6;
    border: 1px solid rgba(20, 184, 166, 0.35);
    background: rgba(20, 184, 166, 0.08);
    transition: all 0.2s ease;
}
.btn-refresh-quotes:hover {
    background: rgba(20, 184, 166, 0.18);
    border-color: rgba(20, 184, 166, 0.5);
    color: #2dd4bf;
    transform: translateY(-1px);
}

/* Portfolio Projection Horizon Group */
.proj-horizon-group {
    display: inline-flex;
    background: rgba(0, 0, 0, 0.3);
    padding: 3px;
    border-radius: 8px;
    border: 1px solid var(--input-border);
    gap: 2px;
}
.proj-horizon-btn {
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}
.proj-horizon-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}
.proj-horizon-btn.active {
    background: var(--primary-gradient) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(124, 58, 237, 0.35) !important;
}

/* ETF Radar Controls Bar */
.etf-radar-controls-bar {
    padding: 14px 20px;
    background: rgba(10, 15, 29, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.etf-search-input {
    width: 100%;
    padding: 9px 38px 9px 14px;
    font-size: 0.83rem;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
    box-sizing: border-box;
}
.etf-search-icon {
    position: absolute;
    right: 12px;
    left: auto;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    pointer-events: none;
}
.etf-sort-label {
    font-size: 0.76rem;
    font-weight: 600;
    color: #94a3b8;
    white-space: nowrap;
}
.etf-sort-select {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #ffffff;
    padding: 7px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
}
.etf-badge-count {
    font-size: 0.74rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 3px 8px;
    border-radius: 6px;
    color: #cbd5e1;
}
.etf-ter-badge {
    font-size: 0.74rem;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 3px 8px;
    border-radius: 6px;
    color: #10b981;
    font-weight: 700;
}

/* ETF Radar Navigation, Filter Chips, Table & Compact Row Styles */
.etf-cat-nav-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}
.etf-cat-btn {
    background: transparent !important;
    color: #94a3b8 !important;
    border: 1px solid transparent !important;
    padding: 5px 10px !important;
    font-size: 0.74rem !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    transition: all 0.15s ease !important;
    box-shadow: none !important;
    transform: none !important;
    display: inline-flex !important;
    align-items: center !important;
}
.etf-cat-btn:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #f8fafc !important;
    transform: none !important;
}
.etf-cat-btn.active {
    background: rgba(99, 102, 241, 0.2) !important;
    color: #c7d2fe !important;
    border-color: rgba(99, 102, 241, 0.45) !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.18) !important;
}
.etf-search-input:focus {
    outline: none !important;
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2) !important;
}
.etf-filter-chips-group {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.etf-filter-chip {
    height: 38px !important;
    padding: 0 14px !important;
    border-radius: 8px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    white-space: nowrap !important;
    transition: all 0.18s ease !important;
    box-sizing: border-box !important;
    background: rgba(15, 23, 42, 0.7) !important;
    color: #94a3b8 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    user-select: none !important;
    box-shadow: none !important;
    transform: none !important;
}
.etf-filter-chip:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #f1f5f9 !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-1px) !important;
}
.etf-filter-chip .chip-check-dot {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.18s ease;
    flex-shrink: 0;
}
.etf-filter-chip .chip-check-dot svg {
    display: none;
}
.etf-filter-chip.active .chip-check-dot svg {
    display: block;
}
.etf-filter-chip.chip-no-erosion.active {
    background: rgba(16, 185, 129, 0.14) !important;
    color: #34d399 !important;
    border-color: rgba(16, 185, 129, 0.45) !important;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.15) !important;
}
.etf-filter-chip.chip-no-erosion.active .chip-check-dot {
    background: #10b981;
    border-color: #10b981;
    color: #fff;
}
.etf-filter-chip.chip-low-ter.active {
    background: rgba(99, 102, 241, 0.16) !important;
    color: #c7d2fe !important;
    border-color: rgba(99, 102, 241, 0.45) !important;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.15) !important;
}
.etf-filter-chip.chip-low-ter.active .chip-check-dot {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
}
.etf-filter-chip.chip-estv.active {
    background: rgba(56, 189, 248, 0.14) !important;
    color: #7dd3fc !important;
    border-color: rgba(56, 189, 248, 0.45) !important;
    box-shadow: 0 2px 10px rgba(56, 189, 248, 0.15) !important;
}
.etf-filter-chip.chip-estv.active .chip-check-dot {
    background: #38bdf8;
    border-color: #38bdf8;
    color: #0f172a;
}
.etf-row {
    transition: background 0.15s ease;
}
.etf-row:hover td {
    background: rgba(255, 255, 255, 0.025) !important;
}
.etf-table {
    width: 100%;
    margin-bottom: 0;
    border-collapse: collapse;
    table-layout: auto;
}
.etf-table th, .etf-table td {
    padding: 7px 6px !important;
    font-size: 0.78rem;
    vertical-align: middle;
}
.etf-table th {
    font-size: 0.65rem !important;
    letter-spacing: 0.04em;
}
.etf-table th:first-child, .etf-table td:first-child {
    padding-left: 12px !important;
    padding-right: 2px !important;
    width: 36px;
}
.etf-table th:last-child, .etf-table td:last-child {
    padding-right: 12px !important;
    padding-left: 2px !important;
    width: 68px;
}
.etf-main-col {
    white-space: normal !important;
    max-width: 210px;
    word-break: normal;
}
.btn-etf-detail {
    padding: 3px 9px !important;
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    color: #c7d2fe !important;
    border: 1px solid rgba(99, 102, 241, 0.35) !important;
    background: rgba(99, 102, 241, 0.1) !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
}
.btn-etf-detail:hover {
    background: rgba(99, 102, 241, 0.25) !important;
    border-color: rgba(99, 102, 241, 0.6) !important;
    color: #fff !important;
    transform: translateY(-1px) !important;
}
.etf-table th[onclick] {
    user-select: none;
    transition: color 0.15s ease;
}
.etf-table th[onclick]:hover {
    color: #fff !important;
}
.sort-indicator {
    font-size: 0.68rem;
    color: #818cf8;
    margin-left: 3px;
    font-weight: 800;
}
.modal-range-btn {
    background: transparent !important;
    color: #94a3b8 !important;
    border: 1px solid transparent !important;
    border-radius: 6px !important;
    padding: 4px 11px !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
    transform: none !important;
    outline: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.modal-range-btn:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.08) !important;
    transform: none !important;
}
.modal-range-btn.active {
    background: #8b5cf6 !important;
    color: #fff !important;
    border-color: #a78bfa !important;
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.45) !important;
}
.etf-td-rank {
    text-align: center;
    font-weight: 800;
    color: #a78bfa;
    font-size: 0.80rem;
}
.etf-name-main {
    font-weight: 700;
    color: var(--text-main, #fff);
    font-size: 0.80rem;
    line-height: 1.25;
}
.etf-name-sub {
    font-size: 0.69rem;
    color: var(--text-muted);
    margin-top: 2px;
    line-height: 1.2;
}
.etf-ticker-hl {
    font-weight: 700;
    color: #38bdf8;
}
.etf-cat-pill {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.69rem;
    font-weight: 600;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.etf-cat-pill--global { background: rgba(99, 102, 241, 0.12); color: #a5b4fc; border-color: rgba(99, 102, 241, 0.25); }
.etf-cat-pill--us_stocks { background: rgba(56, 189, 248, 0.12); color: #7dd3fc; border-color: rgba(56, 189, 248, 0.25); }
.etf-cat-pill--ch_europe { background: rgba(244, 63, 94, 0.12); color: #fda4af; border-color: rgba(244, 63, 94, 0.25); }
.etf-cat-pill--emerging { background: rgba(245, 158, 11, 0.12); color: #fcd34d; border-color: rgba(245, 158, 11, 0.25); }
.etf-cat-pill--real_estate { background: rgba(168, 85, 247, 0.12); color: #d8b4fe; border-color: rgba(168, 85, 247, 0.25); }
.etf-cat-pill--gold { background: rgba(234, 179, 8, 0.12); color: #fde047; border-color: rgba(234, 179, 8, 0.25); }
.etf-cat-pill--crypto { background: rgba(236, 72, 153, 0.12); color: #f472b6; border-color: rgba(236, 72, 153, 0.25); }
.etf-cat-pill--bonds { background: rgba(20, 184, 166, 0.12); color: #5eead4; border-color: rgba(20, 184, 166, 0.25); }
.etf-ret-main {
    font-weight: 700;
    color: #10b981;
    font-size: 0.82rem;
    white-space: nowrap;
}
.etf-ret-main.neg {
    color: #f43f5e;
}
.etf-sub-line {
    font-size: 0.68rem;
    color: var(--text-muted);
    white-space: nowrap;
}
.etf-1y-pos { color: #34d399; font-weight: 600; }
.etf-1y-neg { color: #f87171; font-weight: 600; }
.etf-aum-val {
    font-weight: 600;
    color: var(--text-main, #fff);
    font-size: 0.78rem;
}
.etf-ter-val {
    font-weight: 700;
    color: var(--text-main, #fff);
    font-size: 0.78rem;
}
.etf-ter-val.low {
    color: #10b981;
}
.etf-td-score {
    text-align: center;
}
.etf-score-pill {
    display: inline-block;
    padding: 2px 5px;
    border-radius: 4px;
    font-weight: 800;
    font-size: 0.78rem;
}
.etf-score-pill--hi { background: rgba(16, 185, 129, 0.13); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.27); }
.etf-score-pill--mid { background: rgba(139, 92, 246, 0.13); color: #8b5cf6; border: 1px solid rgba(139, 92, 246, 0.27); }
.etf-score-pill--lo { background: rgba(245, 158, 11, 0.13); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.27); }
.etf-td-act {
    text-align: right;
    white-space: nowrap;
}
.btn-etf-remove {
    margin-left: 5px;
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 6px;
    padding: 4px 7px;
    cursor: pointer;
    font-size: 0.75rem;
    vertical-align: middle;
    transition: all 0.2s;
}
.btn-etf-remove svg {
    display: block;
}

/* Tax Optimizer 10J Duel Card & Explanation Box */
.optimizer-duel-card {
    background: linear-gradient(145deg, rgba(139, 92, 246, 0.09) 0%, rgba(56, 189, 248, 0.05) 100%);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 12px;
    padding: 14px 18px;
    margin: 0;
}
.optimizer-duel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 8px;
    flex-wrap: wrap;
}
.optimizer-duel-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}
.optimizer-duel-icon {
    stroke: #38bdf8;
}
.optimizer-duel-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-main);
}
.duel-wealth-badge {
    font-size: 0.74rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 6px;
    font-variant-numeric: tabular-nums;
}
.duel-wealth-badge.badge-warning {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.15);
}
.duel-wealth-badge.badge-success {
    color: #10b981;
    background: rgba(16, 185, 129, 0.15);
}
.duel-wealth-badge.badge-danger {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
}
.optimizer-duel-bars-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}
.optimizer-duel-bar-label-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 3px;
}
.duel-active-label,
.duel-active-val {
    color: #38bdf8;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.duel-ref-label,
.duel-ref-val {
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}
.optimizer-duel-bar-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
}
.duel-active-bar {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #38bdf8);
    border-radius: 4px;
    transition: width 0.35s ease;
}
.duel-ref-bar {
    height: 100%;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    transition: width 0.35s ease;
}
.duel-explanation-box {
    font-size: 0.76rem;
    color: #cbd5e1;
    line-height: 1.48;
    background: rgba(0, 0, 0, 0.22);
    padding: 10px 14px;
    border-radius: 8px;
    border-left: 3px solid #38bdf8;
}
.duel-explanation-box strong {
    color: #ffffff;
}
.duel-explanation-box em {
    color: #94a3b8;
    font-style: italic;
}

/* News Feed Grid & Cards */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 14px;
}
.news-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}
.news-card {
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 14px !important;
    padding: 16px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    height: 100% !important;
    box-sizing: border-box !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
}
.news-card:hover {
    transform: translateY(-3px) !important;
    border-color: rgba(139, 92, 246, 0.45) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
    background: rgba(30, 41, 59, 0.75) !important;
}
.news-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(139, 92, 246, 0.2);
    color: #c4b5fd;
    border: 1px solid rgba(139, 92, 246, 0.3);
}
.news-title {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 10px 0;
    color: #ffffff;
}
.news-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* 5-Dimension Optimization Cards */
.optim-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}
.optim-card {
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 14px !important;
    padding: 16px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    box-sizing: border-box !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.optim-card:hover {
    transform: translateY(-2px) !important;
    border-color: rgba(139, 92, 246, 0.4) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3) !important;
    background: rgba(30, 41, 59, 0.75) !important;
}
.optim-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: var(--fs-base);
}
.optim-card-desc {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    line-height: 1.45;
}
.optim-card-action {
    margin-top: auto;
    font-size: var(--fs-sm);
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* --- MACRO STRESS TEST & CRASH CARDS --- */
.stress-test-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.stress-card {
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 14px !important;
    padding: 16px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
}
.benchmark-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}
.benchmark-card {
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    padding: 12px 14px !important;
}
.stress-card {
    border-radius: var(--radius);
    padding: 18px 20px;
    border: 1px solid var(--input-border);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.stress-card:hover {
    transform: translateY(-2px);
    border-color: rgba(239, 68, 68, 0.4);
}
.stress-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #ef4444;
}
.stress-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}
.stress-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
}
.stress-card-tag {
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    font-weight: 700;
    white-space: nowrap;
}
.stress-loss-amount {
    font-size: 1.45rem;
    font-weight: 800;
    color: #ef4444;
    letter-spacing: -0.5px;
}
.stress-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.45;
}

/* Benchmark Bar Container */
.benchmark-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 12px;
}
.benchmark-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-input);
    padding: 10px 14px;
}
.benchmark-label {
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 600;
    margin-bottom: 2px;
}
.benchmark-val {
    font-weight: 800;
    color: #ef4444;
    font-size: 0.92rem;
}

/* --- PORTFOLIO AUTOCOMPLETE & SELECT SUGGESTIONS --- */
.pos-autocomplete-wrapper {
    position: relative;
    width: 100%;
}
.pos-autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 1050;
    background: #181528;
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-radius: var(--radius-input);
    box-shadow: 0 16px 36px rgba(0,0,0,0.65), 0 0 0 1px rgba(255,255,255,0.05);
    max-height: 290px;
    overflow-y: auto;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.pos-autocomplete-header {
    padding: 8px 12px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.pos-autocomplete-item {
    padding: 10px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.15s ease;
}
.pos-autocomplete-item:last-child {
    border-bottom: none;
}
.pos-autocomplete-item:hover {
    background: rgba(139, 92, 246, 0.22);
}
.pos-autocomplete-badge {
    font-family: monospace;
    font-weight: 700;
    font-size: 0.78rem;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    background: rgba(139, 92, 246, 0.25);
    color: #c4b5fd;
    border: 1px solid rgba(139, 92, 246, 0.35);
    white-space: nowrap;
}
.pos-autocomplete-title {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-main);
    line-height: 1.25;
}
.pos-autocomplete-sub {
    font-size: 0.74rem;
    color: var(--text-muted);
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.pos-autocomplete-price {
    font-weight: 800;
    font-size: 0.88rem;
    color: #10b981;
    white-space: nowrap;
    text-align: right;
}

/* ==========================================================================
   NUTRITION, MEAL PLANNING & SMART SHOPPING STYLES
   ========================================================================== */

/* Wochenplan 7-Tage-Slider & Scan-Track */
.nutrition-week-nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
    background: rgba(0, 0, 0, 0.2);
    padding: 6px 10px;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

body.light-mode .nutrition-week-nav-bar {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
}

.nutrition-day-pills-track {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    flex: 1;
}

.nutrition-day-pills-track::-webkit-scrollbar {
    display: none;
}

.nutrition-day-pill {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 9px;
    padding: 6px 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 700;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nutrition-day-pill:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
}

body.light-mode .nutrition-day-pill:hover {
    background: rgba(0, 0, 0, 0.06);
}

.nutrition-day-pill.is-today {
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.35);
    background: rgba(16, 185, 129, 0.08);
}

.nutrition-day-pill.active-pill {
    background: #10b981 !important;
    color: #ffffff !important;
    border-color: #10b981 !important;
}

.pill-today-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
}

.nutrition-day-pill.active-pill .pill-today-dot {
    background: #ffffff;
}

.pill-day-kcal {
    font-size: 0.72rem;
    opacity: 0.75;
    font-weight: 600;
}

.nutrition-week-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px;
    padding: 4px 2px 14px 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scroll-behavior: smooth;
    width: 100%;
    box-sizing: border-box;
}

.nutrition-week-grid::-webkit-scrollbar {
    height: 6px;
}

.nutrition-week-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.nutrition-day-card {
    flex: 0 0 310px;
    min-width: 310px;
    max-width: 310px;
    scroll-snap-align: start;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--input-border);
    border-radius: var(--radius);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.2s ease, border-color 0.2s ease;
    box-sizing: border-box;
}

.nutrition-day-card:hover {
    border-color: rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
}

.nutrition-day-card.today-card {
    border: 2px solid #10b981;
    background: rgba(16, 185, 129, 0.05);
    box-shadow: 0 4px 20px -2px rgba(16, 185, 129, 0.2);
}

.nutrition-day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.nutrition-day-title {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--text-main);
}

.nutrition-today-badge {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    background: #10b981;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.nutrition-day-kcal-badge {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    white-space: nowrap;
}

.nutrition-day-macros-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.76rem;
    font-weight: 700;
}

.nutrition-macro-bar {
    display: flex;
    height: 6px;
    width: 100%;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
}

.nutrition-slots-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
}

.nutrition-slot-item {
    background: var(--card-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-input);
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nutrition-slot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
}

.nutrition-slot-select-wrap .custom-search-select-btn {
    padding: 6px 10px;
    font-size: 0.82rem;
}

/* Einkaufsliste Checklist Rows */
.shopping-item-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-input);
    transition: all 0.2s ease;
    cursor: pointer;
}

.shopping-item-row:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(20, 184, 166, 0.3);
}

.shopping-item-row.checked, .shopping-item-row:has(input:checked) {
    opacity: 0.5;
    background: rgba(0, 0, 0, 0.15);
}

.shopping-item-row.checked .shop-item-name,
.shopping-item-row:has(input:checked) .shop-item-name {
    text-decoration: line-through;
    color: var(--text-muted);
}

.shop-item-name {
    font-size: 0.85rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.shop-item-cat-badge {
    font-size: 0.68rem;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    font-weight: 600;
}

.shop-item-qty {
    font-weight: 700;
    font-size: 0.85rem;
    color: #14b8a6;
    white-space: nowrap;
}

/* Supermarkt-Preisvergleich */
.supermarket-cheapest-badge {
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.4);
    letter-spacing: 0.4px;
}

.market-price-bar-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-top: 4px;
}

.market-price-bar-fill {
    height: 100%;
    border-radius: var(--radius-sm);
    transition: width 0.4s ease;
}

.savings-potential-box {
    margin-top: 14px;
    padding: 12px 14px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: var(--radius);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

/* Gerichte & Rezepte Katalog */
.meals-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    margin-top: 10px;
}

.meal-catalog-card {
    background: var(--card-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius);
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    cursor: pointer;
    position: relative;
}

.meal-catalog-card:hover {
    transform: translateY(-2px);
    border-color: rgba(139, 92, 246, 0.45);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.meal-edit-hint {
    font-size: 0.72rem;
    opacity: 0.5;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.meal-catalog-card:hover .meal-edit-hint {
    opacity: 1;
    transform: scale(1.15);
}

.meal-cat-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    background: rgba(139, 92, 246, 0.18);
    color: #a78bfa;
    text-transform: uppercase;
}

.meal-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
    margin-bottom: 8px;
}

.meal-tag-pill {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

.meal-macro-pills-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.meal-macro-pill {
    font-size: 0.74rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
}

.meal-macro-pill.macro-cal { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.meal-macro-pill.macro-prot { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }
.meal-macro-pill.macro-carb { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.meal-macro-pill.macro-fat { background: rgba(236, 72, 153, 0.15); color: #f472b6; }

.meal-cost-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-muted);
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 6px;
}

.shopmode-tab-btn {
    width: auto !important;
    padding: 4px 10px !important;
    font-size: 0.76rem !important;
    font-weight: 600 !important;
    border-radius: 7px !important;
    background: transparent !important;
    border: none !important;
    color: var(--text-muted) !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    white-space: nowrap !important;
    line-height: 1.2 !important;
    height: auto !important;
}

.shopmode-tab-btn:hover {
    color: var(--text-main) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    transform: none !important;
}

.shopmode-tab-btn.active {
    background: #14b8a6 !important;
    color: #ffffff !important;
    box-shadow: 0 1px 4px rgba(20, 184, 166, 0.3) !important;
}

/* ==========================================================================
   DRY CUSTOM CHECKBOX SYSTEM (CLEAN VECTOR CHECKMARK)
   ========================================================================== */
input[type="checkbox"].app-checkbox,
.shopping-item-row input[type="checkbox"],
.custom-checkbox-container input[type="checkbox"],
.custom-checkbox input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    border-radius: var(--radius-sm);
    border: 1.5px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
    outline: none;
}

body.light-mode input[type="checkbox"].app-checkbox,
body.light-mode .shopping-item-row input[type="checkbox"],
body.light-mode .custom-checkbox-container input[type="checkbox"],
body.light-mode .custom-checkbox input[type="checkbox"] {
    border-color: rgba(0, 0, 0, 0.25);
    background: rgba(0, 0, 0, 0.03);
}

input[type="checkbox"].app-checkbox:hover,
.shopping-item-row input[type="checkbox"]:hover,
.custom-checkbox-container input[type="checkbox"]:hover,
.custom-checkbox input[type="checkbox"]:hover {
    border-color: var(--accent);
    background: rgba(20, 184, 166, 0.1);
}

input[type="checkbox"].app-checkbox:checked,
.shopping-item-row input[type="checkbox"]:checked,
.custom-checkbox-container input[type="checkbox"]:checked,
.custom-checkbox input[type="checkbox"]:checked {
    background-color: #14b8a6 !important;
    border-color: #14b8a6 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-size: 68% 68% !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    box-shadow: 0 2px 6px rgba(20, 184, 166, 0.35);
}

/* ==========================================================================
   RESPONSIVE WIDGET GRID SYSTEM (STANDARDIZED 24px GAPS)
   ========================================================================== */
.widgets-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 0;
}

.widgets-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 0;
}

.widgets-grid-split {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 24px;
    margin-bottom: 0;
}

.nutrition-quick-add-form {
    display: grid;
    grid-template-columns: 1fr 70px 90px 42px;
    gap: 8px;
    margin-bottom: 16px;
    align-items: center;
}

@media (max-width: 900px) {
    .widgets-grid-2,
    .widgets-grid-3,
    .widgets-grid-split,
    .widgets-2col,
    .overview-grid,
    .dashboard-2col {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .meals-catalog-grid {
        grid-template-columns: 1fr !important;
    }

    .nutrition-quick-add-form {
        grid-template-columns: 1fr 65px 75px 38px !important;
        gap: 6px !important;
    }
}

/* ==========================================================================
   UNIVERSAL TABLE RESPONSIVENESS & HORIZONTAL SCROLL
   ========================================================================== */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    position: relative;
}

.table-responsive::-webkit-scrollbar {
    height: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

/* ==========================================================================
   DEFINITIVE MOBILE DESIGN SYSTEM (SCREEN <= 768PX)
   ========================================================================== */
@media (max-width: 768px) {
    /* --- 1. SINGLE-ROW SLEEK HEADER --- */
    nav {
        height: auto !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 9000 !important;
        padding-top: env(safe-area-inset-top, 0px) !important;
        padding-bottom: 0 !important;
        padding-left: env(safe-area-inset-left, 0px) !important;
        padding-right: env(safe-area-inset-right, 0px) !important;
    }

    .nav-content {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 8px !important;
        padding: 10px 14px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .brand {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        flex-shrink: 0 !important;
        order: 1 !important;
    }

    .brand img, .nav-logo {
        width: 28px !important;
        height: 28px !important;
    }

    .brand h1, .nav-title {
        font-size: 1.15rem !important;
        font-weight: 800 !important;
        margin: 0 !important;
    }

    .stats {
        order: 2 !important;
        margin: 0 auto !important;
        padding: 5px 14px !important;
        border-radius: 50px !important;
        flex-shrink: 1 !important;
        max-width: 60% !important;
        white-space: nowrap !important;
        box-sizing: border-box !important;
    }

    #total-stat {
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }

    #total-stat .label {
        font-size: 0.65rem !important;
        font-weight: 700 !important;
        line-height: 1.1 !important;
    }

    #total-stat .value,
    #total-stat span:not(.label) {
        font-size: 0.95rem !important;
        font-weight: 800 !important;
        line-height: 1.2 !important;
    }

    .nav-actions,
    .header-actions {
        order: 3 !important;
        width: auto !important;
        justify-content: flex-end !important;
        flex-shrink: 0 !important;
        display: flex !important;
        margin: 0 !important;
    }

    .btn-icon, .menu-trigger {
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        min-height: 38px !important;
    }

    /* --- 2. FULLSCREEN APP MODALS --- */
    .modal {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100dvh !important;
        padding: 0 !important;
        margin: 0 !important;
        align-items: stretch !important;
        justify-content: stretch !important;
        z-index: 99990 !important;
    }

    .modal-content, .admin-modal-content {
        width: 100vw !important;
        height: 100dvh !important;
        max-width: 100vw !important;
        max-height: 100dvh !important;
        min-height: 100dvh !important;
        border-radius: 0 !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        box-shadow: none !important;
    }

    .modal-header {
        border-radius: 0 !important;
        padding: 14px 16px !important;
        flex-shrink: 0 !important;
    }

    .modal-body {
        padding: 16px !important;
        flex: 1 1 auto !important;
        height: auto !important;
        max-height: calc(100dvh - 120px) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .modal-footer {
        padding: 12px 16px !important;
        border-radius: 0 !important;
        flex-shrink: 0 !important;
    }

    /* --- 3. TOP KPI CARDS (2X2 COMPACT CLEAN GRID) --- */
    .kpi-card-grid, .portfolio-kpi-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
        margin-bottom: 16px !important;
    }

    .kpi-card, .portfolio-kpi-card {
        padding: 12px 12px !important;
        border-radius: 14px !important;
        gap: 6px !important;
        min-height: auto !important;
        box-sizing: border-box !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
    }

    .kpi-card-label, .portfolio-kpi-label {
        font-size: 0.68rem !important;
        font-weight: 800 !important;
        letter-spacing: 0.5px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        line-height: 1.2 !important;
    }

    .kpi-icon-badge {
        width: 22px !important;
        height: 22px !important;
        border-radius: 6px !important;
        font-size: 0.8rem !important;
    }

    .kpi-icon-badge svg {
        width: 12px !important;
        height: 12px !important;
    }

    .kpi-card-val, .portfolio-kpi-val {
        font-size: 1.15rem !important;
        font-weight: 900 !important;
        line-height: 1.15 !important;
        margin: 2px 0 !important;
    }

    .kpi-card-sub, .portfolio-kpi-sub {
        font-size: 0.68rem !important;
        line-height: 1.25 !important;
        white-space: normal !important;
    }

    /* --- 4. RISIKOCHECK & STRESS-TEST CARDS (COMPACT) --- */
    .stress-test-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }

    .stress-card {
        padding: 10px 12px !important;
        gap: 4px !important;
        border-radius: 12px !important;
    }

    .stress-card-title {
        font-size: 0.82rem !important;
        font-weight: 700 !important;
        line-height: 1.2 !important;
    }

    .stress-card-tag {
        font-size: 0.65rem !important;
        padding: 2px 6px !important;
    }

    .stress-loss-amount {
        font-size: 1.15rem !important;
        font-weight: 800 !important;
        margin: 2px 0 !important;
        line-height: 1.1 !important;
    }

    .stress-meta {
        font-size: 0.70rem !important;
        line-height: 1.35 !important;
    }

    .benchmark-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 6px !important;
        margin-top: 8px !important;
    }

    .benchmark-card {
        padding: 6px 8px !important;
        border-radius: 8px !important;
    }

    .benchmark-label {
        font-size: 0.64rem !important;
    }

    .benchmark-val {
        font-size: 0.78rem !important;
        font-weight: 700 !important;
    }

    /* --- 5. UNIVERSAL MOBILE HORIZONTAL SWIPE TRACKS --- */
    .mobile-swipe-track,
    .nutrition-week-grid,
    .meals-catalog-grid,
    .proj-kpi-container {
        display: flex !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        gap: 12px !important;
        padding: 2px 2px 14px 2px !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .mobile-swipe-track::-webkit-scrollbar,
    .nutrition-week-grid::-webkit-scrollbar,
    .meals-catalog-grid::-webkit-scrollbar,
    .proj-kpi-container::-webkit-scrollbar {
        display: none !important;
    }

    /* 5a. Wochenplanung Wochentage Slider */
    .nutrition-day-card {
        flex: 0 0 280px !important;
        min-width: 280px !important;
        max-width: 280px !important;
        scroll-snap-align: center !important;
        padding: 12px 14px !important;
        border-radius: var(--radius) !important;
        gap: 8px !important;
        box-sizing: border-box !important;
    }

    .nutrition-day-title {
        font-size: 0.90rem !important;
        font-weight: 800 !important;
    }

    .nutrition-day-kcal-badge {
        font-size: 0.72rem !important;
        padding: 2px 6px !important;
    }

    .nutrition-day-macros-row {
        font-size: 0.68rem !important;
        gap: 6px !important;
    }

    .nutrition-day-slots {
        gap: 6px !important;
    }

    .meal-slot-item {
        gap: 3px !important;
    }

    .meal-slot-label {
        font-size: 0.66rem !important;
    }

    .meal-slot-item .custom-search-select-btn {
        padding: 4px 8px !important;
        font-size: 0.78rem !important;
        min-height: 30px !important;
    }

    /* 5b. Gerichte-Katalog Swipeable Cards */
    .meals-catalog-grid .meal-catalog-card {
        flex: 0 0 285px !important;
        min-width: 285px !important;
        max-width: 285px !important;
        scroll-snap-align: center !important;
        margin-bottom: 0 !important;
        box-sizing: border-box !important;
        padding: 14px 16px !important;
    }

    /* 5c. Wachstumsprognose Szenario Kacheln Swipe Track */
    .proj-kpi-container {
        padding: 14px 2px 14px 2px !important;
        margin-top: 18px !important;
    }

    .proj-kpi-container > div {
        flex: 0 0 160px !important;
        min-width: 160px !important;
        max-width: 160px !important;
        scroll-snap-align: center !important;
        box-sizing: border-box !important;
        padding: 10px 12px !important;
    }

    /* 5d. Responsive Tables Swipeable Container */
    .table-responsive {
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: thin !important;
        margin-bottom: 8px !important;
    }

    .table-responsive table {
        min-width: 580px !important;
    }

    .widget-table-card .table-responsive table {
        min-width: 720px !important;
    }

    .table-responsive .admin-table-header,
    .table-responsive .admin-item {
        min-width: 680px !important;
        box-sizing: border-box !important;
    }

    .table-responsive .app-empty-state,
    .table-responsive:has(.app-empty-state) {
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: visible !important;
    }

    .table-responsive:has(.app-empty-state) .admin-table-header {
        display: none !important;
    }

    /* 5e. Admin Modal Forms Mobile Grids */
    .target-alloc-row {
        grid-template-columns: 1fr 85px 36px !important;
        grid-template-rows: auto auto !important;
        background: rgba(255, 255, 255, 0.02) !important;
        padding: 8px 10px !important;
        border-radius: var(--radius-sm) !important;
        border: 1px solid var(--input-border) !important;
        margin-bottom: 6px !important;
        gap: 8px !important;
    }

    .target-alloc-row > div:nth-child(1) {
        grid-column: 1 / -1 !important;
    }

    .target-alloc-row > div:nth-child(2) {
        grid-column: 1 !important;
    }

    .target-alloc-row > div:nth-child(3) {
        grid-column: 2 !important;
    }

    .target-alloc-row > div:nth-child(4) {
        grid-column: 3 !important;
    }

    .macro-risk-metrics {
        grid-template-columns: 1fr 90px !important;
        gap: 8px !important;
    }

    .macro-risk-metrics > div:nth-child(1) {
        grid-column: 1 !important;
    }

    .macro-risk-metrics > div:nth-child(2) {
        grid-column: 2 !important;
    }

    .macro-risk-metrics > div:nth-child(3) {
        grid-column: 1 / -1 !important;
    }

    .pos-meta-grid,
    .pos-row-metrics {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }

    .pos-row-metrics > div:last-child {
        grid-column: 1 / -1 !important;
    }

    .admin-meal-meta-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }

    .admin-meal-meta-grid > div:nth-child(1) {
        grid-column: 1 / -1 !important;
    }

    .meal-ing-row {
        grid-template-columns: 1fr 65px 65px 36px !important;
        gap: 4px !important;
    }

    .settings-2col-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }

    /* --- 6. BUDGET CAROUSEL & CARDS --- */
    .carousel-container {
        align-items: flex-start !important;
    }

    .carousel-item {
        min-height: auto !important;
        height: auto !important;
        align-items: flex-start !important;
    }

    .carousel-item > div {
        min-height: auto !important;
        height: auto !important;
        padding: 14px 12px !important;
    }

    .chart-section {
        flex-direction: column !important;
        gap: 12px !important;
        padding: 14px 12px !important;
    }

    .budget-auslastung-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    .chart-container {
        width: 140px !important;
        height: 140px !important;
        margin: 0 auto !important;
    }

    .chart-legend {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        width: 100% !important;
        gap: 6px !important;
    }

    .legend-item {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 4px 8px !important;
        background: rgba(255, 255, 255, 0.03) !important;
        border-radius: var(--radius-sm) !important;
        font-size: 0.74rem !important;
        gap: 4px !important;
    }

    .legend-item .label {
        font-size: 0.70rem !important;
        font-weight: 700 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .legend-item .value {
        font-size: 0.80rem !important;
        font-weight: 800 !important;
        color: var(--text-main) !important;
        white-space: nowrap !important;
    }

    .overview-section,
    .community-container {
        padding: 14px 14px 28px 14px !important;
        gap: 14px !important;
    }

    .card {
        padding: 16px 14px !important;
    }

    .month-picker {
        gap: 8px !important;
    }

    .month-name {
        font-size: 0.95rem !important;
    }

    /* 7. MODAL SIZING & FULL-HEIGHT MOBILE VIEW */
    .modal {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100dvh !important;
        padding: 0 !important;
        margin: 0 !important;
        align-items: stretch !important;
        justify-content: stretch !important;
        z-index: 99990 !important;
    }

    .modal-content,
    .admin-modal-content {
        width: 100vw !important;
        height: 100dvh !important;
        max-width: 100vw !important;
        max-height: 100dvh !important;
        min-height: 100dvh !important;
        border-radius: 0 !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        box-shadow: none !important;
        box-sizing: border-box !important;
    }

    .modal-body {
        padding: 14px 16px !important;
        flex: 1 1 auto !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        min-height: 0 !important;
    }

    .admin-modal-body {
        padding: 12px 14px !important;
    }

    .modal-header {
        flex-shrink: 0 !important;
        padding: 14px 16px !important;
    }

    .modal-footer {
        flex-shrink: 0 !important;
        padding: 12px 16px !important;
    }
}

/* ==========================================================================
   FINANCIAL APP MODERN LANDING PAGE & AUTH MODAL DESIGN
   ========================================================================== */
.landing-wrapper {
    min-height: 100vh;
    background: radial-gradient(circle at 50% 0%, rgba(139, 92, 246, 0.15) 0%, rgba(15, 23, 42, 0.98) 60%), #0b0f19;
    color: var(--text-main);
    overflow-x: hidden;
}

.landing-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(15, 23, 42, 0.82);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: env(safe-area-inset-top, 0px);
}

.landing-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.landing-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.landing-logo {
    width: 32px;
    height: 32px;
}

.landing-title {
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: #ffffff;
}

.landing-country-badge {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: 4px;
}

.landing-nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.landing-nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    transition: color 0.2s;
}

.landing-nav-links a:hover {
    color: #ffffff;
}

.guest-nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 3px 5px;
    border-radius: 9999px;
}

.guest-nav-link {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 9999px;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.guest-nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

.guest-nav-link.active {
    color: #ffffff;
    background: rgba(139, 92, 246, 0.25);
    border: 1px solid rgba(139, 92, 246, 0.4);
}

.landing-nav-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.btn-landing-login {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #cbd5e1;
    font-weight: 700;
    font-size: 0.84rem;
    padding: 0 14px;
    height: 36px;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-landing-login:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-landing-register {
    background: var(--primary-gradient);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.84rem;
    padding: 0 16px;
    height: 36px;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 10px var(--primary-glow);
    transition: all 0.2s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-landing-register:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--primary-glow);
}

/* HERO SECTION */
.landing-hero {
    max-width: 960px;
    margin: 0 auto;
    padding: 60px 20px 40px 20px;
    text-align: center;
}

.landing-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--card-glass-active);
    border: 1px solid var(--border-hover);
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #c4b5fd;
    margin-bottom: 24px;
}

.hero-pulse {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.landing-hero-title {
    font-size: 2.8rem;
    font-weight: 900;
    line-height: 1.18;
    margin: 0 0 20px 0;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: var(--hero-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.landing-hero-subtitle {
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 720px;
    margin: 0 auto 32px auto;
}

.landing-hero-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 26px;
}

.btn-hero-primary {
    background: var(--primary-gradient);
    color: #ffffff;
    border: none;
    padding: 10px 22px;
    font-size: 0.92rem;
    font-weight: 700;
    border-radius: var(--radius-btn);
    cursor: pointer;
    box-shadow: 0 4px 16px var(--primary-glow);
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: 240px;
}

.btn-hero-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
}

.btn-hero-secondary {
    background: var(--rest-box-bg);
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    padding: 10px 20px;
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: var(--radius-btn);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: all 0.2s;
    width: auto;
    max-width: 200px;
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.14);
}

.landing-hero-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* LIVE MOCKUP PREVIEW */
.landing-mockup-wrap {
    max-width: 780px;
    margin: 0 auto;
}

.landing-mockup-card {
    background: var(--card-glass-hover);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.mockup-header-bar {
    background: var(--header-bg);
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.mockup-dots {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.mockup-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.mockup-url {
    font-size: 0.78rem;
    font-family: monospace;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.3);
    padding: 3px 12px;
    border-radius: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.mockup-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #10b981;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 3px 10px;
    border-radius: 20px;
    flex-shrink: 0;
    white-space: nowrap;
}

.mockup-body-preview {
    padding: 24px;
}

.mockup-kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.mockup-kpi {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.mockup-kpi-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mockup-kpi-value {
    font-size: 1.4rem;
    font-weight: 900;
    font-family: 'Outfit', sans-serif;
}

.mockup-kpi-sub {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-muted);
}

.mockup-footer-ticker {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.78rem;
    color: var(--text-muted);
    gap: 10px;
}

.ticker-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.ticker-name {
    color: var(--text-main);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ticker-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.ticker-price {
    color: #ffffff;
    font-weight: 700;
    font-family: monospace;
}

.ticker-perf {
    color: #10b981;
    font-weight: 700;
}

.text-purple { color: #c4b5fd; }
.text-green { color: #10b981; }
.text-teal { color: #2dd4bf; }
.text-amber { color: #fbbf24; }

/* SECTIONS */
.landing-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

.section-title-wrap {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 40px auto;
}

.section-tag {
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary);
    margin-bottom: 8px;
    display: block;
}

.section-heading {
    font-size: 2.1rem;
    font-weight: 900;
    margin: 0 0 12px 0;
    line-height: 1.25;
}

.section-subtext {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0;
}

/* BENTO GRID */
.landing-bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.landing-benefit-card {
    background: var(--card-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 24px;
    backdrop-filter: blur(10px);
    transition: transform 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
}

.landing-benefit-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-hover);
}

.landing-benefit-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.landing-benefit-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.landing-benefit-badge {
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.landing-benefit-title {
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0 0 8px 0;
    color: #ffffff;
}

.landing-benefit-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0;
}

/* ==========================================================================
   BILLING TOGGLE & PRICING PLANS
   ========================================================================== */
.billing-toggle-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 41, 59, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    padding: 5px;
    border-radius: 9999px;
    margin: 28px auto 0 auto;
    gap: 4px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    max-width: 100%;
    height: 56px;
    box-sizing: border-box;
}

.billing-toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 700;
    padding: 0 24px;
    height: 46px;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    user-select: none;
    white-space: nowrap;
    box-sizing: border-box;
}

.billing-toggle-btn:hover:not(.active) {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.billing-toggle-btn.active {
    background: var(--primary-gradient);
    color: #ffffff;
    box-shadow: 0 4px 18px var(--primary-glow);
}

.billing-save-badge {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
    font-size: 0.74rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 9999px;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    align-items: stretch;
    margin-top: 10px;
}

.pricing-card {
    background: var(--card-glass);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 32px 24px;
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.pricing-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.pricing-card.popular {
    background: rgba(30, 41, 59, 0.75);
    border: 2px solid var(--primary);
    box-shadow: 0 12px 36px var(--primary-glow);
    transform: scale(1.02);
}

.pricing-card.popular:hover {
    transform: scale(1.02) translateY(-4px);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-gradient);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 4px 14px;
    border-radius: 20px;
    box-shadow: 0 4px 10px var(--primary-glow);
    white-space: nowrap;
}

.pricing-card-header {
    margin-bottom: 20px;
}

.pricing-card-title {
    font-size: 1.5rem;
    font-weight: 900;
    color: #ffffff;
    margin: 0 0 6px 0;
}

.pricing-card-tagline {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin: 0;
    min-height: 38px;
}

.pricing-card-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.price-val-wrap {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.price-currency {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-muted);
}

.price-amount {
    font-size: 2.5rem;
    font-weight: 900;
    font-family: 'Outfit', sans-serif;
    color: #ffffff;
    line-height: 1;
}

.price-period {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
}

.pricing-cta-btn {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px !important;
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    margin-bottom: 24px;
}

.pricing-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pricing-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.88rem;
    color: #cbd5e1;
    line-height: 1.45;
}

.pricing-feature-item svg {
    flex-shrink: 0;
    margin-top: 2px;
}

/* TESTIMONIAL SLIDER */
.testimonial-slider-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.testimonial-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 10px 4px;
    width: 100%;
}

.testimonial-track::-webkit-scrollbar {
    display: none;
}

.landing-testimonial-card {
    flex: 0 0 100%;
    scroll-snap-align: center;
    background: var(--card-glass);
    border: 1px solid var(--border-subtle);
    border-radius: 18px;
    padding: 32px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (min-width: 768px) {
    .landing-testimonial-card {
        flex: 0 0 calc(50% - 10px);
    }
}

.testimonial-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.testimonial-stars {
    display: flex;
    gap: 3px;
}

.testimonial-stat {
    font-size: 0.72rem;
    font-weight: 800;
    background: var(--card-glass-active);
    color: #c4b5fd;
    border: 1px solid var(--border-hover);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
}

.testimonial-quote {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #e2e8f0;
    margin: 0;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
}

.testimonial-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
    color: #ffffff;
    font-weight: 800;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonial-name {
    font-size: 0.95rem;
    font-weight: 800;
    color: #ffffff;
}

.testimonial-role {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.verified-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    color: #10b981;
    margin-top: 2px;
}

.slider-arrow {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.slider-arrow:hover {
    background: rgba(255, 255, 255, 0.18);
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.2s;
}

.slider-dot.active {
    width: 22px;
    border-radius: 10px;
    background: #8b5cf6;
}

/* FAQ ACCORDION */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.25s ease;
}

.faq-item:hover {
    border-color: rgba(139, 92, 246, 0.35);
    background: rgba(30, 41, 59, 0.7);
}

.faq-item.active {
    background: rgba(139, 92, 246, 0.12);
    border-color: rgba(139, 92, 246, 0.45);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.15);
}

.faq-question {
    width: 100%;
    padding: 18px 20px;
    background: none;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    cursor: pointer;
    transition: color 0.2s, background-color 0.2s;
}

.faq-item.active .faq-question {
    color: #c4b5fd;
}

.faq-arrow {
    transition: transform 0.25s, color 0.25s;
    color: var(--text-muted);
    flex-shrink: 0;
}

.faq-item:hover .faq-arrow {
    color: #c4b5fd;
}

.faq-item.active .faq-arrow {
    transform: rotate(180deg);
    color: #8b5cf6;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 20px;
}

.faq-item.active .faq-answer {
    max-height: 300px;
    padding-bottom: 18px;
}

.faq-answer p {
    font-size: 0.92rem;
    color: #cbd5e1;
    line-height: 1.6;
    margin: 0;
}

/* FOOTER */
.landing-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.95);
    padding: 30px 20px;
}

.landing-footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.landing-footer-meta {
    font-size: 0.82rem;
    color: var(--text-muted);
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* AUTH MODAL & TABS */
#auth-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100dvh !important;
    background: rgba(11, 15, 25, 0.82) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    z-index: 99999 !important;
}

#auth-modal.active,
#auth-modal[style*="display: flex"] {
    display: flex !important;
}

.auth-modal-box {
    width: 100% !important;
    max-width: 440px !important;
    height: auto !important;
    min-height: auto !important;
    max-height: 90vh !important;
    border-radius: 20px !important;
    background: #131d31 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7) !important;
    margin: auto !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.auth-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 0 20px !important;
    border: none !important;
}

.auth-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.25);
    padding: 4px;
    border-radius: 10px;
    gap: 4px;
}

.auth-tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.84rem;
    padding: 6px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-tab-btn.active {
    background: rgba(139, 92, 246, 0.25);
    color: #ffffff;
}

.auth-tab-content {
    padding: 20px;
}

.auth-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    margin-bottom: 4px;
    border-radius: 10px;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.4;
    text-align: left;
    box-sizing: border-box;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.08);
}

.alert-danger svg {
    color: #f87171;
    flex-shrink: 0;
}

/* REGISTRATION AVATAR UPLOAD (PROTRUDING CAMERA BADGE) */
.reg-avatar-wrapper {
    position: relative;
    width: 86px;
    height: 86px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4px auto;
}

.reg-avatar-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.12);
    border: 2px dashed rgba(139, 92, 246, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.reg-avatar-wrapper:hover .reg-avatar-inner {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.2);
    transform: scale(1.02);
}

#avatar-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

#avatar-preview-icon-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.avatar-camera-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    border: 2.5px solid #131d31;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    z-index: 5;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.reg-avatar-wrapper:hover .avatar-camera-badge {
    transform: scale(1.15);
}

.reg-avatar-label-wrap {
    font-size: 0.82rem;
    font-weight: 700;
    color: #c4b5fd;
    margin-top: 8px;
    cursor: pointer;
    text-align: center;
    transition: color 0.15s ease;
}

.reg-avatar-label-wrap:hover {
    color: #ffffff;
}

.reg-avatar-sublabel {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.72rem;
}

/* OTP INPUT GRID */
.otp-inputs-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin-bottom: 18px;
}

.otp-digit {
    width: 100%;
    height: 52px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 900;
    font-family: monospace;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-input);
    color: var(--text-main);
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.otp-digit:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25);
    outline: none;
}

@media (max-width: 768px) {
    .landing-nav-links {
        display: none;
    }
    .landing-hero-title {
        font-size: 2.1rem;
    }
    .landing-hero-subtitle {
        font-size: 0.98rem;
    }
    .landing-hero-cta {
        flex-direction: column;
        width: 100%;
    }
    .btn-hero-primary,
    .btn-hero-secondary {
        width: 100%;
        max-width: 100%;
    }
}

/* ==========================================================================
   GAMIFICATION SYSTEM (XP, LEVELS, BADGES & QUESTS)
   ========================================================================== */
.gamification-header-badge {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50px;
    padding: 4px 12px 4px 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
}

.gamification-header-badge:hover {
    transform: translateY(-1px);
    border-color: rgba(139, 92, 246, 0.45);
    box-shadow: 0 4px 14px var(--primary-glow);
    background: rgba(30, 41, 59, 0.95);
}

.badge-icon-wrap {
    font-size: 1.25rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.badge-info-wrap {
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-align: left;
}

.badge-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.badge-lvl {
    font-size: 0.75rem;
    font-weight: 800;
    color: #c4b5fd;
    text-transform: uppercase;
}

.badge-name {
    font-size: 0.75rem;
    font-weight: 700;
    color: #ffffff;
}

.badge-streak {
    font-size: 0.68rem;
    font-weight: 800;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.15);
    padding: 1px 5px;
    border-radius: 10px;
}

.badge-xp-bar-bg {
    width: 90px;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    overflow: hidden;
}

.badge-xp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #38bdf8);
    border-radius: 4px;
    transition: width 0.4s ease;
}

/* ACHIEVEMENTS MODAL */
.achievements-modal-box {
    max-width: 680px !important;
    border-radius: 20px !important;
    background: #111827 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    overflow: hidden;
}

.achieve-hero-banner {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(59, 130, 246, 0.1) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 16px 20px;
    margin: 16px 20px 14px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.achieve-hero-avatar {
    font-size: 2.8rem;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.2);
    border: 2px solid rgba(139, 92, 246, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.achieve-hero-details {
    flex: 1;
    min-width: 140px;
}

.achieve-hero-level {
    font-size: 0.72rem;
    font-weight: 900;
    color: #a78bfa;
    letter-spacing: 1px;
}

.achieve-hero-title {
    font-size: 1.3rem;
    font-weight: 900;
    color: #ffffff;
    margin: 2px 0 6px 0;
}

.achieve-hero-xp-text {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.achieve-hero-bar-wrap {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    overflow: hidden;
}

.achieve-hero-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #38bdf8, #10b981);
    border-radius: 8px;
    transition: width 0.5s ease;
}

.achieve-streak-card {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px;
    padding: 10px 14px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
    flex-shrink: 0;
}

/* --- UNIFIED DRY SEGMENTED CONTROL COMPONENT --- */
.segmented-control-bar {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    align-items: center;
    gap: 6px;
    padding: 5px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-sizing: border-box;
    width: 100%;
    flex-shrink: 0;
}

body.light-mode .segmented-control-bar {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.segmented-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 8px 10px;
    height: 38px;
    min-height: 38px;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    white-space: nowrap;
    text-align: center;
    box-sizing: border-box;
    width: 100%;
    user-select: none;
    -webkit-user-select: none;
}

.segmented-tab-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

body.light-mode .segmented-tab-btn {
    color: #64748b;
}

body.light-mode .segmented-tab-btn:hover {
    color: #0f172a;
    background: rgba(0, 0, 0, 0.04);
}

.segmented-tab-btn.active {
    color: #ffffff !important;
    background: var(--primary-gradient, #8b5cf6) !important;
    box-shadow: 0 3px 12px var(--primary-glow, rgba(139, 92, 246, 0.4)) !important;
    font-weight: 800;
}

.segmented-tab-btn .segmented-badge {
    opacity: 0.85;
    font-size: 0.82em;
    font-weight: 600;
}

.segmented-tab-btn .segmented-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95em;
}

/* Specific Context: Achievements Modal */
.achieve-segmented-control {
    margin: 0 20px 14px 20px !important;
    width: calc(100% - 40px) !important;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 5px;
    display: grid !important;
    grid-template-columns: 1.15fr 0.9fr 0.95fr !important;
    box-sizing: border-box !important;
}

body.light-mode .achieve-segmented-control {
    background: rgba(241, 245, 249, 0.9);
    border: 1px solid #e2e8f0;
}

/* Specific Context: Dashboard Header */
.unified-dashboard-nav .nav-tabs-group {
    background: rgba(0, 0, 0, 0.35);
    border: none;
    padding: 4px;
    width: auto;
    display: flex;
}

/* BADGES GRID */
.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.badge-card {
    border-radius: 14px;
    padding: 14px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    transition: all 0.2s ease;
}

.badge-card.unlocked {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(139, 92, 246, 0.35);
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.12);
}

.badge-card.unlocked:hover {
    transform: translateY(-2px);
    border-color: rgba(139, 92, 246, 0.6);
}

.badge-card.locked {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    opacity: 0.55;
    filter: grayscale(0.5);
}

.badge-card-icon {
    font-size: 2rem;
    line-height: 1;
}

.badge-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.badge-card-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: #ffffff;
}

.badge-card-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.badge-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
}

.badge-status-unlocked {
    font-size: 0.7rem;
    font-weight: 800;
    color: #10b981;
}

.badge-status-locked {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
}

.badge-xp-reward {
    font-size: 0.72rem;
    font-weight: 800;
    color: #c4b5fd;
    background: rgba(139, 92, 246, 0.2);
    padding: 2px 6px;
    border-radius: 6px;
}

/* QUESTS */
.quests-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quest-item {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    justify-content: space-between;
    flex-wrap: wrap;
}

.quest-icon {
    font-size: 1.8rem;
}

.quest-info {
    flex: 1;
    min-width: 200px;
}

.quest-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 3px;
}

.quest-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.btn-quest-claim {
    background: var(--primary-gradient);
    color: #ffffff;
    border: none;
    padding: 8px 14px;
    border-radius: var(--radius-btn);
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 4px 12px var(--primary-glow);
    transition: transform 0.2s;
}

.btn-quest-claim:hover {
    transform: translateY(-1px);
}

/* RANKS TIMELINE */
.ranks-timeline {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rank-step {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 10px 16px;
    opacity: 0.6;
}

.rank-step.achieved {
    background: rgba(139, 92, 246, 0.12);
    border-color: rgba(139, 92, 246, 0.35);
    opacity: 1;
}

.rank-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-weight: 900;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rank-info {
    font-size: 0.88rem;
    color: var(--text-main);
}

/* --- REFERRAL & INVITATION MODAL SYSTEM --- */
.referral-modal-box {
    max-width: 540px !important;
    border-radius: 20px !important;
    background: #111827 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    overflow: hidden;
}

.referral-hero-banner {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(59, 130, 246, 0.12) 100%);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.referral-hero-icon {
    font-size: 2.2rem;
    flex-shrink: 0;
}

.referral-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.referral-stat-card {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px;
    text-align: center;
}

.referral-stat-num {
    font-size: 1.5rem;
    font-weight: 900;
    color: #ffffff;
    line-height: 1.2;
}

.referral-stat-lbl {
    font-size: 0.74rem;
    color: var(--text-muted);
    margin-top: 2px;
    font-weight: 600;
}

.referral-link-container {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    background: rgba(0, 0, 0, 0.35) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 12px !important;
    padding: 4px 6px 4px 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.referral-link-input {
    background: transparent !important;
    border: none !important;
    color: var(--text-main) !important;
    font-size: 0.84rem !important;
    font-family: monospace !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
    padding: 8px 4px !important;
    outline: none !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    overflow: hidden !important;
}

.referral-copy-btn {
    background: var(--primary) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 0 16px !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    border-radius: 9px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    height: 36px !important;
    min-height: 36px !important;
    cursor: pointer !important;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3) !important;
    transition: all 0.2s ease !important;
}

.referral-copy-btn:hover {
    background: var(--primary-hover) !important;
    transform: translateY(-1px) !important;
}

.referral-share-btn {
    padding: 10px 14px !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    transition: all 0.2s ease !important;
}

/* Light Mode Overrides for Referral */
body.light-mode .referral-modal-box {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
}

body.light-mode .referral-hero-banner {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(59, 130, 246, 0.08) 100%) !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
}

body.light-mode .referral-hero-info h3 {
    color: #0f172a !important;
}

body.light-mode .referral-stat-card {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
}

body.light-mode .referral-stat-num {
    color: #0f172a !important;
}

body.light-mode .referral-link-container {
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
}

body.light-mode .referral-link-input {
    color: #0f172a !important;
}

/* ==========================================================================
   TAX SETTINGS FORM STYLES
   ========================================================================== */
.tax-form-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
}

.tax-form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
    line-height: 1.35;
}

.tax-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px 18px;
}

.tax-form-grid .tax-form-field {
    margin-bottom: 0;
}

.tax-anlagen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 14px 16px;
}

.tax-anlagen-grid .tax-form-field {
    margin-bottom: 0;
}

.tax-anlagen-grid .tax-form-field-full {
    grid-column: 1 / -1;
}

/* ==========================================================================
   STANDARDIZED MODAL FORM GRID (12-COLUMN HARMONIZED GRID)
   ========================================================================== */
.form-grid-12 {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 14px;
    width: 100%;
    box-sizing: border-box;
}

.col-12 { grid-column: span 12; }
.col-9  { grid-column: span 9; }
.col-8  { grid-column: span 8; }
.col-6  { grid-column: span 6; }
.col-4  { grid-column: span 4; }
.col-3  { grid-column: span 3; }
.col-2  { grid-column: span 2; }

@media (max-width: 768px) {
    .form-grid-12 {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    .form-grid-12 > [class*="col-"] {
        grid-column: span 1 !important;
    }
}

/* ==========================================================================
   YUH EXPERT MODE & 10-YEAR WEALTH FORECAST STYLES (FLAT & CLEAN - NO BOX-IN-BOX)
   ========================================================================== */
.expert-mode-toggle-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    border: none;
    border-top: 1px solid var(--border-subtle);
    padding: 14px 4px 4px 4px;
    margin-top: 8px;
    transition: all 0.2s ease;
}

.expert-legal-note {
    display: none;
    background: rgba(139, 92, 246, 0.05);
    border: 1px dashed rgba(139, 92, 246, 0.3);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: var(--fs-xs);
    color: var(--text-muted);
    line-height: 1.45;
    margin-top: 8px;
    animation: fadeInNote 0.25s ease forwards;
}

.expert-legal-note strong {
    color: #a78bfa;
}

body.expert-mode-active .expert-legal-note,
.modal.expert-mode-active .expert-legal-note {
    display: block;
}

@keyframes fadeInNote {
    from { opacity: 0; transform: translateY(-3px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 10-Year Multi-Year Comparison Card (Clean Single-Layer) */
.forecast-10y-card {
    background: var(--card-bg, #1e293b);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-sizing: border-box;
}

.forecast-10y-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.forecast-10y-title {
    font-size: var(--fs-md);
    font-weight: 700;
    color: var(--text-main);
}

.forecast-10y-badge {
    font-size: var(--fs-xs);
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(56, 189, 248, 0.12);
    color: var(--info);
}

.forecast-10y-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 4px 0;
}

/* Flat columns - strictly no nested box-in-box */
.forecast-col {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.forecast-col:first-child {
    padding-right: 24px;
    border-right: 1px solid var(--border-subtle);
}

.forecast-col-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: var(--fs-sm);
    font-weight: 700;
}

.forecast-stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

.forecast-stat-row strong {
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
}

.forecast-net-sum {
    border-top: 1px solid var(--input-border);
    padding-top: 8px;
    margin-top: 2px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.forecast-net-sum-label {
    font-size: var(--fs-xs);
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.forecast-net-sum-val {
    font-size: var(--fs-lg);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

/* Flat summary recommendation line - strictly no box-in-box */
.forecast-recommendation-bar {
    background: transparent;
    border: none;
    border-top: 1px solid var(--border-subtle);
    border-radius: 0;
    padding: 10px 0 0 0;
    display: flex;
    align-items: center;
    font-size: var(--fs-xs);
    font-weight: 600;
    color: #10b981;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .forecast-10y-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    .forecast-col:first-child {
        padding-right: 0 !important;
        border-right: none !important;
        border-bottom: 1px solid var(--border-subtle) !important;
        padding-bottom: 16px !important;
    }
}

/* ==========================================================================
   COMPREHENSIVE MOBILE RESPONSIVENESS (LANDING & APP)
   ========================================================================== */
@media (max-width: 768px) {
    .landing-wrapper {
        padding: 0 !important;
        overflow-x: hidden;
        width: 100%;
    }

    .landing-header {
        width: 100%;
    }

    .landing-nav-container {
        padding: 12px 16px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .landing-hero {
        padding: 36px 16px 28px 16px !important;
    }

    .landing-section {
        padding: 44px 16px !important;
    }

    .landing-hero-title {
        font-size: 2rem;
        line-height: 1.25;
        letter-spacing: -0.5px;
    }

    .landing-hero-subtitle {
        font-size: 0.95rem;
        line-height: 1.55;
        margin-bottom: 24px;
    }

    .landing-hero-cta {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .btn-hero-primary,
    .btn-hero-secondary {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
        font-size: 0.95rem;
    }

    .landing-hero-trust {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px 16px;
        margin-top: 24px;
    }

    .trust-item {
        font-size: 0.78rem;
    }

    /* Live App Mockup on Mobile */
    .landing-mockup-wrap {
        margin: 20px auto 0 auto !important;
        max-width: 100% !important;
        padding: 0 !important;
    }

    .landing-mockup-card {
        border-radius: 14px !important;
    }

    .mockup-header-bar {
        padding: 8px 12px !important;
        gap: 8px !important;
    }

    .mockup-dots span {
        width: 8px !important;
        height: 8px !important;
    }

    .mockup-url {
        font-size: 0.70rem !important;
        padding: 2px 8px !important;
        max-width: 140px !important;
    }

    .mockup-live-badge {
        font-size: 0.68rem !important;
        padding: 2px 8px !important;
    }

    .mockup-body-preview {
        padding: 12px !important;
    }

    .mockup-kpi-row {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }

    .mockup-kpi {
        padding: 10px 14px !important;
        gap: 2px !important;
        border-radius: 10px !important;
    }

    .mockup-kpi-title {
        font-size: 0.68rem !important;
    }

    .mockup-kpi-value {
        font-size: 1.15rem !important;
    }

    .mockup-kpi-sub {
        font-size: 0.70rem !important;
    }

    .mockup-footer-ticker {
        margin-top: 10px !important;
        padding-top: 8px !important;
        font-size: 0.72rem !important;
        gap: 6px !important;
    }

    .ticker-name {
        font-size: 0.70rem !important;
    }

    .ticker-price, .ticker-perf {
        font-size: 0.70rem !important;
    }

    /* Testimonials / Reviews Slider on Mobile */
    .testimonial-slider-container {
        padding: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .testimonial-slider-container .slider-arrow {
        display: none !important;
    }

    .testimonial-track {
        gap: 14px !important;
        padding: 6px 0 !important;
        width: 100% !important;
    }

    .landing-testimonial-card {
        flex: 0 0 100% !important;
        width: 100% !important;
        padding: 22px 18px !important;
        gap: 14px !important;
        border-radius: 16px !important;
        box-sizing: border-box !important;
    }

    .testimonial-top {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;
        flex-wrap: nowrap !important;
        width: 100% !important;
    }

    .testimonial-stars {
        gap: 3px !important;
        flex-shrink: 0 !important;
        display: flex !important;
    }

    .testimonial-stars svg {
        width: 14px !important;
        height: 14px !important;
    }

    .testimonial-stat {
        font-size: 0.72rem !important;
        font-weight: 700 !important;
        padding: 3px 10px !important;
        border-radius: 20px !important;
        background: rgba(139, 92, 246, 0.15) !important;
        color: #c4b5fd !important;
        border: 1px solid rgba(139, 92, 246, 0.3) !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        text-align: right !important;
        max-width: none !important;
    }

    .testimonial-quote {
        font-size: 0.90rem !important;
        line-height: 1.55 !important;
    }

    .testimonial-author {
        gap: 12px !important;
    }

    .testimonial-avatar {
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        font-size: 1rem !important;
    }

    .testimonial-name {
        font-size: 0.90rem !important;
    }

    .testimonial-role {
        font-size: 0.74rem !important;
    }

    .verified-pill {
        font-size: 0.66rem !important;
    }

    .section-title-wrap {
        margin-bottom: 24px;
    }

    .section-heading {
        font-size: 1.65rem;
        line-height: 1.3;
    }

    .section-subtext {
        font-size: 0.88rem;
    }

    .billing-toggle-wrapper {
        width: 100%;
        max-width: 360px;
        height: 52px;
        box-sizing: border-box;
        margin-top: 18px;
    }

    .billing-toggle-btn {
        flex: 1;
        height: 42px;
        padding: 0 12px;
        font-size: 0.84rem;
        justify-content: center;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .pricing-card {
        padding: 24px 18px;
    }

    .faq-question {
        padding: 14px 16px;
        font-size: 0.92rem;
    }

    .faq-answer {
        padding: 0 16px;
    }

    #auth-modal {
        padding: 16px !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .auth-modal-box {
        width: 100% !important;
        max-width: 400px !important;
        height: auto !important;
        min-height: auto !important;
        max-height: 92dvh !important;
        margin: auto !important;
        border-radius: 18px !important;
    }

    .achievements-modal-box {
        width: 100% !important;
        max-width: 500px !important;
        margin: auto !important;
        border-radius: 18px !important;
    }

    .achieve-hero-banner {
        margin: 14px 14px 12px 14px !important;
        padding: 12px 14px !important;
        gap: 12px !important;
        flex-shrink: 0 !important;
    }

    .achieve-hero-avatar {
        width: 48px !important;
        height: 48px !important;
        font-size: 2rem !important;
        flex-shrink: 0 !important;
    }

    .achieve-hero-details {
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }

    .achieve-hero-title {
        font-size: 1.15rem !important;
        margin: 1px 0 3px 0 !important;
    }

    .achieve-streak-card {
        padding: 8px 10px !important;
        min-width: 70px !important;
        flex-shrink: 0 !important;
    }

    .segmented-control-bar {
        gap: 4px !important;
        padding: 4px !important;
        border-radius: 12px !important;
    }

    .segmented-tab-btn, .achieve-tab-btn {
        padding: 7px 3px !important;
        font-size: 0.78rem !important;
        height: 36px !important;
        min-height: 36px !important;
        gap: 3px !important;
    }

    .achieve-segmented-control {
        margin: 0 14px 12px 14px !important;
        width: calc(100% - 28px) !important;
        padding: 4px !important;
        display: grid !important;
        grid-template-columns: 1.15fr 0.9fr 0.95fr !important;
        box-sizing: border-box !important;
    }

    .tax-form-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .tax-form-label {
        min-height: auto !important;
        margin-bottom: 4px !important;
    }

    .tax-anlagen-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }

    .tax-anlagen-grid .tax-form-field-full {
        grid-column: 1 / -1 !important;
    }

    .community-cta-container {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
    }

    .btn-community-primary,
    .btn-community-secondary {
        font-size: 0.88rem !important;
        padding: 0 20px !important;
        height: 44px !important;
        flex: 0 0 auto !important;
        width: auto !important;
    }

    .badges-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .badge-name, .badge-streak {
        display: none;
    }

    .gamification-header-badge {
        padding: 4px 8px;
    }

    .badge-xp-bar-bg {
        width: 50px;
    }

    .landing-hero-title {
        font-size: 1.75rem;
    }

    .landing-country-badge {
        display: none;
    }

    .pricing-card.popular {
        transform: none !important;
    }
}

/* ==========================================================================
   SCHWEIZER COMMUNITY & INSIGHTS STYLES
   ========================================================================== */

/* 1. LANDING PAGE SCANNABLE TEASER */
.community-teaser-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.community-teaser-card {
    background: var(--card-glass);
    border: 1px solid var(--border-subtle);
    border-radius: 18px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s, box-shadow 0.2s;
    backdrop-filter: blur(12px);
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.community-teaser-card:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 92, 246, 0.45);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.community-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.community-tag-badge {
    font-size: 0.72rem;
    font-weight: 800;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 2px 10px;
    border-radius: 9999px;
    letter-spacing: 0.3px;
}

.community-time-text {
    font-size: 0.74rem;
    color: var(--text-muted);
    font-weight: 600;
}

.community-card-headline {
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.community-card-snippet {
    font-size: 0.86rem;
    color: #cbd5e1;
    line-height: 1.55;
    margin: 0 0 16px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.community-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.community-author-pill {
    display: flex;
    align-items: center;
    gap: 8px;
}

.community-avatar-small {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.72rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.community-author-name {
    font-size: 0.84rem;
    font-weight: 700;
    color: #ffffff;
}

.community-lvl-pill {
    font-size: 0.68rem;
    font-weight: 800;
    color: #ddd6fe;
    background: rgba(139, 92, 246, 0.22);
    border: 1px solid rgba(139, 92, 246, 0.35);
    padding: 1px 7px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
}

.community-stats-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.community-stat-pill {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 3px 8px;
    border-radius: 6px;
}

.community-cta-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 28px;
    width: 100%;
}

.btn-community-primary {
    background: var(--primary-gradient);
    color: #ffffff !important;
    font-size: 0.95rem;
    font-weight: 800;
    padding: 0 28px;
    height: 48px;
    border-radius: 9999px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 18px var(--primary-glow);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    border: none;
    box-sizing: border-box;
    cursor: pointer;
    flex: 0 0 auto;
    width: auto !important;
}

.btn-community-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--primary-glow);
    color: #ffffff !important;
}

.btn-community-secondary {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #f8fafc !important;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 0 24px;
    height: 48px;
    border-radius: 9999px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    box-sizing: border-box;
    cursor: pointer;
    backdrop-filter: blur(12px);
    flex: 0 0 auto;
    width: auto !important;
}

.btn-community-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff !important;
    transform: translateY(-2px);
}

.community-container {
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
    max-width: 1200px !important;
    box-sizing: border-box !important;
}

.community-hero-banner {
    background: var(--card-glass);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 30px 24px;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.hero-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    padding: 4px 14px;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 800;
    color: #c4b5fd;
    margin-bottom: 12px;
}

.community-hero-title {
    font-size: 1.85rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 8px 0;
    line-height: 1.25;
}

.community-hero-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 20px auto;
    line-height: 1.5;
}

.btn-create-post-hero {
    background: var(--primary-gradient);
    color: #ffffff !important;
    font-size: 0.92rem;
    font-weight: 800;
    padding: 0 26px;
    height: 44px;
    border-radius: 9999px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 18px var(--primary-glow);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    border: none;
    cursor: pointer;
    width: auto !important;
    max-width: fit-content;
    margin: 0 auto;
}

.btn-create-post-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--primary-glow);
    color: #ffffff !important;
}

/* GUEST WELCOME BANNER */
.community-guest-cta-box {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.16), rgba(56, 189, 248, 0.12));
    border: 1px solid rgba(139, 92, 246, 0.35);
    border-radius: 18px;
    padding: 18px 24px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.guest-cta-icon-wrap {
    font-size: 2.2rem;
    line-height: 1;
    flex-shrink: 0;
}

.guest-cta-content {
    flex: 1;
}

.guest-cta-title {
    font-size: 1.02rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 4px 0;
}

.guest-cta-desc {
    font-size: 0.85rem;
    color: #cbd5e1;
    margin: 0;
    line-height: 1.45;
}

.guest-cta-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.btn-guest-register {
    background: var(--primary-gradient);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.88rem;
    padding: 0 20px;
    height: 42px;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px var(--primary-glow);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-guest-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-guest-login {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #f8fafc;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 0 18px;
    height: 42px;
    border-radius: 9999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-guest-login:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

/* 2. DEDICATED COMMUNITY PAGE LAYOUT (3-COLUMNS) */
.community-page-layout {
    display: grid;
    grid-template-columns: 240px 1fr 280px;
    gap: 24px;
    align-items: start;
}

.community-panel {
    background: var(--card-glass);
    border: 1px solid var(--border-subtle);
    border-radius: 18px;
    padding: 18px;
    backdrop-filter: blur(14px);
}

.panel-header-title {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 14px;
}

.community-channel-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.channel-item {
    background: transparent;
    border: 1px solid transparent;
    color: #cbd5e1;
    font-size: 0.88rem;
    font-weight: 700;
    padding: 10px 14px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-start !important;
    text-align: left !important;
    width: 100%;
    gap: 10px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.channel-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.05rem;
    line-height: 1;
}

.channel-name {
    flex: 1;
    text-align: left !important;
}

.channel-item:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff;
    transform: none !important;
}

.channel-item.active {
    background: rgba(139, 92, 246, 0.2);
    color: #c4b5fd;
    border: 1px solid rgba(139, 92, 246, 0.35);
}

.channel-badge {
    margin-left: auto !important;
    font-size: 0.72rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 9999px;
    color: #ffffff;
    flex-shrink: 0;
}

.community-feed-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    width: 100%;
}

.community-search-box {
    flex: 1;
    position: relative;
    height: 44px;
    display: flex;
    align-items: center;
}

.search-input-icon {
    position: absolute !important;
    right: 18px !important;
    left: auto !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: var(--text-muted) !important;
    pointer-events: none !important;
    z-index: 2 !important;
    width: 16px !important;
    height: 16px !important;
}

.community-search-field {
    width: 100% !important;
    height: 44px !important;
    background: var(--input-bg) !important;
    border: 1px solid var(--input-border) !important;
    border-radius: 9999px !important;
    padding-left: 18px !important;
    padding-right: 48px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    color: var(--text-main) !important;
    font-family: inherit !important;
    font-size: 0.88rem !important;
    outline: none !important;
    box-sizing: border-box !important;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.community-search-field:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.community-sort-pills {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(30, 41, 59, 0.7);
    padding: 4px;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: 44px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.sort-pill {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0 14px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sort-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transform: none;
}

.sort-pill.active {
    background: var(--primary-gradient);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.sort-pill.active:hover {
    background: var(--primary-gradient);
    color: #ffffff;
    transform: none;
}

.community-stat-metric-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.stat-metric-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 12px 10px;
    text-align: center;
}

.stat-metric-num {
    font-size: 1.25rem;
    font-weight: 900;
    color: #ffffff;
}

.stat-metric-lbl {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 2px;
}

.community-leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(30, 41, 59, 0.4);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.leaderboard-rank {
    font-weight: 900;
    font-size: 0.88rem;
    color: #f59e0b;
    width: 16px;
    text-align: center;
}

.leaderboard-info {
    flex: 1;
    min-width: 0;
}

.leaderboard-name {
    font-size: 0.84rem;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leaderboard-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.leaderboard-xp {
    font-size: 0.75rem;
    font-weight: 800;
    color: #34d399;
}

/* FEED ITEM STYLES */
.community-feed-item {
    background: var(--card-glass);
    border: 1px solid var(--border-subtle);
    border-radius: 18px;
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s, box-shadow 0.2s;
    backdrop-filter: blur(14px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.community-feed-item:hover {
    transform: translateY(-3px);
    border-color: rgba(139, 92, 246, 0.45);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.feed-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.feed-item-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.feed-avatar,
.forum-avatar,
.community-avatar-small {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #38bdf8 100%) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 0.92rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4) !important;
    flex-shrink: 0 !important;
    text-transform: uppercase !important;
    border: 2px solid rgba(255, 255, 255, 0.25) !important;
    line-height: 1 !important;
}

.feed-avatar.sm,
.forum-comment-item .feed-avatar,
.leaderboard-item .feed-avatar {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
    font-size: 0.78rem !important;
    border-width: 1.5px !important;
}

.feed-author-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.feed-author-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.feed-author-name {
    font-size: 0.92rem;
    font-weight: 800;
    color: #ffffff;
}

.feed-author-lvl {
    font-size: 0.72rem;
    font-weight: 700;
    color: #ddd6fe;
    background: rgba(139, 92, 246, 0.22);
    border: 1px solid rgba(139, 92, 246, 0.35);
    padding: 2px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    line-height: 1.3;
}

.feed-timestamp {
    font-size: 0.74rem;
    color: var(--text-muted);
}

.feed-tag-pill {
    font-size: 0.72rem;
    font-weight: 800;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 3px 10px;
    border-radius: 9999px;
    letter-spacing: 0.3px;
}

.feed-item-title {
    font-size: 1.08rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.feed-item-snippet {
    font-size: 0.88rem;
    color: #cbd5e1;
    line-height: 1.55;
    margin: 0 0 16px 0;
}

.feed-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.feed-stats-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-feed-like {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    border-radius: 8px;
    padding: 4px 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

.btn-feed-like:hover,
.btn-feed-like.active {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
}

.feed-stat-chip {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
}

.feed-read-link {
    font-size: 0.84rem;
    font-weight: 800;
    color: #a78bfa;
    transition: color 0.2s;
}

.community-feed-item:hover .feed-read-link {
    color: #c4b5fd;
}

.btn-forum-like {
    font-weight: 700;
    transition: all 0.2s ease;
}

.btn-forum-like:hover,
.btn-forum-like.active {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
}

.forum-stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
}

.forum-read-more {
    font-size: 0.82rem;
    font-weight: 800;
    color: #a78bfa;
    transition: color 0.2s;
}

.forum-card:hover .forum-read-more {
    color: #c4b5fd;
}

.forum-cta-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.forum-detail-modal-box {
    max-width: 720px !important;
    border-radius: 20px !important;
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.forum-new-modal-box {
    max-width: 600px !important;
    border-radius: 20px !important;
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.forum-modal-post-title {
    color: #ffffff;
}

.forum-modal-post-content {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* MODAL REPLIES DIVIDER */
.modal-replies-divider {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    margin: 18px 0 16px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
}

.replies-divider-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 800;
    color: #ffffff;
}

/* HIGH-CONTRAST VISIBLE REPLY CARD */
.forum-reply-card {
    background: rgba(15, 23, 42, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    border-radius: 16px !important;
    padding: 16px !important;
    margin-top: 14px !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

.forum-reply-label {
    font-size: 0.78rem !important;
    font-weight: 800 !important;
    color: var(--text-muted) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.forum-reply-textarea {
    width: 100% !important;
    background: rgba(30, 41, 59, 0.8) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 12px !important;
    padding: 12px 14px !important;
    color: #ffffff !important;
    font-family: inherit !important;
    font-size: 0.92rem !important;
    line-height: 1.5 !important;
    outline: none !important;
    resize: vertical !important;
    min-height: 75px !important;
    box-sizing: border-box !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
}

.forum-reply-textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3) !important;
    background: rgba(30, 41, 59, 0.95) !important;
}

.forum-reply-textarea::placeholder {
    color: #94a3b8 !important;
    font-size: 0.88rem !important;
}

.forum-reply-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.reply-tip {
    font-size: 0.75rem !important;
    color: var(--text-muted) !important;
    font-weight: 600 !important;
}

.btn-reply-submit {
    padding: 8px 22px !important;
    font-size: 0.86rem !important;
    font-weight: 800 !important;
    border-radius: 9999px !important;
    width: auto !important;
    flex: 0 0 auto !important;
}

/* SWISS-GRADE APP FOOTER */
.app-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 0 !important;
    margin-top: 0 !important;
    position: relative;
    z-index: 10;
    width: 100%;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 20px 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-sizing: border-box;
}

.footer-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-brand-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.footer-logo {
    width: 24px;
    height: 24px;
}

.footer-title {
    font-size: 1.15rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.footer-tagline {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.footer-nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.footer-nav-links a {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.footer-nav-links a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
}

.footer-nav-links a.active {
    color: #a78bfa;
    background: rgba(139, 92, 246, 0.12);
    border-color: rgba(139, 92, 246, 0.25);
}

.footer-bottom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    padding-top: 8px;
    border-top: none;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.footer-trust-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: #94a3b8;
}

.footer-dot {
    opacity: 0.4;
}

.footer-copyright {
    color: var(--text-muted);
    font-weight: 500;
}

/* ==========================================================================
   COMPREHENSIVE LIGHT MODE COLOR SYSTEM
   ========================================================================== */
body.light-mode {
    background: #f8fafc !important;
    color: #0f172a !important;
}

body.light-mode html {
    background: #f8fafc !important;
}

/* Light Mode Navigation */
body.light-mode nav {
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}
body.light-mode .nav-title {
    color: #0f172a !important;
}
body.light-mode .menu-trigger {
    background: rgba(255, 255, 255, 0.85) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    color: #0f172a !important;
}
body.light-mode .menu-trigger:hover {
    background: #ffffff !important;
    border-color: rgba(139, 92, 246, 0.4) !important;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.15) !important;
    color: #0f172a !important;
}
body.light-mode .menu-trigger svg {
    stroke: #0f172a !important;
}
body.light-mode .rest-prorated-pill {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.07);
}
body.light-mode .cell-subnote.note-ahv {
    color: #0284c7;
}
body.light-mode .cell-subnote.note-pk-rente {
    color: #4f46e5;
}
body.light-mode .cell-subnote.note-steuern {
    color: #dc2626;
}
body.light-mode .cell-subnote.note-darlehen {
    color: #ea580c;
}
body.light-mode .cell-subnote.note-ao {
    color: #d97706;
}
body.light-mode .cell-subnote.note-pk {
    color: #7c3aed;
}
body.light-mode .cell-subnote.note-einkauf {
    color: #9333ea;
}
body.light-mode .cell-subnote.note-firma {
    color: #0284c7;
}

/* Light Mode Cards, Widgets & Containers */
body.light-mode .card,
body.light-mode .widget-card,
body.light-mode .tax-card,
body.light-mode .overview-card,
body.light-mode .chart-section {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important;
}
body.light-mode .widget-header {
    background: rgba(0, 0, 0, 0.02) !important;
    border-bottom: 1px solid #e2e8f0 !important;
}
body.light-mode .widget-title,
body.light-mode .card h3 {
    color: #0f172a !important;
}

/* Light Mode Sub-Cards (News, Optimization, Stresstests) */
body.light-mode .news-card,
body.light-mode .optim-card,
body.light-mode .stress-card,
body.light-mode .benchmark-card {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03) !important;
}
body.light-mode .news-title {
    color: #0f172a !important;
}
body.light-mode .optim-card-desc {
    color: #475569 !important;
}
body.light-mode .news-card:hover,
body.light-mode .optim-card:hover {
    background: #ffffff !important;
    border-color: rgba(124, 58, 237, 0.4) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
}
body.light-mode .optim-card-action {
    background: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
}

/* Light Mode Slide-In Navigation Drawer */
body.light-mode .slide-menu-drawer {
    background: rgba(255, 255, 255, 0.98) !important;
    border-left: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: -15px 0 35px rgba(0, 0, 0, 0.15) !important;
}
body.light-mode .slide-menu-brand span {
    color: #0f172a !important;
}
body.light-mode .slide-menu-close {
    background: rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    color: #0f172a !important;
}
body.light-mode .slide-menu-section-title {
    color: #64748b !important;
}
body.light-mode .slide-menu-item {
    color: #0f172a !important;
}
body.light-mode .slide-menu-item .title {
    color: #0f172a !important;
}
body.light-mode .slide-menu-item .sub {
    color: #64748b !important;
}
body.light-mode .slide-menu-item:hover {
    background: rgba(124, 58, 237, 0.08) !important;
}
body.light-mode .slide-menu-theme-row {
    background: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
}
body.light-mode #theme-menu-label {
    color: #0f172a !important;
}
body.light-mode .slide-menu-logout {
    background: rgba(239, 68, 68, 0.08) !important;
    color: #ef4444 !important;
}

/* Light Mode Slide-In Navigation Semantic Badges */
body.light-mode .slide-menu-item .icon-wrap {
    background: rgba(0, 0, 0, 0.04) !important;
    border: 1px solid rgba(0, 0, 0, 0.07) !important;
}
body.light-mode .slide-menu-item .icon-wrap.budget {
    background: rgba(139, 92, 246, 0.12) !important;
    border-color: rgba(139, 92, 246, 0.22) !important;
    color: #7c3aed !important;
}
body.light-mode .slide-menu-item .icon-wrap.portfolio {
    background: rgba(99, 102, 241, 0.12) !important;
    border-color: rgba(99, 102, 241, 0.22) !important;
    color: #4f46e5 !important;
}
body.light-mode .slide-menu-item .icon-wrap.taxes {
    background: rgba(14, 165, 233, 0.12) !important;
    border-color: rgba(14, 165, 233, 0.22) !important;
    color: #0284c7 !important;
}
body.light-mode .slide-menu-item .icon-wrap.fire {
    background: rgba(249, 115, 22, 0.12) !important;
    border-color: rgba(249, 115, 22, 0.22) !important;
    color: #ea580c !important;
}
body.light-mode .slide-menu-item .icon-wrap.calendar {
    background: rgba(20, 184, 166, 0.12) !important;
    border-color: rgba(20, 184, 166, 0.22) !important;
    color: #0d9488 !important;
}
body.light-mode .slide-menu-item .icon-wrap.nutrition {
    background: rgba(16, 185, 129, 0.12) !important;
    border-color: rgba(16, 185, 129, 0.22) !important;
    color: #059669 !important;
}
body.light-mode .slide-menu-item .icon-wrap.company {
    background: rgba(14, 165, 233, 0.12) !important;
    border-color: rgba(14, 165, 233, 0.22) !important;
    color: #0284c7 !important;
}
body.light-mode .slide-menu-item .icon-wrap.community {
    background: rgba(99, 102, 241, 0.12) !important;
    border-color: rgba(99, 102, 241, 0.22) !important;
    color: #4f46e5 !important;
}
body.light-mode .slide-menu-item .icon-wrap.bank {
    background: rgba(16, 185, 129, 0.12) !important;
    border-color: rgba(16, 185, 129, 0.22) !important;
    color: #059669 !important;
}
body.light-mode .slide-menu-item .icon-wrap.receipts {
    background: rgba(59, 130, 246, 0.12) !important;
    border-color: rgba(59, 130, 246, 0.22) !important;
    color: #2563eb !important;
}
body.light-mode .slide-menu-item .icon-wrap.scanner {
    background: rgba(236, 72, 153, 0.12) !important;
    border-color: rgba(236, 72, 153, 0.22) !important;
    color: #db2777 !important;
}
body.light-mode .slide-menu-item .icon-wrap.achievements {
    background: rgba(245, 158, 11, 0.12) !important;
    border-color: rgba(245, 158, 11, 0.22) !important;
    color: #d97706 !important;
}
body.light-mode .slide-menu-item .icon-wrap.referral {
    background: rgba(16, 185, 129, 0.12) !important;
    border-color: rgba(16, 185, 129, 0.22) !important;
    color: #059669 !important;
}
body.light-mode .slide-menu-item .icon-wrap.intro {
    background: rgba(139, 92, 246, 0.12) !important;
    border-color: rgba(139, 92, 246, 0.22) !important;
    color: #7c3aed !important;
}
body.light-mode .slide-menu-item .icon-wrap.settings {
    background: rgba(100, 116, 139, 0.12) !important;
    border-color: rgba(100, 116, 139, 0.22) !important;
    color: #475569 !important;
}
body.light-mode .slide-menu-item .icon-wrap.admin {
    background: rgba(139, 92, 246, 0.12) !important;
    border-color: rgba(139, 92, 246, 0.22) !important;
    color: #7c3aed !important;
}
body.light-mode .slide-menu-item .icon-wrap.debug {
    background: rgba(239, 68, 68, 0.12) !important;
    border-color: rgba(239, 68, 68, 0.22) !important;
    color: #dc2626 !important;
}
body.light-mode .slide-menu-item .icon-wrap.pricing {
    background: rgba(16, 185, 129, 0.12) !important;
    border-color: rgba(16, 185, 129, 0.22) !important;
    color: #059669 !important;
}
body.light-mode .slide-menu-item.active {
    background: rgba(139, 92, 246, 0.1) !important;
    border-color: rgba(139, 92, 246, 0.3) !important;
}
body.light-mode .slide-menu-item.active .icon-wrap {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(124, 58, 237, 0.25) !important;
}

/* --- LIGHT MODE UNIFIED STYLIZED KPI OVERVIEW CARDS (FIRE, PORTFOLIO, TAXES, ETC.) --- */
body.light-mode .kpi-card,
body.light-mode .portfolio-kpi-card {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.03) !important;
}

body.light-mode .kpi-card::before,
body.light-mode .portfolio-kpi-card::before {
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.45), transparent) !important;
    opacity: 0.8 !important;
}

body.light-mode .kpi-card:hover,
body.light-mode .portfolio-kpi-card:hover {
    transform: translateY(-3px) !important;
    border-color: rgba(139, 92, 246, 0.35) !important;
    box-shadow: 0 12px 28px -4px rgba(0, 0, 0, 0.09), 0 4px 12px -2px rgba(139, 92, 246, 0.12) !important;
}

body.light-mode .kpi-card-val,
body.light-mode .portfolio-kpi-val {
    color: #0f172a !important;
}

body.light-mode .kpi-card-sub,
body.light-mode .portfolio-kpi-sub {
    color: #64748b !important;
    font-weight: 500 !important;
}

body.light-mode .kpi-label-text,
body.light-mode .kpi-card-label span {
    filter: saturate(1.3) brightness(0.78);
    font-weight: 800 !important;
}

body.light-mode .kpi-icon-badge {
    filter: saturate(1.2) brightness(0.85);
}

/* --- LIGHT MODE PORTFOLIO PAGE CONTRAST ENHANCEMENTS --- */
/* Rebalancing & Target Allocation */
body.light-mode .rebalance-bar-container {
    background: #e2e8f0 !important;
}
body.light-mode .rebalance-target-marker {
    background: #0f172a !important;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.4) !important;
}
body.light-mode .rebalance-recommend-box {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
}
body.light-mode .rebalance-recommend-header {
    color: #0f766e !important;
}
body.light-mode .rebalance-rate-badge {
    color: #0f766e !important;
    background: rgba(15, 118, 110, 0.1) !important;
    border: 1px solid rgba(15, 118, 110, 0.28) !important;
}
body.light-mode .rebalance-recommend-desc {
    color: #64748b !important;
}
body.light-mode .rebalance-item-row {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
}
body.light-mode .rebalance-item-amount {
    color: #0f172a !important;
}
body.light-mode .rebalance-item-pct {
    color: #64748b !important;
}
body.light-mode .rebalance-footer-tip {
    color: #64748b !important;
    border-top-color: #e2e8f0 !important;
}

/* Portfolio Live Market Status Bar */
body.light-mode .portfolio-live-bar {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
}
body.light-mode .live-indicator-title {
    color: #0f172a !important;
}
body.light-mode .live-indicator-sep {
    color: #cbd5e1 !important;
}
body.light-mode .live-indicator-meta {
    color: #64748b !important;
}
body.light-mode .live-indicator-time {
    color: #0f172a !important;
}
body.light-mode .btn-refresh-quotes {
    color: #0f766e !important;
    background: rgba(15, 118, 110, 0.08) !important;
    border: 1px solid rgba(15, 118, 110, 0.28) !important;
}
body.light-mode .btn-refresh-quotes:hover {
    background: rgba(15, 118, 110, 0.16) !important;
    border-color: #0f766e !important;
    color: #0f766e !important;
}

/* Wachstumsprognose Horizon Buttons */
body.light-mode .proj-horizon-group {
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
}
body.light-mode .proj-horizon-btn {
    color: #475569 !important;
}
body.light-mode .proj-horizon-btn:hover {
    color: #0f172a !important;
    background: rgba(0, 0, 0, 0.05) !important;
}
body.light-mode .proj-horizon-btn.active {
    background: var(--primary-gradient) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3) !important;
}

/* ETF Radar Controls Bar */
body.light-mode .etf-radar-controls-bar {
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
}
body.light-mode .etf-cat-nav-wrapper {
    background: #eef2f6 !important;
    border: 1px solid #e2e8f0 !important;
}
body.light-mode .etf-cat-btn {
    color: #475569 !important;
}
body.light-mode .etf-cat-btn:hover {
    background: rgba(255, 255, 255, 0.8) !important;
    color: #0f172a !important;
}
body.light-mode .etf-cat-btn.active {
    background: #ffffff !important;
    color: #4f46e5 !important;
    border-color: #cbd5e1 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}
body.light-mode .etf-search-input {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
}
body.light-mode .etf-search-icon {
    color: #94a3b8 !important;
}
body.light-mode .etf-sort-label {
    color: #64748b !important;
}
body.light-mode .etf-sort-select {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
}
body.light-mode .etf-sort-select option {
    background: #ffffff !important;
    color: #0f172a !important;
}
body.light-mode .etf-filter-chip {
    background: #ffffff !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
}
body.light-mode .etf-filter-chip:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border-color: #94a3b8 !important;
}
body.light-mode .etf-filter-chip.active {
    background: rgba(99, 102, 241, 0.08) !important;
    color: #4f46e5 !important;
    border-color: rgba(99, 102, 241, 0.3) !important;
}
body.light-mode .etf-filter-chip .chip-check-dot {
    background: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
}
body.light-mode .etf-filter-chip.active .chip-check-dot {
    background: #4f46e5 !important;
    border-color: #4f46e5 !important;
    color: #ffffff !important;
}
body.light-mode .etf-badge-count {
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    color: #475569 !important;
}
body.light-mode .etf-ter-badge {
    background: rgba(16, 185, 129, 0.1) !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
    color: #0f766e !important;
}
body.light-mode #etf-yahoo-dropdown {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15) !important;
}
body.light-mode .yahoo-search-item {
    border-bottom: 1px solid #f1f5f9 !important;
}
body.light-mode .yahoo-search-item:hover {
    background: #f8fafc !important;
}

/* Light Mode 10J-Vermögensvergleich & Tiefststeuer-Fokus */
body.light-mode .optimizer-duel-card {
    background: linear-gradient(145deg, rgba(139, 92, 246, 0.06) 0%, rgba(2, 132, 199, 0.04) 100%) !important;
    border: 1px solid rgba(139, 92, 246, 0.2) !important;
}
body.light-mode .optimizer-duel-icon {
    stroke: #0284c7 !important;
}
body.light-mode .optimizer-duel-title {
    color: #0f172a !important;
}
body.light-mode .duel-active-label,
body.light-mode .duel-active-val {
    color: #0284c7 !important;
}
body.light-mode .duel-ref-label,
body.light-mode .duel-ref-val {
    color: #64748b !important;
}
body.light-mode .optimizer-duel-bar-track {
    background: #e2e8f0 !important;
}
body.light-mode .duel-ref-bar {
    background: #94a3b8 !important;
}
body.light-mode .duel-explanation-box {
    background: #f0f9ff !important;
    border: 1px solid #bae6fd !important;
    border-left: 4px solid #0284c7 !important;
    color: #1e293b !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
}
body.light-mode .duel-explanation-box strong {
    color: #0f172a !important;
}
body.light-mode .duel-explanation-box strong[style*="38bdf8"] {
    color: #0284c7 !important;
}
body.light-mode .duel-explanation-box strong[style*="10b981"] {
    color: #059669 !important;
}
body.light-mode .duel-explanation-box strong[style*="ef4444"] {
    color: #dc2626 !important;
}
body.light-mode .duel-explanation-box em {
    color: #475569 !important;
}

/* Light Mode Footer */
body.light-mode .app-footer {
    background: rgba(255, 255, 255, 0.95) !important;
    border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
}
body.light-mode .footer-title {
    color: #0f172a !important;
}
body.light-mode .footer-tagline,
body.light-mode .footer-nav-links a,
body.light-mode .footer-trust-badge,
body.light-mode .footer-copyright {
    color: #64748b !important;
}
body.light-mode .footer-nav-links a:hover {
    color: #0f172a !important;
    background: rgba(0, 0, 0, 0.05) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}
body.light-mode .footer-nav-links a.active {
    color: #7c3aed !important;
    background: rgba(124, 58, 237, 0.08) !important;
    border-color: rgba(124, 58, 237, 0.2) !important;
}
body.light-mode .footer-bottom-row {
    border-top: none !important;
}

/* Light Mode Gamification Header Badge */
body.light-mode .gamification-header-badge {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
}

body.light-mode .gamification-header-badge:hover {
    background: #ffffff !important;
    border-color: rgba(124, 58, 237, 0.4) !important;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.15) !important;
}

body.light-mode .badge-lvl {
    color: #7c3aed !important;
}

body.light-mode .badge-name {
    color: #0f172a !important;
}

body.light-mode .badge-xp-bar-bg {
    background: rgba(0, 0, 0, 0.08) !important;
}

/* Light Mode Achievements Modal */
body.light-mode .achievements-modal-box {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #0f172a !important;
}

body.light-mode .achieve-hero-banner {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, rgba(99, 102, 241, 0.05) 100%) !important;
    border: 1px solid rgba(124, 58, 237, 0.15) !important;
}

body.light-mode .achieve-hero-title {
    color: #0f172a !important;
}

body.light-mode .achieve-hero-level {
    color: #7c3aed !important;
}

body.light-mode .achieve-hero-bar-wrap {
    background: rgba(0, 0, 0, 0.08) !important;
}

body.light-mode .achieve-streak-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
}

body.light-mode .badge-card {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
}

body.light-mode .badge-card.unlocked {
    background: #ffffff !important;
    border-color: rgba(124, 58, 237, 0.3) !important;
}

body.light-mode .badge-card-title {
    color: #0f172a !important;
}

body.light-mode .badge-card-desc {
    color: #64748b !important;
}

body.light-mode .quest-item {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
}

body.light-mode .quest-title {
    color: #0f172a !important;
}

body.light-mode .quest-desc {
    color: #64748b !important;
}

body.light-mode .rank-step {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    color: #475569 !important;
}

body.light-mode .rank-step.achieved {
    background: rgba(16, 185, 129, 0.08) !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
    color: #0f172a !important;
}

/* ==========================================================================
   LIGHT MODE: CUSTOM SEARCH SELECT DROPDOWNS
   ========================================================================== */
body.light-mode .custom-search-select-btn {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

body.light-mode .custom-search-select-btn:hover {
    border-color: #7c3aed !important;
    background: #ffffff !important;
}

body.light-mode .cs-btn-label {
    color: #0f172a !important;
}

body.light-mode .cs-arrow {
    stroke: #64748b !important;
    color: #64748b !important;
}

body.light-mode .cs-reset-btn {
    color: #94a3b8 !important;
}

body.light-mode .custom-search-select-menu {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12) !important;
}

body.light-mode .custom-search-select-search-input {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}

body.light-mode .custom-search-select-search-input::placeholder {
    color: #94a3b8 !important;
}

body.light-mode .custom-search-select-option {
    color: #334155 !important;
}

body.light-mode .custom-search-select-option:hover {
    background: rgba(124, 58, 237, 0.08) !important;
    color: #7c3aed !important;
}

body.light-mode .custom-search-select-option.selected {
    background: rgba(124, 58, 237, 0.12) !important;
    color: #7c3aed !important;
    font-weight: 700 !important;
}

body.light-mode .custom-search-select-option.reset-option {
    color: #94a3b8 !important;
    border-bottom: 1px dashed #e2e8f0 !important;
}

/* ==========================================================================
   LIGHT MODE: COMMUNITY & INSIGHTS HUB
   ========================================================================== */
body.light-mode .community-container {
    background: transparent !important;
}

body.light-mode .community-hero-banner {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important;
}

body.light-mode .hero-badge-pill {
    background: rgba(124, 58, 237, 0.08) !important;
    border: 1px solid rgba(124, 58, 237, 0.2) !important;
    color: #7c3aed !important;
}

body.light-mode .community-hero-title {
    color: #0f172a !important;
}

body.light-mode .community-hero-subtitle {
    color: #64748b !important;
}

body.light-mode .community-panel {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03) !important;
}

body.light-mode .panel-header-title {
    color: #64748b !important;
}

body.light-mode .channel-item {
    color: #334155 !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    justify-content: flex-start !important;
    text-align: left !important;
    box-shadow: none !important;
}

body.light-mode .channel-name {
    text-align: left !important;
}

body.light-mode .channel-item:hover {
    background: rgba(124, 58, 237, 0.06) !important;
    color: #7c3aed !important;
    border-color: transparent !important;
    transform: none !important;
}

body.light-mode .channel-item.active {
    background: rgba(124, 58, 237, 0.1) !important;
    color: #7c3aed !important;
    border: 1px solid rgba(124, 58, 237, 0.3) !important;
}

body.light-mode .channel-badge {
    background: #f1f5f9 !important;
    color: #64748b !important;
    border: 1px solid #e2e8f0 !important;
    margin-left: auto !important;
}

body.light-mode .community-search-field {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

body.light-mode .community-search-field::placeholder {
    color: #94a3b8 !important;
}

body.light-mode .community-sort-pills {
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
}

body.light-mode .sort-pill {
    background: transparent !important;
    color: #64748b !important;
}

body.light-mode .sort-pill:hover {
    background: rgba(124, 58, 237, 0.09) !important;
    color: #7c3aed !important;
    transform: none !important;
}

body.light-mode .sort-pill.active {
    background: var(--primary-gradient) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.25) !important;
}

body.light-mode .sort-pill.active:hover {
    background: var(--primary-gradient) !important;
    color: #ffffff !important;
    transform: none !important;
}

body.light-mode .community-feed-item {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04) !important;
}

body.light-mode .community-feed-item:hover {
    border-color: rgba(124, 58, 237, 0.35) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
}

body.light-mode .community-card-headline,
body.light-mode .feed-title {
    color: #0f172a !important;
}

body.light-mode .community-card-snippet,
body.light-mode .feed-snippet {
    color: #475569 !important;
}

body.light-mode .community-author-name,
body.light-mode .feed-author-name {
    color: #0f172a !important;
}

body.light-mode .community-lvl-pill,
body.light-mode .feed-author-lvl {
    color: #6d28d9 !important;
    background: rgba(109, 40, 217, 0.08) !important;
    border: 1px solid rgba(109, 40, 217, 0.22) !important;
    font-weight: 700 !important;
}

body.light-mode .community-time-text,
body.light-mode .feed-time,
body.light-mode .feed-timestamp {
    color: #64748b !important;
}

body.light-mode .community-stat-pill,
body.light-mode .feed-stat-pill {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    color: #64748b !important;
}

body.light-mode .community-tag-badge,
body.light-mode .feed-tag-badge,
body.light-mode .feed-tag-pill {
    background: rgba(14, 165, 233, 0.08) !important;
    border: 1px solid rgba(14, 165, 233, 0.25) !important;
    color: #0284c7 !important;
}

body.light-mode .stat-metric-card {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
}

body.light-mode .stat-metric-num {
    color: #0f172a !important;
}

body.light-mode .stat-metric-lbl {
    color: #64748b !important;
}

body.light-mode .leaderboard-item {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
}

body.light-mode .leaderboard-name {
    color: #0f172a !important;
}

body.light-mode .leaderboard-sub {
    color: #64748b !important;
}

body.light-mode .feed-read-link {
    color: #7c3aed !important;
}

body.light-mode .forum-comment-item {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    color: #0f172a !important;
}

body.light-mode .forum-comment-author {
    color: #0f172a !important;
}

body.light-mode .forum-comment-text {
    color: #334155 !important;
}

body.light-mode .forum-reply-box {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
}

body.light-mode .forum-reply-textarea {
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    color: #0f172a !important;
}

/* --- LIGHT MODE MODALS & COMMUNITY SYSTEM --- */
body.light-mode .modal {
    background: rgba(15, 23, 42, 0.45) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
}

body.light-mode .modal-content,
body.light-mode .forum-new-modal-box,
body.light-mode .forum-detail-modal-box,
body.light-mode .auth-modal-box {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05) !important;
    color: #0f172a !important;
}

body.light-mode .modal-header {
    background: #ffffff !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}

body.light-mode .modal-header h2 {
    color: #0f172a !important;
}

body.light-mode .modal-header .close-btn,
body.light-mode .btn-close-icon {
    background: rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    color: #0f172a !important;
}

body.light-mode .modal-header .close-btn:hover,
body.light-mode .btn-close-icon:hover {
    background: rgba(0, 0, 0, 0.1) !important;
    color: #0f172a !important;
}

body.light-mode .auth-label {
    color: #1e293b !important;
    font-weight: 700 !important;
    font-size: 0.82rem !important;
}

body.light-mode .alert-danger {
    background: #fef2f2 !important;
    border: 1px solid #fecaca !important;
    color: #b91c1c !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.06) !important;
}

body.light-mode .alert-danger svg {
    color: #dc2626 !important;
}

body.light-mode .forum-new-modal-box input,
body.light-mode .forum-new-modal-box select,
body.light-mode .forum-new-modal-box textarea,
body.light-mode .app-input,
body.light-mode .app-select {
    background: #f8fafc !important;
    border: 1.5px solid #cbd5e1 !important;
    color: #0f172a !important;
    border-radius: 12px !important;
}

body.light-mode .forum-new-modal-box input:focus,
body.light-mode .forum-new-modal-box select:focus,
body.light-mode .forum-new-modal-box textarea:focus,
body.light-mode .app-input:focus,
body.light-mode .app-select:focus {
    background: #ffffff !important;
    border-color: #7c3aed !important;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15) !important;
    outline: none !important;
}

body.light-mode .forum-modal-post-title {
    color: #0f172a !important;
}

body.light-mode .forum-modal-post-content {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    color: #1e293b !important;
}

body.light-mode .modal-replies-divider {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

body.light-mode .replies-divider-label {
    color: #0f172a !important;
}

body.light-mode .forum-reply-card {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04) !important;
}

body.light-mode .forum-reply-label {
    color: #475569 !important;
}

body.light-mode .forum-guest-reply-prompt {
    background: rgba(124, 58, 237, 0.06) !important;
    border: 1.5px dashed rgba(124, 58, 237, 0.3) !important;
}
body.light-mode .forum-guest-reply-prompt div:first-child {
    color: #0f172a !important;
}
body.light-mode .forum-guest-reply-prompt div:nth-child(2) {
    color: #64748b !important;
}
body.light-mode .forum-guest-reply-prompt .btn-secondary {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
}

/* ==========================================================================
   COMMUNITY MOBILE RESPONSIVENESS & USER EXPERIENCE
   ========================================================================== */
@media (max-width: 992px) {
    .community-page-layout {
        display: flex !important;
        flex-direction: column !important;
        gap: 18px !important;
    }

    .community-sidebar-left {
        width: 100% !important;
    }

    .community-sidebar-left .community-panel {
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
    }

    .community-sidebar-left .panel-header-title {
        display: none !important;
    }

    .community-channel-list {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
        gap: 8px !important;
        padding: 2px 2px 6px 2px !important;
        width: 100% !important;
    }

    .community-channel-list::-webkit-scrollbar {
        display: none !important;
    }

    .channel-item {
        flex: 0 0 auto !important;
        width: auto !important;
        white-space: nowrap !important;
        padding: 8px 14px !important;
        font-size: 0.84rem !important;
        border-radius: 9999px !important;
        background: rgba(30, 41, 59, 0.7) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        gap: 6px !important;
        justify-content: flex-start !important;
        text-align: left !important;
    }

    .channel-name {
        flex: initial !important;
        text-align: left !important;
    }

    .channel-item.active {
        background: var(--primary-gradient) !important;
        color: #ffffff !important;
        border-color: transparent !important;
    }

    .channel-badge {
        margin-left: 4px !important;
        font-size: 0.70rem !important;
        background: rgba(255, 255, 255, 0.2) !important;
    }

    body.light-mode .community-channel-list .channel-item {
        background: #ffffff !important;
        border: 1px solid #e2e8f0 !important;
        color: #334155 !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
        justify-content: flex-start !important;
        text-align: left !important;
    }

    body.light-mode .community-channel-list .channel-item.active {
        background: var(--primary-gradient) !important;
        color: #ffffff !important;
        border-color: transparent !important;
    }

    .community-main-feed {
        width: 100% !important;
    }

    .community-sidebar-right {
        width: 100% !important;
        margin-top: 8px !important;
    }
}

@media (max-width: 768px) {
    .hide-mobile,
    .guest-nav-links {
        display: none !important;
    }

    .community-hero-banner {
        padding: 20px 16px !important;
        margin-bottom: 16px !important;
        border-radius: 16px !important;
    }

    .community-hero-title {
        font-size: 1.45rem !important;
        line-height: 1.25 !important;
        margin-bottom: 6px !important;
    }

    .community-hero-subtitle {
        font-size: 0.85rem !important;
        margin-bottom: 16px !important;
        line-height: 1.45 !important;
    }

    .btn-create-post-hero {
        width: 100% !important;
        max-width: 100% !important;
        height: 44px !important;
        font-size: 0.90rem !important;
    }

    /* Guest Welcome Banner Mobile */
    .community-guest-cta-box {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 14px !important;
        padding: 18px 16px !important;
        border-radius: 16px !important;
        margin-bottom: 16px !important;
        box-sizing: border-box !important;
        width: 100% !important;
    }

    .guest-cta-icon-wrap {
        font-size: 1.8rem !important;
    }

    .guest-cta-title {
        font-size: 0.98rem !important;
    }

    .guest-cta-desc {
        font-size: 0.82rem !important;
        line-height: 1.45 !important;
    }

    .guest-cta-actions {
        width: 100% !important;
        flex-direction: column !important;
        gap: 8px !important;
    }

    .btn-guest-register,
    .btn-guest-login {
        width: 100% !important;
        justify-content: center !important;
        height: 44px !important;
        font-size: 0.88rem !important;
    }

    /* Search & Sort Mobile */
    .community-feed-header {
        flex-direction: column !important;
        gap: 10px !important;
        margin-bottom: 14px !important;
    }

    .community-search-box {
        width: 100% !important;
    }

    .community-search-field {
        height: 42px !important;
        font-size: 0.84rem !important;
    }

    .community-sort-pills {
        width: 100% !important;
        display: flex !important;
        justify-content: space-between !important;
        height: 40px !important;
    }

    .sort-pill {
        flex: 1 !important;
        justify-content: center !important;
        height: 32px !important;
        font-size: 0.78rem !important;
        padding: 0 6px !important;
    }

    /* Feed Items Mobile */
    .community-feed-item {
        padding: 16px 14px !important;
        gap: 10px !important;
        border-radius: 16px !important;
    }

    .feed-avatar,
    .forum-avatar,
    .community-avatar-small {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
        font-size: 0.82rem !important;
    }

    .community-card-headline,
    .feed-title {
        font-size: 1.02rem !important;
        line-height: 1.35 !important;
    }

    .community-card-snippet,
    .feed-snippet {
        font-size: 0.84rem !important;
        line-height: 1.45 !important;
    }

    .community-stats-row {
        gap: 6px !important;
        flex-wrap: wrap !important;
    }

    .community-stat-pill,
    .feed-stat-pill {
        font-size: 0.72rem !important;
        padding: 3px 8px !important;
    }
}


/* ==========================================================================
   SUPER ADMIN PANEL & PROFILE CARD STYLES
   ========================================================================== */
.admin-panel-modal-box {
    background: #0f172a !important;
    border: 1px solid rgba(139, 92, 246, 0.3) !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6) !important;
}

.btn-table-action {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    border-radius: 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.btn-table-action svg {
    width: 16px !important;
    height: 16px !important;
    display: block !important;
    pointer-events: none !important;
}

.btn-table-action:hover {
    background: rgba(255, 255, 255, 0.18) !important;
    transform: translateY(-1px);
}

.btn-table-action.delete:hover {
    background: rgba(239, 68, 68, 0.25) !important;
    border-color: rgba(239, 68, 68, 0.5) !important;
}

.btn-table-action.edit:hover {
    background: rgba(139, 92, 246, 0.25) !important;
    border-color: rgba(139, 92, 246, 0.5) !important;
}

.btn-table-action.reset:hover {
    background: rgba(245, 158, 11, 0.25) !important;
    border-color: rgba(245, 158, 11, 0.5) !important;
    color: #f59e0b !important;
}

/* Profile settings card in light mode */
body.light-mode .profile-settings-card {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
}

body.light-mode .admin-panel-modal-box {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
}

body.light-mode #admin-users-table-container,
body.light-mode #admin-community-table-container {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
}

body.light-mode .btn-table-action {
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    color: #475569 !important;
}

body.light-mode .btn-table-action:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

body.light-mode .admin-table-header {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}

body.light-mode .admin-th-col.admin-th-text > span {
    background: transparent !important;
    border: none !important;
    color: #64748b !important;
}

body.light-mode .admin-th-badge {
    background: transparent !important;
    border: none !important;
    color: #64748b !important;
    box-shadow: none !important;
}

body.light-mode .admin-th-badge svg {
    color: #64748b !important;
    opacity: 0.8 !important;
}

body.light-mode .admin-th-badge:hover {
    background: transparent !important;
    border: none !important;
    color: #0f172a !important;
    box-shadow: none !important;
}

body.light-mode .admin-item:hover {
    background: rgba(0, 0, 0, 0.02) !important;
}

body.light-mode #global-app-tooltip {
    background: rgba(255, 255, 255, 0.98);
    color: #0f172a;
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
}

/* Central Toast Notifications (Top-Center 2s) */
#toast-container {
    position: fixed !important;
    top: 24px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 999999 !important;
    pointer-events: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 8px !important;
    width: auto !important;
    max-width: 90vw !important;
}

.toast {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 10px 22px !important;
    border-radius: 9999px !important;
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 15px rgba(16, 185, 129, 0.2) !important;
    pointer-events: auto !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    animation: toastSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    text-align: center !important;
    white-space: nowrap !important;
}

.toast-success {
    background: rgba(16, 185, 129, 0.95) !important;
}

.toast-error {
    background: rgba(239, 68, 68, 0.95) !important;
}

.toast-info {
    background: rgba(59, 130, 246, 0.95) !important;
}

.toast-warning {
    background: rgba(245, 158, 11, 0.95) !important;
}

@keyframes toastSlideDown {
    from {
        opacity: 0;
        transform: translateY(-16px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Supermarket Price Comparison Table */
.market-compare-table {
    width: 100% !important;
    border-collapse: collapse !important;
}

.market-compare-table td:first-child {
    width: 65% !important;
    text-align: left !important;
    vertical-align: middle !important;
}

.market-compare-table td:last-child {
    width: 35% !important;
    text-align: right !important;
    vertical-align: middle !important;
}

.market-compare-table .market-price-bar-container {
    width: 100% !important;
    max-width: 140px !important;
    margin-left: auto !important;
}

/* DRY Yuh-Style Empty State Component */
.app-empty-state {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 32px 20px !important;
    margin: 12px 0 !important;
    border-radius: var(--radius) !important;
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px dashed rgba(255, 255, 255, 0.14) !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

body.light-mode .app-empty-state {
    background: rgba(0, 0, 0, 0.02) !important;
    border: 1px dashed rgba(0, 0, 0, 0.14) !important;
}

.app-empty-state-icon {
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    background: rgba(139, 92, 246, 0.12) !important;
    color: #a78bfa !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 12px !important;
}

.app-empty-state-title {
    font-size: 0.98rem !important;
    font-weight: 800 !important;
    color: var(--text-main) !important;
    margin-bottom: 6px !important;
    letter-spacing: -0.2px !important;
}

.app-empty-state-desc {
    font-size: 0.83rem !important;
    color: var(--text-muted) !important;
    max-width: 440px !important;
    line-height: 1.45 !important;
    margin-bottom: 14px !important;
}

/* ==========================================================================
   YUH-STYLE GAMIFIED ONBOARDING INTRO WIZARD (DRY CSS)
   ========================================================================== */
.yuh-intro-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 100000;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.yuh-intro-box {
    width: 100%;
    max-width: 600px;
    background: var(--card-bg);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 40px rgba(139, 92, 246, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: yuhIntroSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes yuhIntroSlideUp {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.yuh-intro-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-subtle);
}

.yuh-intro-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #a78bfa;
}

.yuh-dot-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    display: inline-block;
    animation: yuhPulse 2s infinite;
}

@keyframes yuhPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.6; }
}

.yuh-reward-pill {
    background: rgba(16, 185, 129, 0.14);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
    font-size: 0.74rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
}

.yuh-close-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}
.yuh-close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.4);
}

.yuh-progress-track {
    width: 100%;
    height: 4px;
    background: var(--progress-track);
    overflow: hidden;
}

.yuh-progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    transition: width 0.35s ease;
}

.yuh-intro-body {
    padding: 24px 22px;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
    max-height: calc(88vh - 140px);
}

.yuh-slide {
    display: none;
    animation: yuhFadeIn 0.3s ease;
}
.yuh-slide.active {
    display: block;
}

@keyframes yuhFadeIn {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

.yuh-slide-hero {
    text-align: center;
    margin-bottom: 20px;
}

.yuh-emoji-badge {
    font-size: 2.5rem;
    line-height: 1;
    margin-bottom: 10px;
    display: inline-block;
}

.yuh-emoji-badge.pulse-celebrate {
    animation: yuhBounce 1s infinite alternate;
}

@keyframes yuhBounce {
    from { transform: translateY(0) scale(1); }
    to { transform: translateY(-8px) scale(1.1); }
}

.yuh-slide-hero h2 {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.3px;
    margin-bottom: 6px;
}

.yuh-slide-hero .hero-gradient-text {
    background: var(--hero-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.yuh-sub {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.45;
    max-width: 480px;
    margin: 0 auto;
}

.yuh-card-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.yuh-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.yuh-field-group label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 6px;
}

.yuh-input-select, .yuh-input-large, .yuh-input-num {
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius-input);
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    color: var(--text-main);
    font-size: 0.92rem;
    font-weight: 600;
    outline: none;
    box-sizing: border-box;
    transition: all 0.2s;
}

.yuh-input-select:focus, .yuh-input-large:focus, .yuh-input-num:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.yuh-pill-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.yuh-pill-btn {
    padding: 10px 12px;
    border-radius: var(--radius-btn);
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    color: var(--text-muted);
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.yuh-pill-btn.active {
    background: rgba(139, 92, 246, 0.18);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.25);
}

.yuh-preset-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: rgba(139, 92, 246, 0.1);
    border: 1px dashed rgba(139, 92, 246, 0.35);
    gap: 10px;
}

.yuh-action-btn-sm {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: #ffffff;
    border: none;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap !important;
    transition: all 0.2s;
}
.yuh-action-btn-sm:hover {
    background: var(--primary-hover);
}

.yuh-mini-budget-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.yuh-budget-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: rgba(255, 255, 255, 0.02);
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
}

.yuh-budget-row span {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
}

.yuh-live-summary-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: var(--radius-input);
    font-size: 0.86rem;
    font-weight: 700;
}

.yuh-quick-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.yuh-chip {
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap !important;
    transition: all 0.2s;
}
.yuh-chip:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: var(--primary);
    color: #ffffff;
}

.yuh-slider-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: rgba(255, 255, 255, 0.02);
    padding: 10px 14px;
    border-radius: var(--radius-input);
    border: 1px solid var(--border-subtle);
}

.yuh-slider-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.84rem;
    font-weight: 700;
}

.yuh-fire-preview-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 8px;
}

.yuh-fire-preview-col {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-input);
    padding: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.yuh-fire-preview-col .lbl {
    font-size: 0.74rem;
    color: var(--text-muted);
    font-weight: 600;
}
.yuh-fire-preview-col strong {
    font-size: 1.05rem;
    font-weight: 800;
}

.yuh-celebration-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: var(--radius);
    padding: 18px 20px;
}

.yuh-badge-unlocked-row {
    display: flex;
    align-items: center;
    gap: 14px;
}
.yuh-badge-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.4);
}

.yuh-summary-checklist {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 12px;
}

.yuh-check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-main);
}

.yuh-intro-footer {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 16px 20px !important;
    border-top: 1px solid var(--border-subtle) !important;
    background: rgba(255, 255, 255, 0.03) !important;
    gap: 12px !important;
    min-height: 64px !important;
    box-sizing: border-box !important;
    position: relative !important;
    z-index: 10 !important;
    visibility: visible !important;
}

.yuh-btn-nav {
    padding: 9px 18px;
    font-size: 0.86rem;
    font-weight: 700;
    white-space: nowrap !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.yuh-btn-text {
    background: transparent !important;
    border: none !important;
    color: var(--text-muted) !important;
    font-size: 0.86rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    padding: 10px 14px !important;
    white-space: nowrap !important;
    transition: color 0.2s !important;
    flex-shrink: 0 !important;
}
.yuh-btn-text:hover {
    color: #ffffff !important;
}

.yuh-btn-primary {
    background: var(--primary) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 10px 22px !important;
    font-size: 0.88rem !important;
    font-weight: 800 !important;
    border-radius: var(--radius-btn) !important;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4) !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    min-width: 105px !important;
    flex-shrink: 0 !important;
    transition: all 0.2s ease !important;
}
.yuh-btn-primary:hover {
    background: var(--primary-hover) !important;
    transform: translateY(-1px) !important;
}

.yuh-btn-finish {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
}

#intro-wizard-modal .modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid var(--input-border);
}

#intro-wizard-modal .modal-footer button {
    width: auto;
    min-width: 0;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Intro Wizard Step Badges (Menu / Blueprint Harmonized) */
.intro-step-badge {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    border: 1px solid transparent;
    transition: transform 0.2s ease;
}
.intro-step-badge svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    display: block;
}
.intro-step-badge.intro-badge-violet {
    background: rgba(139, 92, 246, 0.16);
    border-color: rgba(139, 92, 246, 0.3);
    color: #a78bfa;
}
.intro-step-badge.intro-badge-emerald {
    background: rgba(16, 185, 129, 0.16);
    border-color: rgba(16, 185, 129, 0.3);
    color: #34d399;
}
.intro-step-badge.intro-badge-blue {
    background: rgba(14, 165, 233, 0.16);
    border-color: rgba(14, 165, 233, 0.3);
    color: #38bdf8;
}
.intro-step-badge.intro-badge-amber {
    background: rgba(249, 115, 22, 0.16);
    border-color: rgba(249, 115, 22, 0.3);
    color: #fb923c;
}
.intro-step-badge.intro-badge-gold {
    background: rgba(245, 158, 11, 0.16);
    border-color: rgba(245, 158, 11, 0.3);
    color: #fbbf24;
}

body.light-mode .intro-step-badge.intro-badge-violet {
    background: rgba(139, 92, 246, 0.12) !important;
    border-color: rgba(139, 92, 246, 0.25) !important;
    color: #7c3aed !important;
}
body.light-mode .intro-step-badge.intro-badge-emerald {
    background: rgba(16, 185, 129, 0.12) !important;
    border-color: rgba(16, 185, 129, 0.25) !important;
    color: #059669 !important;
}
body.light-mode .intro-step-badge.intro-badge-blue {
    background: rgba(14, 165, 233, 0.12) !important;
    border-color: rgba(14, 165, 233, 0.25) !important;
    color: #0284c7 !important;
}
body.light-mode .intro-step-badge.intro-badge-amber {
    background: rgba(249, 115, 22, 0.12) !important;
    border-color: rgba(249, 115, 22, 0.25) !important;
    color: #ea580c !important;
}
body.light-mode .intro-step-badge.intro-badge-gold {
    background: rgba(245, 158, 11, 0.12) !important;
    border-color: rgba(245, 158, 11, 0.25) !important;
    color: #d97706 !important;
}

@media (max-width: 600px) {
    .yuh-mini-budget-grid {
        grid-template-columns: 1fr;
    }
    .yuh-fire-preview-card {
        grid-template-columns: 1fr;
    }
    .yuh-intro-box {
        max-height: 94vh;
    }
}

/* --- MAGICAL HIGHLIGHT BUTTON: OPTIMIEREN & SAVE --- */
.btn-magic-opt {
    height: 34px;
    padding: 0 16px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #ffffff !important;
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 45%, #ec4899 100%);
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    cursor: pointer;
    box-shadow: 0 0 16px rgba(168, 85, 247, 0.42), 0 2px 6px rgba(0, 0, 0, 0.25);
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    text-decoration: none;
    box-sizing: border-box;
    vertical-align: middle;
}

.btn-magic-opt::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -70%;
    width: 45%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: rotate(25deg);
    pointer-events: none;
    transition: all 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-magic-opt:hover::before {
    left: 140%;
}

.btn-magic-opt:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 24px rgba(217, 70, 239, 0.65), 0 4px 14px rgba(0, 0, 0, 0.32);
    border-color: rgba(255, 255, 255, 0.55);
    background: linear-gradient(135deg, #8b5cf6 0%, #c026d3 50%, #f43f5e 100%);
}

.btn-magic-opt:active {
    transform: translateY(0);
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.45);
}

.btn-magic-opt .magic-sparkle-icon {
    flex-shrink: 0;
    color: #fef08a;
    filter: drop-shadow(0 0 4px rgba(254, 240, 138, 0.7));
    animation: magicSparkle 2.4s ease-in-out infinite alternate;
}

@keyframes magicSparkle {
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 0.88;
        filter: drop-shadow(0 0 3px rgba(254, 240, 138, 0.6));
    }
    50% {
        transform: scale(1.18) rotate(10deg);
        opacity: 1;
        filter: drop-shadow(0 0 8px rgba(254, 240, 138, 0.9));
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 0.88;
        filter: drop-shadow(0 0 3px rgba(254, 240, 138, 0.6));
    }
}

.btn-company-save {
    height: 34px;
    padding: 0 14px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #ffffff !important;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
    transition: all 0.2s ease;
    white-space: nowrap;
    box-sizing: border-box;
    vertical-align: middle;
}

.btn-company-save:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.btn-company-save:active {
    transform: translateY(0);
}

/* ==========================================================================
   ANTIGRAVITY AI CHAT WIDGET (BOTTOM RIGHT FLOATING ASSISTANT)
   ========================================================================== */
.ag-chat-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 0%, #172554 0%, #090b10 75%);
    border: 1px solid rgba(96, 165, 250, 0.35);
    color: #ffffff;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55), 0 0 18px rgba(59, 130, 246, 0.25);
    cursor: pointer;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease, border-color 0.22s ease;
    padding: 0;
}

.ag-chat-fab:hover {
    transform: translateY(-3px) scale(1.04);
    border-color: rgba(96, 165, 250, 0.65);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.65), 0 0 24px rgba(59, 130, 246, 0.45);
}

.ag-chat-fab.is-open {
    transform: scale(0.92);
    border-color: #3b82f6;
}

.ag-fab-status-dot {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #3b82f6;
    border: 2px solid #090b10;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.8);
}

.ag-chat-window {
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 450px;
    height: 620px;
    max-width: calc(100vw - 32px);
    max-height: calc(100dvh - 116px);
    background: radial-gradient(ellipse 85% 42% at 50% 0%, rgba(29, 78, 216, 0.24) 0%, rgba(15, 23, 42, 0.08) 55%, transparent 100%), #080a0f;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.78), 0 0 0 1px rgba(59, 130, 246, 0.12);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(18px) scale(0.97);
    transform-origin: bottom right;
    transition: opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1), transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.24s, width 0.24s ease, height 0.24s ease;
    color: #f1f5f9;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.ag-chat-window.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.ag-chat-window.is-expanded {
    width: min(780px, calc(100vw - 40px));
    height: min(760px, calc(100dvh - 110px));
}

.ag-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(10, 12, 18, 0.65);
    backdrop-filter: blur(12px);
    flex-shrink: 0;
}

.ag-chat-header-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ag-chat-header-title {
    font-size: 0.86rem;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: 0.2px;
}

.ag-chat-header-badge {
    font-size: 0.66rem;
    font-weight: 600;
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.14);
    border: 1px solid rgba(59, 130, 246, 0.28);
    padding: 2px 7px;
    border-radius: 999px;
}

.ag-chat-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ag-header-icon-btn {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    border: none;
    background: transparent;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    padding: 0;
}

.ag-header-icon-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.ag-chat-canvas {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 20px 18px 12px 18px;
    display: flex;
    flex-direction: column;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
}

.ag-chat-hero {
    margin: auto 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 18px 8px;
}

.ag-hero-emblem-wrap {
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 8px 24px rgba(30, 58, 138, 0.35));
}

.ag-hero-greeting {
    font-size: 1.22rem;
    font-weight: 500;
    color: #f8fafc;
    margin: 0 0 18px 0;
    letter-spacing: -0.01em;
    line-height: 1.35;
}

.ag-starter-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
    max-width: 390px;
}

.ag-starter-chip {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    color: #cbd5e1;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.74rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.16s ease;
}

.ag-starter-chip:hover {
    background: rgba(59, 130, 246, 0.14);
    border-color: rgba(96, 165, 250, 0.4);
    color: #ffffff;
    transform: translateY(-1px);
}

.ag-chat-messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ag-msg {
    display: flex;
    flex-direction: column;
    gap: 4px;
    animation: agFadeIn 0.2s ease-out;
}

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

.ag-msg-user {
    align-self: flex-end;
    max-width: 88%;
    background: #161922;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
    padding: 10px 14px;
    border-radius: 14px 14px 4px 14px;
    font-size: 0.84rem;
    line-height: 1.48;
}

.ag-msg-assistant {
    align-self: flex-start;
    width: 100%;
    background: rgba(17, 20, 28, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 0.83rem;
    line-height: 1.55;
    box-sizing: border-box;
}

.ag-msg-assistant h4 {
    margin: 0 0 8px 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: #93c5fd;
}

.ag-msg-assistant p {
    margin: 0 0 8px 0;
}

.ag-msg-assistant p:last-child {
    margin-bottom: 0;
}

.ag-msg-assistant ul {
    margin: 6px 0 8px 0;
    padding-left: 18px;
}

.ag-msg-assistant li {
    margin-bottom: 5px;
}

.ag-msg-assistant strong {
    color: #ffffff;
    font-weight: 600;
}

.ag-msg-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.68rem;
    color: #64748b;
}

.ag-copy-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 0.68rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: 5px;
}

.ag-copy-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #f8fafc;
}

/* Antigravity Composer Box (Bottom) */
.ag-composer-outer {
    margin: 0 12px 12px 12px;
    background: #101218;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 8px 10px 10px 10px;
    flex-shrink: 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.ag-composer-top {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 4px 7px 4px;
}

.ag-ctx-pill {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 0.74rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 4px;
    border-radius: 6px;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}

.ag-ctx-pill:hover {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.05);
}

.ag-composer-inner {
    background: #171a22;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    padding: 9px 11px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: border-color 0.18s ease;
}

.ag-composer-inner:focus-within {
    border-color: rgba(96, 165, 250, 0.45);
}

.ag-composer-attachment {
    display: flex;
    align-items: center;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ag-composer-attachment.is-hidden {
    display: none;
}

.ag-attachment-thumb {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    padding: 4px 9px 4px 5px;
}

.ag-thumb-lines {
    width: 24px;
    height: 24px;
    border-radius: 5px;
    background: #f8fafc;
    padding: 4px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.ag-thumb-lines span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: #64748b;
}

.ag-thumb-lines .ag-tl-1 { width: 85%; background: #3b82f6; }
.ag-thumb-lines .ag-tl-2 { width: 100%; }
.ag-thumb-lines .ag-tl-3 { width: 65%; }

.ag-attachment-label {
    font-size: 0.71rem;
    font-weight: 500;
    color: #cbd5e1;
}

.ag-composer-textarea {
    width: 100%;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    color: #f1f5f9 !important;
    font-size: 0.84rem;
    line-height: 1.45;
    resize: none;
    padding: 2px 0;
    margin: 0;
    min-height: 38px;
    max-height: 110px;
    font-family: inherit;
}

.ag-composer-textarea::placeholder {
    color: #64748b;
}

.ag-composer-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding-top: 2px;
}

.ag-toolbar-left,
.ag-toolbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ag-toolbar-plus-btn,
.ag-toolbar-mic-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: color 0.15s ease, background 0.15s ease;
}

.ag-toolbar-plus-btn:hover,
.ag-toolbar-mic-btn:hover {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.08);
}

.ag-toolbar-meta-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 6px;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s ease, background 0.15s ease;
}

.ag-toolbar-meta-btn:hover {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.06);
}

.ag-send-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: #3b82f6;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.45);
    transition: background 0.15s ease, transform 0.15s ease;
    flex-shrink: 0;
}

.ag-send-btn:hover {
    background: #2563eb;
    transform: scale(1.06);
}

.ag-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 768px) {
    .ag-chat-fab {
        bottom: 84px;
        right: 16px;
        width: 48px;
        height: 48px;
    }

    .ag-chat-window {
        bottom: 142px;
        right: 12px;
        left: 12px;
        width: auto !important;
        max-width: none !important;
        height: min(560px, calc(100dvh - 160px)) !important;
    }
}

/* --- GUEST PREVIEW BANNER & SEO NAVIGATION --- */
.guest-preview-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    margin-bottom: 18px;
    border-radius: 12px;
    background: rgba(139, 92, 246, 0.09);
    border: 1px solid rgba(139, 92, 246, 0.28);
}

body.light-mode .guest-preview-banner {
    background: rgba(139, 92, 246, 0.06);
    border-color: rgba(139, 92, 246, 0.24);
}

.guest-preview-copy {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex-wrap: wrap;
}

.guest-preview-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: var(--fs-xs, 0.72rem);
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #c4b5fd;
    background: rgba(139, 92, 246, 0.22);
    flex-shrink: 0;
}

body.light-mode .guest-preview-badge {
    color: #6d28d9;
    background: rgba(139, 92, 246, 0.14);
}

.guest-preview-text {
    margin: 0;
    font-size: var(--fs-sm, 0.85rem);
    line-height: 1.45;
    color: var(--text-main);
}

.guest-preview-context {
    color: var(--text-muted);
    font-weight: 600;
}

.guest-preview-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.guest-preview-cta {
    white-space: nowrap;
}

.landing-footer-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 18px;
    margin: 10px 0;
}

.landing-footer-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: var(--fs-sm, 0.84rem);
    font-weight: 600;
    transition: color 0.18s ease;
}

.landing-footer-nav a:hover {
    color: var(--text-main);
}

.btn-hero-secondary-link {
    text-decoration: none;
    max-width: 260px;
}

.canton-seo-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 14px 0 18px;
    padding: 10px 0;
    border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
    border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
}

.canton-seo-label {
    font-size: var(--fs-xs, 0.74rem);
    font-weight: 700;
    color: var(--text-muted);
    margin-right: 4px;
}

.canton-seo-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: var(--fs-xs, 0.73rem);
    font-weight: 700;
    text-decoration: none;
    color: var(--text-muted);
    border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.canton-seo-pill:hover,
.canton-seo-pill.active {
    color: var(--text-main);
    border-color: rgba(139, 92, 246, 0.55);
    background: rgba(139, 92, 246, 0.16);
}

.bento-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

@media (max-width: 768px) {
    .guest-preview-banner {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ==========================================================================
   SPRINT 1: GUEST SCENARIO PERSISTENCE, CROSS-CALCULATOR BRIDGE,
   SWISS 3A & ETF BROKER FEE CALCULATOR & MODERN WEB GUIDANCE STANDARDS
   ========================================================================== */

.guest-preview-actions {
    gap: 8px;
    flex-wrap: wrap;
}

.guest-preview-badge.is-active {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

body.light-mode .guest-preview-badge.is-active {
    background: rgba(16, 185, 129, 0.14);
    color: #047857;
}

.roze-scenario-import-banner {
    background: rgba(16, 185, 129, 0.09);
    border-color: rgba(16, 185, 129, 0.32);
}

body.light-mode .roze-scenario-import-banner {
    background: rgba(16, 185, 129, 0.06);
    border-color: rgba(16, 185, 129, 0.28);
}

.roze-import-badge {
    background: rgba(16, 185, 129, 0.22);
    color: #6ee7b7;
}

body.light-mode .roze-import-badge {
    background: rgba(16, 185, 129, 0.16);
    color: #047857;
}

.auth-scenario-save-note {
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: 8px;
    border-left: 3px solid #10b981;
    background: rgba(16, 185, 129, 0.09);
    color: var(--text-main);
    font-size: var(--fs-xs, 0.78rem);
    line-height: 1.45;
}

/* Forms & Validate-After-Interaction (:user-invalid + fallback) */
.roze-form-field {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.roze-field-label {
    font-size: var(--fs-sm, 0.82rem);
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 2px;
}

.roze-field-hint {
    font-size: var(--fs-xs, 0.73rem);
    color: var(--text-muted);
    line-height: 1.35;
    margin-bottom: 6px;
}

.roze-field-error {
    display: none;
    margin-top: 5px;
    font-size: var(--fs-xs, 0.74rem);
    font-weight: 600;
    color: #f87171;
    line-height: 1.35;
}

body.light-mode .roze-field-error {
    color: #dc2626;
}

.roze-validate-input:user-invalid,
.roze-validate-input.user-invalid-fallback {
    border-color: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.18);
}

.roze-validate-input:user-invalid ~ .roze-field-error,
.roze-validate-input.user-invalid-fallback ~ .roze-field-error {
    display: block;
}

/* Visible Radio Group (Zero-click scanning for <= 5 options) */
.roze-horizon-fieldset {
    border: 0;
    margin: 0;
    padding: 0;
    min-width: 0;
}

.roze-horizon-fieldset > legend {
    padding: 0;
}

.roze-radio-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.roze-radio-option {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 0 12px;
    border-radius: var(--radius-input, 8px);
    border: 1px solid var(--input-border, rgba(255, 255, 255, 0.14));
    color: var(--text-main);
    font-size: var(--fs-sm, 0.83rem);
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.16s ease, color 0.16s ease;
}

.roze-radio-option input[type="radio"] {
    margin: 0;
    width: 15px;
    height: 15px;
    accent-color: #8b5cf6;
    cursor: pointer;
}

.roze-radio-option:has(input[type="radio"]:checked) {
    border-color: #8b5cf6;
    color: #c4b5fd;
}

body.light-mode .roze-radio-option:has(input[type="radio"]:checked) {
    border-color: #7c3aed;
    color: #5b21b6;
}

/* Tax Quick Scenario Bar & Fee Comparison Module (Zero Box-in-Box) */
.roze-fee-widget,
.roze-tax-quick-widget,
.roze-bridge-card {
    margin-bottom: 20px;
}

.roze-fee-header-pill,
.roze-bridge-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: var(--fs-xs, 0.74rem);
    font-weight: 700;
    color: #10b981;
    background: rgba(16, 185, 129, 0.14);
}

body.light-mode .roze-fee-header-pill,
body.light-mode .roze-bridge-pill {
    color: #047857;
    background: rgba(16, 185, 129, 0.12);
}

.roze-fee-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.roze-fee-inputs-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.roze-tax-quick-grid {
    display: grid;
    grid-template-columns: 1.1fr 1.1fr 1.25fr 1fr;
    gap: 16px;
    align-items: start;
}

.roze-fee-kpi-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding: 14px 0;
    border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
    border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
}

.roze-fee-kpi-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-right: 12px;
    border-right: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
}

.roze-fee-kpi-item:last-child {
    border-right: 0;
    padding-right: 0;
}

.roze-fee-kpi-label {
    font-size: var(--fs-xs, 0.75rem);
    font-weight: 600;
    color: var(--text-muted);
}

.roze-fee-kpi-val {
    font-size: var(--fs-lg, 1.15rem);
    font-weight: 800;
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
}

.roze-fee-kpi-val--best,
.roze-fee-kpi-val--savings {
    color: #10b981;
}

/* Responsive Provider Comparison Table (@container + sticky headers) */
.roze-fee-table-region {
    container-type: inline-size;
    overflow: auto;
    max-width: 100%;
    --label-2: "Gesamtgebühr";
    --label-3: "Endvermögen";
    --label-4: "Gebührenverlust";
    --label-5: "Mehrvermögen vs. Bank";
    --label-6: "Anbieter";
}

.roze-fee-table-region:focus-visible {
    outline: 2px solid #8b5cf6;
    outline-offset: 3px;
    border-radius: 6px;
}

.roze-fee-caption {
    text-align: left;
    font-size: var(--fs-xs, 0.74rem);
    color: var(--text-muted);
    padding-bottom: 8px;
}

.roze-fee-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fs-sm, 0.84rem);
    font-variant-numeric: tabular-nums;
}

.roze-fee-table th,
.roze-fee-table td {
    padding: 11px 10px;
    border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
    text-align: left;
    vertical-align: middle;
}

.roze-fee-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--card-bg, #1e293b);
    font-size: var(--fs-xs, 0.72rem);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.roze-fee-table tbody th {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--card-bg, #1e293b);
    font-weight: 700;
    min-width: 210px;
}

.roze-fee-table thead th:first-child {
    left: 0;
    z-index: 3;
}

.roze-fee-table .roze-fee-num {
    text-align: right;
    white-space: nowrap;
}

.roze-fee-table .roze-fee-action-th,
.roze-fee-table .roze-fee-action-td {
    text-align: right;
    white-space: nowrap;
}

.roze-fee-provider-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.roze-fee-provider-name {
    font-weight: 800;
    color: var(--text-main);
}

.roze-fee-provider-badge {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #a78bfa;
}

.roze-fee-row--best .roze-fee-provider-badge {
    color: #10b981;
}

.roze-fee-row--ref .roze-fee-provider-badge {
    color: var(--text-muted);
}

.roze-fee-provider-sub {
    font-size: var(--fs-xs, 0.73rem);
    font-weight: 400;
    color: var(--text-muted);
    margin-top: 2px;
    line-height: 1.35;
}

.roze-fee-cell-drag {
    color: #f87171;
}

body.light-mode .roze-fee-cell-drag {
    color: #dc2626;
}

.roze-fee-adv-pos {
    color: #10b981;
}

.roze-fee-adv-ref,
.roze-fee-ref-note {
    color: var(--text-muted);
    font-size: var(--fs-xs, 0.75rem);
}

.roze-fee-link-btn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.roze-fee-footnote {
    font-size: var(--fs-xs, 0.74rem);
    color: var(--text-muted);
    line-height: 1.45;
}

@container (width < 600px) {
    .roze-fee-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
        border: 0;
    }

    .roze-fee-table,
    .roze-fee-table tbody,
    .roze-fee-table tr,
    .roze-fee-table th,
    .roze-fee-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .roze-fee-table tbody tr {
        padding: 12px 0;
        border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.12));
    }

    .roze-fee-table tbody th {
        position: static;
        padding: 0 0 8px;
        border-bottom: 0;
        min-width: 0;
    }

    .roze-fee-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        padding: 5px 0;
        border-bottom: 0;
        text-align: right;
    }

    .roze-fee-table tbody td:nth-child(2)::before {
        content: var(--label-2) ": ";
        font-weight: 700;
        color: var(--text-muted);
        text-align: left;
    }

    .roze-fee-table tbody td:nth-child(3)::before {
        content: var(--label-3) ": ";
        font-weight: 700;
        color: var(--text-muted);
        text-align: left;
    }

    .roze-fee-table tbody td:nth-child(4)::before {
        content: var(--label-4) ": ";
        font-weight: 700;
        color: var(--text-muted);
        text-align: left;
    }

    .roze-fee-table tbody td:nth-child(5)::before {
        content: var(--label-5) ": ";
        font-weight: 700;
        color: var(--text-muted);
        text-align: left;
    }

    .roze-fee-table tbody td:nth-child(6)::before {
        content: var(--label-6) ": ";
        font-weight: 700;
        color: var(--text-muted);
        text-align: left;
    }
}

/* Cross-Calculator Bridge ("Nächster Optimierungsschritt") */
.roze-bridge-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.roze-bridge-step {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    padding-right: 16px;
    border-right: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
}

.roze-bridge-step:last-child {
    border-right: 0;
    padding-right: 0;
}

.roze-bridge-tag {
    font-size: var(--fs-xs, 0.71rem);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #a78bfa;
}

.roze-bridge-title {
    margin: 0;
    font-size: var(--fs-base, 0.94rem);
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.3;
}

.roze-bridge-desc {
    margin: 0;
    font-size: var(--fs-xs, 0.78rem);
    color: var(--text-muted);
    line-height: 1.45;
    flex: 1;
}

.roze-bridge-action {
    margin-top: 6px;
}

.roze-bridge-cta {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 980px) {
    .roze-fee-inputs-grid,
    .roze-tax-quick-grid,
    .roze-fee-kpi-strip,
    .roze-bridge-grid {
        grid-template-columns: 1fr;
    }

    .roze-fee-kpi-item,
    .roze-bridge-step {
        border-right: 0;
        padding-right: 0;
        padding-bottom: 12px;
        border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
    }

    .roze-fee-kpi-item:last-child,
    .roze-bridge-step:last-child {
        border-bottom: 0;
        padding-bottom: 0;
    }
}



















/* --- SUBTLE SEO FOOTER NAVIGATION GRID --- */
.roze-seo-footer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 32px;
    width: 100%;
    padding: 16px 0;
    margin: 10px 0 4px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    text-align: left;
}
.roze-seo-footer-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.roze-seo-footer-heading {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted, #94a3b8);
}
.roze-seo-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
}
.roze-seo-footer-links a {
    font-size: 0.78rem;
    color: var(--text-muted, #94a3b8);
    text-decoration: none;
    transition: color 0.18s ease;
}
.roze-seo-footer-links a:hover {
    color: var(--text-main, #f8fafc);
    text-decoration: underline;
}
body.light-mode .roze-seo-footer-grid {
    border-top-color: rgba(15, 23, 42, 0.08);
}
@media (max-width: 760px) {
    .roze-seo-footer-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

/* ==========================================================================
   FIRE SPARVERLAUF, CASHFLOW TABLE & TAX OPTIMIZER PRESETS (EXTERNALIZED)
   ========================================================================== */
.sv-tr-cur {
    background: rgba(56, 189, 248, 0.09);
    border-left: 4px solid #38bdf8;
    box-shadow: inset 0 0 16px rgba(56, 189, 248, 0.08);
}
.sv-tr-ret {
    background: rgba(239, 68, 68, 0.04);
}
.sv-nw {
    white-space: nowrap;
}
.sv-badge-cur {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 7px;
    border-radius: 6px;
    background: linear-gradient(135deg, #0284c7, #38bdf8);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(56, 189, 248, 0.35);
    margin-right: 6px;
}
.sv-badge-hist {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(148, 163, 184, 0.12);
    color: #94a3b8;
    margin-right: 5px;
}
.sv-age {
    font-size: 0.78rem;
    opacity: 0.7;
}
.sv-badge-mt {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
    margin-left: 4px;
}
.sv-pen {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}
.sv-pen-100 { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.sv-pen-part { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.sv-pen-0 { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.sv-r {
    text-align: right;
    white-space: nowrap;
}
.sv-fw6 { font-weight: 600; }
.sv-fw7 { font-weight: 700; }
.sv-fw8 { font-weight: 800; }
.sv-pos { color: #10b981; }
.sv-neg { color: #ef4444; }
.sv-mut { color: var(--text-muted); }
.sv-main { color: var(--text-main); }
.sv-inf { font-size: 0.85rem; }

/* Cashflow Calculator Table & Subcards */
.btn-cf-chevron {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    width: 22px;
    height: 22px;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.25s ease, background 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
    padding: 0;
}
.btn-cf-chevron:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}
.cf-main-row:hover {
    background: rgba(255, 255, 255, 0.02);
}
.cf-detail-cell {
    padding: 8px 16px 16px 16px !important;
    background: rgba(255, 255, 255, 0.012);
    border-bottom: 1px solid var(--border-subtle);
}
.cf-subdetail-wrap {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
.cf-subcard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
}
.cf-subcard {
    width: 100%;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
body.light-mode .cf-subcard {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.cf-subcard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 4px;
}
.cf-subcard-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.cf-subcard-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.018);
    border: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 0.79rem;
    transition: background 0.15s ease;
}
body.light-mode .cf-subcard-item {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.04);
}
.cf-subcard-item:hover {
    background: rgba(255, 255, 255, 0.04);
}
body.light-mode .cf-subcard-item:hover {
    background: rgba(0, 0, 0, 0.04);
}
.cf-item-left {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
}
.cf-item-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.cf-item-right {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    text-align: right;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.cf-tag-subtle {
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.06);
    padding: 1px 6px;
    border-radius: 4px;
}
body.light-mode .cf-tag-subtle {
    background: rgba(0, 0, 0, 0.05);
}
.cf-cashflow-table {
    width: 100% !important;
    table-layout: fixed !important;
    border-collapse: separate;
    margin: 0;
}
.cf-cashflow-table th,
.cf-cashflow-table td {
    box-sizing: border-box;
}
.cf-cashflow-table th:nth-child(1),
.cf-cashflow-table td:nth-child(1) {
    width: 52%;
    white-space: normal !important;
    word-break: break-word;
    overflow-wrap: break-word;
    padding-right: 12px !important;
}
.cf-cashflow-table th:nth-child(2),
.cf-cashflow-table td:nth-child(2) {
    width: 18%;
    min-width: 95px;
    text-align: right !important;
    white-space: nowrap !important;
    font-variant-numeric: tabular-nums;
}
.cf-cashflow-table th:nth-child(3),
.cf-cashflow-table td:nth-child(3) {
    width: 18%;
    min-width: 90px;
    text-align: right !important;
    white-space: nowrap !important;
    font-variant-numeric: tabular-nums;
}
.cf-cashflow-table th:nth-child(4),
.cf-cashflow-table td:nth-child(4) {
    width: 12%;
    min-width: 60px;
    text-align: right !important;
    white-space: nowrap !important;
    font-variant-numeric: tabular-nums;
}
.cf-cashflow-table .cf-detail-cell {
    width: 100% !important;
    white-space: normal !important;
    word-break: break-word;
    overflow-wrap: break-word;
    padding: 10px 16px 16px 16px !important;
    box-sizing: border-box;
}
.cf-cashflow-table .cf-detail-cell * {
    white-space: normal;
    box-sizing: border-box;
}
.cf-cashflow-table .cf-detail-cell .cf-item-right,
.cf-cashflow-table .cf-detail-cell .badge-pill,
.cf-cashflow-table .cf-detail-cell .cf-tag-subtle {
    white-space: nowrap !important;
}
.cf-row-note {
    white-space: normal !important;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
    max-width: 100%;
}
@media (max-width: 768px) {
    .cf-cashflow-table {
        min-width: 500px;
    }
}

/* Tax Optimizer Modal Presets */
.optimizer-presets-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}
@media (max-width: 780px) {
    .optimizer-presets-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}
.btn-preset {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    background: rgba(255, 255, 255, 0.025);
    color: var(--text-main);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    text-align: left;
    width: 100%;
    min-width: 0;
    min-height: 62px;
    box-sizing: border-box;
    overflow: hidden;
}
.btn-preset:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.16);
}
.btn-preset.active {
    border-color: var(--primary, #8b5cf6) !important;
    background: rgba(139, 92, 246, 0.12) !important;
    box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.25);
}
.btn-preset .preset-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 4px;
    min-height: 16px;
    margin-bottom: 2px;
}
.btn-preset .preset-title {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.01em;
}
.btn-preset.active .preset-title {
    color: var(--text-main);
}
.btn-preset .preset-badge {
    font-size: 0.56rem;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 3px;
    letter-spacing: 0.01em;
    white-space: nowrap;
    line-height: 1.2;
    flex-shrink: 0;
}
.btn-preset .preset-metric {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}
.btn-preset.active .preset-metric {
    color: var(--text-main);
}
.btn-preset .preset-wealth-row {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin: 2px 0 1px 0;
    line-height: 1.2;
}
.btn-preset .preset-wealth-val {
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
    color: #38bdf8;
}
.btn-preset .preset-wealth-sub {
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--text-muted);
}
.btn-preset .preset-tax-sub {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

/* ==========================================================================
   FISCARIS. SWISS FIDUCIARY TRUST DESIGN SYSTEM (ANALOG THUN-NOTAR.CH)
   ========================================================================== */

@supports not (accent-color: #059669) {
    input[type="checkbox"],
    input[type="radio"] {
        border: 1.5px solid var(--input-border);
    }
}

.fiscaris-brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    user-select: none;
}
.fiscaris-brand-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(5, 150, 105, 0.1);
    color: var(--primary);
    border: 1px solid rgba(5, 150, 105, 0.25);
}

/* White Pill-Button Top Navigation (1:1 thun-notar.ch Trust Style) */
body.light-mode nav,
body.light-mode .landing-header.tn-trust-header {
    background: rgba(255, 255, 255, 0.97) !important;
    border-bottom: 1px solid #d1fae5 !important;
    box-shadow: 0 1px 6px rgba(15, 23, 42, 0.03) !important;
}

.tn-pill-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tn-nav-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--input-border);
    background: var(--card-bg);
    color: var(--text-main);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease, transform 0.12s ease;
    white-space: nowrap;
}
.tn-nav-pill:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.tn-nav-pill.active {
    border-color: var(--emerald-cta, #00c47c);
    background: rgba(0, 196, 124, 0.09);
    color: var(--primary);
    font-weight: 700;
}
.tn-nav-pill--cta {
    border-color: var(--emerald-cta, #00c47c) !important;
    background: rgba(0, 196, 124, 0.08) !important;
    color: var(--text-main) !important;
    font-weight: 700 !important;
}
body.light-mode .tn-nav-pill--cta {
    border-width: 1.5px !important;
    border-color: #00c47c !important;
    background: #f0fdf4 !important;
    color: #0f172a !important;
}
.tn-nav-pill--cta:hover {
    background: #00c47c !important;
    border-color: #00c47c !important;
    color: #ffffff !important;
}

.tax-score-header-pill {
    border-color: rgba(5, 150, 105, 0.38);
    background: rgba(5, 150, 105, 0.07);
}
.tax-score-header-pill strong {
    color: var(--primary);
    font-weight: 800;
}

/* Thun-Notar Style Landing Sections & Mint Container (#cdeee0) */
.tn-landing-shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: 26px 24px 56px;
}
.tn-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.tn-breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
}
.tn-breadcrumb a:hover {
    color: var(--primary);
}
.tn-breadcrumb .tn-bc-current {
    color: #00a86b;
    font-weight: 700;
}
.tn-page-title {
    font-size: clamp(1.75rem, 3vw, 2.35rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-main);
    line-height: 1.18;
    margin: 0 0 12px 0;
}
.tn-page-lead {
    font-size: 1.02rem;
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 920px;
    margin: 0 0 26px 0;
}

.fiscaris-mint-block {
    background: #cdeee0;
    border-radius: 18px;
    padding: 28px;
    margin-bottom: 36px;
    border: 1px solid #b5e4cf;
}
body:not(.light-mode) .fiscaris-mint-block {
    background: rgba(5, 150, 105, 0.11);
    border-color: rgba(16, 185, 129, 0.24);
}
.fiscaris-mint-block__title {
    font-size: 1.28rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-main);
    margin: 0 0 8px 0;
}
.fiscaris-mint-block__lead {
    font-size: 0.92rem;
    line-height: 1.58;
    color: var(--text-main);
    opacity: 0.88;
    margin: 0 0 22px 0;
    max-width: 920px;
}
.fiscaris-pillar-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.fiscaris-pillar-card {
    background: var(--card-bg);
    border-radius: 14px;
    padding: 20px 22px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.fiscaris-pillar-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}
.fiscaris-pillar-card__head {
    display: flex;
    align-items: center;
    gap: 12px;
}
.fiscaris-pillar-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #e6f7ef;
    color: #059669;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
body:not(.light-mode) .fiscaris-pillar-icon {
    background: rgba(16, 185, 129, 0.16);
    color: #34d399;
}
.fiscaris-pillar-card__title {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}
.fiscaris-pillar-card__text {
    font-size: 0.84rem;
    line-height: 1.55;
    color: var(--text-muted);
    margin: 0;
}

/* 3-Column Swiss Fiduciary Service Packages (1:1 thun-notar.ch) */
.tn-section-heading {
    font-size: 1.32rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-main);
    margin: 0 0 16px 0;
}
.fiscaris-package-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 40px;
}
.fiscaris-package-card {
    background: var(--card-bg);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    box-shadow: var(--shadow);
}
.fiscaris-package-card--featured {
    border-color: rgba(0, 196, 124, 0.55);
}
.fiscaris-package-card__title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 8px 0;
}
.fiscaris-package-card__desc {
    font-size: 0.84rem;
    line-height: 1.58;
    color: var(--text-muted);
    margin: 0;
}
.tn-pill-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.16s ease;
}
.tn-pill-cta--outline {
    background: var(--card-bg);
    border: 1px solid var(--input-border);
    color: var(--text-main);
}
.tn-pill-cta--outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.tn-pill-cta--emerald {
    background: #00c47c;
    border: 1px solid #00c47c;
    color: #ffffff;
}
.tn-pill-cta--emerald:hover {
    background: #059669;
    border-color: #059669;
    color: #ffffff;
}

/* Steuer-Optimierungs-Score (0–100 %) Cockpit Widget */
.fiscaris-score-cockpit {
    background: var(--card-bg);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 22px 24px;
    margin-bottom: 22px;
    box-shadow: var(--shadow);
}
body.light-mode .fiscaris-score-cockpit {
    border-color: #bbf7d0;
    background: linear-gradient(180deg, #ffffff 0%, #f8fdfa 100%);
}
.fiscaris-score-cockpit__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.fiscaris-score-cockpit__summary {
    flex: 1 1 360px;
}
.fiscaris-score-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary);
    margin-bottom: 8px;
}
.fiscaris-score-headline-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 10px;
}
.fiscaris-score-number {
    font-size: 2.3rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    color: var(--text-main);
}
.fiscaris-score-number span {
    font-size: 1.2rem;
    color: var(--primary);
    margin-left: 2px;
}
.fiscaris-score-grade {
    font-size: 0.96rem;
    font-weight: 700;
    color: var(--text-main);
}
.fiscaris-score-sub {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.fiscaris-emerald-text {
    color: var(--primary);
}
.fiscaris-score-bar-track {
    width: 100%;
    max-width: 460px;
    height: 8px;
    border-radius: 999px;
    background: var(--progress-track);
    overflow: hidden;
}
.fiscaris-score-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #00c47c 0%, #059669 100%);
    transition: width 0.35s ease;
}
.fiscaris-score-cockpit__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.fiscaris-lever-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
}
.fiscaris-lever-card {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 13px 15px;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    background: var(--rest-box-bg);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.16s ease, transform 0.14s ease;
}
.fiscaris-lever-card:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
}
.fiscaris-lever-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.fiscaris-lever-status {
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 7px;
    border-radius: 999px;
}
.fiscaris-lever-status--optimal { background: rgba(16, 185, 129, 0.16); color: #059669; }
.fiscaris-lever-status--partial { background: rgba(245, 158, 11, 0.18); color: #b45309; }
.fiscaris-lever-status--open    { background: rgba(14, 165, 233, 0.16); color: #0369a1; }
.fiscaris-lever-savings {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--text-muted);
}
.fiscaris-lever-savings.has-pot {
    color: var(--primary);
    font-weight: 800;
}
.fiscaris-lever-card__title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    margin-top: 2px;
}
.fiscaris-lever-card__law {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary);
}
.fiscaris-lever-card__desc {
    font-size: 0.76rem;
    line-height: 1.45;
    color: var(--text-muted);
}

/* Shared Hint-System & Info-Box (analog thun-notar.ch) */
.fiscaris-info-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    color: #0f172a;
    margin-bottom: 18px;
}
body:not(.light-mode) .fiscaris-info-box {
    background: rgba(5, 150, 105, 0.1);
    border-color: rgba(16, 185, 129, 0.25);
    color: var(--text-main);
}
.fiscaris-info-box--warning {
    background: #fffbeb;
    border-color: #fde68a;
}
.fiscaris-info-box--legal {
    background: #f8fafc;
    border-color: #cbd5e1;
}
.fiscaris-info-box__icon {
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 1px;
}
.fiscaris-info-box__title {
    font-size: 0.86rem;
    font-weight: 700;
    margin-bottom: 2px;
}
.fiscaris-info-box__text {
    font-size: 0.81rem;
    line-height: 1.55;
    color: var(--text-muted);
}

.tn-tooltip-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 5px;
    vertical-align: middle;
}
.tn-tooltip-btn {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 1px solid var(--input-border);
    background: var(--card-bg);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}
.tn-tooltip-btn:hover,
.tn-tooltip-btn:focus-visible {
    border-color: var(--primary);
    color: var(--primary);
}
.tn-tooltip-popover {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: 260px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #0f172a;
    color: #f8fafc;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.45;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.22);
    z-index: 9000;
    pointer-events: none;
}
.tn-tooltip-wrap:hover .tn-tooltip-popover,
.tn-tooltip-wrap:focus-within .tn-tooltip-popover,
.tn-tooltip-wrap.is-open .tn-tooltip-popover {
    display: block;
}

/* Shared Form Input Box (.fiscaris-input-box analog thun-notar.ch) */
.fiscaris-field-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.fiscaris-field-label-row {
    display: flex;
    align-items: center;
}
.fiscaris-field-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
}
.fiscaris-input-box {
    display: flex;
    align-items: center;
    border: 1px solid var(--input-border);
    border-radius: var(--radius-input);
    background: var(--input-bg);
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.fiscaris-input-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.14);
}
.fiscaris-input-affix {
    padding: 0 11px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--rest-box-bg);
    align-self: stretch;
    display: inline-flex;
    align-items: center;
    border-right: 1px solid var(--border-subtle);
}
.fiscaris-input-suffix {
    border-right: none;
    border-left: 1px solid var(--border-subtle);
}
.fiscaris-input-control {
    flex: 1;
    border: none;
    background: transparent;
    padding: 9px 12px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
    font-family: inherit;
    font-variant-numeric: tabular-nums;
    outline: none;
    min-width: 0;
}

@media (min-width: 769px) {
    .show-mobile-inline {
        display: none !important;
    }
}
@media (max-width: 960px) {
    .tn-pill-nav.hide-mobile {
        display: none !important;
    }
    .fiscaris-pillar-grid {
        grid-template-columns: 1fr;
    }
    .fiscaris-package-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 768px) {
    .tn-nav-pill.hide-mobile,
    .tn-nav-pill .hide-mobile {
        display: none !important;
    }
    .show-mobile-inline {
        display: inline !important;
    }
    .tn-nav-pill {
        padding: 6px 12px;
        font-size: 0.78rem;
    }
}

.fiscaris-subpage-hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 20px 2px;
    box-sizing: border-box;
}
.fiscaris-subpage-title {
    font-size: clamp(1.35rem, 2.4vw, 1.85rem);
    font-weight: 800;
    letter-spacing: -0.028em;
    color: var(--text-main);
    line-height: 1.22;
    margin: 0;
}
