/* ==========================================
   GLOBAL VARIABLES - White/Light Theme
   ========================================== */
:root {
    --primary-dark: #f8f9fa;
    --secondary-dark: #ffffff;
    --tertiary-dark: #f1f3f5;
    --accent-orange: #e85d04;
    --accent-yellow: #f48c06;
    --accent-green: #2d9e6b;
    --accent-blue: #2563eb;
    --accent-cyan: #0891b2;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --border-color: #e5e7eb;
    --hover-bg: #f3f4f6;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --info: #2563eb;
    --shadow-sm: 0 1px 3px 0 rgba(0,0,0,0.07);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.12);
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--primary-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

.kategori-baslik {
    background: var(--secondary-dark);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}
.kategori-baslik h4 { color: var(--text-primary); font-weight: 600; }

/* NAVBAR */
.navbar-dark {
    background: #ffffff !important;
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 0;
    box-shadow: var(--shadow-md);
}
.navbar-brand {
    display: flex; align-items: center; gap: 0.75rem;
    font-weight: 700; color: var(--text-primary) !important;
    transition: transform var(--transition-base);
}
.navbar-brand:hover { transform: scale(1.05); }
.logo { height: 40px; filter: none; }
.nav-link { color: var(--text-secondary) !important; transition: color var(--transition-base); padding: 0.5rem 1rem; }
.nav-link:hover { color: var(--accent-orange) !important; }
.nav-icon { font-size: 1.2rem; }
.badge-notif { position: absolute; top: -8px; right: -8px; font-size: 0.65rem; padding: 3px 6px; border-radius: 50%; }
.bg-accent { background: var(--accent-orange) !important; }
.navbar-toggler-icon { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280,0,0,0.7%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important; }
.navbar-toggler { border-color: var(--border-color) !important; }

/* DROPDOWNS */
.dropdown-dark {
    background: #ffffff;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem 0;
}
.dropdown-dark .dropdown-item { color: var(--text-secondary); padding: 0.75rem 1.5rem; transition: all var(--transition-base); }
.dropdown-dark .dropdown-item:hover { background: var(--hover-bg); color: var(--accent-orange); }
.dropdown-dark .dropdown-divider { border-color: var(--border-color); }

/* BUTTON */
.btn-accent {
    background: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-yellow) 100%);
    border: none; color: #ffffff; font-weight: 600;
    transition: all var(--transition-base); position: relative; overflow: hidden;
}
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(232,93,4,0.3); color: #fff; }

/* CATEGORY DRAWER */
#categoryDrawerOverlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 1040; opacity: 0; visibility: hidden;
    transition: all 0.3s ease;
}
#categoryDrawerOverlay.show { opacity: 1; visibility: visible; }

#categoryDrawer {
    position: fixed; top: 0; left: 0;
    width: 300px; height: 100vh;
    background: #ffffff; z-index: 1050;
    box-shadow: 4px 0 24px rgba(0,0,0,0.12);
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
    display: flex; flex-direction: column; overflow: hidden;
}
#categoryDrawer.open { transform: translateX(0); }

.drawer-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-yellow) 100%);
    flex-shrink: 0;
}
.drawer-header h6 { font-weight: 700; font-size: 1rem; margin: 0; color: white; }
.drawer-close-btn {
    background: rgba(255,255,255,0.2); border: none; color: white;
    width: 32px; height: 32px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background 0.2s; font-size: 1rem;
}
.drawer-close-btn:hover { background: rgba(255,255,255,0.35); }

.drawer-body { flex: 1; overflow-y: auto; padding: 1rem 0; }
.drawer-body::-webkit-scrollbar { width: 5px; }
.drawer-body::-webkit-scrollbar-track { background: transparent; }
.drawer-body::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 5px; }

.drawer-all-item {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.9rem 1.5rem; color: var(--text-primary);
    font-weight: 600; text-decoration: none; transition: all 0.2s;
    border-left: 3px solid transparent; font-size: 0.95rem;
}
.drawer-all-item:hover, .drawer-all-item.active {
    background: #fff3ed; color: var(--accent-orange); border-left-color: var(--accent-orange);
}
.drawer-all-item i { color: var(--accent-orange); width: 18px; text-align: center; }
.drawer-divider { height: 1px; background: var(--border-color); margin: 0.5rem 0; }

