/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

:root {
    --primary: #0891b2;
    --primary-dark: #0e7490;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --bg-primary: rgba(255, 255, 255, 0.85);
    --bg-secondary: #ecfdf5;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --border: rgba(148, 163, 184, 0.2);
    --shadow: rgba(16, 185, 129, 0.15);
    --glow-blue: rgba(14, 165, 233, 0.3);
    --glow-gold: rgba(251, 191, 36, 0.3);
    --radius: 16px;
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg,
            #ecfdf5 0%,
            #f0f9ff 20%,
            #fefce8 40%,
            #eff6ff 60%,
            #f0fdf4 80%,
            #fffbeb 100%);
    background-size: 400% 400%;
    animation: gradientShift 20s ease infinite;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://cbx-prod.b-cdn.net/COLOURBOX30141598.jpg?width=800&height=800&quality=70');
    background-size: 400px auto;
    background-position: center;
    background-attachment: fixed;
    background-repeat: repeat;
    opacity: 0.08;
    z-index: 0;
    pointer-events: none;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 12px;
    position: relative;
    z-index: 1;
}

/* Header - Compact & Professional */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    padding: 0.5rem 0;
    /* Compact */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    /* Compact */
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #059669 0%, #0891b2 50%, #eab308 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.3)) drop-shadow(0 0 15px rgba(8, 145, 178, 0.2)) drop-shadow(0 0 20px rgba(234, 179, 8, 0.2));
    letter-spacing: 0.5px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    /* Compact - professional spacing */
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
    /* Compact */
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0.875rem;
    /* Compact padding */
    margin: 0 0.25rem;
    /* Small margin between links */
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #059669 0%, #0891b2 50%, #eab308 100%);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link:hover::after {
    width: 100%;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1002;
    position: relative;
    transition: transform 0.3s ease;
}

.hamburger:hover {
    transform: scale(1.1);
}

.hamburger span {
    width: 28px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
    background: var(--primary);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
    background: var(--primary);
}


/* Main Content - Compact spacing */
.main-content {
    padding-top: 4.5rem;
    /* Account for fixed header */
    padding-bottom: 2rem;
    min-height: calc(100vh - 120px);
}

/* First section - reduce top space */
.balance-section {
    margin-top: 0;
    padding-top: 0.75rem;
    /* Compact */
}

/* ===== DASHBOARD TOP GRID - Side by Side Layout ===== */
.dashboard-top-grid {
    display: grid;
    grid-template-columns: 40% 60%;
    /* 40% Overview, 60% Health Score */
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Responsive - Stack on mobile */
@media (max-width: 1024px) {
    .dashboard-top-grid {
        grid-template-columns: 1fr;
        /* Stack vertically on tablets/mobile */
    }

    /* Balance cards stack on mobile too */
    .balance-cards {
        grid-template-columns: 1fr !important;
    }
}

/* Mobile Navigation Overlay */
@media (max-width: 1024px) {
    .hamburger {
        display: flex;
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: flex-start;
        padding: 5rem 2rem 2rem;
        gap: 0.5rem;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
        overflow-y: auto;
    }

    .nav.active {
        right: 0;
    }

    .nav-link {
        width: 100%;
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
        border-radius: 12px;
        transition: all 0.3s ease;
        background: transparent;
    }

    .nav-link:hover,
    .nav-link.active {
        background: rgba(8, 145, 178, 0.1);
        color: var(--primary);
        transform: translateX(8px);
    }

    .nav-link::after {
        display: none;
    }

    /* Mobile menu backdrop */
    .nav::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.4s ease, visibility 0.4s ease;
        z-index: -1;
    }

    .nav.active::before {
        opacity: 1;
        visibility: visible;
    }
}

/* Tablet and smaller desktop adjustments */
@media (max-width: 1024px) and (min-width: 769px) {
    .nav {
        width: 350px;
    }
}

