/**
 * 🚀 FINAL MODERN BANKING DESIGN
 * Collapsible Black Matte Sidebar + Complete System Design
 * Space-Saving Icon-Only Sidebar with Full Functionality
 */

/* ========================================
   MODERN BANKING FOUNDATION
======================================== */

:root {
    /* 🎨 FINAL MODERN COLORS - WHITE BACKGROUNDS */
    --bg-primary: #ffffff;           /* Pure White Background */
    --bg-card: #ffffff;              /* Pure White Card Background */
    --bg-sidebar: #000000;           /* Pure Black Sidebar */
    --bg-sidebar-hover: #333333;     /* Sidebar Hover */
    --bg-accent: #000000;            /* Pure Black Accent instead of Blue */
    
    /* 💳 CARD & STATUS COLORS */
    --card-dark: #000000;            /* Dark Card - Pure Black */
    --success: #10b981;              /* Success Green */
    --warning: #f59e0b;              /* Warning Orange */
    --error: #ef4444;                /* Error Red */
    --info: #000000;                 /* Info Pure Black instead of Blue */
    
    /* 🔤 TYPOGRAPHY */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'SF Mono', 'Monaco', 'Consolas', monospace;
    
    /* 📝 TEXT COLORS - IMPROVED READABILITY */
    --text-primary: #1a1a1a;         /* Dark Black for Primary Text */
    --text-secondary: #525252;       /* Medium Gray for Secondary Text */
    --text-muted: #737373;           /* Light Gray for Muted Text */
    --text-white: #ffffff;           /* White Text for Dark Backgrounds */
    
    /* 📏 SPACING */
    --space-1: 0.25rem;    /* 4px */
    --space-2: 0.5rem;     /* 8px */
    --space-3: 0.75rem;    /* 12px */
    --space-4: 1rem;       /* 16px */
    --space-5: 1.25rem;    /* 20px */
    --space-6: 1.5rem;     /* 24px */
    --space-8: 2rem;       /* 32px */
    --space-10: 2.5rem;    /* 40px */
    --space-12: 3rem;      /* 48px */
    
    /* ✨ EFFECTS */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* ========================================
   ACCOUNTS PAGE SPECIFIC STYLES
======================================== */

.account-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.account-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.account-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.account-name {
    font-size: 18px;
    font-weight: 500;
    color: #666;
    margin: 0;
}

.account-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background-color: #e8f5e9;
    color: #4CAF50;
}

.account-type {
    display: inline-block;
    background: #f5f5f5;
    color: #666;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    margin-top: 8px;
}

.account-type.shared {
    background: #e0f2fe;
    color: #0277bd;
}

.account-content {
    /* Content styling handled by individual elements */
}

