:root {
    --primary-bg: #0A0A0A;
    --secondary-bg: #1A1A1A;
    --card-bg: #1F1F1F;
    --text-color: #E0E0E0;
    --text-light: #A0A0A0;
    --border-color: #333333;
    --accent-color: #FFFFFF;
    --hover-bg: #2A2A2A;
    --positive-color: #34D399;
    --negative-color: #EF4444;
    --warning-color: #FBBF24;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--primary-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--accent-color);
    font-weight: 600;
}

a {
    color: var(--accent-color);
    text-decoration: none;
}

p {
    color: var(--text-light);
}

button {
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
    font-family: inherit;
}

/* Login Page Styles */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-bg) 0%, #171717 100%);
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background-color: var(--secondary-bg);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    padding: 48px;
    border: 1px solid var(--border-color);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 24px;
}

.login-header .logo-icon {
    width: 32px;
    height: 32px;
    background-color: var(--accent-color);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.login-header .logo-icon::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 50%;
    background-color: var(--primary-bg);
    top: 0;
    left: 0;
    opacity: 0.2;
}

.login-header .logo span {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-color);
}

.login-header h1 {
    font-size: 32px;
    margin-bottom: 12px;
    font-weight: 700;
}

.login-header p {
    font-size: 16px;
    color: var(--text-light);
}

.login-form .form-group {
    margin-bottom: 24px;
}

.login-form .form-group label {
    display: block;
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 8px;
    font-weight: 500;
}

.login-form .form-group input {
    width: 100%;
    padding: 16px 18px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 16px;
    color: var(--text-color);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-form .form-group input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.login-form .signin-btn {
    width: 100%;
    padding: 16px 24px;
    background-color: var(--accent-color);
    color: var(--primary-bg);
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.login-form .signin-btn:hover {
    background-color: #E0E0E0;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.15);
}

.login-form .signin-btn svg {
    color: var(--primary-bg);
    width: 18px;
    height: 18px;
}

.error-message {
    color: var(--negative-color);
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    min-height: 20px;
}

/* Dashboard Layout - FIXED FOR DESKTOP */
.dashboard-body {
    display: flex;
    min-height: 100vh;
    background-color: var(--primary-bg);
    width: 100%;
}

.dashboard-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background-color: var(--secondary-bg);
    border-right: 1px solid var(--border-color);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-shrink: 0;
    height: 100vh;
    position: sticky;
    top: 0;
}

.sidebar-header {
    margin-bottom: 48px;
}

.sidebar-header .logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-header .logo-icon {
    width: 36px;
    height: 36px;
    background-color: var(--accent-color);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.sidebar-header .logo-icon::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 50%;
    background-color: var(--primary-bg);
    top: 0;
    left: 0;
    opacity: 0.2;
}

.sidebar-header .logo span {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-color);
}

.nav-menu {
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 10px;
    color: var(--text-light);
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-bottom: 8px;
    cursor: pointer;
}

.nav-item svg {
    width: 22px;
    height: 22px;
    stroke: var(--text-light);
    transition: stroke 0.2s ease;
}

.nav-item:hover {
    background-color: var(--hover-bg);
    color: var(--accent-color);
}

.nav-item:hover svg {
    stroke: var(--accent-color);
}

.nav-item.active {
    background-color: var(--accent-color);
    color: var(--primary-bg);
}

.nav-item.active svg {
    stroke: var(--primary-bg);
}

.sidebar-footer {
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.logout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background-color: var(--card-bg);
    border-radius: 10px;
    color: var(--text-light);
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.logout-btn svg {
    width: 22px;
    height: 22px;
    stroke: var(--text-light);
    transition: stroke 0.2s ease;
}

.logout-btn:hover {
    background-color: var(--hover-bg);
    color: var(--accent-color);
}

.logout-btn:hover svg {
    stroke: var(--accent-color);
}

.main-content {
    flex-grow: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    width: calc(100% - 280px); /* Adjust based on sidebar width */
    max-width: 1400px; /* Max width for content on very large screens */
    margin: 0 auto; /* Center content */
}

.dashboard-header {
    margin-bottom: 48px;
}

.dashboard-header .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.dashboard-header h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
}

.dashboard-header p {
    font-size: 17px;
    color: var(--text-light);
}

.profile-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.profile-avatar {
    width: 52px;
    height: 52px;
    background-color: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--primary-bg);
    font-size: 20px;
    flex-shrink: 0;
}

.dashboard-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.stat-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.stat-card.primary {
    background-color: var(--accent-color);
    color: var(--primary-bg);
    border-color: var(--accent-color);
}

.stat-card.primary h3 {
    color: var(--primary-bg);
}