/* Mobile specific adjustments */
@media (max-width: 768px) {
    .nav {
        width: 280px;
        padding: 4rem 1.5rem 2rem;
    }

    .nav-link {
        padding: 0.875rem 1.25rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .nav {
        width: 75%;
        max-width: 280px;
    }
}


section {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(236, 72, 153, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

section:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 48px rgba(16, 185, 129, 0.2),
        0 0 0 1px rgba(8, 145, 178, 0.3),
        0 0 30px rgba(251, 191, 36, 0.2);
}

section:hover::before {
    opacity: 1;
}

section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #059669 0%, #0891b2 50%, #eab308 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* Balance Cards */
.balance-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.balance-card {
    padding: 2rem;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.balance-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.balance-card:hover {
    transform: translateY(-8px) scale(1.02);
}

.balance-card:hover::before {
    opacity: 1;
}

.balance-card--total {
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 50%, #22d3ee 100%);
    color: white;
}

.balance-card--total:hover {
    box-shadow: 0 15px 40px rgba(8, 145, 178, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.5),
        0 0 25px rgba(34, 211, 238, 0.4);
}

.balance-card--income {
    background: linear-gradient(135deg, #059669 0%, #10b981 50%, #34d399 100%);
    color: white;
}

.balance-card--income:hover {
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.5),
        0 0 25px rgba(52, 211, 153, 0.4);
}

.balance-card--expense {
    background: linear-gradient(135deg, #ef4444 0%, #f87171 50%, #fca5a5 100%);
    color: white;
}

.balance-card--expense:hover {
    box-shadow: 0 15px 40px rgba(239, 68, 68, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.5),
        0 0 25px rgba(248, 113, 113, 0.4);
}

.balance-label {
    font-size: 0.875rem;
    opacity: 0.95;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.balance-amount {
    font-size: 2.5rem;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Forms */
.transaction-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group select {
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:hover,
.form-group select:hover {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(8, 145, 178, 0.4);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.15),
        0 0 20px rgba(16, 185, 129, 0.1);
    background: rgba(255, 255, 255, 0.95);
}

.form-help {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 50%, #22d3ee 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(8, 145, 178, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(8, 145, 178, 0.4),
        0 0 20px rgba(34, 211, 238, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-icon {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--bg-secondary);
}

/* Budget Section */
.budget-alerts {
    margin-bottom: 1rem;
}

.budget-alert {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.budget-alert--warning {
    background: #fef3c7;
    color: #92400e;
    border-left: 4px solid var(--warning);
}

.budget-alert--danger {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--danger);
}

.budget-list {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
}

.budget-item {
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.budget-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.2),
        0 0 0 1px rgba(8, 145, 178, 0.3),
        0 0 20px rgba(251, 191, 36, 0.15);
    background: rgba(255, 255, 255, 0.8);
}

.budget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.budget-category {
    font-weight: 600;
    text-transform: capitalize;
}

.budget-amount {
    color: var(--text-secondary);
}

.budget-progress {
    width: 100%;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}

.budget-progress-bar {
    height: 100%;
    background: var(--success);
    transition: var(--transition);
}

.budget-progress-bar--warning {
    background: var(--warning);
}

.budget-progress-bar--danger {
    background: var(--danger);
}

/* Insights */
.insights-section {
    margin: 2rem 0;
}

.insights-section h3 {
    margin-bottom: 2rem;
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 600;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.insight-card {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.insight-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.2),
        0 0 0 1px rgba(8, 145, 178, 0.3),
        0 0 20px rgba(251, 191, 36, 0.15);
    background: rgba(255, 255, 255, 0.8);
}

.insight-card h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.insight-card canvas {
    max-width: 100%;
    height: auto;
}

/* Transactions */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filters {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
    width: 100%;
}

.search-input,
.filter-select {
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 12px;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.search-input:hover,
.filter-select:hover {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(99, 102, 241, 0.4);
}

.search-input:focus,
.filter-select:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.15),
        0 0 20px rgba(16, 185, 129, 0.1);
}

.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.transaction-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(8, 145, 178, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 0;
}

.transaction-item:hover {
    transform: translateX(8px);
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.2),
        0 0 0 1px rgba(8, 145, 178, 0.3),
        0 0 20px rgba(251, 191, 36, 0.15);
    background: rgba(255, 255, 255, 0.8);
}

.transaction-item:hover::before {
    opacity: 1;
}

.transaction-info {
    flex: 1;
    position: relative;
    z-index: 1;
}

.transaction-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.transaction-category {
    font-weight: 600;
    text-transform: capitalize;
}

.transaction-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.transaction-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.transaction-date {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.transaction-amount {
    font-size: 1.25rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.transaction-amount--income {
    color: var(--success);
}

.transaction-amount--expense {
    color: var(--danger);
}

.transaction-actions {
    display: flex;
    gap: 0.5rem;
    position: relative;
    z-index: 2;
}

.btn-edit {
    background: transparent;
    border: none;
    color: var(--primary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: var(--transition);
    font-size: 1.1rem;
}

.btn-edit:hover {
    background: #e0e7ff;
}

.btn-delete {
    background: transparent;
    border: none;
    color: var(--danger);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.btn-delete:hover {
    background: #fee2e2;
}

/* Bulk Delete Styles */
.transaction-checkbox {
    margin-right: 0.75rem;
    transform: scale(1.2);
    cursor: pointer;
    flex-shrink: 0;
}

.transaction-item.select-mode {
    border-left: 4px solid var(--primary);
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
}

.transaction-item.selected {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.select-mode-active .transaction-item {
    padding-left: 1rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.pagination button {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    background: var(--bg-primary);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.pagination button:hover:not(:disabled) {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination .page-info {
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: var(--radius);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.modal-body {
    padding: 1.5rem;
    padding-bottom: 2rem;
    /* Extra space before buttons */
}

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: center;
    /* Center align buttons */
    padding: 1rem 1.5rem 1.5rem;
    /* Top, sides, bottom padding */
    margin-top: 0.5rem;
    /* Space from modal body */
}

/* Budget Options Modal */
#budget-options-modal {
    z-index: 1100;
}

/* Confirmation Modal - Highest z-index (appears on top of everything) */
#confirm-modal {
    z-index: 1200;
}

/* ===== USER PROFILE STYLES ===== */
.user-profile-details {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.profile-avatar {
    flex-shrink: 0;
}

.avatar-large {
    font-size: 3rem;
    display: block;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    border-radius: 50%;
    color: white;
}

.profile-info h4 {
    margin: 0 0 0.25rem 0;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.user-email {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0.25rem 0;
}

.user-role {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    margin: 0.25rem 0;
}

.join-date {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin: 0.25rem 0;
}

.user-stats {
    margin-top: 1.5rem;
}

.user-stats h5 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.stat-item {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.stat-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
}

.guest-info {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.guest-info p {
    margin: 0.5rem 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.guest-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.guest-actions .btn {
    flex: 1;
    max-width: 150px;
}

/* User Profile in Header */
#user-profile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

#user-profile:hover {
    background: rgba(99, 102, 241, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-avatar {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    border-radius: 50%;
    color: white;
    flex-shrink: 0;
}

.user-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-details .user-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-actions {
    display: flex;
    gap: 0.25rem;
}

.user-actions .btn-icon {
    padding: 0.25rem;
    font-size: 0.9rem;
}

/* ===== SETTINGS STYLES ===== */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.settings-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.settings-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(8, 145, 178, 0.15);
}

.settings-card h3 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.settings-actions .btn {
    justify-content: flex-start;
    text-align: left;
}

.theme-info {
    padding: 0.5rem;
    background: var(--bg-primary);
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
}

.settings-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* Import Modal Styles */
.file-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px dashed var(--border);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-input:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.file-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.import-options {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.import-options .checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.import-options .checkbox-label:last-child {
    margin-bottom: 0;
}

.import-options input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .user-details {
        display: none;
    }

    .guest-actions {
        flex-direction: column;
    }

    .guest-actions .btn {
        max-width: none;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--text-primary);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    box-shadow: 0 4px 12px var(--shadow);
    transform: translateY(200%);
    transition: transform 0.3s ease;
    z-index: 1001;
    font-weight: 600;
}

.toast.show {
    transform: translateY(0);
}

.toast--success {
    background: var(--success);
    color: white;
}

.toast--error {
    background: var(--danger);
    color: white;
}

.toast--info {
    background: #0891b2;
    color: white;
}

/* Team Cards (Contact Page) */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.team-card {
    padding: 2.5rem 2rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.team-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(8, 145, 178, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.team-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.2),
        0 0 0 1px rgba(8, 145, 178, 0.3),
        0 0 30px rgba(251, 191, 36, 0.15);
}

.team-card:hover::before {
    opacity: 1;
}

.team-avatar {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    border: 4px solid white;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.team-card:hover .team-avatar {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.team-avatar--blue {
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 50%, #22d3ee 100%);
}

.team-avatar--green {
    background: linear-gradient(135deg, #059669 0%, #10b981 50%, #34d399 100%);
}

.team-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #059669 0%, #0891b2 50%, #eab308 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.team-role {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.team-contact {
    margin-top: 1.5rem;
    position: relative;
    z-index: 1;
}

.team-email {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: rgba(8, 145, 178, 0.1);
    color: var(--primary);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.team-email:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(8, 145, 178, 0.3);
    border-color: var(--primary);
}

.email-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.team-email:hover .email-icon {
    transform: scale(1.2);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border);
    padding: 1.25rem 0;
    /* Compact */
    text-align: center;
    color: var(--text-secondary);
    margin-top: auto;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    /* Professional spacing */
    margin-bottom: 0.5rem;
}

.footer-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.25rem 0.5rem;
}

.footer-link:hover {
    color: var(--primary);
    transform: translateY(-2px);
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background: var(--primary);
    transition: transform 0.3s ease;
}

.footer-link:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.footer-text {
    margin: 0.5rem 0;
    font-size: 0.85rem;
    /* Compact */
}

/* Responsive */
@media (max-width: 1024px) {
    .filters {
        grid-template-columns: 1fr 1fr;
    }

    .section-actions {
        flex-wrap: wrap;
    }

    .insights-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 0.75rem;
    }

    .nav {
        gap: 1rem;
    }

    .nav-link {
        font-size: 0.9rem;
    }

    .balance-cards {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .filters {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .search-input,
    .filter-select {
        width: 100%;
        font-size: 0.9rem;
        padding: 0.6rem;
    }

    .insights-grid {
        grid-template-columns: 1fr;
    }

    .transaction-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .transaction-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .section-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .btn-sm {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .footer-links {
        gap: 1rem;
    }

    .footer-link {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 510px) {
    .container {
        padding: 0 0.5rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    .logo {
        font-size: 1.25rem;
    }

    /* Show hamburger menu */
    .hamburger {
        display: flex;
    }

    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }

    .footer-link {
        padding: 0.5rem 1rem;
        width: 100%;
        text-align: center;
        max-width: 200px;
    }

    .footer-text {
        font-size: 0.8rem;
        text-align: center;
    }

    /* Hide nav by default on mobile - positioned below header */
    .nav {
        position: fixed;
        top: 104px;
        /* Further below header (70px + 25px gap) */
        right: -300px;
        width: 70%;
        max-width: 280px;
        height: calc(100vh - 104px);
        /* Adjust height for new top position */
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: flex-start;
        padding: 2rem 1.5rem;
        gap: 1.5rem;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 99;
        /* Below header (100) */
        border-left: 1px solid rgba(148, 163, 184, 0.2);
    }

    .nav.active {
        right: 0;
    }

    .nav-link {
        font-size: 1rem;
        padding: 0.5rem 0;
        width: 100%;
    }

    .nav-link::after {
        display: none;
    }

    /* Theme toggle stays visible next to hamburger */
    #theme-toggle {
        display: flex;
        margin: 0;
    }

    .balance-amount {
        font-size: 1.5rem;
    }

    .form-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .btn {
        width: 100%;
    }

    .section-actions {
        flex-direction: column;
        width: 100%;
    }

    .section-actions .btn {
        width: 100%;
    }

    .transaction-item {
        padding: 0.5rem;
    }

    .transaction-item.select-mode {
        flex-direction: row;
        align-items: flex-start;
    }

    .transaction-checkbox {
        margin-right: 0.5rem;
        margin-top: 0.25rem;
    }

    .transaction-amount {
        font-size: 1.1rem;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .pagination button {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }

    .btn-edit,
    .btn-delete {
        padding: 0.4rem;
        font-size: 1rem;
    }
}

/* Dark Theme Overrides - Keep original dark theme styling */
[data-theme="dark"] body {
    background: #111827;
    animation: none;
}

[data-theme="dark"] body::before {
    display: none;
}

[data-theme="dark"] .header {
    background: var(--bg-primary);
    backdrop-filter: none;
}

[data-theme="dark"] .logo {
    background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 8px rgba(129, 140, 248, 0.4)) drop-shadow(0 0 15px rgba(99, 102, 241, 0.3));
}

[data-theme="dark"] .hamburger span {
    background: var(--text-primary);
}

[data-theme="dark"] .nav {
    background: var(--bg-primary);
    border-left: 1px solid var(--border);
}



[data-theme="dark"] .nav-link {
    color: var(--text-primary);
}

[data-theme="dark"] .nav-link:hover {
    color: var(--primary);
}

[data-theme="dark"] .nav-link::after {
    background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
}

[data-theme="dark"] section {
    background: var(--bg-primary);
    backdrop-filter: none;
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px var(--shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] section::before {
    display: none;
}

[data-theme="dark"] section:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(129, 140, 248, 0.2),
        0 0 0 1px rgba(99, 102, 241, 0.3),
        0 0 30px rgba(129, 140, 248, 0.15);
    border-color: rgba(99, 102, 241, 0.4);
}

[data-theme="dark"] section h2 {
    background: none;
    -webkit-text-fill-color: var(--text-primary);
    color: var(--text-primary);
}

[data-theme="dark"] .balance-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .balance-card::before {
    display: none;
}

[data-theme="dark"] .balance-card:hover {
    transform: translateY(-8px) scale(1.02);
}

[data-theme="dark"] .balance-card--total {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

[data-theme="dark"] .balance-card--total:hover {
    box-shadow: 0 20px 60px rgba(129, 140, 248, 0.4),
        0 0 0 1px rgba(99, 102, 241, 0.5),
        0 0 50px rgba(129, 140, 248, 0.5);
}

[data-theme="dark"] .balance-card--income {
    background: linear-gradient(135deg, #10b981, #059669);
}

[data-theme="dark"] .balance-card--income:hover {
    box-shadow: 0 20px 60px rgba(16, 185, 129, 0.4),
        0 0 0 1px rgba(52, 211, 153, 0.5),
        0 0 50px rgba(16, 185, 129, 0.5);
}

[data-theme="dark"] .balance-card--expense {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

[data-theme="dark"] .balance-card--expense:hover {
    box-shadow: 0 20px 60px rgba(239, 68, 68, 0.4),
        0 0 0 1px rgba(248, 113, 113, 0.5),
        0 0 50px rgba(239, 68, 68, 0.5);
}

[data-theme="dark"] .transaction-item {
    background: var(--bg-primary);
    backdrop-filter: none;
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .transaction-item::before {
    display: none;
}

[data-theme="dark"] .transaction-item:hover {
    transform: translateX(8px);
    box-shadow: 0 8px 32px rgba(129, 140, 248, 0.25),
        0 0 0 1px rgba(99, 102, 241, 0.4),
        0 0 20px rgba(129, 140, 248, 0.2);
    border-color: rgba(99, 102, 241, 0.5);
}

[data-theme="dark"] .budget-item {
    background: var(--bg-primary);
    backdrop-filter: none;
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .budget-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(129, 140, 248, 0.25),
        0 0 0 1px rgba(99, 102, 241, 0.4),
        0 0 20px rgba(129, 140, 248, 0.2);
    border-color: rgba(99, 102, 241, 0.5);
}

[data-theme="dark"] .insight-card {
    background: var(--bg-primary);
    backdrop-filter: none;
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .insight-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(129, 140, 248, 0.25),
        0 0 0 1px rgba(99, 102, 241, 0.4),
        0 0 20px rgba(129, 140, 248, 0.2);
    border-color: rgba(99, 102, 241, 0.5);
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group select,
[data-theme="dark"] .search-input,
[data-theme="dark"] .filter-select {
    background: #ffffff;
    color: #0f172a;
    backdrop-filter: none;
    border: 1px solid var(--border);
}

[data-theme="dark"] .form-group input:hover,
[data-theme="dark"] .form-group select:hover,
[data-theme="dark"] .search-input:hover,
[data-theme="dark"] .filter-select:hover {
    background: #ffffff;
    border-color: rgba(99, 102, 241, 0.4);
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group select:focus,
[data-theme="dark"] .search-input:focus,
[data-theme="dark"] .filter-select:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.2),
        0 0 20px rgba(129, 140, 248, 0.15);
}

[data-theme="dark"] .form-group input::placeholder,
[data-theme="dark"] .search-input::placeholder {
    color: #64748b;
}

[data-theme="dark"] .btn-primary {
    background: var(--primary);
    box-shadow: 0 4px 15px rgba(129, 140, 248, 0.3);
}

[data-theme="dark"] .btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(129, 140, 248, 0.4),
        0 0 20px rgba(129, 140, 248, 0.3);
}

[data-theme="dark"] .btn-secondary {
    background: var(--bg-secondary);
    backdrop-filter: none;
    border: 1px solid var(--border);
}

[data-theme="dark"] .btn-secondary:hover {
    background: var(--bg-primary);
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 4px 15px rgba(129, 140, 248, 0.2);
}

/* Dark Mode - Team Cards */
[data-theme="dark"] .team-card {
    background: var(--bg-primary);
    backdrop-filter: none;
    border: 1px solid var(--border);
}

[data-theme="dark"] .team-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(129, 140, 248, 0.3),
        0 0 0 1px rgba(99, 102, 241, 0.4),
        0 0 30px rgba(129, 140, 248, 0.25);
    border-color: rgba(99, 102, 241, 0.5);
}

[data-theme="dark"] .team-avatar--blue {
    background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
}

[data-theme="dark"] .team-avatar--green {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
}

[data-theme="dark"] .team-name {
    color: var(--text-primary);
}

[data-theme="dark"] .team-role {
    color: var(--text-secondary);
    opacity: 1;
}

[data-theme="dark"] .team-email {
    color: var(--text-primary);
}

[data-theme="dark"] .team-email:hover {
    background: rgba(129, 140, 248, 0.15);
}

/* Dark Mode - Toast Notifications */
[data-theme="dark"] .toast {
    background: #1f2937;
    color: #f9fafb;
    border: 1px solid rgba(129, 140, 248, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(129, 140, 248, 0.2);
}

[data-theme="dark"] .toast--success {
    background: #10b981;
    color: white;
    border-color: rgba(52, 211, 153, 0.5);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

[data-theme="dark"] .toast--error {
    background: #ef4444;
    color: white;
    border-color: rgba(248, 113, 113, 0.5);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
}

[data-theme="dark"] .toast--info {
    background: #818cf8;
    color: white;
    border-color: rgba(129, 140, 248, 0.5);
    box-shadow: 0 8px 24px rgba(129, 140, 248, 0.4);
}



/* ===== SECTION-BASED LAYOUT ===== */

/* App Sections */
.app-section {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.app-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section Descriptions */
.section-description {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Navigation Active State */
.nav-link.active {
    color: var(--primary);
    font-weight: 600;
}

.nav-link.active::after {
    width: 100%;
}

/* Quick Actions Dashboard */
.quick-actions {
    margin: 2rem 0;
}

.quick-actions h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.2rem;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: var(--text-primary);
}

.action-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.2),
        0 0 0 1px rgba(8, 145, 178, 0.3);
}

.action-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.action-text {
    font-weight: 600;
    font-size: 1rem;
}

/* Section Actions */
.budget-actions,
.history-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: center;
}

/* Undo/Redo Section */
.undo-redo-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.undo-redo-section h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.undo-redo-buttons {
    display: flex;
    gap: 1rem;
}

/* Enhanced Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 2rem;
}

/* Responsive Design for Sections */
@media (max-width: 768px) {
    .action-buttons {
        grid-template-columns: 1fr;
    }

    .budget-actions,
    .history-actions {
        flex-direction: column;
        align-items: center;
    }

    .undo-redo-buttons {
        flex-direction: column;
    }

    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Dark Mode for Sections */
[data-theme="dark"] .action-btn {
    background: var(--bg-primary);
    border-color: var(--border);
    color: var(--text-primary);
}

[data-theme="dark"] .action-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(129, 140, 248, 0.25),
        0 0 0 1px rgba(99, 102, 241, 0.3);
}

[data-theme="dark"] .nav-link.active {
    color: var(--primary);
}

/* User Profile Modal Styles - Phase 1 */
.user-profile-details {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.profile-avatar {
    flex-shrink: 0;
}

.avatar-large {
    font-size: 4rem;
    display: block;
    text-align: center;
    width: 80px;
    height: 80px;
    line-height: 80px;
    background: var(--bg-primary);
    border-radius: 50%;
    border: 3px solid var(--primary);
    box-shadow: 0 4px 16px var(--shadow);
}

.profile-info h4 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.user-email {
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.user-role {
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 0.25rem;
}

.join-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.user-stats {
    margin-top: 2rem;
}

.user-stats h5 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    text-align: center;
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px var(--shadow);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 600;
}

/* Guest Mode Styles */
.guest-info {
    text-align: center;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 2rem;
}

.guest-info p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.guest-info p:first-child {
    font-size: 1.2rem;
    color: var(--text-primary);
    font-weight: 500;
}

.guest-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

/* Profile Edit Form */
#edit-profile-form .form-group {
    margin-bottom: 1.5rem;
}

#edit-profile-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

#edit-profile-form input,
#edit-profile-form select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

#edit-profile-form input:focus,
#edit-profile-form select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
}

/* Responsive User Profile */
@media (max-width: 768px) {
    .user-profile-details {
        flex-direction: column;
        text-align: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .guest-actions {
        flex-direction: column;
    }

    .avatar-large {
        width: 60px;
        height: 60px;
        line-height: 60px;
        font-size: 3rem;
    }
}

/* Dark Mode User Profile */
[data-theme="dark"] .user-profile-details,
[data-theme="dark"] .stat-item,
[data-theme="dark"] .guest-info {
    background: var(--bg-secondary);
    border-color: var(--border);
}

[data-theme="dark"] .avatar-large {
    background: var(--bg-primary);
    border-color: var(--primary);
}

/* Header User Profile - Phase 1 */
.user-profile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 1rem;
    padding: 0.5rem;
    background: var(--bg-primary);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.user-profile:hover {
    box-shadow: 0 2px 8px var(--shadow);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    font-size: 1.5rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: 50%;
    border: 2px solid var(--primary);
}

.user-details {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.user-actions {
    display: flex;
    gap: 0.25rem;
}

.user-actions .btn-icon {
    padding: 0.25rem;
    font-size: 0.9rem;
    min-width: auto;
    width: 28px;
    height: 28px;
}

/* Responsive Header User Profile */
@media (max-width: 768px) {
    .user-profile {
        margin-right: 0.5rem;
    }

    .user-details {
        display: none;
    }

    .user-info {
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .user-profile {
        padding: 0.25rem;
    }

    .user-avatar {
        width: 28px;
        height: 28px;
        font-size: 1.2rem;
    }
}

/* Dark Mode Header User Profile */
[data-theme="dark"] .user-profile {
    background: var(--bg-secondary);
    border-color: var(--border);
}

[data-theme="dark"] .user-avatar {
    background: var(--bg-primary);
    border-color: var(--primary);
}

/* ===== DASHBOARD DESIGN IMPROVEMENTS ===== */

/* Compact and Professional Balance Cards */
.balance-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    /* Column layout - cards stacked vertically */
}

.balance-card {
    padding: 1.25rem 1.5rem;
    /* Reduced padding - more compact */
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    /* Tighter spacing */
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.balance-label {
    font-size: 0.8rem;
    /* Smaller label */
    opacity: 0.95;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.balance-amount {
    font-size: 2rem;
    /* Reduced from 2.5rem */
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    line-height: 1.2;
}

/* Financial Health Score - Perfect Circle Alignment */
.score-circle {
    position: relative;
    width: 180px;
    /* Slightly smaller for better proportion */
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.score-circle svg {
    transform: rotate(-90deg);
    position: absolute;
    top: 0;
    left: 0;
}

.score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.score-number {
    font-size: 3rem;
    /* Adjusted for better fit */
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, #059669 0%, #0891b2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    padding: 0;
}

.score-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    font-weight: 500;
}

/* Improved Section Spacing */
section {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 1.25rem;
    /* Reduced padding */
    margin-bottom: 1.25rem;
    /* Reduced margin */
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

section h2 {
    font-size: 1.35rem;
    /* Slightly smaller */
    margin-bottom: 1.25rem;
    /* Reduced margin */
    background: linear-gradient(135deg, #059669 0%, #0891b2 50%, #eab308 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* Dashboard Top Grid - Better Spacing */
.dashboard-top-grid {
    display: grid;
    grid-template-columns: 25% 75%;
    gap: 1.25rem;
    /* Financial Overview narrower, Health Score wider */
    margin-bottom: 1.25rem;
}

/* Financial Health Card - Compact */
.health-score-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 1.5rem;
    /* Reduced padding */
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.health-score-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    /* Reduced margin */
}

.health-score-title {
    font-size: 1.35rem;
    /* Slightly smaller */
    font-weight: 700;
    background: linear-gradient(135deg, #059669 0%, #0891b2 50%, #eab308 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.health-score-grade {
    font-size: 1.75rem;
    /* Slightly smaller */
    font-weight: 800;
    padding: 0.4rem 0.875rem;
    /* Reduced padding */
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.health-score-main {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1.5rem;
    /* Reduced gap */
    margin-bottom: 1.5rem;
}

/* Score Breakdown - Compact */
.score-breakdown {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    /* Reduced gap */
}

.breakdown-item {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    /* Tighter spacing */
}

.breakdown-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    /* Slightly smaller */
}

.breakdown-icon {
    font-size: 1.1rem;
    /* Slightly smaller */
}

.breakdown-score {
    font-weight: 700;
    color: var(--text-secondary);
    font-size: 0.85rem;
    /* Slightly smaller */
}

.breakdown-tip {
    font-size: 0.75rem;
    /* Smaller tip text */
    color: var(--text-secondary);
    font-style: italic;
}

/* Score Tips - Compact */
.score-tips {
    margin-top: 1.5rem;
    /* Reduced margin */
    padding: 1.25rem;
    /* Reduced padding */
    background: rgba(8, 145, 178, 0.05);
    border-radius: 12px;
    border-left: 4px solid var(--primary);
}

.score-tips h4 {
    font-size: 1rem;
    /* Slightly smaller */
    font-weight: 600;
    margin-bottom: 0.875rem;
    /* Reduced margin */
    color: var(--text-primary);
}

.tips-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    /* Reduced gap */
}

.tip-item {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    /* Reduced gap */
    font-size: 0.85rem;
    /* Slightly smaller */
    color: var(--text-primary);
}

.tip-icon {
    font-size: 1.1rem;
    /* Slightly smaller */
    flex-shrink: 0;
}

/* Main Content - Compact */
.main-content {
    padding-top: 4.5rem;
    padding-bottom: 1.5rem;
    /* Reduced padding */
    min-height: calc(100vh - 120px);
}

.balance-section {
    margin-top: 0;
    padding-top: 0.5rem;
    /* More compact */
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .balance-cards {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }

    .balance-card {
        padding: 1rem 1.25rem;
    }

    .balance-amount {
        font-size: 1.75rem;
    }

    .score-circle {
        width: 160px;
        height: 160px;
    }

    .score-number {
        font-size: 2.5rem;
    }

    .health-score-card {
        padding: 1.25rem;
    }

    .dashboard-top-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    section {
        padding: 1rem;
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .score-circle {
        width: 140px;
        height: 140px;
    }

    .score-number {
        font-size: 2.25rem;
    }

    .balance-amount {
        font-size: 1.5rem;
    }
}

/* Dark Mode Adjustments */
[data-theme="dark"] .health-score-card {
    background: rgba(31, 41, 55, 0.85);
    border-color: rgba(75, 85, 99, 0.3);
}

[data-theme="dark"] section {
    background: rgba(31, 41, 55, 0.75);
    border-color: rgba(75, 85, 99, 0.3);
}

/* ===== COMPACT PROFESSIONAL DESIGN OVERRIDES ===== */

/* Reduce Header/Navbar Size */
.header {
    padding: 0.5rem 0 !important;
}

.logo {
    font-size: 1.4rem !important;
}

.nav-link {
    padding: 0.5rem 1rem !important;
    font-size: 0.9rem !important;
}

/* Reduce Main Content Spacing */
/* Removed conflicting .main-content rule - using original definition at line 242 */


section {
    padding: 1rem !important;
    margin-bottom: 1.25rem !important;
}

section h2 {
    font-size: 1.25rem !important;
    margin-bottom: 1rem !important;
}

section h3 {
    font-size: 1.1rem !important;
    margin-bottom: 0.875rem !important;
}

/* Compact Balance Cards */
.balance-cards {
    gap: 1rem !important;
}

.balance-card {
    padding: 1.25rem !important;
}

.balance-label {
    font-size: 0.85rem !important;
    margin-bottom: 0.5rem !important;
}

.balance-amount {
    font-size: 1.75rem !important;
}

/* Compact Financial Health Score */
.health-score-card {
    padding: 1.25rem !important;
}

.health-score-header {
    margin-bottom: 1.25rem !important;
}

.health-score-title {
    font-size: 1.25rem !important;
}

.health-score-grade {
    font-size: 1.5rem !important;
    padding: 0.375rem 0.75rem !important;
}

.health-score-main {
    gap: 1.5rem !important;
    margin-bottom: 1.25rem !important;
}

.score-circle {
    width: 160px !important;
    height: 160px !important;
}

.score-circle svg {
    width: 160px !important;
    height: 160px !important;
}

.score-circle-bg,
.score-circle-progress {
    r: 72 !important;
}

.score-number {
    font-size: 2.75rem !important;
}

.score-label {
    font-size: 0.8rem !important;
}

.score-message {
    font-size: 0.9rem !important;
    margin-top: 0.75rem !important;
}

.score-breakdown {
    gap: 1rem !important;
}

.breakdown-item {
    gap: 0.375rem !important;
}

.breakdown-name {
    font-size: 0.9rem !important;
}

.breakdown-score {
    font-size: 0.85rem !important;
}

.breakdown-icon {
    font-size: 1.1rem !important;
}

.breakdown-tip {
    font-size: 0.75rem !important;
}

.score-tips {
    margin-top: 1.25rem !important;
    padding: 1rem !important;
}

.score-tips h4 {
    font-size: 1rem !important;
    margin-bottom: 0.75rem !important;
}

.tips-list {
    gap: 0.5rem !important;
}

.tip-item {
    font-size: 0.85rem !important;
    gap: 0.5rem !important;
}

/* Compact Insights Section */
.insights-grid {
    gap: 1rem !important;
}

.insight-card {
    padding: 1rem !important;
}

.insight-card h4 {
    font-size: 1rem !important;
    margin-bottom: 0.75rem !important;
}

/* Compact Quick Actions */
.quick-actions {
    margin: 1.25rem 0 !important;
}

.action-buttons {
    gap: 0.75rem !important;
}

.action-btn {
    padding: 1rem !important;
}

.action-icon {
    font-size: 1.75rem !important;
}

.action-text {
    font-size: 0.9rem !important;
}

/* Compact Budget Items */
.budget-item {
    padding: 1rem !important;
}

/* Compact Transaction Items */
.transaction-item {
    padding: 1rem !important;
}

.transaction-amount {
    font-size: 1.125rem !important;
}

/* Compact Forms */
.form-group {
    margin-bottom: 1rem !important;
}

.form-group label {
    font-size: 0.9rem !important;
    margin-bottom: 0.375rem !important;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.625rem !important;
    font-size: 0.9rem !important;
}

/* Compact Buttons */
.btn {
    padding: 0.625rem 1.25rem !important;
    font-size: 0.9rem !important;
}

.btn-sm {
    padding: 0.5rem 0.875rem !important;
    font-size: 0.85rem !important;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .score-circle {
        width: 140px !important;
        height: 140px !important;
    }

    .score-circle svg {
        width: 140px !important;
        height: 140px !important;
    }

    .score-circle-bg,
    .score-circle-progress {
        r: 63 !important;
    }

    .score-number {
        font-size: 2.25rem !important;
    }

    .health-score-main {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {
    section {
        padding: 0.875rem !important;
    }

    .balance-card {
        padding: 1rem !important;
    }

    .balance-amount {
        font-size: 1.5rem !important;
    }

    .health-score-card {
        padding: 1rem !important;
    }
}

/* ===== NAVBAR & FOOTER PROFESSIONAL FIXES ===== */

/* Reduce navbar spacing - make it tighter and professional */
.nav {
    gap: 0.5rem !important;
    /* Reduced from default */
}

.nav-link {
    padding: 0.5rem 0.875rem !important;
    /* Tighter padding */
    margin: 0 0.25rem !important;
    /* Small margin between links */
}

/* User profile section - reduce spacing */
.user-profile {
    gap: 0.75rem !important;
}

.user-info {
    gap: 0.5rem !important;
}

.user-actions {
    gap: 0.5rem !important;
}

/* Theme toggle - align properly */
#theme-toggle {
    margin-left: 0.5rem !important;
}

/* Reduce space after navbar */
/* Removed conflicting .main-content padding-top rule - using original definition at line 242 */


/* First section after navbar - reduce top margin */
.balance-section {
    margin-top: 0 !important;
    padding-top: 1rem !important;
}

/* ===== FOOTER FIXES ===== */

/* Make footer more compact */
.footer {
    padding: 1.25rem 0 !important;
    /* Reduced from default */
}

.footer-content {
    gap: 1rem !important;
}

/* Fix footer links styling - make them look professional */
.footer-links {
    gap: 1.5rem !important;
}

.footer-link {
    color: var(--text-primary) !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    font-size: 0.9rem !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    padding: 0.25rem 0.5rem !important;
}

.footer-link:hover {
    color: var(--primary) !important;
    transform: translateY(-2px) !important;
}

.footer-link::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 50% !important;
    transform: translateX(-50%) scaleX(0) !important;
    width: 80% !important;
    height: 2px !important;
    background: var(--primary) !important;
    transition: transform 0.3s ease !important;
}

.footer-link:hover::after {
    transform: translateX(-50%) scaleX(1) !important;
}

/* Footer text - reduce size */
.footer p {
    font-size: 0.85rem !important;
    margin: 0.5rem 0 !important;
}

/* Dark mode footer link fix */
[data-theme="dark"] .footer-link {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .footer-link:hover {
    color: var(--primary) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .nav {
        gap: 0.375rem !important;
    }

    .nav-link {
        padding: 0.5rem 0.625rem !important;
        font-size: 0.85rem !important;
    }

    .footer {
        padding: 1rem 0 !important;
    }
}