.balance {
    font-size: 32px;
    font-weight: bold;
    margin: 10px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.balance.positive {
    color: #4CAF50;
}

.balance.negative {
    color: #f44336;
}

.account-info {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.account-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.btn-transfer {
    background: #4CAF50;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.btn-transfer:hover {
    background: #45a049;
    color: white;
    transform: translateY(-1px);
    text-decoration: none;
}

.btn-transfer.success {
    background: #4CAF50;
}

.btn-transfer.success:hover {
    background: #45a049;
}

.btn-transfer.secondary {
    background: transparent;
    color: #4CAF50;
    border: 1px solid #4CAF50;
}

.btn-transfer.secondary:hover {
    background: #4CAF50;
    color: white;
}

.btn-history {
    background: #f5f5f5;
    color: #666;
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.btn-history:hover {
    background: #e0e0e0;
    color: #333;
    transform: translateY(-1px);
    text-decoration: none;
}

.transfer-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.button-group {
    display: flex;
    gap: 15px;
}

.transfer-history {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.transfer-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
}

.transfer-item:last-child {
    border-bottom: none;
}

.transfer-info {
    flex: 1;
}

.transfer-amount {
    font-weight: 600;
    font-size: 18px;
    font-family: monospace;
}

.transfer-amount.positive {
    color: #4CAF50;
}

.transfer-amount.negative {
    color: #f44336;
}

.transfer-details {
    color: #666;
    font-size: 14px;
    margin-top: 4px;
}

.original-source {
    color: #2196f3;
    font-style: italic;
    font-size: 12px;
    margin-top: 4px;
}

.accounts-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.section-header {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
}

.accounts-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

/* Missing CSS variables - move to root */
:root {
    /* Additional variables that were misplaced */
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* 🔄 ANIMATIONS */
    --transition: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* 📱 CROSS-BROWSER COMPATIBILITY */
    --backdrop-filter: blur(10px);
    --webkit-backdrop-filter: blur(10px);
    
    /* 📱 BORDER RADIUS */
    --radius-sm: 0.375rem;   /* 6px */
    --radius-md: 0.75rem;    /* 12px */
    --radius-lg: 1rem;       /* 16px */
    --radius-xl: 1.5rem;     /* 24px */
    --radius-2xl: 2rem;      /* 32px */
    
    /* 📐 SIDEBAR DIMENSIONS */
    --sidebar-width-collapsed: 80px;
    --sidebar-width-expanded: 280px;
}

/* ========================================
   GLOBAL RESET & BASE
======================================== */

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

/* 📱 CROSS-BROWSER OPTIMIZATIONS */
@supports not (display: grid) {
    .cards-grid {
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-4);
    }
    .cards-grid > * {
        flex: 1 1 300px;
    }
}

/* Safari specific fixes */
@media not all and (min-resolution: 0.001dpcm) {
    @supports (-webkit-appearance: none) {
        .sidebar {
            -webkit-transform: translateZ(0);
            transform: translateZ(0);
        }
    }
}

/* 🚨 NUCLEAR CSS - ERZWINGT ALLE FARBEN */
.sidebar,
.sidebar * {
    color: #ffffff !important;
    background-color: #000000 !important;
}

.user-avatar {
    color: #ffffff !important;
    background-color: #000000 !important;
}

.card-brand {
    color: #ffffff !important;
}

/* FILTER SEKTION - SCHWARZER HINTERGRUND MIT WEISSEM TEXT */
.filter-section {
    background-color: #000000 !important;
    color: #ffffff !important;
    border: 1px solid #333333 !important;
}

.filter-section *,
.filter-section label,
.filter-section h3,
.filter-section span,
.filter-section div {
    color: #ffffff !important;
}

.filter-section select,
.filter-section input {
    background-color: #000000 !important;
    color: #ffffff !important;
    border: 1px solid #666666 !important;
}

.filter-section select option {
    background-color: #000000 !important;
    color: #ffffff !important;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    background: #ffffff !important;
}

body {
    font-family: var(--font-main);
    background: #ffffff !important;
    color: var(--text-primary);
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* 🚨 EMERGENCY CSS - DIREKT NACH BODY */
.sidebar { background: #000000 !important; color: #ffffff !important; }
.sidebar * { color: #ffffff !important; }
/* Entfernt - wird durch neue Filter-Styles ersetzt */
.user-avatar { background: #000000 !important; color: #ffffff !important; }
.card-brand { color: #ffffff !important; }

/* ========================================
   COLLAPSIBLE SIDEBAR SYSTEM
======================================== */

.app-container {
    display: flex;
    min-height: 100vh;
    background: #ffffff !important;
}

.sidebar {
    width: var(--sidebar-width-collapsed);
    background: #000000 !important;
    color: #ffffff !important;
    position: fixed;
    height: 100vh;
    overflow: visible;
    transition: width var(--transition-slow);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.sidebar * {
    color: #ffffff !important;
}

.sidebar.expanded {
    width: var(--sidebar-width-expanded);
}

.sidebar-header {
    padding: var(--space-6) var(--space-4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-height: 80px;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: #ffffff !important;
    cursor: pointer;
    padding: var(--space-2);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle:hover {
    background: var(--bg-sidebar-hover);
}

.sidebar-toggle svg {
    width: 20px;
    height: 20px;
}

.sidebar-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff !important;
    text-decoration: none;
    opacity: 0;
    transform: translateX(-20px);
    transition: all var(--transition-slow);
    white-space: nowrap;
}

/* FINANCECORE LOGO IM SIDEBAR - WEISS */
.sidebar-logo,
.sidebar a {
    color: #ffffff !important;
}

.sidebar.expanded .sidebar-logo {
    opacity: 1;
    transform: translateX(0);
}

.sidebar-nav {
    flex: 1;
    padding: var(--space-4) 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 0;
    transition: all var(--transition);
    font-weight: 500;
    position: relative;
    margin: 0 var(--space-2);
    border-radius: var(--radius-md);
}

.nav-item * {
    color: #ffffff !important;
}

.nav-item:hover {
    background: #333333;
    color: #ffffff !important;
}

.nav-item:hover * {
    color: #ffffff !important;
}

/* ACTIVE PAGE STYLING - Enhanced */
.nav-item.active,
.nav-item[aria-current="page"] {
    background: rgba(34, 197, 94, 0.15) !important;
    color: #22c55e !important;
    border-left: 3px solid #22c55e !important;
}

.nav-item.active *,
.nav-item[aria-current="page"] * {
    color: #22c55e !important;
}

.nav-item.active .nav-item-text,
.nav-item[aria-current="page"] .nav-item-text,
.nav-item.active svg,
.nav-item[aria-current="page"] svg {
    color: #22c55e !important;
}

.nav-item.active::before,
.nav-item[aria-current="page"]::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: #22c55e !important;
    transform: scaleY(1) !important;
    transition: transform 0.2s ease-in-out;
}

.nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-item-text {
    opacity: 0;
    transform: translateX(-20px);
    transition: all var(--transition-slow);
    white-space: nowrap;
}

.sidebar.expanded .nav-item-text {
    opacity: 1;
    transform: translateX(0);
}

.nav-tooltip {
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: #1f2937 !important;
    color: #ffffff !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: all 0.2s ease !important;
    z-index: 1001 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

.nav-tooltip::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 50%;
    transform: translateY(-50%);
    border: 4px solid transparent;
    border-right-color: #1f2937;
}

/* TOOLTIPS - Nur bei eingeklappter Sidebar anzeigen */
/* Zunächst alle Tooltips verstecken */
.nav-tooltip {
    opacity: 0 !important;
    visibility: hidden !important;
    display: none !important;
    pointer-events: none !important;
}

/* Bei eingeklappter Sidebar (kein expanded class) Tooltips beim Hover zeigen */
.sidebar:not(.expanded) .nav-item:hover .nav-tooltip {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    z-index: 10000 !important;
    pointer-events: none !important;
}

/* Bei aufgeklappter Sidebar (expanded class) Tooltips IMMER verstecken */
.sidebar.expanded .nav-tooltip,
.sidebar.expanded .nav-item:hover .nav-tooltip {
    opacity: 0 !important;
    visibility: hidden !important;
    display: none !important;
    pointer-events: none !important;
}

/* ========================================
   MAIN CONTENT AREA
======================================== */

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width-collapsed);
    transition: margin-left var(--transition-slow);
    min-height: 100vh;
    background: #ffffff !important;
}

.sidebar.expanded + .main-content {
    margin-left: var(--sidebar-width-expanded);
}

.content-wrapper {
    padding: var(--space-8);
    max-width: 1400px;
    margin: 0 auto;
    background: #ffffff !important;
}

/* ========================================
   MODERN HEADER
======================================== */

.header-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-8);
    background: #ffffff;
    padding: var(--space-6);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 2px solid rgba(26, 26, 26, 0.1);
}

.header-greeting {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.user-avatar {
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    background: #000000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 1.1rem !important;
    text-align: center !important;
}

/* ULTRA-AGGRESSIVE REGEL - ALLE TEXT-ELEMENTE IM AVATAR SIND WEISS */
.user-avatar, 
.user-avatar *,
.user-avatar::before,
.user-avatar::after {
    color: #ffffff !important;
    background: #000000 !important;
}

/* NOCHMAL EXPLIZIT FÜR AVATAR-TEXT */
.header-greeting .user-avatar {
    color: #ffffff !important;
    background: #000000 !important;
}

.header-greeting .user-avatar * {
    color: #ffffff !important;
}

.greeting-text h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a !important;
    margin-bottom: var(--space-1);
}

.greeting-text p {
    color: #525252 !important;
    font-size: 0.9rem;
}

/* WILLKOMMEN ZURÜCK TEXT - SCHWARZ AUF WEISSEM HINTERGRUND */
.header-greeting h1,
.header-greeting p,
.greeting-text h1,
.greeting-text p {
    color: #1a1a1a !important;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.search-bar {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 2px solid rgba(26, 26, 26, 0.2);
    border-radius: var(--radius-lg);
    padding: var(--space-3) var(--space-4);
    gap: var(--space-2);
    min-width: 300px;
}

.search-bar input {
    border: none;
    outline: none;
    background: transparent;
    flex: 1;
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
}

.search-bar input::placeholder {
    color: var(--text-secondary);
    font-weight: 400;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    background: #ffffff;
    padding: var(--space-2) var(--space-4);
    border: 2px solid rgba(26, 26, 26, 0.1);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition);
}

.user-menu:hover {
    box-shadow: var(--shadow-md);
}

/* ========================================
   MODERN CARDS & COMPONENTS
======================================== */

.cards-section {
    margin-bottom: var(--space-8);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
}

.see-all {
    color: var(--bg-accent);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all var(--transition);
}

.see-all:hover {
    color: #2563eb;
}

.cards-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-6);
    margin-bottom: var(--space-8);
}

/* BALANCE CARD */
.balance-card {
    background: #ffffff;
    color: var(--text-primary);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-slow);
    border: 2px solid rgba(26, 26, 26, 0.1);
    box-shadow: var(--shadow-sm);
}

