/* --- OHMYBUDGET PREMIUM THEME V4.1 --- */
:root {
    /* PALETTE: Modern Fintech (Deep Emerald & Slate) */
    --primary-color: #059669;   /* Emerald 600 */
    --primary-hover: #047857;   /* Emerald 700 */
    --primary-subtle: #ecfdf5;  /* Emerald 50 */
    
    --bg-body: #f9fafb;         /* Gray 50 */
    --bg-surface: #ffffff;      /* White */
    
    --sidebar-bg: #ffffff;      
    --border-color: #e5e7eb;    /* Gray 200 */
    
    /* Text */
    --text-main: #111827;       /* Gray 900 */
    --text-muted: #6b7280;      /* Gray 500 */
    
    /* Functional */
    --income-color: #10b981;    
    --expense-color: #ef4444;   
    
    /* Dimensions */
    --radius-sm: 6px;
    --radius-md: 10px;          /* Less bubbly */
    --radius-lg: 16px;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif; /* Crisp Font */
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
    font-size: 0.925rem;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: -0.02em;
}

a { text-decoration: none; color: var(--primary-color); transition: 0.2s; }
a:hover { color: var(--primary-hover); }

.text-wine { color: var(--expense-color) !important; }
.text-leaf { color: var(--income-color) !important; }
.text-muted { color: var(--text-muted) !important; }

/* CARDS */
.card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); /* Subtle Tailwind-style shadow */
    margin-bottom: 1rem;
}
.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
}
.card-header h5 { font-size: 0.95rem; margin: 0; font-weight: 600; color: var(--text-main); }
.card-body { padding: 1.25rem; }

/* BUTTONS */
.btn {
    border-radius: var(--radius-sm); /* Tighter */
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    transition: all 0.15s ease-in-out;
}
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
}

/* FORMS */
.form-control, .form-select {
    border-radius: var(--radius-sm);
    border: 1px solid #d1d5db;
    padding: 0.5rem 0.75rem;
    font-size: 0.95rem;
    color: var(--text-main);
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

/* MOBILE NAV */
.mobile-bottom-nav { display: none; }
@media (max-width: 767.98px) {
    body { padding-bottom: 70px; }
    #sidebar-wrapper { display: none !important; }
    .mobile-bottom-nav {
        display: flex; justify-content: space-between; align-items: center;
        position: fixed; bottom: 0; left: 0; right: 0; height: 60px;
        background-color: #ffffff; border-top: 1px solid var(--border-color);
        z-index: 1050; padding-bottom: env(safe-area-inset-bottom);
        padding-left: 15px; padding-right: 15px;
        box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.05);
    }
    .mobile-nav-item {
        text-align: center; color: #9ca3af; font-size: 0.65rem; font-weight: 600;
        flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    }
    .mobile-nav-item i { font-size: 1.3rem; margin-bottom: 2px; }
    .mobile-nav-item.active-link { color: var(--primary-color); }
    
    .mobile-nav-add {
        width: 48px; height: 48px; 
        border-radius: 14px; /* Squircle */
        background: var(--primary-color);
        display: flex; align-items: center; justify-content: center;
        margin-top: -24px; margin-left: auto; margin-right: auto;
        border: 4px solid #ffffff;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }
    .mobile-nav-add i { color: white !important; font-size: 1.6rem; line-height: 1; }
}

/* UTILS */
.logo-awesome { display: block; margin: 0 auto; }
#dim-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background-color: rgba(0, 0, 0, 0.5); backdrop-filter: blur(2px); z-index: 990; opacity: 0; visibility: hidden; transition: opacity 0.2s; pointer-events: none; }
#dim-overlay.active { opacity: 1; visibility: visible; pointer-events: auto; }
.dropdown-menu.show { z-index: 1100 !important; position: absolute; }
.dropup { position: relative; z-index: auto; }
.btn-glass { background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.3); color: white !important; transition: 0.2s; }
.btn-glass:hover { background: white; color: var(--primary-color) !important; }

/* --- FIXED HEATMAP STYLES --- */

/* The Container */
.calendar-wrapper {
    max-width: 900px; /* Wider for better spacing */
    margin: 0 auto;
    width: 100%;
}

/* The Table */
.minimal-calendar {
    width: 100%;
    border-collapse: separate; /* Better for rounded corners than collapse */
    border-spacing: 0;
    table-layout: fixed; /* Forces equal columns */
}

/* The Headers (M T W T F S S) */
.minimal-calendar th {
    width: 14.28%; /* 100% divided by 7 columns */
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding-bottom: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* The Day Cell */
.cal-cell {
    width: 14.28%; /* Force width here too */
    vertical-align: top; /* Align to top */
    padding: 5px; /* Spacing between cells */
    height: auto;
}

/* The Day Container (Square) */
.cal-content {
    aspect-ratio: 1 / 1; /* Forces Square */
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 12px; /* Soft square, matches theme */
    transition: all 0.2s ease;
    cursor: pointer;
}

.cal-content:hover {
    background-color: rgba(0,0,0,0.03);
    transform: translateY(-2px);
}

/* The Date Number */
.cal-date {
    z-index: 3;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
    position: relative;
}

/* The Glowing Orb (Background) */
.mood-orb {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    border-radius: 50%;
    filter: blur(8px);
    z-index: 1;
    opacity: 0.6;
}

/* Current Day Indicator */
.is-today .cal-date {
    background-color: var(--text-main);
    color: white;
    width: 28px;
    height: 28px;
    line-height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .cal-cell { padding: 2px; } /* Tighter spacing on phone */
    .cal-date { font-size: 0.8rem; }
    .minimal-calendar th { font-size: 0.7rem; padding-bottom: 10px; }
    .mood-orb { width: 90%; height: 90%; filter: blur(4px); }
}
/* --- NOTIFICATION BELL --- */
.notification-btn {
    position: relative;
    color: var(--text-muted);
    background: transparent;
    border: none;
    font-size: 1.2rem;
    transition: color 0.2s;
    padding: 5px;
}

.notification-btn:hover {
    color: var(--primary-color);
}

/* The Red Dot */
.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background-color: #ef4444; /* Red */
    border: 2px solid #ffffff; /* White border to cut it out */
    border-radius: 50%;
}

/* Pulse Animation if there are notifs */
.notification-badge.pulse {
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Desktop Sidebar Placement */
.sidebar-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px 10px 15px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}