.drawer-cat-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.85rem 1.5rem; cursor: pointer; transition: all 0.2s;
    border-left: 3px solid transparent; color: var(--text-primary);
    font-weight: 500; font-size: 0.9rem; text-decoration: none; user-select: none;
}
.drawer-cat-header:hover { background: #fff3ed; color: var(--accent-orange); border-left-color: var(--accent-orange); }
.drawer-cat-header.active { background: #fff3ed; color: var(--accent-orange); border-left-color: var(--accent-orange); font-weight: 600; }
.drawer-cat-header .cat-left { display: flex; align-items: center; gap: 0.75rem; flex: 1; min-width: 0; }
.drawer-cat-header .cat-left i { color: var(--accent-orange); width: 18px; text-align: center; flex-shrink: 0; }
.drawer-cat-header .cat-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-cat-header .cat-badge { font-size: 0.7rem; padding: 0.15rem 0.45rem; background: #f3f4f6; color: var(--text-muted); border-radius: 20px; margin-left: 0.5rem; flex-shrink: 0; }
.drawer-cat-header .chevron { transition: transform 0.25s; color: var(--text-muted); font-size: 0.75rem; flex-shrink: 0; }
.drawer-cat-header.expanded .chevron { transform: rotate(90deg); }

.drawer-sub-list { background: #fafafa; display: none; border-left: 2px solid var(--border-color); margin-left: 1.5rem; }
.drawer-sub-list.open { display: block; }
.drawer-sub-item {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.65rem 1rem 0.65rem 1.25rem;
    color: var(--text-secondary); font-size: 0.85rem;
    text-decoration: none; transition: all 0.2s; cursor: pointer;
}
.drawer-sub-item:hover, .drawer-sub-item.active { color: var(--accent-orange); background: #fff8f5; }
.drawer-sub-item i { font-size: 0.7rem; color: var(--accent-orange); }

.btn-category-drawer {
    background: none; border: 1px solid var(--border-color);
    color: var(--text-secondary); padding: 0.4rem 0.8rem;
    border-radius: 8px; font-size: 0.9rem;
    display: flex; align-items: center; gap: 0.5rem;
    cursor: pointer; transition: all 0.2s;
}
.btn-category-drawer:hover { border-color: var(--accent-orange); color: var(--accent-orange); background: #fff3ed; }

/* MAIN CONTENT */
.main-content { min-height: calc(100vh - 180px); padding-top: 76px; }

/* FOOTER */
.footer { background: #1e293b; border-top: 1px solid rgba(255,255,255,0.08); padding: 2.5rem 0; margin-top: 5rem; color: #94a3b8; }
.footer-brand { display: flex; align-items: center; gap: 0.75rem; font-weight: 700; font-size: 1.1rem; color: #fff; margin-bottom: 0.5rem; }
.footer-logo { height: 30px; filter: brightness(0) invert(1); }
.footer-text { font-size: 0.9rem; color: #64748b; }
.footer-links a { color: #94a3b8; text-decoration: none; transition: color var(--transition-base); }
.footer-links a:hover { color: var(--accent-orange); }
.footer-version { display: block; margin-top: 0.5rem; color: #475569; font-family: 'Fira Code', monospace; }

/* TOASTS */
.toast-container { position: fixed; top: 100px; right: 20px; z-index: 9999; }
.custom-toast {
    background: #fff; border-radius: 12px; border: 1px solid var(--border-color);
    padding: 1rem 1.5rem; margin-bottom: 1rem;
    display: flex; align-items: center; gap: 1rem;
    animation: slideInRight 0.3s ease-out; box-shadow: var(--shadow-xl); min-width: 300px;
}
.toast-success { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid var(--danger); }
.toast-warning { border-left: 4px solid var(--warning); }
.toast-info { border-left: 4px solid var(--info); }

@keyframes slideInRight {
    from { transform: translateX(400px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* UTILITIES */
.text-accent { color: var(--accent-orange); }
.bg-dark-card { background: var(--secondary-dark); border: 1px solid var(--border-color); border-radius: 12px; }
.hover-lift { transition: transform var(--transition-base); }
.hover-lift:hover { transform: translateY(-5px); }

/* SCROLLBAR */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f1f3f5; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* MODALS - white theme */
.modal-content { background: #fff; color: var(--text-primary); border: 1px solid var(--border-color); border-radius: 16px; }
.modal-header { background: #f9fafb; border-bottom: 1px solid var(--border-color); padding: 1.25rem 1.5rem; }
.modal-title { color: var(--text-primary) !important; }
.btn-close { filter: none !important; }

/* PROFILE MODAL */
.profile-card { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border-radius: 20px; overflow: hidden; }
.profile-header { background: rgba(255,255,255,0.95); padding: 2rem; text-align: center; }
.profile-avatar { position: relative; display: inline-block; margin-bottom: 1rem; }
.avatar-circle { width: 100px; height: 100px; border-radius: 50%; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); display: flex; align-items: center; justify-content: center; font-size: 3rem; color: white; }
.avatar-status { position: absolute; bottom: 5px; right: 5px; width: 20px; height: 20px; background: #10b981; border: 3px solid white; border-radius: 50%; }
.profile-name { font-size: 1.5rem; font-weight: 700; color: #1f2937; margin-bottom: 0.5rem; }
.profile-email { color: #6b7280; font-size: 0.95rem; margin-bottom: 1rem; }
.profile-badge { display: inline-block; padding: 0.4rem 1rem; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border-radius: 20px; font-size: 0.85rem; font-weight: 600; }
.balance-section { padding: 1.5rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.balance-card { background: rgba(255,255,255,0.95); border-radius: 15px; padding: 1.5rem; display: flex; align-items: center; gap: 1rem; grid-column: span 2; }
.balance-card.positive .balance-icon { background: linear-gradient(135deg, #10b981, #059669); }
.balance-card.negative .balance-icon { background: linear-gradient(135deg, #ef4444, #dc2626); }
.balance-icon { width: 60px; height: 60px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: white; }
.balance-label { display: block; font-size: 0.85rem; color: #6b7280; margin-bottom: 0.25rem; }
.balance-amount { font-size: 1.8rem; font-weight: 700; color: #1f2937; margin: 0; }
.term-card { background: rgba(255,255,255,0.95); border-radius: 15px; padding: 1.5rem; display: flex; align-items: center; gap: 1rem; grid-column: span 2; }
.term-icon { width: 50px; height: 50px; border-radius: 12px; background: linear-gradient(135deg, #f59e0b, #d97706); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; color: white; }
.term-label { display: block; font-size: 0.85rem; color: #6b7280; margin-bottom: 0.25rem; }
.term-value { font-size: 1.3rem; font-weight: 700; color: #1f2937; margin: 0; }
.details-section { background: rgba(255,255,255,0.95); padding: 2rem; border-radius: 20px 20px 0 0; }
.section-title { font-size: 1.1rem; font-weight: 600; color: #1f2937; margin-bottom: 1.5rem; padding-bottom: 0.75rem; border-bottom: 2px solid #e5e7eb; }
.details-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1.5rem; }
.detail-item { display: flex; gap: 1rem; }
.detail-item.full-width { grid-column: span 2; }
.detail-icon { width: 40px; height: 40px; border-radius: 10px; background: linear-gradient(135deg, #667eea15, #764ba215); display: flex; align-items: center; justify-content: center; color: #667eea; flex-shrink: 0; }
.detail-content { display: flex; flex-direction: column; }
.detail-label { font-size: 0.8rem; color: #9ca3af; font-weight: 500; margin-bottom: 0.25rem; }
.detail-value { font-size: 0.95rem; color: #1f2937; font-weight: 600; }
.error-state { text-align: center; padding: 3rem 2rem; color: #ef4444; }
.error-state i { font-size: 4rem; margin-bottom: 1rem; }
.error-state h5 { color: #1f2937; margin-bottom: 0.5rem; }
.error-state p { color: #6b7280; font-size: 0.95rem; }

/* RESPONSIVE */
@media (max-width: 992px) {
    .main-content { padding-top: 60px; }
}
@media (max-width: 768px) {
    .details-grid { grid-template-columns: 1fr; }
    .detail-item.full-width { grid-column: span 1; }
    .balance-section { grid-template-columns: 1fr; }
    .balance-card, .term-card { grid-column: span 1; }
}
@media (max-width: 576px) {
    .footer { text-align: center; }
    .footer-links { margin-top: 1rem; }
    .toast-container { left: 20px; right: 20px; top: 80px; }
    .custom-toast { min-width: auto; }
}