.balance-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.balance-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(26, 26, 26, 0.02);
    border-radius: 50%;
    z-index: 1;
}

.balance-content {
    position: relative;
    z-index: 2;
}

.balance-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-bottom: var(--space-2);
}

.balance-amount {
    font-size: 2.75rem;
    font-weight: 700;
    font-family: var(--font-mono);
    margin-bottom: var(--space-4);
    letter-spacing: -0.02em;
}

.card-number {
    color: rgba(255, 255, 255, 0.6);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-2);
}

.card-date {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
}

.card-brand {
    position: absolute;
    bottom: var(--space-6);
    right: var(--space-6);
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff !important;
}

/* METRIC CARDS */
.metric-card {
    background: #ffffff;
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    border: 2px solid rgba(26, 26, 26, 0.1);
    transition: all var(--transition-slow);
    box-shadow: var(--shadow-sm);
}

.metric-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.metric-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.metric-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.metric-icon.income {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.metric-icon.expense {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.metric-title {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

.metric-amount {
    font-size: 1.875rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: #1e293b;
    margin-bottom: var(--space-2);
    letter-spacing: -0.02em;
}

.metric-change {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: 0.8rem;
    font-weight: 500;
}

.metric-change.positive {
    color: var(--success);
}

.metric-change.negative {
    color: var(--error);
}

/* ========================================
   MODERN FORMS & INPUTS
======================================== */

.form-container {
    background: #ffffff;
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    border: 2px solid rgba(26, 26, 26, 0.1);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-8);
}

.form-header {
    margin-bottom: var(--space-8);
}

.form-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: var(--space-2);
}

.form-subtitle {
    color: #64748b;
    font-size: 0.9rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
    margin-bottom: var(--space-6);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.form-group.full-width {
    grid-column: span 2;
}

.form-label {
    font-weight: 500;
    color: #374151;
    font-size: 0.9rem;
}

.form-input,
.form-select,
.form-textarea {
    padding: var(--space-3) var(--space-4);
    border: 1px solid #d1d5db;
    border-radius: var(--radius-lg);
    background: white;
    color: #1e293b;
    font-family: var(--font-main);
    font-size: 0.9rem;
    transition: all var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--bg-accent);
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* ========================================
   MODERN BUTTONS
======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-lg);
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font-main);
    font-size: 0.9rem;
    min-height: 44px;
}

