:root {
    --sidebar-width: 260px;
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --sidebar-bg: #0f172a;
    --sidebar-hover: #1e293b;
    --body-bg: #f1f5f9;
    --card-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --cat-snackbar: #f59e0b;
    --cat-giris: #3b82f6;
    --cat-restoran: #10b981;
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--body-bg);
    color: #1e293b;
    margin: 0;
}

/* ===== LOGIN ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
}

.login-container { width: 100%; max-width: 420px; padding: 1rem; }

.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
}

.login-header { text-align: center; margin-bottom: 2rem; }

.login-logo {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.75rem; color: #fff;
}

.login-header h1 { font-size: 1.5rem; font-weight: 700; margin: 0; }
.login-header p { color: #64748b; margin: 0.25rem 0 0; font-size: 0.875rem; }

.btn-login {
    padding: 0.75rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    border: none;
}

.btn-login:hover { background: linear-gradient(135deg, var(--primary-dark), #7c3aed); }

.login-footer { text-align: center; margin-top: 1.5rem; }

/* ===== LAYOUT ===== */
.app-wrapper { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 1000;
    transition: transform 0.3s;
}

.sidebar-brand {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.brand-icon {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem; color: #fff;
}

.brand-title { font-weight: 700; color: #fff; font-size: 1rem; }
.brand-sub { font-size: 0.7rem; color: #64748b; }

.sidebar-nav { flex: 1; padding: 1rem 0.75rem; overflow-y: auto; }

.nav-section {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #475569;
    padding: 1rem 0.75rem 0.5rem;
    font-weight: 600;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 2px;
    font-size: 0.875rem;
    transition: all 0.15s;
}

.sidebar-nav .nav-link:hover { background: var(--sidebar-hover); color: #e2e8f0; }
.sidebar-nav .nav-link.active { background: rgba(99,102,241,0.15); color: #a5b4fc; font-weight: 600; }
.sidebar-nav .nav-link i { font-size: 1.1rem; width: 20px; text-align: center; }

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #94a3b8;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.topbar {
    background: #fff;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.page-heading { font-size: 1.25rem; font-weight: 700; margin: 0; flex: 1; }

.topbar-actions .btn-upload {
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    border: none;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
}

.content-area { padding: 1.5rem; }

/* ===== STAT CARDS ===== */
.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--card-shadow);
    border: 1px solid #e2e8f0;
}

.stat-icon {
    width: 52px; height: 52px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
}

.stat-primary .stat-icon { background: rgba(99,102,241,0.1); color: var(--primary); }
.stat-success .stat-icon { background: rgba(16,185,129,0.1); color: #10b981; }
.stat-info .stat-icon { background: rgba(59,130,246,0.1); color: #3b82f6; }

.stat-label { font-size: 0.8rem; color: #64748b; font-weight: 500; }
.stat-value { font-size: 1.5rem; font-weight: 700; color: #0f172a; }

.mini-stat {
    background: #fff;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    border-left: 4px solid var(--primary);
    box-shadow: var(--card-shadow);
}

.mini-stat-label { font-size: 0.75rem; color: #64748b; text-transform: uppercase; letter-spacing: 0.05em; }
.mini-stat-value { font-size: 1.35rem; font-weight: 700; margin-top: 0.25rem; }

/* ===== CATEGORY CARDS ===== */
.category-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--card-shadow);
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: var(--cat-color);
}

.category-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--cat-color) 12%, transparent);
    color: var(--cat-color);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
}

.category-info { flex: 1; }
.category-info h3 { font-size: 1rem; font-weight: 600; margin: 0; }
.category-revenue { font-size: 1.25rem; font-weight: 700; color: var(--cat-color); margin-top: 0.25rem; }
.category-meta { font-size: 0.75rem; color: #64748b; margin-top: 0.15rem; }
.category-arrow { color: #cbd5e1; font-size: 1.25rem; }

.category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: #fff;
    border-radius: 12px;
    border-left: 4px solid var(--cat-color);
    box-shadow: var(--card-shadow);
}

.category-header-icon {
    width: 52px; height: 52px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--cat-color) 12%, transparent);
    color: var(--cat-color);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
}

/* ===== BADGES ===== */
.badge-cat-snackbar { background: rgba(245,158,11,0.15) !important; color: #d97706 !important; }
.badge-cat-giris { background: rgba(59,130,246,0.15) !important; color: #2563eb !important; }
.badge-cat-restoran { background: rgba(16,185,129,0.15) !important; color: #059669 !important; }

/* ===== CARDS & TABLES ===== */
.card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 1.25rem;
    border-radius: 12px 12px 0 0 !important;
}

.card-header h5 { font-size: 0.95rem; font-weight: 600; margin: 0; }
.card-header h5 i { margin-right: 0.5rem; color: var(--primary); }

.table { font-size: 0.875rem; }
.table thead th {
    background: #f8fafc;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    border-bottom-width: 1px;
    padding: 0.75rem 1rem;
}

.table tbody td { padding: 0.75rem 1rem; vertical-align: middle; }

.filter-bar {
    background: #fff;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

/* ===== UPLOAD ZONE ===== */
.upload-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #f8fafc;
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--primary);
    background: rgba(99,102,241,0.04);
}

.upload-icon { font-size: 3rem; color: #10b981; display: block; margin-bottom: 0.75rem; }
.upload-text { font-weight: 600; margin: 0; color: #334155; }
.upload-sub { color: #64748b; font-size: 0.875rem; margin: 0.25rem 0; }
.upload-hint { font-size: 0.75rem; color: #94a3b8; }

.page-drop-zone {
    position: fixed;
    inset: 0;
    background: rgba(99,102,241,0.15);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.page-drop-zone.active { display: flex; }

.page-drop-content {
    background: #fff;
    border: 3px dashed var(--primary);
    border-radius: 20px;
    padding: 3rem 4rem;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

.page-drop-content i { font-size: 4rem; color: var(--primary); display: block; margin-bottom: 1rem; }
.page-drop-content p { font-size: 1.25rem; font-weight: 700; margin: 0; }
.page-drop-content span { color: #64748b; font-size: 0.875rem; }

.btn-delete-upload:hover {
    background: #fee2e2;
    border-color: #ef4444;
    color: #dc2626;
}

@media print {
    .sidebar, .topbar, .filter-bar, .btn-upload, .sidebar-toggle { display: none !important; }
    .main-content { margin-left: 0 !important; }
    .content-area { padding: 0 !important; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); }
    .main-content { margin-left: 0; }
}
