/* ============================================
   Expense Manager - Professional Green & White Theme
   ============================================ */

:root {
    --primary-green: #22c55e;
    --primary-green-dark: #16a34a;
    --primary-green-light: #4ade80;
    --primary-green-lighter: #dcfce7;
    --success: #22c55e;
    --success-dark: #16a34a;
    --warning: #f59e0b;
    --warning-dark: #d97706;
    --error: #ef4444;
    --error-dark: #dc2626;
    --info: #3b82f6;
    --info-dark: #2563eb;
    --secondary: #6b7280;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 50%, #f0f9ff 100%);
    background-attachment: fixed;
    color: var(--gray-900);
    line-height: 1.7;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 15px;
}

.main-content-wrapper {
    margin-left: 260px;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
    background: transparent;
}

.main-content-wrapper.side-menu-hidden {
    margin-left: 0;
}

.side-menu.side-menu-hidden {
    transform: translateX(-100%);
}

.container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 25px 20px;
}

.mobile-only {
    display: none;
}

.desktop-only {
    display: block;
}

/* ============================================
   Top Header (Mobile Only)
   ============================================ */

.top-header {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1002;
    border-bottom: 3px solid var(--primary-green-light);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.top-header-content {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.top-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.top-header h2 i {
    font-size: 1.3rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 10px;
    border-radius: 6px;
}

.menu-toggle {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1003;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    margin-left: auto;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

.menu-toggle.active {
    background: rgba(255, 255, 255, 0.3);
}

/* ============================================
   Side Menu (Always visible on desktop, toggle on mobile)
   ============================================ */

.side-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}

.side-menu-overlay.active {
    display: block;
    opacity: 1;
}

.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 2px solid var(--gray-200);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.side-menu.mobile-menu {
    top: 60px;
    height: calc(100vh - 60px);
}

.side-menu-header {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
    padding: 24px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    min-height: 85px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.side-menu-header.mobile-only {
    min-height: 60px;
    padding: 15px 20px;
}

.side-menu-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.side-menu-toggle-desktop {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    font-size: 1.2rem;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.side-menu-toggle-desktop:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.floating-menu-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
    border: none;
    color: white;
    font-size: 1.3rem;
    border-radius: 12px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
    z-index: 1002;
    transition: all 0.3s ease;
}

.floating-menu-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.4);
}

.floating-menu-toggle.show {
    display: flex;
}

.side-menu-logo i {
    font-size: 2.1rem;
    color: white;
    background: rgba(255, 255, 255, 0.2);
    padding: 13px;
    border-radius: 14px;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.side-menu-logo:hover i {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.logo-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.logo-text h3 {
    color: white;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logo-text p {
    color: rgba(255, 255, 255, 0.8);
    margin: 2px 0 0 0;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.side-menu-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    font-size: 1.3rem;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.side-menu-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

.side-menu-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--gray-300) transparent;
}

.side-menu-nav::-webkit-scrollbar {
    width: 6px;
}

.side-menu-nav::-webkit-scrollbar-track {
    background: transparent;
}

.side-menu-nav::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

.side-menu-nav::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

.side-nav-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 17px 24px;
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid transparent;
    margin: 5px 14px;
    border-radius: 0 14px 14px 0;
    position: relative;
    white-space: nowrap;
    background: transparent;
}

.side-nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-green);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.side-nav-link i {
    font-size: 1.25rem;
    color: var(--gray-600);
    width: 32px;
    height: 32px;
    text-align: center;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    padding: 9px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.side-nav-link span {
    flex: 1;
    font-weight: 500;
}

.side-nav-link:hover {
    background: linear-gradient(90deg, var(--primary-green-lighter) 0%, rgba(34, 197, 94, 0.08) 100%);
    color: var(--primary-green-dark);
    border-left-color: var(--primary-green);
    padding-left: 28px;
    transform: translateX(5px);
    box-shadow: 0 3px 12px rgba(34, 197, 94, 0.18);
}

.side-nav-link:hover i {
    color: white;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(34, 197, 94, 0.3);
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.3);
}

.side-nav-link.active {
    background: linear-gradient(90deg, var(--primary-green-lighter) 0%, rgba(34, 197, 94, 0.15) 100%);
    border-left-color: var(--primary-green);
    color: var(--primary-green-dark);
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.25);
    padding-left: 28px;
    transform: translateX(5px);
}