.btn-primary {
    background: var(--bg-accent);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 2px solid rgba(26, 26, 26, 0.2);
    font-weight: 600;
}

.btn-secondary:hover {
    background: rgba(26, 26, 26, 0.02);
    box-shadow: var(--shadow-md);
    border-color: rgba(26, 26, 26, 0.3);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--error);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: 0.8rem;
    min-height: 36px;
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: 1rem;
    min-height: 52px;
}

/* ========================================
   MODERN TABLES
======================================== */

.table-container {
    background: #ffffff;
    border-radius: var(--radius-xl);
    border: 2px solid rgba(26, 26, 26, 0.1);
    overflow: hidden;
    margin-bottom: var(--space-8);
    box-shadow: var(--shadow-sm);
}

.table-header {
    padding: var(--space-6);
    border-bottom: 2px solid rgba(26, 26, 26, 0.1);
}

.table-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: var(--space-1);
}

.table-subtitle {
    color: #64748b;
    font-size: 0.9rem;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead th {
    background: #ffffff;
    color: var(--text-primary);
    font-weight: 700;
    padding: var(--space-4) var(--space-6);
    text-align: left;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid rgba(26, 26, 26, 0.1);
}

.table tbody td {
    padding: var(--space-4) var(--space-6);
    border-bottom: 1px solid rgba(26, 26, 26, 0.1);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
}

.table tbody tr:hover {
    background: rgba(26, 26, 26, 0.02);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* ========================================
   STATUS BADGES & INDICATORS
======================================== */

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.status-badge.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.status-badge.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.status-badge.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.status-badge.info {
    background: rgba(26, 26, 26, 0.05);
    color: var(--info);
    border: 1px solid rgba(26, 26, 26, 0.1);
}

/* ========================================
   FILTER SECTION
======================================== */

/* ÜBERGEORDNETE FILTER-SECTION REGELN - SCHWARZES DESIGN */
.filter-section {
    background: #000000 !important;
    border-radius: 16px;
    padding: var(--space-6);
    margin-bottom: var(--space-6);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid #333333 !important;
    color: #ffffff !important;
}

/* ALLE FILTER-TEXTE WEISS AUF SCHWARZEM HINTERGRUND */
.filter-section h3,
.filter-section label,
.filter-section .filter-title,
.filter-section span,
.filter-section div:not(select):not(input),
.filter-section * {
    color: #ffffff !important;
    background: transparent !important;
}

/* SPEZIFISCHE FILTER-LABELS - WEISS */
.filter-group label {
    color: #ffffff !important;
    font-weight: 600 !important;
}

/* Dropdowns sind schwarz mit weissem Text */
.filter-section select,
.filter-section input {
    background: #000000 !important;
    color: #ffffff !important;
    border: 1px solid #666666 !important;
}

.filter-section select option {
    background: #000000 !important;
    color: #ffffff !important;
}

/* Buttons in Filter-Section */
.filter-section .btn {
    background: #333333 !important;
    color: #ffffff !important;
    border: 1px solid #666666 !important;
}

.filter-section .btn:hover {
    background: #666666 !important;
}

.filter-form {
    width: 100%;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    align-items: end;
}

.filter-group {
    flex: 1;
    min-width: 160px;
}

.filter-group label {
    display: block;
    margin-bottom: var(--space-2);
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff !important;
}

.filter-group select,
.filter-group input[type="date"] {
    width: 100%;
    padding: var(--space-3);
    border: 2px solid #666666;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    background: #ffffff !important;
    color: #000000 !important;
    transition: var(--transition);
}

.filter-group select option {
    background: #ffffff !important;
    color: #000000 !important;
}

.filter-group select:focus,
.filter-group input[type="date"]:focus {
    outline: none;
    border-color: #4a4a4a;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

/* ========================================
   CHARTS SECTION
======================================== */

.charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-6);
    margin-bottom: var(--space-8);
}

.chart-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    border: 2px solid rgba(26, 26, 26, 0.1);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-5);
}