.stat-card.primary .stat-icon {
    background-color: rgba(0, 0, 0, 0.1);
    color: var(--primary-bg);
}

.stat-card.primary .stat-icon svg {
    stroke: var(--primary-bg);
}

.stat-card.primary .stat-value .currency,
.stat-card.primary .stat-value .amount,
.stat-card.primary .stat-value .decimal {
    color: var(--primary-bg);
}

.stat-card.primary .stat-change {
    color: var(--primary-bg);
    opacity: 0.8;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.stat-header h3 {
    font-size: 17px;
    font-weight: 500;
    color: var(--text-light);
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--hover-bg);
    color: var(--text-color);
}

.stat-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--text-color);
}

.stat-icon.secondary {
    background-color: rgba(68, 170, 255, 0.1);
    color: #44AAFF; /* Blue */
}
.stat-icon.secondary svg {
    stroke: #44AAFF;
}

.stat-icon.tertiary {
    background-color: rgba(255, 170, 68, 0.1);
    color: #FFaa44; /* Orange */
}
.stat-icon.tertiary svg {
    stroke: #FFaa44;
}

.stat-value {
    display: flex;
    align-items: baseline;
    margin-bottom: 12px;
}

.stat-value .currency {
    font-size: 26px;
    font-weight: 500;
    margin-right: 5px;
    color: var(--text-light);
}

.stat-value .amount {
    font-size: 42px;
    font-weight: 700;
    color: var(--accent-color);
}

.stat-value .decimal {
    font-size: 22px;
    font-weight: 500;
    color: var(--text-light);
}

.stat-card.primary .stat-value .currency,
.stat-card.primary .stat-value .amount,
.stat-card.primary .stat-value .decimal {
    color: var(--primary-bg);
}

.stat-change {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 500;
}

.stat-change.positive {
    color: var(--positive-color);
}

.stat-change.positive svg {
    stroke: var(--positive-color);
    transform: rotate(0deg);
}

.stat-change.negative {
    color: var(--negative-color);
}

.stat-change.negative svg {
    stroke: var(--negative-color);
    transform: rotate(180deg);
}

.stat-change svg {
    width: 18px;
    height: 18px;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.card {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.card-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--accent-color);
}

.view-all {
    font-size: 15px;
    color: var(--text-light);
    transition: color 0.2s ease;
    padding: 6px 10px;
    border-radius: 6px;
}

.view-all:hover {
    color: var(--accent-color);
    background-color: var(--hover-bg);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 18px;
}

.activity-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon svg {
    width: 22px;
    height: 22px;
    stroke-width: 2;
}

.activity-icon.income {
    background-color: rgba(52, 211, 153, 0.1); /* light green */
    color: var(--positive-color);
}
.activity-icon.income svg {
    stroke: var(--positive-color);
}

.activity-icon.expense {
    background-color: rgba(239, 68, 68, 0.1); /* light red */
    color: var(--negative-color);
}
.activity-icon.expense svg {
    stroke: var(--negative-color);
}

.activity-icon.transfer {
    background-color: rgba(68, 170, 255, 0.1); /* light blue */
    color: #44AAFF;
}
.activity-icon.transfer svg {
    stroke: #44AAFF;
}

.activity-details {
    flex-grow: 1;
}

.activity-details h4 {
    font-size: 17px;
    font-weight: 500;
    color: var(--accent-color);
    margin-bottom: 4px;
}

.activity-details p {
    font-size: 14px;
    color: var(--text-light);
}

.activity-amount {
    font-weight: 600;
    font-size: 16px;
    flex-shrink: 0;
}

.activity-amount.positive {
    color: var(--positive-color);
}

.activity-amount.negative {
    color: var(--negative-color);
}

.monthly-report p {
    margin-bottom: 25px;
    font-size: 16px;
}

.monthly-report .report-stats div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid var(--border-color);
}

.monthly-report .report-stats div:first-of-type { /* Changed to first-of-type for robustness */
    border-top: none;
}

.monthly-report .report-stats div span {
    font-size: 16px;
    font-weight: 500;
}

.monthly-report .report-stats div span.positive {
    color: var(--positive-color);
}

.monthly-report .report-stats div span.negative {
    color: var(--negative-color);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .main-content {
        padding: 30px;
    }
    .stats-grid, .content-grid {
        gap: 25px;
    }
}