.side-nav-link.active::before {
    transform: scaleY(1);
}

.side-nav-link.active i {
    color: white;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.45);
    transform: scale(1.05);
}

.side-menu-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--gray-200) 20%, var(--gray-200) 80%, transparent 100%);
    margin: 12px 20px;
    border-radius: 2px;
}

.side-nav-link.logout {
    color: var(--error);
    margin-top: 5px;
}

.side-nav-link.logout i {
    color: var(--error);
}

.side-nav-link.logout:hover {
    background: linear-gradient(90deg, #f8d7da 0%, rgba(220, 53, 69, 0.05) 100%);
    border-left-color: var(--error);
    color: var(--error-dark);
}

.side-nav-link.logout:hover i {
    color: var(--error);
}

.side-menu-footer {
    padding: 22px;
    border-top: 2px solid var(--gray-200);
    background: linear-gradient(180deg, var(--gray-50) 0%, #ffffff 100%);
    text-align: center;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
    margin-top: auto;
}

.side-menu-footer p {
    margin: 0;
    color: var(--gray-600);
    font-size: 0.85rem;
    font-weight: 500;
}

/* ============================================
   Page Header
   ============================================ */

.page-header {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    padding: 25px 30px;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
    border-left: 5px solid var(--primary-green);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(229, 231, 235, 0.8);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 15px;
}

.page-header-content {
    flex: 1;
    min-width: 0;
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
    letter-spacing: -0.5px;
}

.page-header .page-header-content h1 {
    margin-bottom: 10px;
}

.page-header h1 i {
    color: var(--primary-green);
    font-size: 1.6rem;
    background: var(--primary-green-lighter);
    padding: 10px;
    border-radius: 10px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-header .subtitle {
    color: var(--gray-600);
    font-size: 0.95rem;
    font-weight: 500;
    margin: 0;
    position: relative;
    z-index: 1;
}

/* ============================================
   Cards
   ============================================ */

.card {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    margin-bottom: 25px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(229, 231, 235, 0.8);
    position: relative;
}

.modern-card {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border: 1px solid rgba(229, 231, 235, 0.8);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    position: relative;
}

.card::before,
.modern-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-green);
    transform: scaleY(0);
    transition: transform 0.3s ease;
    z-index: 1;
}

.card:hover::before,
.modern-card:hover::before {
    transform: scaleY(1);
}

.card:hover,
.modern-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-green-light);
    border-left-width: 5px;
}

.card-header {
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    padding: 22px 28px;
    border-bottom: 2px solid rgba(229, 231, 235, 0.6);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
    position: relative;
}

.card-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green) 0%, var(--primary-green-light) 100%);
    transform: scaleX(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover .card-header::after {
    transform: scaleX(1);
}

.card-header h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.3px;
}

.card-header h2 i {
    color: white;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 1.25rem;
    box-shadow: 0 4px 6px rgba(34, 197, 94, 0.2);
}

.card-body {
    padding: 28px;
    background: white;
}

/* ============================================
   Summary Cards (Dashboard Overview)
   ============================================ */

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 18px;
    margin-bottom: 25px;
}

.summary-cards.dashboard-main-stats {
    grid-template-columns: repeat(2, 1fr) !important;
}

.dashboard-cards {
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.summary-cards.stats-three-column {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 18px;
}

.summary-cards.stats-banks {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 18px;
}

.summary-cards.stats-two-column {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 18px;
}

.dashboard-main-stats {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 18px;
    margin-bottom: 0;
}

.dashboard-overview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 25px;
}