.chart-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.chart-legend {
    display: flex;
    gap: var(--space-4);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.chart-container {
    position: relative;
    height: 300px;
    background: #ffffff !important;
}

.chart-container canvas {
    background: #ffffff !important;
}

/* Force all chart backgrounds to be white */
canvas {
    background: #ffffff !important;
}

/* Override Chart.js defaults */
.chartjs-tooltip {
    background: var(--text-primary) !important;
    color: white !important;
}

/* Force all elements to have white backgrounds if they appear dark */
.chart-card > div:not(.chart-header),
.categories-grid > div,
.summary-grid > div,
.action-buttons > div {
    background: #ffffff !important;
}

/* Ensure all card-like elements are white */
[class*="card"]:not(.balance-card) {
    background: #ffffff !important;
    color: var(--text-primary) !important;
}

/* Force white backgrounds for all major sections */
.charts-grid, .charts-grid > *,
.categories-grid, .categories-grid > *,
.summary-grid, .summary-grid > *,
.action-buttons, .action-buttons > * {
    background: #ffffff !important;
}

/* Override any dark backgrounds */
div[style*="background: #"] {
    background: #ffffff !important;
}

/* REMOVED: This was overriding proper button styles */

/* Force all container-like elements to be white */
.section-header + div,
[class*="container"]:not(.app-container),
[class*="wrapper"]:not(.content-wrapper) {
    background: #ffffff !important;
}

/* REMOVED: Nuclear option was breaking text readability */

/* ========================================
   TEXT READABILITY SYSTEM
======================================== */

/* Ensure all text is readable on white backgrounds */
.main-content h1,
.main-content h2,
.main-content h3,
.main-content h4,
.main-content h5,
.main-content h6,
.main-content p,
.main-content span,
.main-content div:not([class*="btn"]),
.main-content label,
.main-content td,
.main-content th {
    color: var(--text-primary) !important;
}

/* Secondary text elements */
.section-subtitle,
.category-count,
.transaction-meta,
.metric-change {
    color: var(--text-secondary) !important;
}

/* Input and form elements */
input, select, textarea {
    color: var(--text-primary) !important;
    background: #ffffff !important;
}

input::placeholder {
    color: var(--text-secondary) !important;
}

/* Links */
a:not([class*="btn"]) {
    color: var(--text-primary) !important;
}

a:not([class*="btn"]):hover {
    color: var(--text-secondary) !important;
}


/* ========================================
   CATEGORIES GRID
======================================== */

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

.category-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
    border: 2px solid rgba(26, 26, 26, 0.1);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.category-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.category-icon {
    font-size: 2rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(26, 26, 26, 0.05);
    border-radius: 12px;
    flex-shrink: 0;
    border: 1px solid rgba(26, 26, 26, 0.1);
}

.category-details {
    flex: 1;
    min-width: 0;
}

.category-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
    font-size: 0.95rem;
}