@media (max-width: 1024px) {
    .sidebar {
        width: 80px; /* Collapse sidebar */
        padding: 20px 10px;
    }

    .sidebar .logo span,
    .nav-item span,
    .logout-btn span {
        display: none; /* Hide text */
    }

    .sidebar-header .logo {
        justify-content: center;
    }
    .sidebar-header .logo-icon {
        width: 32px;
        height: 32px;
    }
    .sidebar-header .logo-icon::before {
        content: none;
    }
    .nav-item, .logout-btn {
        justify-content: center;
        padding: 10px;
    }
    .nav-item svg, .logout-btn svg {
        width: 24px;
        height: 24px;
    }

    .main-content {
        width: calc(100% - 80px); /* Adjust based on collapsed sidebar */
        padding: 30px;
    }

    .dashboard-header h1 {
        font-size: 32px;
    }
    .dashboard-header p {
        font-size: 15px;
    }

    .stat-value .amount {
        font-size: 38px;
    }
    .stat-value .currency {
        font-size: 24px;
    }
    .stat-value .decimal {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .dashboard-body {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 15px 20px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        position: static; /* Remove sticky on mobile */
    }

    .sidebar-header {
        margin-bottom: 0;
    }

    .sidebar .logo span {
        display: inline; /* Show logo text in mobile header */
    }
    .sidebar-header .logo-icon::before {
        content: '';
    }
    .sidebar-header .logo-icon {
        width: 28px;
        height: 28px;
    }
    .sidebar-header .logo span {
        font-size: 24px;
    }

    .nav-menu {
        display: none; /* Hide main nav menu on small screens */
    }

    .sidebar-footer {
        padding-top: 0;
        border-top: none;
    }
    .logout-btn {
        width: auto;
        margin-left: auto; /* Push logout button to the right */
        padding: 10px 15px;
        gap: 10px;
    }
    .logout-btn span {
        display: inline;
    }
    .logout-btn svg {
        width: 20px;
        height: 20px;
    }

    .main-content {
        width: 100%; /* Take full width on mobile */
        max-width: none; /* Remove max-width restriction */
        padding: 20px;
    }

    .dashboard-header .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .dashboard-header h1 {
        font-size: 28px;
    }
    .dashboard-header p {
        font-size: 14px;
    }
    .profile-avatar {
        width: 44px;
        height: 44px;
        font-size: 16px;
    }

    .stats-grid, .content-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .stat-card, .card {
        padding: 25px;
    }

    .stat-header h3 {
        font-size: 16px;
    }
    .stat-value .amount {
        font-size: 36px;
    }
    .stat-value .currency {
        font-size: 22px;
    }
    .stat-value .decimal {
        font-size: 18px;
    }

    .activity-item {
        gap: 15px;
    }
    .activity-icon {
        width: 38px;
        height: 38px;
    }
    .activity-icon svg {
        width: 18px;
        height: 18px;
    }
    .activity-details h4 {
        font-size: 15px;
    }
    .activity-details p {
        font-size: 12px;
    }
    .activity-amount {
        font-size: 14px;
    }
    .monthly-report p {
        font-size: 14px;
    }
    .monthly-report .report-stats div span {
        font-size: 14px;
    }
}

.login-header .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    padding: 20px 0;
}

.login-header .logo .logo-image {
    max-width: 280px;
    width: 100%;
    height: auto;
    filter: brightness(0) invert(1); /* Makes the logo white on dark background */
}

/* Remove old logo icon and text */
.login-header .logo-icon,
.login-header .logo span {
    display: none !important;
}

/* Dashboard Sidebar Logo */
.sidebar-header {
    margin-bottom: 48px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
}

.sidebar-header .logo .logo-image {
    max-width: 220px;
    width: 100%;
    height: auto;
    filter: brightness(0) invert(1); /* Makes the logo white on dark background */
}

/* Remove old sidebar logo elements */
.sidebar-header .logo-icon,
.sidebar-header .logo span {
    display: none !important;
}

/* Responsive Logo Adjustments */
@media (max-width: 1024px) {
    /* Collapsed sidebar - show only icon/small logo */
    .sidebar-header .logo .logo-image {
        max-width: 50px;
        max-height: 50px;
        object-fit: contain;
    }

    .sidebar-header {
        margin-bottom: 30px;
        padding-bottom: 15px;
    }
}

@media (max-width: 768px) {
    /* Mobile - full logo in header */
    .sidebar-header .logo .logo-image {
        max-width: 180px;
        max-height: none;
    }

    .sidebar-header {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
    }

    .login-header .logo .logo-image {
        max-width: 220px;
    }

    .login-header .logo {
        margin-bottom: 30px;
        padding: 15px 0;
    }
}

@media (max-width: 480px) {
    .login-header .logo .logo-image {
        max-width: 180px;
    }

    .sidebar-header .logo .logo-image {
        max-width: 150px;
    }
}