.content-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border-radius: var(--radius-lg);
    padding: 25px 28px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(229, 231, 235, 0.8);
    border-top: 5px solid var(--primary-green);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.06) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.stat-card:hover .stat-icon {
    transform: scale(1.08) rotate(2deg);
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.4), 0 4px 8px rgba(34, 197, 94, 0.25);
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-green-light);
    border-top-width: 5px;
}

.stat-card.stat-success {
    border-top-color: var(--success);
}

.stat-card.stat-warning {
    border-top-color: var(--warning);
}

.stat-card.stat-error {
    border-top-color: var(--error);
}

.stat-card.stat-info {
    border-top-color: var(--info);
}

.stat-card.stat-secondary {
    border-top-color: var(--secondary);
}

.stat-icon {
    font-size: 2.8rem;
    line-height: 1;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
    padding: 18px;
    border-radius: 18px;
    width: 80px;
    height: 80px;
    position: relative;
    z-index: 1;
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.3), 0 2px 6px rgba(34, 197, 94, 0.2);
    transition: all 0.4s ease;
}

.stat-icon i {
    font-size: inherit;
}

.stat-content {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
    width: 100%;
    overflow: hidden;
}

.stat-content h3 {
    font-size: 0.8rem;
    color: var(--gray-600);
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    margin: 8px 0;
    color: var(--gray-900);
    line-height: 1.1;
    word-break: break-word;
    overflow-wrap: break-word;
    letter-spacing: -1.2px;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    display: block;
    width: 100%;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--gray-600);
    margin-top: 5px;
    font-weight: 500;
    line-height: 1.4;
}

.stat-success .stat-value {
    color: var(--success);
}

.stat-warning .stat-value {
    color: var(--warning-dark);
}

.stat-error .stat-value {
    color: var(--error);
}

.stat-info .stat-value {
    color: var(--info);
}

.stat-secondary .stat-value {
    color: var(--secondary);
}

/* ============================================
   Forms
   ============================================ */

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--gray-800);
    font-size: 0.875rem;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    color: var(--gray-900);
    font-family: inherit;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.form-control:hover {
    border-color: var(--primary-green-light);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.06), 0 2px 4px rgba(0, 0, 0, 0.05);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
    background: #ffffff;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

select.form-control {
    cursor: pointer;
}

.modern-form {
    max-width: 100%;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    padding: 11px 22px;
    border: none;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    text-align: center;
    font-family: inherit;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.2px;
    border: 1px solid transparent;
}

.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:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35), 0 2px 4px rgba(34, 197, 94, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-green-dark) 0%, var(--primary-green) 100%);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.45), 0 3px 6px rgba(34, 197, 94, 0.25);
    transform: translateY(-3px);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, var(--success-dark) 0%, var(--success) 100%);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning) 0%, var(--warning-dark) 100%);
    color: var(--gray-900);
}

.btn-warning:hover {
    background: linear-gradient(135deg, var(--warning-dark) 0%, var(--warning) 100%);
}

.btn-danger {
    background: linear-gradient(135deg, var(--error) 0%, var(--error-dark) 100%);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, var(--error-dark) 0%, var(--error) 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--gray-700) 100%);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--gray-700) 0%, var(--secondary) 100%);
}

.btn-info {
    background: linear-gradient(135deg, var(--info) 0%, #138496 100%);
    color: white;
}

.btn-block {
    width: 100%;
    display: flex;
}

.btn-sm {
    padding: 10px 18px;
    font-size: 0.875rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

/* ============================================
   Alerts
   ============================================ */

.alert {
    padding: 18px 24px;
    border-radius: var(--radius-sm);
    margin-bottom: 25px;
    border-left: 5px solid;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    background: white;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: var(--primary-green-lighter);
    border-color: var(--success);
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    border-color: var(--error);
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    border-color: var(--warning);
    color: #856404;
}

.alert-info {
    background: #d1ecf1;
    border-color: var(--info);
    color: #0c5460;
}

/* ============================================
   Tables
   ============================================ */

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-sm);
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    margin: 0;
    table-layout: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(229, 231, 235, 0.8);
}

