* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-dark: #1a1d2e;
    --primary-accent: #4f46e5;
    --primary-accent-hover: #6366f1;
    --secondary-accent: #3b82f6;
    --bg-primary: #0f1117;
    --bg-secondary: #1a1d2e;
    --bg-tertiary: #242836;
    --bg-card: #1e2230;
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --text-muted: #718096;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-green: #10b981;
    --accent-orange: #f59e0b;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --transition-normal: 0.3s ease;
}

[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

.desktop-warning {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.warning-content {
    text-align: center;
    max-width: 400px;
}

.warning-icon {
    width: 80px;
    height: 80px;
    color: var(--accent-orange);
    margin: 0 auto 2rem;
}

.warning-content h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.warning-content p {
    color: var(--text-secondary);
}

@media (min-width: 768px) {
    .desktop-warning {
        display: flex;
    }

    .mobile-app {
        display: none;
    }
}

.mobile-app {
    min-height: 100vh;
    padding-bottom: 80px;
}

.app-header {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--primary-dark) 100%);
    padding: 1.5rem 1.25rem;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

[data-theme="light"] .app-header {
    background: linear-gradient(135deg, var(--primary-accent) 0%, var(--secondary-accent) 100%);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-icon {
    width: 32px;
    height: 32px;
    color: var(--primary-accent);
}

[data-theme="light"] .brand-icon {
    color: white;
}

.brand h1 {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-accent) 0%, var(--secondary-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="light"] .brand h1 {
    background: white;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

[data-theme="light"] .theme-toggle {
    background: rgba(255, 255, 255, 0.2);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    color: var(--text-primary);
}

[data-theme="light"] .theme-toggle svg {
    color: white;
}

.welcome-message p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

[data-theme="light"] .welcome-message p {
    color: rgba(255, 255, 255, 0.9);
}

.user-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

[data-theme="light"] .user-name {
    color: white;
}

.app-content {
    padding: 1.5rem 1.25rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-tertiary) 100%);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

[data-theme="light"] .stat-card {
    background: var(--bg-card);
    border: 1px solid #e2e8f0;
}

.stat-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: linear-gradient(135deg, var(--accent-green) 0%, #059669 100%);
    color: white;
    font-size: 0.5rem;
    font-weight: 600;
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
    z-index: 10;
}

.stat-icon {
    width: 40px;
    height: 40px;
    background: rgba(79, 70, 229, 0.15);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.stat-icon svg {
    width: 20px;
    height: 20px;
    color: var(--primary-accent);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.menu-section {
    margin-bottom: 2.5rem;
}

.section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    padding-left: 0.5rem;
}

.menu-grid {
    display: grid;
    gap: 0.75rem;
}

.menu-button {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-tertiary) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

[data-theme="light"] .menu-button {
    background: var(--bg-card);
    border: 1px solid #e2e8f0;
}

.menu-button:active {
    transform: translateX(4px);
}

.menu-icon {
    width: 48px;
    height: 48px;
    background: rgba(79, 70, 229, 0.15);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.menu-icon svg {
    width: 24px;
    height: 24px;
    color: var(--primary-accent);
}

.menu-text {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.menu-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
}

.menu-badge {
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-purple) 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    border-radius: 12px;
}

.menu-arrow {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Fatura Oluştur ve Tahsilat - Mor Buton */
.create-invoice {
    background: linear-gradient(135deg, var(--primary-accent) 0%, var(--secondary-accent) 100%);
    border: none;
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.3);
}

.create-invoice .menu-icon {
    background: rgba(255, 255, 255, 0.2);
}

.create-invoice .menu-icon svg {
    color: white;
}

.create-invoice .menu-title {
    color: white;
    font-weight: 600;
}

.create-invoice .menu-arrow {
    color: rgba(255, 255, 255, 0.8);
}

[data-theme="light"] .create-invoice {
    background: linear-gradient(135deg, var(--primary-accent) 0%, var(--secondary-accent) 100%);
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.25);
}

[data-theme="light"] .create-invoice .menu-icon {
    background: rgba(255, 255, 255, 0.25);
}

[data-theme="light"] .create-invoice .menu-icon svg {
    color: white;
}

[data-theme="light"] .create-invoice .menu-title {
    color: white;
}

[data-theme="light"] .create-invoice .menu-arrow {
    color: rgba(255, 255, 255, 0.8);
}

/* Ödeme Al - Yeşil Buton */
.payment-button {
    background: linear-gradient(135deg, var(--accent-green) 0%, #059669 100%);
    border: none;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.payment-button .menu-icon {
    background: rgba(255, 255, 255, 0.2);
}

.payment-button .menu-icon svg {
    color: white;
}

.payment-button .menu-title {
    color: white;
    font-weight: 600;
}

.payment-button .menu-arrow {
    color: rgba(255, 255, 255, 0.8);
}

.payment-button:active {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

[data-theme="light"] .payment-button {
    background: linear-gradient(135deg, var(--accent-green) 0%, #059669 100%);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.25);
}

[data-theme="light"] .payment-button .menu-icon {
    background: rgba(255, 255, 255, 0.25);
}

[data-theme="light"] .payment-button .menu-icon svg {
    color: white;
}

[data-theme="light"] .payment-button .menu-title {
    color: white;
}

[data-theme="light"] .payment-button .menu-arrow {
    color: rgba(255, 255, 255, 0.8);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    padding: 0.5rem 0.5rem 0.75rem;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

[data-theme="light"] .bottom-nav {
    background: var(--bg-card);
    border-top: 1px solid #e2e8f0;
}

.nav-item {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-md);
    min-width: 50px;
}

.nav-item svg {
    width: 22px;
    height: 22px;
    color: var(--text-muted);
}

.nav-item span {
    font-size: 0.6rem;
    color: var(--text-muted);
    font-weight: 500;
}

.nav-item.active {
    background: rgba(79, 70, 229, 0.15);
}

.nav-item.active svg,
.nav-item.active span {
    color: var(--primary-accent);
}

/* Center Home Button - Special Style */
.nav-item.home-center {
    position: relative;
    margin-top: -25px;
    background: linear-gradient(135deg, var(--primary-accent) 0%, var(--secondary-accent) 100%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
    border: 3px solid var(--bg-secondary);
}

[data-theme="light"] .nav-item.home-center {
    border-color: var(--bg-card);
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.nav-item.home-center svg {
    width: 26px;
    height: 26px;
    color: white;
}

.nav-item.home-center span {
    display: none;
}

.nav-item.home-center:active {
    transform: scale(0.95);
}

.nav-item.home-center.active {
    background: linear-gradient(135deg, var(--primary-accent) 0%, var(--secondary-accent) 100%);
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.5);
}

.nav-item.home-center.active svg {
    color: white;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .bottom-nav {
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    }

    .mobile-app {
        padding-bottom: calc(80px + env(safe-area-inset-bottom));
    }
}

@media (max-width: 360px) {
    .app-header {
        padding: 1.25rem 1rem;
    }

    .app-content {
        padding: 1.25rem 1rem;
    }

    .brand h1 {
        font-size: 1.125rem;
    }

    .menu-button {
        padding: 1rem;
    }

    .menu-icon {
        width: 44px;
        height: 44px;
    }
}