/**
 * KeepItGreen - Design System
 * Modernes, konsistentes Design-System basierend auf modernen Dashboard-Vorlagen
 */

:root {
    /* Farbpalette - Modern & Vibrant */
    --primary: #34C759;
    --primary-dark: #28A745;
    --primary-light: #E8F5E9;
    --primary-gradient: linear-gradient(135deg, #34C759 0%, #28A745 100%);
    
    --secondary: #007AFF;
    --secondary-light: #E3F2FD;
    --secondary-gradient: linear-gradient(135deg, #007AFF 0%, #0051D5 100%);
    
    --accent-pink: #FF6B9D;
    --accent-orange: #FF9500;
    --accent-purple: #8B5CF6;
    --accent-teal: #5AC8FA;
    
    --gradient-pink-orange: linear-gradient(135deg, #FF6B9D 0%, #FF9500 100%);
    --gradient-purple-pink: linear-gradient(135deg, #8B5CF6 0%, #FF6B9D 100%);
    --gradient-blue-cyan: linear-gradient(135deg, #007AFF 0%, #5AC8FA 100%);
    
    /* Neutrale Farben */
    --text-primary: #1D1D1F;
    --text-secondary: #6E6E73;
    --text-tertiary: #86868B;
    --text-disabled: #C7C7CC;
    
    --bg-primary: #F5F5F7;
    --bg-secondary: #FFFFFF;
    --bg-tertiary: #FAFAFA;
    --bg-overlay: rgba(0, 0, 0, 0.4);
    
    --border: #E5E5EA;
    --border-light: #F0F0F0;
    --border-dark: #D2D2D7;
    
    /* Schatten - Weich & Modern */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.06);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.16), 0 8px 16px rgba(0, 0, 0, 0.08);
    
    /* Border Radius */
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-2xl: 36px;
    --radius-full: 9999px;
    
    /* Spacing */
    --space-xs: 0.25rem;   /* 4px */
    --space-sm: 0.5rem;    /* 8px */
    --space-md: 1rem;      /* 16px */
    --space-lg: 1.5rem;    /* 24px */
    --space-xl: 2rem;      /* 32px */
    --space-2xl: 3rem;     /* 48px */
    --space-3xl: 4rem;     /* 64px */
    
    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    --font-size-xs: 0.75rem;    /* 12px */
    --font-size-sm: 0.875rem;   /* 14px */
    --font-size-base: 1rem;     /* 16px */
    --font-size-lg: 1.125rem;    /* 18px */
    --font-size-xl: 1.25rem;     /* 20px */
    --font-size-2xl: 1.5rem;     /* 24px */
    --font-size-3xl: 1.875rem;   /* 30px */
    --font-size-4xl: 2.25rem;    /* 36px */
    
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    --line-height-tight: 1.2;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Z-Index */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

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

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: var(--text-primary);
    background: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

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

p {
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
}

/* Cards - Modern & Elevated */
.card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-sm);
    border: none;
    transition: all var(--transition-base);
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

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

.card-gradient {
    background: var(--gradient-pink-orange);
    color: white;
}

.card-gradient-blue {
    background: var(--gradient-blue-cyan);
    color: white;
}

.card-gradient-purple {
    background: var(--gradient-purple-pink);
    color: white;
}

/* Buttons - Modern Style */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    line-height: 1;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    box-shadow: var(--shadow-xs);
}

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

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

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    box-shadow: var(--shadow-sm);
}

.btn-sm {
    padding: var(--space-xs) var(--space-md);
    font-size: var(--font-size-xs);
}

/* Sidebar Navigation */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-light);
    padding: var(--space-xl);
    overflow-y: auto;
    z-index: var(--z-fixed);
    box-shadow: var(--shadow-sm);
}

.sidebar-logo {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--primary);
    margin-bottom: var(--space-2xl);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.sidebar-logo:hover {
    opacity: 0.8;
}

.sidebar-logo-img {
    height: 32px;
    width: auto;
}

.sidebar-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-nav-item {
    margin-bottom: var(--space-xs);
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
    font-weight: var(--font-weight-medium);
}

.sidebar-nav-link:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.sidebar-nav-link.active {
    background: var(--primary-light);
    color: var(--primary);
}

.sidebar-nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-nav-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

.sidebar-nav-link.active .sidebar-nav-icon svg {
    color: var(--primary);
}

/* Main Content Area */
.main-content {
    margin-left: 280px;
    padding: var(--space-2xl);
    min-height: 100vh;
}

/* Header */
.page-header {
    margin-bottom: var(--space-2xl);
}

.page-title {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--space-sm);
    letter-spacing: -0.03em;
}

.page-subtitle {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    font-weight: var(--font-weight-normal);
}

/* Grid System */
.grid {
    display: grid;
    gap: var(--space-xl);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Stat Cards */
.stat-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

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

.stat-value {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    margin-bottom: var(--space-xs);
}

.stat-label {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: var(--font-weight-medium);
}

/* Mobile Header */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    z-index: var(--z-fixed);
    padding: 0 var(--space-md);
    align-items: center;
    gap: var(--space-md);
}

.mobile-logo {
    display: flex;
    align-items: center;
}

.mobile-logo img {
    width: 142px;
    height: 32px;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.mobile-menu-toggle svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

/* Responsive */
@media (max-width: 1024px) {
    .mobile-header {
        display: flex;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition-base);
        box-shadow: var(--shadow-xl);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding-left: var(--space-lg);
        padding-top: 77px; /* Platz für Mobile-Header */
    }
    
    .page-header {
        padding-left: 0;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "weather"
            "stats"
            "tasks"
            "calendar"
            "charts";
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: var(--space-md);
        padding-top: 77px;
        overflow-x: hidden;
    }
    
    .page-title {
        font-size: var(--font-size-2xl);
        line-height: 1.2;
    }
    
    .page-subtitle {
        font-size: var(--font-size-sm);
    }
    
    .card {
        padding: var(--space-lg);
        border-radius: var(--radius-md);
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