.modern-table {
    box-shadow: none;
}

.data-table thead {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
}

.data-table th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 700;
    color: var(--gray-800);
    border-bottom: 3px solid var(--primary-green);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    white-space: nowrap;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
}

.data-table td {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(229, 231, 235, 0.6);
    color: var(--gray-800);
    vertical-align: middle;
    background: white;
    font-size: 0.875rem;
}

.data-table td.amount-cell {
    white-space: nowrap;
    text-align: right !important;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    min-width: 120px;
}

/* Target table cells containing amount classes */
.data-table td:has(.amount-positive),
.data-table td:has(.amount-negative),
.data-table td:has(.amount-success),
.data-table td:has(.amount-warning),
.data-table td:has(.amount-error) {
    white-space: nowrap;
    text-align: right !important;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    min-width: 120px;
}

.data-table td.amount-cell .amount-positive,
.data-table td.amount-cell .amount-negative,
.data-table td.amount-cell .amount-success,
.data-table td.amount-cell .amount-warning,
.data-table td.amount-cell .amount-error,
.data-table td .amount-positive,
.data-table td .amount-negative,
.data-table td .amount-success,
.data-table td .amount-warning,
.data-table td .amount-error {
    display: inline-block;
    white-space: nowrap;
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

.data-table tbody tr {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.data-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.06) 0%, rgba(34, 197, 94, 0.03) 100%);
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.text-right {
    text-align: right !important;
}

.text-center {
    text-align: center !important;
}

.text-left {
    text-align: left !important;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: nowrap;
}

.text-muted {
    color: var(--gray-600);
    font-size: 0.875rem;
}

/* Amount Colors */
.amount-positive {
    color: var(--success);
    font-weight: 700;
    white-space: nowrap;
    display: inline-block;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    text-align: right;
}

.amount-negative {
    color: var(--error);
    font-weight: 700;
    white-space: nowrap;
    display: inline-block;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    text-align: right;
}

.amount-success {
    color: var(--success);
    font-weight: 600;
    white-space: nowrap;
    display: inline-block;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    text-align: right;
}

.amount-warning {
    color: var(--warning-dark);
    font-weight: 600;
    white-space: nowrap;
    display: inline-block;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    text-align: right;
}

.amount-error {
    color: var(--error);
    font-weight: 600;
    white-space: nowrap;
    display: inline-block;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    text-align: right;
}

.success-text {
    color: var(--success);
    font-weight: 600;
}

.warning-text {
    color: var(--warning-dark);
    font-weight: 600;
}

.error-text {
    color: var(--error);
    font-weight: 600;
}

.info-text {
    color: var(--info);
    font-weight: 600;
}

/* ============================================
   Badges
   ============================================ */

.badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: var(--primary-green-lighter);
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-error {
    background: #f8d7da;
    color: #721c24;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* ============================================
   Content Grid
   ============================================ */

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

/* ============================================
   Person Info
   ============================================ */

.person-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.person-info strong {
    color: var(--gray-900);
    font-weight: 600;
    display: block;
}

.person-info small {
    color: var(--gray-600);
    font-size: 0.85rem;
    display: block;
}

/* ============================================
   Empty State
   ============================================ */

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-600);
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 25px;
}

/* ============================================
   Login Page
   ============================================ */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: move 20s linear infinite;
}

@keyframes move {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.login-container {
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 1;
}

.login-box {
    background: white;
    border-radius: var(--radius-lg);
    padding: 50px;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-green);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    letter-spacing: -1px;
}

.login-header h1 i {
    font-size: 2.2rem;
    background: var(--primary-green-lighter);
    padding: 12px 16px;
    border-radius: 12px;
}

