/* Custom Modern Financial Design System */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --font-primary: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --color-primary: #4f46e5;
    --color-primary-hover: #4338ca;
    --color-income: #10b981;
    --color-income-light: #ecfdf5;
    --color-income-text: #047857;
    --color-expense: #ef4444;
    --color-expense-light: #fef2f2;
    --color-expense-text: #b91c1c;
    --color-transfer: #6366f1;
    --color-transfer-light: #eef2ff;
    --color-transfer-text: #4338ca;
    --color-warning: #f59e0b;
    --color-warning-light: #fffbeb;
    --color-bg: #f8fafc;
    --color-card: #ffffff;
    --color-text-main: #0f172a;
    --color-text-muted: #64748b;
    --sidebar-bg: #0f172a;
    --sidebar-color: #94a3b8;
    --sidebar-active-bg: rgba(255, 255, 255, 0.08);
    --sidebar-active-color: #ffffff;
    --card-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
    --card-shadow-hover: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg);
    color: var(--color-text-main);
    overflow-x: hidden;
}

/* Sidebar Styling */
.app-sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    min-height: 100vh;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1040;
}

.sidebar-brand {
    padding: 1.5rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.sidebar-nav {
    padding: 1rem 0.75rem;
}

.nav-section-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: #64748b;
    padding: 1rem 0.75rem 0.4rem;
}

.nav-link-custom {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.65rem 0.85rem;
    color: var(--sidebar-color);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-bottom: 0.2rem;
}

.nav-link-custom i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.nav-link-custom:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.05);
}

.nav-link-custom.active {
    color: var(--sidebar-active-color);
    background-color: #4f46e5;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
    font-weight: 600;
}

/* Layout Wrapper */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Top Header */
.app-header {
    height: 70px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1020;
}

/* Cards */
.card-custom {
    background: var(--color-card);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-custom:hover {
    box-shadow: var(--card-shadow-hover);
}

.card-stat {
    border-left: 4px solid #cbd5e1;
}

.card-stat-income {
    border-left-color: var(--color-income);
}

.card-stat-expense {
    border-left-color: var(--color-expense);
}

.card-stat-cashflow {
    border-left-color: var(--color-primary);
}

/* Financial Type Badges */
.badge-income {
    background-color: var(--color-income-light);
    color: var(--color-income-text);
    font-weight: 600;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-expense {
    background-color: var(--color-expense-light);
    color: var(--color-expense-text);
    font-weight: 600;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-transfer {
    background-color: var(--color-transfer-light);
    color: var(--color-transfer-text);
    font-weight: 600;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.badge-adjustment {
    background-color: #fef3c7;
    color: #92400e;
    font-weight: 600;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Amount styling */
.amount-income {
    color: #059669;
    font-weight: 700;
}

.amount-expense {
    color: #dc2626;
    font-weight: 700;
}

.amount-transfer {
    color: #4f46e5;
    font-weight: 700;
}

/* Responsive Table */
.table-custom {
    vertical-align: middle;
}

.table-custom th {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    border-bottom: 2px solid #f1f5f9;
    padding: 0.85rem 1rem;
}

.table-custom td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f8fafc;
    font-size: 0.88rem;
}

/* Mobile Responsiveness */
@media (max-width: 991.98px) {
    .app-sidebar-desktop {
        display: none !important;
    }
    .app-header {
        padding: 0 1rem;
    }
}

@media (min-width: 992px) {
    .mobile-nav-toggle {
        display: none !important;
    }
}