.category-amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-mono);
    margin-bottom: var(--space-2);
}

.category-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-2);
    font-size: 0.875rem;
}

.category-percentage {
    font-weight: 600;
    color: var(--text-primary);
}

.category-count {
    color: var(--text-secondary);
}

.category-progress {
    height: 6px;
    background: rgba(26, 26, 26, 0.1);
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid rgba(26, 26, 26, 0.05);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--text-primary), var(--success));
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* ========================================
   SUMMARY GRID
======================================== */

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

.summary-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
    border: 2px solid rgba(26, 26, 26, 0.1);
    display: flex;
    align-items: center;
    gap: var(--space-4);
    transition: var(--transition);
}

.summary-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.summary-icon {
    font-size: 2rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(26, 26, 26, 0.05);
    border-radius: 12px;
    flex-shrink: 0;
    border: 1px solid rgba(26, 26, 26, 0.1);
}

.summary-content {
    flex: 1;
    min-width: 0;
}

.summary-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.summary-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.summary-value.positive {
    color: var(--success);
}

.summary-value.negative {
    color: var(--error);
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */

@media (max-width: 1024px) {
    /* Responsive layout adjustments */
    .charts-grid,
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        min-width: unset;
    }
    
    .summary-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .sidebar {
        transform: translateX(calc(-1 * var(--sidebar-width-collapsed)));
        transition: transform var(--transition-slow);
    }
    
    .sidebar.expanded {
        transform: translateX(0);
        width: var(--sidebar-width-expanded);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .sidebar.expanded + .main-content {
        margin-left: 0;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* Mobile responsive adjustments */
    .filter-section {
        padding: var(--space-4);
        margin-bottom: var(--space-4);
    }
    
    .charts-grid,
    .categories-grid,
    .summary-grid {
        gap: var(--space-3);
    }
    
    .chart-card,
    .category-card,
    .summary-card {
        padding: var(--space-4);
    }
    
    .chart-container {
        height: 250px;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    .category-card,
    .summary-card {
        flex-direction: row;
    }
    
    .category-icon,
    .summary-icon {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .content-wrapper {
        padding: var(--space-4);
    }
    
    .header-modern {
        flex-direction: column;
        gap: var(--space-4);
        align-items: stretch;
    }
    
    .search-bar {
        min-width: auto;
        width: 100%;
    }
    
    .balance-amount {
        font-size: 2.25rem;
    }
    
    .metric-amount {
        font-size: 1.5rem;
    }
}

/* ========================================
   NEUE CSS-KLASSEN FÜR INLINE-STYLE ELIMINIERUNG
======================================== */

/* Grid-Layouts */
.form-grid-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.form-grid-three {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.form-grid-mixed {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

/* Container */
.card-container {
    background: white;
    border-radius: 12px;
    border: 1px solid #dee2e6;
    max-width: 1200px;
    margin: 0 auto;
}

.card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid #dee2e6;
}

.info-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.content-padding {
    padding: 30px;
}

/* Typography */
.label-text {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    display: block;
    margin-bottom: 8px;
}

.help-text {
    color: #6c757d;
    font-size: 14px;
    margin: 5px 0 0 0;
}

.stat-number {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

/* Spacing Utilities */
.mb-25 { margin-bottom: 25px; }
.mb-20 { margin-bottom: 20px; }
.mb-15 { margin-bottom: 15px; }
.mb-10 { margin-bottom: 10px; }
.mb-5 { margin-bottom: 5px; }

.p-30 { padding: 30px; }
.p-20 { padding: 20px; }
.p-15 { padding: 15px; }
.p-10 { padding: 10px; }

.gap-20 { gap: 20px; }
.gap-15 { gap: 15px; }
.gap-10 { gap: 10px; }

/* Button Standardisierung */
.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn {
    padding: 12px 20px;
    font-size: 14px;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-warning {
    background: #f59e0b;
    color: white;
    border: 2px solid #f59e0b;
}

.btn-warning:hover {
    background: #d97706;
    border-color: #d97706;
    transform: translateY(-1px);
}

/* Action Button Container */
.action-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Grid Helper Classes */
.stats-grid-three {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

.filter-grid-four {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* Form Elements */
.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: white;
}

.form-select {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: white;
}

.form-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    resize: vertical;
}

/* Status Badges */
.status-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.status-active {
    background: #dcfce7;
    color: #16a34a;
}

.status-inactive {
    background: #fef3c7;
    color: #d97706;
}

/* Warning Boxes */
.warning-box {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 25px;
}

.warning-title {
    margin: 0 0 10px 0;
    color: #856404;
    font-size: 14px;
}

.warning-list {
    margin: 0;
    padding-left: 20px;
    color: #856404;
    font-size: 13px;
}

.warning-list li {
    margin-bottom: 6px;
}

.warning-list li:last-child {
    margin-bottom: 0;
}

@media (max-width: 1024px) {
    .transaction-layout-grid {
        grid-template-columns: 40% 60%;
    }
}

@media (max-width: 768px) {
    .form-grid-two,
    .form-grid-three {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-container {
        padding: var(--space-6);
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    /* Transaction layout responsive adjustments */
    .transaction-layout-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .right-column {
        max-height: none;
        overflow-y: visible;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 100vw;
        transform: translateX(-100%);
    }
    
    .sidebar.expanded {
        transform: translateX(0);
        width: 100vw;
    }
}

/* ========================================
   UTILITY CLASSES
======================================== */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.font-mono { font-family: var(--font-mono); }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-warning { color: var(--warning); }
.text-info { color: var(--info); }
.text-muted { color: #64748b; }

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

.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-15 { margin-bottom: 15px; }

.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

.p-2 { padding: var(--space-2); }
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }

.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

.w-full { width: 100%; }
.h-full { height: 100%; }

.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }

/* Layout Classes for Add Transaction Page */
.transaction-layout-grid {
    display: grid;
    grid-template-columns: 35% 65%;
    gap: 20px;
    align-items: start;
}

.left-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.right-column {
    max-height: 80vh;
    overflow-y: auto;
}

.button-group-vertical {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Upload Area Styling */
.upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    background: #f9f9f9;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: #4CAF50;
    background: #f0f8f0;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.upload-main-text {
    margin: 10px 0;
}

.upload-help-text {
    margin: 10px 0;
    color: #666;
}

.upload-filename {
    margin-top: 10px;
    font-weight: bold;
    color: #4CAF50;
}

/* Additional utility classes */
.mr-2 { margin-right: var(--space-2); }
.cursor-pointer { cursor: pointer; }
.flex-1 { flex: 1; }

/* Form-specific classes */
.currency-select {
    min-width: 70px;
}

.description-textarea {
    min-height: 100px;
}

/* ========================================
   DARK MODE SUPPORT (Optional)
======================================== */

@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #0f172a;
        --bg-card: #1e293b;
        --bg-sidebar: #0a0a0a;
    }
    
    body {
        color: #e2e8f0;
    }
}