.login-header p {
    color: var(--gray-600);
    font-size: 1.05rem;
    font-weight: 500;
}

.login-form {
    margin-top: 35px;
}

.login-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid var(--gray-200);
    color: var(--gray-600);
    font-size: 0.9rem;
}

.login-footer a {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 600;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* ============================================
   Modal / Popup
   ============================================ */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    z-index: 9998;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 8px 16px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    z-index: 9999;
    animation: modalSlideIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(229, 231, 235, 0.8);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 28px 32px;
    border-bottom: 2px solid rgba(229, 231, 235, 0.6);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    border-radius: 20px 20px 0 0;
    border-left: 5px solid var(--primary-green);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-header h2 i {
    color: var(--primary-green);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-600);
    cursor: pointer;
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--gray-200);
    color: var(--gray-900);
}

.modal-body {
    padding: 32px;
    background: white;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        width: 100%;
        padding: 30px 25px;
    }
    
    .header-content {
        padding: 18px 25px;
    }
}

.month-select {
    display: inline-block;
    width: auto;
    padding: 8px 12px;
    font-size: 0.9rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm);
}

@media (max-width: 992px) {
    .stat-value {
        font-size: 2rem;
        letter-spacing: -1px;
    }
    
    .stat-icon {
        width: 85px;
        height: 85px;
        font-size: 3rem;
    }
    
    .stat-card {
        padding: 30px 25px;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .mobile-only {
        display: block;
    }
    
    .desktop-only {
        display: none;
    }
    
    .main-content-wrapper {
        margin-left: 0;
        padding-top: 60px;
        padding-bottom: 75px; /* Space for bottom nav */
    }
    
    .main-content-wrapper.side-menu-hidden {
        margin-left: 0;
    }
    
    .mobile-bottom-nav {
        display: flex !important; /* Show bottom nav on mobile */
    }
    
    .mobile-bottom-nav.mobile-only {
        display: flex !important;
    }
    
    .side-menu {
        transform: translateX(-100%);
        top: 60px;
        height: calc(100vh - 60px);
    }
    
    .side-menu.active {
        transform: translateX(0);
    }
    
    .side-menu-overlay.active {
        display: block;
    }
    
    /* Only fix page headers - keep other blocks as before */
    .container {
        padding: 15px 12px;
    }
    
    .page-header {
        padding: 18px 16px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .page-header-content {
        flex: 1;
        min-width: 0;
    }
    
    .page-header h1 {
        font-size: 1.3rem;
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: nowrap;
    }
    
    .page-header h1 i {
        font-size: 1.1rem;
        padding: 6px 8px;
        width: 40px;
        height: 40px;
    }
    
    .page-header .subtitle {
        font-size: 0.75rem;
    }
    
    .page-header-actions {
        display: flex;
        align-items: center;
        gap: 6px;
        flex-wrap: nowrap;
        flex-shrink: 0;
    }
    
    .page-header-actions .btn {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 8px 14px;
        font-size: 0.8rem;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .content-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .dashboard-overview-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 25px;
    }
    
    .summary-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .dashboard-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .summary-cards.stats-three-column {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    .summary-cards.stats-banks {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    .summary-cards.stats-two-column {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    .dashboard-main-stats {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .stat-card {
        padding: 20px;
        gap: 15px;
        flex-direction: row;
    }
    
    .stat-icon {
        width: 70px;
        height: 70px;
        font-size: 2.2rem;
        padding: 12px;
    }
    
    .stat-value {
        font-size: 1.75rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .page-header {
        padding: 30px 20px;
    }
    
    .page-header h1 {
        font-size: 2rem;
        flex-wrap: wrap;
    }
    
    .page-header h1 i {
        padding: 8px 12px;
    }
    
    .card-body {
        padding: 20px;
    }
    
    .card-header {
        padding: 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .card-header h2 {
        font-size: 1.25rem;
        width: 100%;
    }
    
    .data-table {
        font-size: 0.85rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px 12px;
    }
    
    .table-responsive {
        border-radius: var(--radius-sm);
        margin: 0 -20px;
        padding: 0 20px;
    }
    
    .month-select {
        width: 100%;
        margin-top: 10px;
    }
    
    .btn-sm {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px 12px;
    }
    
    .top-header-content {
        padding: 12px 15px;
    }
    
    .top-header h2 {
        font-size: 1.2rem;
    }
    
    .top-header h2 i {
        font-size: 1.1rem;
        padding: 5px 8px;
    }
    
    .side-menu {
        width: 260px;
    }
    
    .side-menu-header {
        padding: 20px 15px;
    }
    
    .side-menu-logo i {
        font-size: 1.5rem;
        width: 40px;
        height: 40px;
        padding: 10px;
    }
    
    .logo-text h3 {
        font-size: 1.1rem;
    }
    
    .side-nav-link {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    /* Keep same layout, just smaller */
    .page-header {
        padding: 16px 12px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        margin-bottom: 18px;
    }
    
    .page-header h1 {
        font-size: 1.15rem;
        display: flex;
        align-items: center;
        gap: 7px;
        flex-direction: row;
    }
    
    .page-header h1 i {
        padding: 5px 7px;
        font-size: 0.95rem;
        width: 36px;
        height: 36px;
    }
    
    .page-header .subtitle {
        font-size: 0.7rem;
    }
    
    .page-header-actions {
        gap: 5px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        flex-wrap: nowrap;
    }
    
    .page-header-actions .btn {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 7px 12px;
        font-size: 0.75rem;
    }
    
    .summary-cards {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
        padding: 16px 12px;
        gap: 12px;
        align-items: center;
    }
    
    .stat-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
        margin: 0 auto;
    }
    
    .stat-value {
        font-size: 1.4rem;
    }
    
    .card-body {
        padding: 14px;
    }
    
    .card-header {
        padding: 14px;
    }
    
    .card-header h2 {
        font-size: 1rem;
    }
    
    .data-table {
        font-size: 0.8rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 10px;
    }
    
    .data-table th {
        font-size: 0.75rem;
    }
    
    .table-responsive {
        margin: 0 -15px;
        padding: 0 15px;
    }
    
    .login-box {
        padding: 30px 20px;
    }
    
    .btn {
        padding: 8px 14px;
        font-size: 0.8rem;
        white-space: nowrap;
    }
    
    .btn-sm {
        padding: 6px 12px;
        font-size: 0.75rem;
    }
    
    .action-buttons {
        gap: 6px;
        flex-wrap: nowrap;
    }
    
    .page-header-actions {
        gap: 6px;
        flex-wrap: nowrap;
    }
    
    .page-header-actions .btn {
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .form-control {
        padding: 12px 14px;
        font-size: 0.95rem;
    }
    
    .person-info {
        font-size: 0.9rem;
    }
}

/* ============================================
   Mobile Bottom Navigation
   ============================================ */

.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border-top: 3px solid rgba(229, 231, 235, 0.8);
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.12), 0 -2px 8px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    display: none; /* Hidden by default, shown only on mobile */
    justify-content: space-around;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    align-items: center;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    backdrop-filter: blur(10px);
    width: 100%;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    text-decoration: none;
    color: var(--gray-600);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    position: relative;
    flex: 1;
    max-width: 120px;
    flex: 1;
    max-width: 100px;
    position: relative;
}

.bottom-nav-item i {
    font-size: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--gray-500);
    padding: 8px;
    border-radius: 10px;
    background: transparent;
}

.bottom-nav-item span {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
    color: var(--primary-green-dark);
    background: linear-gradient(135deg, var(--primary-green-lighter) 0%, rgba(34, 197, 94, 0.08) 100%);
    transform: translateY(-2px);
}

.bottom-nav-item:hover i,
.bottom-nav-item.active i {
    color: white;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
    border-radius: 0 0 6px 6px;
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.4);
}
