/* Frutiger Aero Glass UI - Cyan, Purple, Dark Theme */
:root {
    --nav-bar-height: 70px;
    /* stacking order: navbar must always appear above nav-column */
    --nav-bar-z: 1000;
    --nav-column-z: 100;
    --nav-column-active-z: 100;
    --primary-gradient: linear-gradient(135deg, #00d4ff 0%, #9d4edd 50%, #7b2cbf 100%);
    --primary-color: #00d4ff;
    --secondary-color: #9d4edd;
    --accent-color: #7b2cbf;
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --text-muted: #a0a0a0;
    --text-dark: #1a1a2e;
    --background-dark: #0a0a0f;
    --background-glass: rgba(255, 255, 255, 0.08);
    --background-glass-light: rgba(255, 255, 255, 0.12);
    --background-glass-solid: rgba(20, 20, 35, 0.85);
    --background-overlay: rgba(10, 10, 15, 0.9);
    --border-glass: rgba(255, 255, 255, 0.15);
    --border-glow: rgba(0, 212, 255, 0.3);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 25px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow-cyan: 0 0 30px rgba(0, 212, 255, 0.3), 0 0 60px rgba(0, 212, 255, 0.1);
    --shadow-glow-purple: 0 0 30px rgba(157, 78, 221, 0.3), 0 0 60px rgba(157, 78, 221, 0.1);
    --shadow-primary: 0 4px 20px rgba(0, 212, 255, 0.4);
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --blur-glass: blur(20px);
    --blur-glass-strong: blur(30px);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
}

/* Modern scrollbar styling - Glass Aero */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    border-radius: 5px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #00e5ff, #b366e8);
    background-clip: padding-box;
}

/* Modern selection styling */
::selection {
    background: rgba(0, 212, 255, 0.3);
    color: var(--text-primary);
}

@font-face {
    font-family: 'Exson';
    src: url("/static/font/ginder.d8ef74a11ad9.ttf") format('opentype');
    font-weight: normal;
    font-style: normal;
}


body {
    font-family: 'Inter', sans-serif;
}

h1, h2, h3, p, a, label, input, strong, select, option, textarea {
    font-family: 'Inter', sans-serif; /* Apply to specific elements if needed */
}

body, html {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 25%, #16213e 50%, #0f3460 75%, #1a1a2e 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: #ffffff;
    line-height: 1.6;
    font-weight: 400;
    scroll-behavior: smooth;
    position: relative;
}

/* Animated background orbs for Frutiger Aero effect */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(ellipse 600px 600px at 20% 20%, rgba(0, 212, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 500px 500px at 80% 30%, rgba(157, 78, 221, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 400px 400px at 40% 80%, rgba(123, 44, 191, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse 300px 300px at 90% 70%, rgba(0, 212, 255, 0.08) 0%, transparent 50%);
    animation: floatOrbs 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes floatOrbs {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(-2%, 2%) rotate(1deg); }
    50% { transform: translate(1%, -1%) rotate(-0.5deg); }
    75% { transform: translate(2%, 1%) rotate(0.5deg); }
}

/* Home page specific styling - no scrolling */
body.home-page, html.home-page {
    height: 100vh;
    overflow: hidden;
}

/* Apply the custom font to the title - Glass Aero Style */
.title {
    font-family: 'Inter', sans-serif;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    background: linear-gradient(135deg, #00d4ff 0%, #9d4edd 50%, #7b2cbf 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    letter-spacing: -0.02em;
    margin: 0;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.2));
}

h1 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 600;
    color: #ffffff;
    text-align: left;
    margin-top: 0;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

p {
    font-size: 1rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
    font-weight: 400;
}   

/* Modern form styling - Glass Aero */
form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 420px;
    margin: 0 auto;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
}

form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.3), rgba(157, 78, 221, 0.3), transparent);
}

/* Modern input styling - Glass Aero */
input {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: #ffffff;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    width: 100%;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.2s ease;
    outline: none;
}

input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

input:focus {
    border-color: rgba(0, 212, 255, 0.4);
    box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.1);
    background: rgba(255, 255, 255, 0.06);
}

.nav-bar {
    position: fixed;
    top: 0;
    z-index: var(--nav-bar-z);
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    box-sizing: border-box;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-bar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.4), rgba(157, 78, 221, 0.4), transparent);
}

/* Responsive nav-bar adjustments */
@media (max-width: 768px) {
    :root { --nav-bar-height: 56px; }
    .nav-bar {
        padding: 0.75rem 1rem;
        gap: 0.5rem;
    }
    
    .nav-bar .title {
        font-size: 1.2rem;
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    :root { --nav-bar-height: 48px; }
    .nav-bar {
        padding: 0.5rem 0.75rem;
    }
    
    .nav-bar .title {
        font-size: 1.1rem;
    }
}

.nav-bar .title {
    margin-left: 0;
    color: #ffffff;
    align-items: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.nav-bar .title:hover {
    background: linear-gradient(135deg, #00d4ff, #9d4edd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transform: scale(1.05);
    filter: drop-shadow(0 0 15px rgba(0, 212, 255, 0.4));
}

.menu-content a {
    color: rgba(255, 255, 255, 0.8);
    padding: 12px 24px;
    text-decoration: none;
    font-weight: 500;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.menu-content a:hover {
    background: rgba(0, 212, 255, 0.15);
    color: #00d4ff;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

.nav-bar .menu-icon {
    display: block;
    margin-right: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 28px;
    cursor: pointer;
    padding: 8px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

/* Organization Switcher Styles */
.org-switcher {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: auto;
    margin-right: 1rem;
}

.org-switcher-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.org-switcher-btn:hover {
    background: rgba(0, 212, 255, 0.15);
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
}

.org-switcher-btn i.fa-building {
    color: var(--primary-color);
}

.org-switcher-btn .org-name {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.org-switcher-btn .org-chevron {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.org-dropdown.show + .org-switcher-btn .org-chevron,
.org-switcher-btn:focus + .org-dropdown.show ~ .org-chevron {
    transform: rotate(180deg);
}

.org-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 280px;
    background: rgba(20, 20, 35, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    overflow: hidden;
}

.org-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.org-dropdown-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.org-list {
    max-height: 250px;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.org-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.org-item:hover {
    background: rgba(0, 212, 255, 0.1);
}

.org-item.active {
    background: linear-gradient(90deg, rgba(0, 212, 255, 0.15), rgba(157, 78, 221, 0.15));
}

.org-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.org-item-name {
    color: #ffffff;
    font-weight: 500;
    font-size: 0.95rem;
}

.org-item-role {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    text-transform: capitalize;
}

.org-check {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.org-dropdown-footer {
    padding: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.org-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.6rem 1rem;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: var(--primary-color);
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.org-action-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

/* Mobile responsive for org switcher */
@media (max-width: 768px) {
    .org-switcher {
        margin-right: 0.5rem;
    }
    
    .org-switcher-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .org-switcher-btn .org-name {
        max-width: 80px;
    }
    
    .org-dropdown {
        position: fixed;
        top: var(--nav-bar-height, 70px);
        left: 10px;
        right: 10px;
        min-width: auto;
        width: calc(100% - 20px);
        max-height: calc(100vh - var(--nav-bar-height, 70px) - 32px);
        overflow-y: auto;
    }
}

@media (max-width: 480px) {
    .org-switcher-btn .org-name {
        display: none;
    }
    
    .org-switcher-btn {
        padding: 0.4rem;
    }
    
    .org-dropdown {
        position: fixed;
        top: 60px;
        left: 8px;
        right: 8px;
        min-width: auto;
        width: calc(100% - 16px);
    }
}

/* Hide menu icon on desktop when sidebar is visible */
@media (min-width: 1421px) {
    .nav-bar .menu-icon {
        display: none;
    }
}

/* Show menu icon on smaller screens */
@media (max-width: 1420px) {
    .nav-bar .menu-icon {
        display: block;
        font-size: 24px; /* Slightly smaller on mobile */
        padding: 6px;
    }
}

.user-info.info-content p {
    color: rgba(255, 255, 255, 0.7);
}

.menu-icon:hover {
    color: #00d4ff;
    background: rgba(0, 212, 255, 0.15);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.welcome_buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
}

.try_now_button {
    background: linear-gradient(135deg, #00d4ff 0%, #9d4edd 50%, #7b2cbf 100%);
    color: white;
    padding: 16px 32px;
    text-decoration: none;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 20px rgba(0, 212, 255, 0.4),
        0 0 40px rgba(0, 212, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.try_now_button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.try_now_button:hover::before {
    left: 100%;
}


.try_now_button:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 8px 30px rgba(0, 212, 255, 0.5),
        0 0 60px rgba(0, 212, 255, 0.3);
}


.inverted_try_now_button {
    padding: 16px 32px;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.inverted_try_now_button:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 8px 30px rgba(157, 78, 221, 0.4),
        0 0 40px rgba(157, 78, 221, 0.2);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(157, 78, 221, 0.5);
    color: #ffffff;
}

.welcome_div {
    padding: 6rem 2rem 4rem;
    margin: 0 auto;
    max-width: 1200px;
    display: flex;
    align-items: center;
    flex-direction: row;
    gap: 4rem;
    min-height: 90vh;
    text-align: justify;
}


.add_div {
    display: none; /* Initially hidden */
    position: fixed; /* Position it over the page */
    top: 0;
    left: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    background-color: rgba(10, 10, 15, 0.85); /* Dark transparent background */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 100000; /* Ensure it appears above other elements */
    justify-content: center; /* Center content horizontally */
    align-items: center; /* Center content vertically */
    flex-direction: column; /* Stack menu items vertically */
}

.overlay-menu {
    display: none; /* Initially hidden */
    position: fixed; /* Position it over the page */
    top: 0;
    left: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    background-color: rgba(10, 10, 15, 0.9); /* Dark transparent background */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 1000; /* Ensure it appears above other elements */
    justify-content: center; /* Center content horizontally */
    align-items: center; /* Center content vertically */
    flex-direction: column; /* Stack menu items vertically */
}

.overlay-menu a {
    color: #ffffff; /* White text for visibility */
    font-size: 1.5rem; /* Larger font size */
    text-decoration: none; /* Remove underline */
    margin: 15px 0; /* Add spacing between links */
    text-align: center; /* Center text */
    transition: all 0.3s ease;
}

.overlay-menu a:hover {
    color: #00d4ff;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.overlay-menu .close-button {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
}

.overlay-menu .close-button:hover {
    color: #00d4ff;
    transform: rotate(90deg);
}

/* Modern button styling - Glass Aero */
button {
    padding: 10px 18px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.8) 0%, rgba(157, 78, 221, 0.8) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 12px rgba(0, 212, 255, 0.2);
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.4s ease;
}

button:hover::before {
    left: 100%;
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 18px rgba(0, 212, 255, 0.3);
}

button:active {
    transform: translateY(0);
}

/* Optional: Add focus styles for inputs */
input:focus {
    outline: none;
    border-color: rgba(0, 212, 255, 0.4);
    box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.1);
}

/* Modern chart container - Glass Aero */
.chart_div {
    padding: 2rem;
    margin: 2rem auto;
    margin-top: 110px; /* Account for fixed nav bar height */
    margin-bottom: 80px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 60px rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    overflow-x: auto;
    box-sizing: border-box;
    transition: all 0.3s ease; /* Smooth transition for responsive changes */
    position: relative;
}

.chart_div::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.4), rgba(157, 78, 221, 0.4), transparent);
}

/* Desktop: With sidebar */
@media (min-width: 1421px) {
    .chart_div {
        margin-left: 270px; /* Account for sidebar */
        margin-right: 20px;
        max-width: calc(100% - 300px);
        width: calc(100% - 300px);
    }
}

/* Smaller screens: No sidebar */
@media (max-width: 1420px) {
    .chart_div {
        margin-left: 20px !important;
        margin-right: 20px !important;
        max-width: calc(100% - 40px) !important;
        width: calc(100% - 40px) !important;
        padding: 1.5rem; /* Slightly less padding on smaller screens */
    }
}


/* Ensure proper dimensions for the chart containers */
#expenses-pie-chart, 
#sales-pie-chart, 
#expenses-user-pie-chart, 
#sales-user-pie-chart, 
#financial-timeline-chart {
    width: 100%; /* Ensure charts span the full width of their container */
    height: 450px; /* Default height for better bar chart visibility */
    display: block; /* Ensure charts are displayed properly */
    min-height: 300px; /* Minimum height for small screens */
    max-height: 600px; /* Maximum height to prevent charts from becoming too large */
}

/* Timeline chart specific styling */
#financial-timeline-chart {
    height: 500px; /* Larger height for timeline chart */
    min-height: 350px; /* Minimum height for timeline readability */
}

/* Specific styling for bar charts */
.chart-section .plotly-graph-div {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Chart container hover effects */
.chart-section:hover .plotly-graph-div {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Fix layout issues in the stats container */
.stats-container {
    display: flex; /* Use flex layout for consistency */
    flex-wrap: wrap; /* Allow charts to wrap if necessary */
    justify-content: space-between; /* Space charts evenly */
    margin: 0 auto; /* Center the container horizontally */
    padding: 20px; /* Add padding for better spacing */
    gap: 20px; /* Add consistent gap between items */
}

/* Ensure proper layout for individual chart sections */
.chart-section {
    width: calc(50% - 10px); /* Account for gap */
    margin-bottom: 0; /* Remove margin since gap handles spacing */
    min-width: 300px; /* Minimum width for readability */
}

/* Ensure the full-width chart is properly displayed */
.full-width-chart {
    width: 100%; /* Ensure the timeline chart spans the full width */
    margin-bottom: 0; /* Remove margin since gap handles spacing */
}


/* Modern welcome text and image styling */
.welcome_text {
    flex: 1;
    padding: 0 2rem 0 0;
    text-align: left;
}


/* Modern Messages and Alerts - Glass Aero */
.messages {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
    max-width: 400px;
}

.alert {
    padding: 0.875rem 1.125rem;
    border-radius: 10px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: slideInUp 0.3s ease-out, fadeOut 0.3s ease-in 2.7s forwards;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    pointer-events: auto;
    min-width: 280px;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(150%);
    }
}

.alert-error {
    background: rgba(239, 68, 68, 0.25);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #fca5a5;
}

.alert-success {
    background: rgba(34, 197, 94, 0.25);
    border: 1px solid rgba(34, 197, 94, 0.5);
    color: #86efac;
}

.alert-info {
    background: rgba(0, 212, 255, 0.25);
    border: 1px solid rgba(0, 212, 255, 0.5);
    color: #7dd3fc;
}

.alert i {
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Mobile responsiveness for alerts */
@media (max-width: 768px) {
    .messages {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
    
    .alert {
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
        min-width: auto;
    }
    
    .alert i {
        font-size: 1rem;
    }
}


.welcome_text h1 {
    font-size: 2.5rem;
    color: #ffffff; /* White text for better contrast */
    margin-bottom: 1rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.welcome_text h2 {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9); /* Light text color for better readability */
    margin-bottom: 0.5rem;
}

.welcome_text h3 {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.85); /* Light text color for better readability */
    margin-bottom: 1.5rem;
}

.welcome_text p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8); /* Light text color for better readability */
    margin-bottom: 1.5rem;
}

.welcome_image {
    flex: 1;
    text-align: center;
    position: relative;
}

.welcome_image img {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 24px;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.4),
        0 0 60px rgba(0, 212, 255, 0.15),
        0 0 100px rgba(157, 78, 221, 0.1);
    transition: transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.welcome_image img:hover {
    transform: scale(1.02);
    box-shadow: 
        0 25px 60px rgba(0, 0, 0, 0.5),
        0 0 80px rgba(0, 212, 255, 0.2),
        0 0 120px rgba(157, 78, 221, 0.15);
}

/* Modern info footer - Glass Aero */
.info {
    position: fixed;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    bottom: 0;
    width: 100%;
    text-align: center;
    font-size: 0.875rem;
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-sizing: border-box;
}

.info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.3), rgba(157, 78, 221, 0.3), transparent);
}

/* Hide info bar on smaller screens */
@media (max-width: 1420px) {
    .info {
        display: none;
    }
}

.info a {
    color: #00d4ff;
    padding: 0.5rem 1rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.info a:hover {
    color: #9d4edd;
    text-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
}

.link {
    text-align: center;
    color: #00d4ff; /* Link color */
    padding: 10px 20px;
    text-decoration: none; /* Removes underline */
}

/* Modern navigation column - Glass Aero Always visible */
.nav-column {
    position: fixed;
    top: var(--nav-bar-height, 70px);
    left: 0;
    width: 240px;
    bottom: 0; /* ensure it always reaches the bottom of the viewport */
    height: auto;
    max-height: calc(100vh - var(--nav-bar-height, 70px));
    padding-bottom: env(safe-area-inset-bottom, 12px);
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    z-index: var(--nav-column-z);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.3s ease;
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.3);
}

.nav-column::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 212, 255, 0.3), rgba(157, 78, 221, 0.3), transparent);
}

.nav-column .nav-top {
    display: flex;
    flex-direction: column;
}

.nav-column .nav-bottom {
    display: flex;
    flex-direction: column;
    margin-top: auto;
}

/* Ensure nav-column is always visible on desktop */
@media (min-width: 1421px) {
    .nav-column {
        transform: translateX(0) !important;
    }
}

/* Hide nav-column on smaller screens */
@media (max-width: 1420px) {
    .nav-column {
        transform: translateX(-100%);
        z-index: var(--nav-column-z); /* Higher z-index when hidden to show over content when toggled */
    }
    
    /* When nav-column is shown on mobile (via JavaScript toggle) */
    .nav-column.active {
        transform: translateX(0);
    }
}

/* Modern navigation links - Glass Aero */
.nav-column a {
    display: block;
    padding: 1rem 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: left;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    position: relative;
}

.nav-column a:hover {
    color: #00d4ff;
    background: rgba(0, 212, 255, 0.1);
    border-left-color: #00d4ff;
    box-shadow: inset 0 0 20px rgba(0, 212, 255, 0.1);
}

.nav-column a.active {
    color: #00d4ff;
    background: rgba(0, 212, 255, 0.15);
    border-left-color: #00d4ff;
    font-weight: 600;
    box-shadow: 
        inset 0 0 30px rgba(0, 212, 255, 0.1),
        0 0 20px rgba(0, 212, 255, 0.1);
}

/* Logout link styling - Glass Aero */
.nav-column a.logout-link {
    color: rgba(248, 113, 113, 0.85);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 0.5rem;
}

.nav-column a.logout-link:hover {
    color: #f87171;
    background: rgba(248, 113, 113, 0.1);
    border-left-color: #f87171;
    box-shadow: inset 0 0 20px rgba(248, 113, 113, 0.1);
}

.nav-column a.logout-link i {
    color: rgba(248, 113, 113, 0.85);
}

.nav-column a.logout-link:hover i {
    color: #f87171;
}



.centered_div {
    margin-top: 90px;
    padding: 2rem;
    border-radius: 24px;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 60px rgba(0, 212, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: calc(100vh - 40vh);
    max-height: calc(100vh - 40vh);
    box-sizing: border-box;
    transition: all 0.3s ease;
    position: relative;
}

.centered_div::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.4), rgba(157, 78, 221, 0.4), transparent);
    border-radius: 24px 24px 0 0;
}

/* Desktop: With sidebar */
@media (min-width: 1421px) {
    .centered_div {
        margin-left: 270px;
        margin-right: 20px;
        width: calc(100% - 300px);
        max-width: calc(100% - 300px);
    }
}

/* Smaller screens: No sidebar */
@media (max-width: 1420px) {
    .centered_div {
        margin-left: 20px;
        margin-right: 20px;
        width: calc(100% - 40px);
        max-width: calc(100% - 40px);
    }
}

.centered_div_noback {
    margin-top: 90px;
    padding: 2rem;
    border-radius: 24px;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    height: calc(100vh - 180px);

    box-sizing: border-box;
    transition: all 0.3s ease;
}

/* Desktop: With sidebar */
@media (min-width: 1421px) {
    .centered_div_noback {
        margin-left: 270px;
        margin-right: 20px;
        width: calc(100% - 300px);
        max-width: calc(100% - 300px);
    }
}

/* Smaller screens: No sidebar */
@media (max-width: 1420px) {
    .centered_div_noback {
        margin-left: 20px;
        margin-right: 20px;
        width: calc(100% - 40px);
        max-width: calc(100% - 40px);
    }
}

.over_div {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 15, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 10001;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
    animation: fadeInOverlay 0.3s ease-out;
}

/* ============================================
   JOIN ORGANIZATION MODAL - UNIQUE STYLING
   Uses dedicated class to avoid conflicts with
   slide-modal.css and calculator.css
   ============================================ */
.join-org-modal-content {
    background: linear-gradient(135deg, rgba(20, 20, 35, 0.98) 0%, rgba(30, 30, 45, 0.95) 100%);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    border: 1px solid rgba(0, 212, 255, 0.15);
    max-width: 400px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    animation: modalSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 10002;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: auto;
    transform: none;
}

.join-org-modal-content .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.join-org-modal-content .modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.join-org-modal-content .close-button {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.7);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
}

.join-org-modal-content .close-button:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.join-org-modal-content .modern-form {
    padding: 24px;
}

.join-org-modal-content .modern-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.join-org-modal-content .modern-form input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: 'Inter', monospace;
    letter-spacing: 2px;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.join-org-modal-content .modern-form input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.join-org-modal-content .form-hint {
    margin-top: 8px;
    margin-bottom: 20px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.join-org-modal-content .form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.join-org-modal-content .primary-button {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.join-org-modal-content .primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.join-org-modal-content .secondary-button {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.join-org-modal-content .secondary-button:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* Ensure modal content inside over_div is properly centered and styled */
.over_div > .modal-content {
    margin: auto;
    position: relative;
    flex-shrink: 0;
    /* Override slide-modal styles completely */
    transform: none !important;
    border-radius: 20px !important;
    border: 1px solid rgba(0, 212, 255, 0.15) !important;
    max-height: 90vh;
    animation: modalSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    /* Ensure proper background and visibility */
    background: linear-gradient(135deg, rgba(20, 20, 35, 0.98) 0%, rgba(30, 30, 45, 0.95) 100%) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05) inset !important;
    padding: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Specific styling for Join Organization modal - highest priority */
#joinOrgModal.over_div {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    justify-content: center;
    align-items: center;
}

#joinOrgModal > .modal-content {
    transform: none !important;
    border-radius: 20px !important;
    margin: auto;
    max-width: 400px;
    width: 100%;
}

@keyframes fadeInOverlay {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modern modal content - Enhanced Glass Aero */
.modal-content {
    background: linear-gradient(135deg, rgba(20, 20, 35, 0.95) 0%, rgba(30, 30, 45, 0.92) 100%);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    border: 1px solid rgba(0, 212, 255, 0.15);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    animation: modalSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 10002;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.6), rgba(157, 78, 221, 0.6), transparent);
    border-radius: 20px 20px 0 0;
}

.modal-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 100px;
    background: radial-gradient(ellipse at top, rgba(0, 212, 255, 0.1), transparent);
    pointer-events: none;
}

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

/* Modal header - Enhanced Glass Aero */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.75rem 2rem;
    border-bottom: 1px solid rgba(0, 212, 255, 0.15);
    background: linear-gradient(180deg, rgba(0, 212, 255, 0.05) 0%, transparent 100%);
    margin-bottom: 0;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    background: linear-gradient(135deg, #00d4ff 0%, #9d4edd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-header h3 i {
    -webkit-text-fill-color: #00d4ff;
    font-size: 1.2rem;
}

.modal-header .close-button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 0;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.modal-header .close-button:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
    transform: rotate(90deg) scale(1.05);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

/* Modern form styling - Enhanced Glass Aero */
.modern-form {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow-y: auto;
    flex: 1;
    background: transparent;
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: 0;
    width: calc(100% - 4rem);
    max-width: none;
    box-sizing: content-box;
    margin: 0;
    box-shadow: none;
}

.modern-form label {
    font-weight: 500;
    color: rgba(0, 212, 255, 0.9);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modern-form label i {
    font-size: 0.85rem;
    color: rgba(0, 212, 255, 0.7);
}

.modern-form input,
.modern-form select,
.modern-form textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    font-size: 0.95rem;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    outline: none;
    box-sizing: border-box;
}

.modern-form input::placeholder,
.modern-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.modern-form input:focus,
.modern-form select:focus,
.modern-form textarea:focus {
    border-color: rgba(0, 212, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.15);
    background: rgba(0, 212, 255, 0.08);
    transform: translateY(-1px);
}

.modern-form select[multiple] {
    min-height: 100px;
    padding: 8px;
}

.modern-form select option {
    background: rgba(20, 20, 35, 0.95);
    color: #ffffff;
    padding: 8px;
    border-radius: 6px;
    margin: 2px 0;
}

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

/* Right-Slide Modal Styles - Enhanced */
.right-slide-modal {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 650px;
    height: 100vh;
    background: linear-gradient(135deg, rgba(20, 20, 35, 0.98) 0%, rgba(30, 30, 45, 0.95) 100%);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-left: 2px solid rgba(0, 212, 255, 0.4);
    z-index: 10001;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideInRight 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: -30px 0 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 212, 255, 0.1) inset;
}

.right-slide-modal.closing {
    animation: slideOutRight 0.3s cubic-bezier(0.6, -0.28, 0.74, 0.05);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Right-Slide Modal Header */
.right-slide-modal .modal-header {
    padding: 2rem;
    border-bottom: 1px solid rgba(0, 212, 255, 0.25);
    background: linear-gradient(180deg, rgba(0, 212, 255, 0.08) 0%, transparent 100%);
    flex-shrink: 0;
    position: relative;
}

.right-slide-modal .modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(0, 212, 255, 0.6), rgba(157, 78, 221, 0.6));
}

.right-slide-modal .modal-header h3 {
    font-size: 1.4rem;
    font-weight: 600;
    background: linear-gradient(135deg, #00d4ff 0%, #9d4edd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.right-slide-modal .modal-header h3 i {
    -webkit-text-fill-color: #00d4ff;
    font-size: 1.3rem;
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5));
}

.right-slide-modal .modal-header .close-button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    padding: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.right-slide-modal .modal-header .close-button:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
    transform: rotate(90deg) scale(1.08);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
}

/* Right-Slide Modal Content */
.right-slide-modal .modal-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    animation: none;
    max-width: none;
    width: 100%;
    max-height: none;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
}

.right-slide-modal .modal-content::before,
.right-slide-modal .modal-content::after {
    display: none;
}

/* Right-Slide Modal Form */
.right-slide-modal .modern-form {
    padding: 2rem !important;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    background: transparent;
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: 0;
    width: calc(100% - 4rem);
    max-width: none;
    box-sizing: content-box;
    margin: 0;
    box-shadow: none;
}

.right-slide-modal .modern-form label {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(0, 212, 255, 0.95);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.right-slide-modal .modern-form label i {
    color: rgba(0, 212, 255, 0.7);
}

.right-slide-modal .modern-form input,
.right-slide-modal .modern-form select,
.right-slide-modal .modern-form textarea {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(0, 212, 255, 0.25);
    border-radius: 12px;
    padding: 14px 18px;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.right-slide-modal .modern-form input:focus,
.right-slide-modal .modern-form select:focus,
.right-slide-modal .modern-form textarea:focus {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.15);
    transform: translateY(-1px);
}

/* Right-Slide Modal Form Actions */
.right-slide-modal .form-actions {
    display: flex;
    gap: 1rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 212, 255, 0.2);
    margin-top: 1rem;
}

.right-slide-modal .form-actions button {
    flex: 1;
    padding: 14px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.right-slide-modal .form-actions .primary-button {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.4) 0%, rgba(157, 78, 221, 0.3) 100%);
    color: #ffffff;
    border: 1px solid rgba(0, 212, 255, 0.5);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.2);
}

.right-slide-modal .form-actions .primary-button:hover {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.6) 0%, rgba(157, 78, 221, 0.5) 100%);
    border-color: rgba(0, 212, 255, 0.7);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.4);
}

.right-slide-modal .form-actions .secondary-button {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.right-slide-modal .form-actions .secondary-button:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

/* Right-Slide Modal Overlay */
.right-slide-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.right-slide-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Mobile responsiveness for right-slide modal */
@media (max-width: 768px) {
    .right-slide-modal {
        max-width: 100%;
        border-left-width: 0;
        border-top: 2px solid rgba(0, 212, 255, 0.4);
    }

    .right-slide-modal .modal-header {
        padding: 1.5rem 1.25rem;
    }

    .right-slide-modal .modal-header h3 {
        font-size: 1.2rem;
    }

    .right-slide-modal .modal-header h3 i {
        font-size: 1.1rem;
    }

    .right-slide-modal .modal-header .close-button {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .right-slide-modal .modern-form {
        gap: 1.5rem;
        padding: 1.5rem 1.25rem;
        width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .right-slide-modal .modern-form label {
        font-size: 0.85rem;
    }

    .right-slide-modal .modern-form input,
    .right-slide-modal .modern-form select,
    .right-slide-modal .modern-form textarea {
        padding: 12px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .right-slide-modal .form-actions {
        flex-direction: column;
        gap: 0.75rem;
        padding-top: 1.5rem;
    }

    .right-slide-modal .form-actions button {
        width: 100%;
        padding: 14px 20px;
    }

    .modal-content {
        max-width: 95%;
        border-radius: 16px;
        padding: 0;
    }

    .modal-header {
        padding: 1.5rem 1.25rem;
    }

    .modal-header h3 {
        font-size: 1.15rem;
    }

    .modal-header .close-button {
        width: 36px;
        height: 36px;
    }

    .modern-form {
        padding: 1.5rem 1.25rem;
        gap: 1.25rem;
        width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .modern-form label {
        font-size: 0.85rem;
    }

    .modern-form input,
    .modern-form select,
    .modern-form textarea {
        padding: 12px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Tablet responsiveness */
@media (min-width: 769px) and (max-width: 1024px) {
    .right-slide-modal {
        max-width: 550px;
    }

    .right-slide-modal .modal-header {
        padding: 1.75rem 1.75rem;
    }

    .right-slide-modal .modal-header h3 {
        font-size: 1.3rem;
    }

    .right-slide-modal .modern-form {
        padding: 1.75rem 1.75rem;
        gap: 1.5rem;
    }

    .modal-content {
        max-width: 90%;
    }
}

/* Document input container */
.document-input-container {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.document-name {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Form actions */
.form-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 0.5rem;
}

/* Modern button styles - Glass Aero */
.primary-button {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.8) 0%, rgba(157, 78, 221, 0.8) 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 12px rgba(0, 212, 255, 0.25);
    position: relative;
    overflow: hidden;
}

.primary-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.4s ease;
}

.primary-button:hover::before {
    left: 100%;
}

.primary-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.35);
}

.secondary-button {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 400;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.secondary-button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}

.danger-button {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.danger-button:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.4);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .modal-content {
        margin: 8px;
        max-height: calc(100vh - 16px);
        border-radius: 12px;
    }
    
    .modern-form {
        grid-template-columns: 1fr;
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .modern-form label {
        font-size: 0.75rem;
        margin-bottom: 0.25rem;
    }

    .modern-form input,
    .modern-form select,
    .modern-form textarea {
        padding: 9px 12px;
        font-size: 0.85rem;
        border-radius: 8px;
    }
    
    .modal-header {
        padding: 1rem;
    }

    .modal-header h3 {
        font-size: 1rem;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 0.5rem;
        padding-top: 0.5rem;
    }
    
    .form-actions button {
        width: 100%;
    }
    
    .stats-container {
        flex-direction: column;
        padding: 15px; /* Adjust padding for mobile */
    }
    
    .chart-section {
        width: 100%;
        margin-bottom: 30px;
    }
    
    #expenses-pie-chart, 
    #sales-pie-chart, 
    #expenses-user-pie-chart, 
    #sales-user-pie-chart {
        height: 350px; /* Smaller height for mobile */
    }
    
    #financial-timeline-chart {
        height: 400px; /* Adjusted timeline height for mobile */
    }
    
    /* Hide user information in transaction list on mobile to save space */
    .transaction-users {
        display: none;
    }
    
    /* Hide br tags on mobile */
    .centered_div li br {
        display: none;
    }

    /* Adjust document icons size */
    .centered_div li img:not(.edit-transaction):not(.user-avatar img) {
        width: 16px;
        height: 16px;
    }
}

/* Tablet responsiveness */
@media (min-width: 769px) and (max-width: 1024px) {
    .stats-container {
        padding: 15px;
        gap: 15px;
    }
    
    .chart-section {
        width: 100%; /* Single column on tablet */
        min-width: auto;
    }
    
    #expenses-pie-chart, 
    #sales-pie-chart, 
    #expenses-user-pie-chart, 
    #sales-user-pie-chart {
        height: 400px; /* Medium height for tablet */
        min-height: 350px;
    }
    
    #financial-timeline-chart {
        height: 450px; /* Timeline height for tablet */
        min-height: 400px;
    }
}

/* Small desktop/large tablet responsiveness */
@media (min-width: 1025px) and (max-width: 1420px) {
    .chart-section {
        width: calc(50% - 10px); /* Two columns but account for reduced space */
        min-width: 280px;
    }
    
    #expenses-pie-chart, 
    #sales-pie-chart, 
    #expenses-user-pie-chart, 
    #sales-user-pie-chart {
        height: 420px;
        min-height: 350px;
    }
    
    #financial-timeline-chart {
        height: 480px;
        min-height: 400px;
    }
}

/* Legacy grid form - updated to work with modern forms - Glass Aero */
.grid-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    align-items: start;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.grid-button {
    grid-column: 1 / -1;
    width: 100%;
}

/* Custom Radio Button Styling - Glass Aero */
input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.06);
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    margin-right: 0.5rem;
}

input[type="radio"]:hover {
    border-color: rgba(0, 212, 255, 0.6);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

input[type="radio"]:checked {
    border-color: #00d4ff;
    background-color: rgba(0, 212, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
}

input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00d4ff 0%, #9d4edd 100%);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

input[type="radio"]:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.2);
}

/* Radio button labels styling */
label:has(input[type="radio"]) {
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 12px;
}

label:has(input[type="radio"]):hover {
    background-color: rgba(0, 212, 255, 0.1);
}

label:has(input[type="radio"]) span {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    transition: color 0.3s ease;
}

label:has(input[type="radio"]:checked) span {
    color: #00d4ff;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

/* Organization Setup Section Styling - Glass Aero */
.organization-setup {
    grid-column: 1 / -1;
    margin: 1rem 0;
    padding: 1.5rem;
    background: rgba(0, 212, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(0, 212, 255, 0.15);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.05);
}

.organization-setup h3 {
    margin-bottom: 1rem;
    color: #00d4ff;
    font-size: 1.2rem;
    font-weight: 600;
    text-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.radio-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.help-text {
    grid-column: 1 / -1;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    background: rgba(0, 212, 255, 0.08);
    padding: 0.75rem;
    border-radius: 12px;
    border-left: 3px solid #00d4ff;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.1);
}


/* Transactions Header with Filter Button */
.transactions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0 0.5rem;
}

.transactions-header h3 {
    font-size: 1.5rem;
    color: #ffffff;
    margin: 0;
    background: linear-gradient(135deg, #00d4ff, #9d4edd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.filter-btn:hover {
    background: rgba(0, 212, 255, 0.15);
    border-color: rgba(0, 212, 255, 0.3);
    color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
}

.filter-btn i {
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .transactions-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 0;
    }
    
    .transactions-header h3 {
        font-size: 1.2rem;
    }
    
    .transactions-header > div:last-child {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        width: 100%;
    }
    
    .filter-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
        flex: 1;
        justify-content: center;
    }
    
    .export-btn {
        padding: 0.4rem 0.75rem !important;
        font-size: 0.8rem !important;
        flex: 1;
        justify-content: center;
    }
}

/* Style for the title and subtitle - Glass Aero */
.centered_div h3 {
    font-size: 1.8rem;
    color: #ffffff;
    text-align: center;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #00d4ff, #9d4edd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.centered_div small {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    display: block;
    margin-bottom: 20px;
}

/* Style for the list */
.centered_div ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

/* Modern list item styling - Glass Aero */
.centered_div li {
    display: grid;
    grid-template-columns: 120px 1fr 120px 150px 80px 100px 30px 30px;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border: none;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.centered_div li:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 30px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(0, 212, 255, 0.1);
    border-left-color: #00d4ff;
    background: rgba(255, 255, 255, 0.08);
}

/* Style for transaction details */
.centered_div li strong {
    font-weight: normal;
    color: rgba(255, 255, 255, 0.9);
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.centered_div li strong.transaction-date {
    grid-column: 1;
    text-align: center;
}

.centered_div li .transaction-users-avatars {
    grid-column: 2;
    justify-self: start;
    display: flex;
    align-items: center;
    gap: 0;
    min-width: 0;
    overflow: hidden;
}

.centered_div li strong.transaction-category {
    grid-column: 3;
    text-align: left;
}

.centered_div li strong.transaction-project {
    grid-column: 4;
    text-align: left;
}

.centered_div li strong.transaction-doc {
    display: flex;
    align-items: center;
    justify-content: center;
    grid-column: 5;
    min-width: 40px;
}

.centered_div li strong.transaction-value {
    font-weight: bold;
    color: rgba(255, 255, 255, 0.95);
    text-align: right;
    grid-column: 6;
    white-space: nowrap;
}

/* Transaction values with glow effects */
.centered_div li strong.transaction-value.positive {
    color: #22c55e;
    text-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
}

.centered_div li strong.transaction-value:not(.positive) {
    color: #ef4444;
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

/* Style for linked document icons */
.centered_div li img {
    width: 20px;
    height: 20px;
    cursor: pointer;
    filter: brightness(0) saturate(100%) invert(75%) sepia(50%) saturate(500%) hue-rotate(160deg);
    transition: transform 0.3s ease, filter 0.3s ease;
}

/* Exclude avatar images from filters */
.centered_div li .user-avatar img {
    width: 100%;
    height: 100%;
    filter: none !important;
    object-fit: cover;
}

.centered_div li .user-avatar img:hover {
    filter: none !important;
    transform: none;
}

.centered_div li img.orange {
    filter: brightness(0) saturate(100%) invert(60%) sepia(90%) saturate(400%) hue-rotate(350deg);
}

/* Hover effect for icons */
.centered_div li img:hover {
    transform: scale(1.2);
    filter: brightness(0) saturate(100%) invert(70%) sepia(80%) saturate(600%) hue-rotate(160deg) drop-shadow(0 0 8px rgba(0, 212, 255, 0.5));
}

/* Style for project label in purple - Glass Aero */
.transaction-project {
    color: #9d4edd !important;
    font-weight: 600 !important;
    background: rgba(157, 78, 221, 0.15);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.9rem;
    border: 1px solid rgba(157, 78, 221, 0.3);
    text-shadow: 0 0 10px rgba(157, 78, 221, 0.3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Style for the edit transaction icon */
.centered_div li .edit-transaction {
    width: 20px;
    height: 20px;
    opacity: 0.6;
    transition: opacity 0.2s, transform 0.3s ease;
    cursor: pointer;
    grid-column: 8;
    justify-self: center;
}

.centered_div li .edit-transaction:hover {
    opacity: 1;
    transform: scale(1.2);
    filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.5));
}

/* Responsive grid layout for transaction list */
@media (max-width: 1420px) {
    .centered_div li {
        /* Date | Avatars | Category | Project | Value | Edit */
        grid-template-columns: 90px auto 1fr minmax(80px, 1fr) auto 25px;
        gap: 0.75rem;
    }

    .centered_div li strong.transaction-date {
        grid-column: 1;
    }

    .centered_div li .transaction-users-avatars {
        grid-column: 2;
    }

    .centered_div li strong.transaction-category {
        grid-column: 3;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .centered_div li strong.transaction-project {
        grid-column: 4;
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Value - auto width ensures no truncation */
    .centered_div li strong.transaction-value {
        grid-column: 5;
        white-space: nowrap;
        min-width: fit-content;
        text-align: right;
    }

    .centered_div li .edit-transaction {
        grid-column: 6;
    }
}

@media (max-width: 1024px) {
    .centered_div li {
        /* iPad layout: Date | Category | Value | Edit */
        /* Hide avatars and project to give more space to value */
        grid-template-columns: 80px 1fr auto 30px;
        gap: 0.5rem;
        padding: 1rem;
    }

    .centered_div li strong {
        font-size: 0.85rem;
    }

    .centered_div li strong.transaction-date {
        grid-column: 1;
        align-items: start;
    }

    .centered_div li strong.transaction-category {
        grid-column: 2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Value - auto width to never truncate */
    .centered_div li strong.transaction-value {
        grid-column: 3;
        font-size: 0.95rem;
        font-weight: 700;
        white-space: nowrap;
        min-width: fit-content;
        text-align: right;
        padding-left: 0.5rem;
    }

    .centered_div li .edit-transaction {
        grid-column: 4;
    }

    /* Hide less important elements on tablet */
    .centered_div li strong.transaction-project {
        display: none !important;
    }

    .centered_div li .transaction-users-avatars {
        display: none !important;
    }

    .centered_div li strong.transaction-doc {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .centered_div li {
        display: grid;
        grid-template-columns: 1fr auto auto;
        grid-template-rows: auto auto;
        gap: 0.25rem 0.75rem;
        padding: 0.875rem 1rem;
        align-items: center;
    }

    /* Category - main text, row 1 col 1 */
    .centered_div li strong.transaction-category {
        display: block !important;
        grid-column: 1;
        grid-row: 1;
        font-size: 0.95rem;
        font-weight: 600;
        color: rgba(255, 255, 255, 0.95);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Amount - row 1 col 2 */
    .centered_div li strong.transaction-value {
        grid-column: 2;
        grid-row: 1;
        font-size: 0.95rem;
        font-weight: 700;
        text-align: right;
        white-space: nowrap;
    }

    /* Edit button - row 1 col 3 */
    .centered_div li .edit-transaction {
        grid-column: 3;
        grid-row: 1;
        width: 20px;
        height: 20px;
        opacity: 0.7;
    }

    /* Date - row 2 col 1 */
    .centered_div li strong.transaction-date {
        grid-column: 0;
        grid-row: 2;
        font-size: 0.75rem;
        color: rgba(255, 255, 255, 0.5);
        align-items: start;
    }

    /* Hide less important elements on mobile */
    .centered_div li strong.transaction-project {
        display: none !important;
    }

    .centered_div li .transaction-users-avatars {
        display: none !important;
    }

    .centered_div li strong.transaction-doc {
        display: none !important;
    }
}

/* Modern total div styling - Glass Aero */
.total_div {
    margin: 2rem auto 1rem;
    padding: 1rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 40px rgba(0, 212, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-sizing: border-box;
    transition: all 0.3s ease;
    position: relative;
}

.total_div::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.4), rgba(157, 78, 221, 0.4), transparent);
    border-radius: 24px 24px 0 0;
}

/* Desktop: With sidebar */
@media (min-width: 1421px) {
    .total_div {
        margin-left: 270px;
        margin-right: 20px;
        width: calc(100% - 300px);
        max-width: calc(100% - 300px);
    }
}

/* Smaller screens: No sidebar */
@media (max-width: 1420px) {
    .total_div {
        margin-left: 20px;
        margin-right: 20px;
        width: calc(100% - 40px);
        max-width: calc(100% - 40px);
    }
}

/* Style for the results_div inside total_div */
.results_div {
    display: flex;
    justify-content: space-between; /* Align elements horizontally */
    align-items: center; /* Align elements vertically */
    padding: 10px;
}

/* Style for the visibility toggle icon - Glass Aero */
.visibility-toggle img {
    width: 24px;
    height: 24px;
    cursor: pointer;
    filter: brightness(0) saturate(100%) invert(70%) sepia(80%) saturate(600%) hue-rotate(160deg);
    transition: transform 0.3s ease, filter 0.3s ease;
}

.visibility-toggle img:hover {
    transform: scale(1.2);
    filter: brightness(0) saturate(100%) invert(60%) sepia(100%) saturate(500%) hue-rotate(230deg) drop-shadow(0 0 10px rgba(157, 78, 221, 0.5));
}

/* Style for the export button icon */
#exportButton img {
    width: 24px;
    height: 24px;
    cursor: pointer;
    filter: brightness(0) saturate(100%) invert(70%) sepia(20%) saturate(200%) hue-rotate(180deg);
    transition: transform 0.3s ease, filter 0.3s ease;
}

#exportButton img:hover {
    transform: scale(1.2);
    filter: brightness(0) saturate(100%) invert(60%) sepia(100%) saturate(500%) hue-rotate(160deg) drop-shadow(0 0 10px rgba(0, 212, 255, 0.5));
}

/* Style for the financial content */
#financial-content {
    flex-grow: 1;
    padding-left: 20px;
}

/* Style for individual financial rows */
.financial-row {
    display: flex;
    margin-right: 70px;
    justify-content: space-between;
    margin-bottom: 10px;
}

.financial-row strong {
    font-weight: normal;
    color: rgba(255, 255, 255, 0.9);
}

.financial-row strong.transaction-value {
    font-weight: normal;
    color: rgba(255, 255, 255, 0.9);
}

.financial-row strong.transaction-value.positive {
    color: rgba(255, 255, 255, 0.9);
}

.financial-row strong.transaction-value:not(.positive) {
    color: rgba(255, 255, 255, 0.9);
}

.financial-row strong.balance {
    font-weight: bold;
    color: rgba(255, 255, 255, 0.95);
}

.financial-row strong.balance.positive {
    color: #22c55e;
    text-shadow: 0 0 15px rgba(34, 197, 94, 0.4);
}

.financial-row strong.balance.negative {
    color: #ef4444;
    text-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

.blur-content {
    filter: blur(5px);
    user-select: none;
}

/* Page layout utilities */
.has-sidebar {
    margin-left: 260px;
    width: calc(100% - 300px);
    max-width: calc(100% - 300px);
}

.no-sidebar {
    margin-left: 20px;
    width: calc(100% - 40px);
    max-width: calc(100% - 40px);
}

/* Ensure all content containers respect sidebar - Glass Aero */
.main-content {
    margin-top: 90px;
    padding: 2rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 60px rgba(0, 212, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-sizing: border-box;
    min-height: calc(100vh - 180px);
    transition: all 0.3s ease;
    position: relative;
}

.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.4), rgba(157, 78, 221, 0.4), transparent);
    border-radius: 24px 24px 0 0;
}

/* Desktop: With sidebar */
@media (min-width: 1421px) {
    .main-content {
        margin-left: 270px;
        margin-right: 20px;
        width: calc(100% - 300px);
        max-width: calc(100% - 300px);
    }
}

/* Smaller screens: No sidebar */
@media (max-width: 1420px) {
    .main-content {
        margin-left: 20px;
        margin-right: 20px;
        width: calc(100% - 40px);
        max-width: calc(100% - 40px);
    }
}

/* Hide sidebar toggle on desktop */
@media (min-width: 1421px) {
    .sidebar-toggle {
        display: none;
    }
}

/* Sidebar visibility control */
.sidebar-hidden .nav-column {
    transform: translateX(-100%);
}

.sidebar-visible .nav-column {
    transform: translateX(0);
}

/* Smooth transitions for page changes */
.page-transition {
    transition: margin-left 0.3s ease, width 0.3s ease;
}

/* Ensure charts and other content adapt to sidebar - these classes are for backward compatibility */
.chart_div.has-sidebar {
    margin-left: 270px;
    width: calc(100% - 300px);
    max-width: calc(100% - 300px);
}

.chart_div.no-sidebar {
    margin-left: 20px;
    width: calc(100% - 40px);
    max-width: calc(100% - 40px);
}

/* Responsive navigation breadcrumb styling - Glass Aero */
.breadcrumb {
    margin-top: 90px;
    margin-bottom: 1rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 16px;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Desktop: With sidebar */
@media (min-width: 1421px) {
    .breadcrumb {
        margin-left: 270px;
        margin-right: 20px;
    }
}

/* Smaller screens: No sidebar */
@media (max-width: 1420px) {
    .breadcrumb {
        margin-left: 20px;
        margin-right: 20px;
    }
}

.breadcrumb a {
    color: #00d4ff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.breadcrumb a:hover {
    text-decoration: underline;
    text-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
}

.breadcrumb .separator {
    margin: 0 0.5rem;
    color: rgba(255, 255, 255, 0.4);
}

/* Welcome page specific adjustments */
.welcome-page .breadcrumb {
    display: none;
}

.welcome-page .chart_div {
    margin-left: 20px;
    margin-right: 20px;
    width: calc(100% - 40px);
    max-width: calc(100% - 40px);
}

/* Title link styling */
.nav-bar .title-link {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-bar .title-link:hover {
    text-decoration: none;
}

/* Mobile improvements */
@media (max-width: 768px) {
    .breadcrumb {
        margin-left: 20px;
        width: calc(100% - 40px);
        max-width: calc(100% - 40px);
    }
    
    .chart_div {
        margin-left: 10px;
        margin-right: 10px;
        width: calc(100% - 20px);
        max-width: calc(100% - 20px);
        padding: 1rem; /* Reduce padding further on mobile */
        margin-top: 90px; /* Adjust for nav bar */
    }
    
    /* Ensure nav-column is hidden on mobile by default */
    .nav-column {
        transform: translateX(-100%);
    }
    
    /* Only show nav-column when active class is added via JavaScript */
    .nav-column.active {
        transform: translateX(0);
        z-index: var(--nav-column-active-z); /* Ensure it's above other content but below navbar */
    }
}

/* Modern animations and loading states */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes slideInFromLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Modern loading spinner - Glass Aero */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 212, 255, 0.2);
    border-radius: 50%;
    border-top-color: #00d4ff;
    animation: spin 1s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Fade in animation for page elements */
.fade-in {
    animation: fadeInUp 0.6s ease-out;
}

/* Modern card hover effects */
.card-hover {
    transition: var(--transition-smooth);
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 
        var(--shadow-lg),
        0 0 40px rgba(0, 212, 255, 0.1);
}

/* Modern focus ring */
.focus-ring:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

/* Modern skeleton loading - Glass Aero */
.skeleton {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.04) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Chart titles styling - Glass Aero */
.chart_div h3 {
    text-align: center;
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 2rem;
    font-size: 1.5rem;
    background: linear-gradient(135deg, #00d4ff, #9d4edd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Individual chart section styling - Glass Aero */
.chart-section {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 20px;
    padding: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.chart-section:hover {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.1);
}

.full-width-chart {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 20px;
    padding: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.full-width-chart:hover {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.1);
}

/* Modern floating add button - Glass Aero */
.floating-add-btn {
    position: fixed;
    bottom: 30px;
    left: calc(50% - 30px);
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #00d4ff 0%, #9d4edd 50%, #7b2cbf 100%);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 
        0 8px 30px rgba(0, 212, 255, 0.5),
        0 0 50px rgba(0, 212, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
    text-decoration: none;
    overflow: hidden;
}

.floating-add-btn::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%);
    transform: scale(0);
    transition: transform 0.5s ease;
}

.floating-add-btn:hover::before {
    transform: scale(1);
}

.floating-add-btn:hover {
    box-shadow: 
        0 12px 40px rgba(0, 212, 255, 0.6),
        0 0 80px rgba(0, 212, 255, 0.4);
    transform: scale(1.1);
}

.floating-add-btn:active {
    box-shadow: 
        0 6px 25px rgba(0, 212, 255, 0.5),
        0 0 40px rgba(0, 212, 255, 0.3);
    transform: scale(1.05);
}

.floating-add-btn i {
    transition: transform 0.3s ease;
}

.floating-add-btn:hover i {
    transform: rotate(90deg);
}

/* Responsive adjustments for floating button */
@media (min-width: 1421px) {
    .floating-add-btn {
        bottom: 180px;
        left: 90px;/* Keep it fixed on the left side */
        transform: none; /* Remove centering transform */
    }

}

/* Invert colors on smaller screens - Glass Aero */
/* Responsive rules for calculator donut and controls */
/* Targets .donut-wrap, .donut-canvas and .controls used by fairflow_calculator.html */
@media (max-width: 1024px) {
    body.calculator-page .calculator-card { padding: 16px; }
    body.calculator-page .donut-wrap {
        grid-template-columns: 1fr !important;
        gap: 12px;
        align-items: start;
    }
    body.calculator-page .donut-canvas {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1 / 1;
        display: flex;
        justify-content: center;
        align-items: center;
        overflow: hidden;
        padding: 6px 0;
    }
    body.calculator-page .donut-canvas canvas {
        width: min(420px, 100%) !important;
        height: auto !important;
        max-width: 420px;
        display: block;
    }
    body.calculator-page .donut-center-overlay { position: absolute; width: 64%; pointer-events: none; }
    body.calculator-page .controls {
        padding: 8px 6px;
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100% !important;
        box-sizing: border-box;
    }
    body.calculator-page .controls label { margin-top: 8px; font-size: 0.95rem; }
    body.calculator-page .controls input[type="number"], body.calculator-page .controls input[type="text"] {
        width: 100% !important;
        box-sizing: border-box;
    }
    body.calculator-page .controls .btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
    body.calculator-page .controls .btn-row .primary-button, body.calculator-page .controls .btn-row .secondary-button {
        flex: 1 1 auto;
        min-width: 120px;
    }
    body.calculator-page .expenses-list { max-height: 240px; overflow: auto; }
}

@media (max-width: 480px) {
    body.calculator-page .donut-center-overlay { width: 70%; }
    body.calculator-page .donut-center-overlay .remaining { font-size: 1.6rem; }
    body.calculator-page .donut-center-overlay .budget { font-size: 0.85rem; }
    body.calculator-page .controls label { font-size: 0.88rem; }
    body.calculator-page .controls input[type="number"], body.calculator-page .controls input[type="text"] { padding: 10px; font-size: 0.95rem; }
    body.calculator-page .controls .btn-row { gap: 6px; }
    body.calculator-page .expenses-list { max-height: 180px; }
}

/* Ensure controls are ergonomic on medium tablets (portrait) */
@media (min-width: 481px) and (max-width: 768px) {
    body.calculator-page .donut-center-overlay { width: 62%; }
    body.calculator-page .controls { padding: 10px 8px; }
    body.calculator-page .controls label { font-size: 0.92rem; }
}
    .floating-add-btn {
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        color: #00d4ff;
        border: 1px solid rgba(0, 212, 255, 0.3);
        box-shadow: 
            0 8px 30px rgba(0, 0, 0, 0.4),
            0 0 30px rgba(0, 212, 255, 0.2);
    }
    
    .floating-add-btn:hover {
        background: rgba(255, 255, 255, 0.15);
        color: #00d4ff;
        box-shadow: 
            0 12px 40px rgba(0, 0, 0, 0.5),
            0 0 50px rgba(0, 212, 255, 0.3);
        border-color: rgba(0, 212, 255, 0.5);
    }

    .floating-add-btn:active {
        background: rgba(255, 255, 255, 0.2);
        color: #00d4ff;
        box-shadow: 
            0 6px 25px rgba(0, 0, 0, 0.4),
            0 0 30px rgba(0, 212, 255, 0.25);
    }



/* ================================================
   LANDING PAGE STYLES - Liquid Glass Aero
   ================================================ */

.landing-page {
    min-height: 100vh;
    background: #0a0a14;
    color: #ffffff;
    overflow-x: hidden;
    position: relative;
}

/* Deep Liquid Background */
.liquid-background {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    mix-blend-mode: screen;
    animation: blob 20s ease-in-out infinite;
}

.blob-1 {
    top: -20%;
    left: -10%;
    width: 800px;
    height: 800px;
    background: rgba(59, 130, 246, 0.3);
}

.blob-2 {
    bottom: -20%;
    right: -10%;
    width: 800px;
    height: 800px;
    background: rgba(139, 92, 246, 0.3);
    animation-delay: 2s;
}

.blob-3 {
    top: 40%;
    left: 30%;
    width: 600px;
    height: 600px;
    background: rgba(34, 211, 238, 0.2);
    animation-delay: 4s;
    animation-name: float;
}

@keyframes blob {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -50px) scale(1.1); }
    50% { transform: translate(-20px, 20px) scale(0.9); }
    75% { transform: translate(50px, 50px) scale(1.05); }
}

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

.noise-overlay {
    position: absolute;
    inset: 0;
    opacity: 0.15;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Glass Nav - Landing */
.landing-nav {
    position: fixed;
    width: 100%;
    z-index: 50;
    padding: 2rem 0;
    background: transparent;
    border-bottom: none;
    transition: all 0.3s ease;
}

.landing-nav.scrolled {
    padding: 1rem 0;
    background: rgba(10, 10, 20, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.logo-icon-wrapper {
    position: relative;
}

.logo-glow {
    position: absolute;
    inset: 0;
    background: #3b82f6;
    border-radius: 12px;
    filter: blur(12px);
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.logo-group:hover .logo-glow {
    opacity: 1;
}

.logo-icon {
    position: relative;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.logo-text {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    background: linear-gradient(to right, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: #cbd5e1;
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #ffffff;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #3b82f6;
    transition: width 0.3s ease;
}

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

.nav-cta {
    padding: 0.625rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff;
    text-decoration: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.nav-cta:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.nav-cta:active {
    transform: scale(0.95);
}

/* Hero Section */
.hero-section {
    position: relative;
    z-index: 10;
    max-width: 1400px;
    margin: 0 auto;
    padding: 10rem 2rem 6rem;
    text-align: center;
}

/* Badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 9999px;
    margin-bottom: 2.5rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: fadeInUp 0.6s ease-out;
}

.badge-ping {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #60a5fa;
    border-radius: 50%;
    animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.badge-dot {
    position: relative;
    width: 8px;
    height: 8px;
    background: #3b82f6;
    border-radius: 50%;
}

.badge-text {
    font-size: 0.75rem;
    font-weight: 700;
    color: #93c5fd;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

@keyframes ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Hero Title */
.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 2rem;
    text-align: center;
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.gradient-text {
    background: linear-gradient(90deg, #60a5fa, #a78bfa, #22d3ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: gradientX 3s ease infinite;
}

/* Rotating text animation */
.rotating-text {
    display: inline-block;
    transition: opacity 0.4s ease, transform 0.4s ease;
    min-width: 280px;
}

@keyframes gradientX {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

/* Hero Description */
.hero-description {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: #94a3b8;
    max-width: 640px;
    margin: 0 auto 3rem;
    line-height: 1.7;
    font-weight: 300;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

/* Hero Buttons */
.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.btn-primary {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: #3b82f6;
    color: #ffffff;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 1.125rem;
    text-decoration: none;
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.35);
    transition: all 0.3s ease;
    overflow: hidden;
}

.btn-primary:hover {
    background: #2563eb;
    box-shadow: 0 15px 50px rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
}

.btn-primary i {
    transition: transform 0.3s ease;
}

.btn-primary:hover i {
    transform: translateX(4px);
}

.btn-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.7s ease;
}

.btn-primary:hover .btn-shine {
    transform: translateX(100%);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 1.125rem;
    text-decoration: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.btn-secondary i {
    transition: transform 0.3s ease;
}

.btn-secondary:hover i {
    transform: scale(1.2);
}

/* Hero Mockup Link */
.hero-mockup-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Hero Mockup */
.hero-mockup {
    position: relative;
    max-width: 1200px;
    margin: 6rem auto 0;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    aspect-ratio: 16 / 9;
    transition: transform 1s ease, opacity 0.5s ease;
    cursor: pointer;
}

.mockup-glow {
    position: absolute;
    top: -50%;
    left: -20%;
    width: 100%;
    height: 100%;
    background: rgba(59, 130, 246, 0.1);
    filter: blur(100px);
    pointer-events: none;
}

.mockup-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    gap: 1rem;
}

.window-controls {
    display: flex;
    gap: 8px;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.control.red {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.5);
}

.control.yellow {
    background: rgba(234, 179, 8, 0.2);
    border: 1px solid rgba(234, 179, 8, 0.5);
}

.control.green {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.5);
}

.mockup-url {
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    font-size: 0.625rem;
    font-family: monospace;
    color: #64748b;
}

.mockup-content {
    padding: 2rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 5rem;
    position: relative;
}

.mockup-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    width: 100%;
    height: 100%;
    padding: 2rem;
    opacity: 0.8;
}

.mockup-sidebar {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.mockup-main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mockup-chart {
    height: 35%;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.mockup-table {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

@keyframes pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 0.4; }
}

.mockup-callout {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    text-align: center;
    max-width: 300px;
    max-height: 200px;
    margin: auto;
    transition: transform 0.5s ease;
}

.hero-mockup:hover .mockup-callout {
    transform: scale(1.1);
}

.callout-icon {
    font-size: 3rem;
    color: #3b82f6;
    margin-bottom: 1rem;
    animation: spin-slow 8s linear infinite;
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.mockup-callout h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.25rem;
}

.mockup-callout p {
    font-size: 0.875rem;
    color: #94a3b8;
}

/* Features Section */
.features-section {
    position: relative;
    z-index: 10;
    background: #0a0a14;
    padding: 8rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.features-grid,
.pricing-section .pricing-grid {
    /* Shared responsive grid for features and pricing — max 3 columns */
    max-width: calc(900px + 4rem); /* 3 * 300px + 2 * gap (2rem) */
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    align-items: stretch;
    grid-auto-rows: auto;
}

/* Desktop view: equal height for all feature cards */
@media (min-width: 920px) {
    .features-grid,
    .pricing-section .pricing-grid {
        grid-auto-rows: 1fr;
    }
}

.feature-card {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    transition: all 0.3s ease;
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

.feature-icon.blue {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
}

.feature-icon.violet {
    background: rgba(139, 92, 246, 0.1);
    color: #a78bfa;
}

.feature-icon.cyan {
    background: rgba(34, 211, 238, 0.1);
    color: #22d3ee;
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.75rem;
}

.feature-card p {
    font-size: 1rem;
    color: #94a3b8;
    line-height: 1.6;
}

/* Coming-soon state for unavailable pricing plans */
.feature-card.coming-soon {
    position: relative;
    transition: opacity 0.25s ease;
}

/* Blur all children except the badge so the badge remains sharp */
.feature-card.coming-soon > :not(.coming-soon-badge) {
    filter: blur(3px);
    opacity: 0.7;
    pointer-events: none;
}

/* Non-blurred badge element */
.coming-soon-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(90deg, rgba(0,0,0,0.6), rgba(20,20,35,0.6));
    color: #fff;
    padding: 6px 10px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.85rem;
    backdrop-filter: blur(6px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.35);
    z-index: 20;
    pointer-events: auto;
}

.feature-card.coming-soon .feature-icon {
    filter: grayscale(60%) opacity(0.9);
}

/* Ensure disabled buttons look inert */
.feature-card.coming-soon .btn-secondary.disabled,
.feature-card.coming-soon .btn-primary.disabled {
    opacity: 0.6;
    cursor: default;
    pointer-events: none;
    filter: none;
} 



/* Ensure disabled buttons look inert */
.feature-card.coming-soon .btn-secondary.disabled,
.feature-card.coming-soon .btn-primary.disabled {
    opacity: 0.6;
    cursor: default;
    pointer-events: none;
    filter: none;
}

/* Landing Footer */
.landing-footer {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
    background: rgba(10, 10, 20, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.landing-footer a {
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
    transition: color 0.3s ease;
}

.landing-footer a:hover {
    color: #3b82f6;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    /* Ensure pricing section matches features section horizontal padding on mobile */
    .features-section,
    .pricing-section {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    /* Keep grids full-width inside their sections but with same internal spacing */
    .features-grid,
    .pricing-section .pricing-grid {
        padding: 0; /* grid gutters controlled by gap; avoid extra horizontal offsets */
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .hero-section {
        padding: 8rem 1.5rem 4rem;
    }
    
    .hero-title {
        font-size: clamp(2rem, 7vw, 3.5rem);
        margin-bottom: 1.5rem;
        min-height: 140px;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        text-align: center;
        gap: 0;
        line-height: 1.05;
    }
    
    .hero-title br {
        display: none;
    }
    
    .rotating-text {
        min-width: auto;
        min-height: 2.2em;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: -0.1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .hero-mockup {
        margin-top: 3rem;
        aspect-ratio: 4 / 3;
    }
    
    .mockup-grid {
        grid-template-columns: 1fr;
    }
    
    .mockup-sidebar {
        display: none;
    }
    
    .features-grid,
    .pricing-section .pricing-grid {
        grid-template-columns: 1fr;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .hero-title {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
        margin-bottom: 2rem;
        min-height: 160px;
        padding: 0 1rem;
        gap: 0;
        line-height: 1;
    }
    
    .rotating-text {
        min-height: 2.6em;
        line-height: 1.15;
        margin-top: -0.2rem;
    }
    
    .hero-description {
        font-size: 1rem;
        padding: 0 0.5rem;
    }
}

/* Hide default welcome page elements on landing */
.landing-page .welcome_div,
.landing-page .info {
    display: none;
}

/* ================================
   LIQUID DASHBOARD STYLES
   Modern glass morphism dashboard
   ================================ */

.dashboard-page {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 30%, #0f172a 70%, #1e293b 100%);
    min-height: 100vh;
}

.dashboard-main {
    padding: 2rem;
    padding-top: 100px;
    padding-bottom: 100px;
    max-width: 1600px;
    margin: 0 auto;
    animation: fadeInUp 0.6s ease-out;
}

@media (min-width: 1421px) {
    .dashboard-main {
        margin-left: 270px;
        max-width: calc(100% - 300px);
        padding-right: 2rem;
    }
}

@media (max-width: 1420px) {
    .dashboard-main {
        margin-left: 0;
        padding: 1.5rem;
        padding-top: 100px;
    }
}

/* Dashboard Header */
.dashboard-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .dashboard-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
    }
}

.header-content {
    flex: 1;
}

.dashboard-title {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #f8fafc 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.02em;
}

.dashboard-subtitle {
    color: rgba(148, 163, 184, 0.8);
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
}

/* Export PDF Button */
.export-pdf-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(220, 38, 38, 0.3) 100%);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    color: #fca5a5;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    white-space: nowrap;
}

.export-pdf-btn:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.3) 0%, rgba(220, 38, 38, 0.4) 100%);
    border-color: rgba(239, 68, 68, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.25);
}

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

.export-pdf-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Chart.js Tooltip - Always on top of everything */
#chartjs-tooltip,
.chartjs-tooltip,
div[class*="chartjs"][class*="tooltip"] {
    z-index: 99999 !important;
    position: absolute !important;
    pointer-events: none;
}

/* Ensure canvas and its tooltips render above center text overlay */
.doughnut-container canvas {
    position: relative;
    z-index: 100;
}

/* Chart card should not clip tooltips */
.liquid-card.chart-card {
    isolation: isolate;
}

.export-pdf-btn i {
    font-size: 1rem;
}

.export-pdf-btn .fa-spinner {
    animation: spin 1s linear infinite;
}

@media (max-width: 768px) {
    .export-pdf-btn {
        padding: 0.625rem 1rem;
        font-size: 0.8rem;
    }
    
    .export-pdf-btn i {
        margin: 0;
    }
}

.system-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #60a5fa;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #3b82f6;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* KPI Cards Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 640px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .kpi-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Liquid Card Base */
.liquid-card {
    position: relative;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: cardFadeIn 0.5s ease-out backwards;
    animation-delay: var(--delay, 0s);
}

/* CRITICAL: Override overflow for chart cards to allow hover effects */
.liquid-card.chart-card {
    overflow: visible !important;
    clip-path: none !important;
    -webkit-clip-path: none !important;
    contain: none !important;
    /* Disable backdrop-filter as it creates a clipping stacking context */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    /* Use solid background instead for glass effect */
    background: rgba(15, 23, 42, 0.85);
}

/* Ensure chart-card children don't clip */
.liquid-card.chart-card > * {
    overflow: visible !important;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.liquid-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.liquid-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 60px rgba(59, 130, 246, 0.1);
    z-index: 20;
}

/* Card Internal Blob */
.card-blob {
    position: absolute;
    right: -24px;
    top: -24px;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    opacity: 0.1;
    filter: blur(24px);
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.liquid-card:hover .card-blob {
    opacity: 0.2;
}

.card-blob.bg-blue { background: #3b82f6; }
.card-blob.bg-violet { background: #8b5cf6; }
.card-blob.bg-amber { background: #f59e0b; }
.card-blob.bg-emerald { background: #10b981; }
.card-blob.bg-rose { background: #f43f5e; }
.card-blob.bg-cyan { background: #06b6d4; }

/* Card Header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    position: relative;
    z-index: 10;
}

.card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-icon.bg-blue {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}
.card-icon.bg-violet {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}
.card-icon.bg-amber {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}
.card-icon.bg-emerald {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}
.card-icon.bg-rose {
    background: rgba(244, 63, 94, 0.15);
    color: #fb7185;
}

.liquid-card:hover .card-icon {
    transform: scale(1.1);
}

.liquid-card:hover .card-icon.bg-blue { background: #3b82f6; color: white; }
.liquid-card:hover .card-icon.bg-violet { background: #8b5cf6; color: white; }
.liquid-card:hover .card-icon.bg-amber { background: #f59e0b; color: white; }
.liquid-card:hover .card-icon.bg-emerald { background: #10b981; color: white; }
.liquid-card:hover .card-icon.bg-rose { background: #f43f5e; color: white; }

/* Trend Badge */
.trend-badge {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    backdrop-filter: blur(8px);
}

.trend-badge.trend-up {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.trend-badge.trend-down {
    background: rgba(244, 63, 94, 0.15);
    color: #fb7185;
    border: 1px solid rgba(244, 63, 94, 0.3);
}

.trend-badge i {
    font-size: 0.625rem;
}

/* Card Content */
.card-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(148, 163, 184, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.25rem 0;
}

.card-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0;
    letter-spacing: -0.02em;
    transition: transform 0.3s ease;
    transform-origin: left;
}

.card-hint {
    font-size: 0.7rem;
    color: rgba(148, 163, 184, 0.7);
    margin-top: 0.25rem;
    display: block;
}

.liquid-card:hover .card-value {
    transform: scale(1.05);
}

/* Section Header Styling */
.section-header {
    margin: 2rem 0 1.5rem 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title i {
    color: #00d4ff;
}

.section-subtitle {
    font-size: 0.875rem;
    color: rgba(148, 163, 184, 0.8);
    margin: 0;
}

/* Pricing Section Specific Styles */
.pricing-section .pricing-header {
    text-align: center;
    margin-bottom: 1rem;
}

.pricing-section {
    /* New blue gradient background (refined) */
    background: linear-gradient(180deg, #04273a 0%, #0b4868 100%);
    /* match features-section horizontal padding so grids align exactly */
    padding: 2.25rem 2rem;
}

.pricing-section .pricing-header .hero-title {
    font-size: 1.0rem; /* slightly smaller title */
    margin: 0 0 0.25rem;
    font-weight: 700;
}
.pricing-section .pricing-header .hero-description {
    margin: 0;
    color: var(--muted);
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

/* Header pill sits above (vertically) but not overlapping the cards */
.pricing-section .pricing-header {
    position: static; /* normal flow */
    display: inline-block;
    margin: 0 auto 1rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: rgba(157, 78, 221, 0.10); /* purple-tinted pill */
    border: 1px solid rgba(157, 78, 221, 0.18);
    color: var(--text-primary);
    box-shadow: 0 6px 18px rgba(11, 18, 40, 0.25);
}

.pricing-section .pricing-grid .feature-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    min-height: 320px;
    /* match feature-card padding for identical internal spacing */
    padding: 2rem;
    text-align: center;
    border-radius: 12px;
    background: rgba(255,255,255,0.02);
    transition: transform .18s ease, box-shadow .18s ease;
}

.pricing-section .pricing-grid .feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.pricing-section .pricing-grid .feature-card .feature-icon {
    margin-bottom: 0.5rem;
}

.pricing-section .pricing-grid .btn-primary,
.pricing-section .pricing-grid .btn-secondary {
    margin-top: 1rem;
}

/* Responsive: cap columns to 2 under medium widths, and 1 on narrow screens
   Both grids share the same behavior so widths match exactly. */
@media (max-width: 920px) {
    .features-grid,
    .pricing-section .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: calc(600px + 2rem); /* 2 * 300px + gap */
    }
}

@media (max-width: 560px) {
    .features-grid,
    .pricing-section .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 100%;
        padding: 0 1rem;
    }
}

/* pull grid up slightly so header sits visually over the top of cards */
.pricing-section .pricing-grid {
    margin-top: 0; /* don't overlap — header above the cards */
    grid-auto-rows: auto; /* let cards size naturally */
    align-items: start;
    /* layout controlled by shared .features-grid rules above */
}


.pricing-section .pricing-grid > .feature-card {
    height: auto; /* allow cards to size naturally to match features grid */
}

/* Responsive: revert header to normal flow on small screens */
@media (max-width: 860px) {
    .pricing-section .pricing-header {
        position: static;
        transform: none;
        margin: 0 auto 1rem;
        display: block;
        box-shadow: none;
        background: rgba(255,255,255,0.03);
        border: 1px solid rgba(255,255,255,0.04);
    }

    .pricing-section .pricing-grid > .feature-card {
        width: 100%;
        margin: 0 auto;
        padding: 2rem; /* same as .feature-card in features section */
        box-sizing: border-box;
        text-align: left;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 24px;
        height: auto !important;
        align-items: flex-start;
    }

    /* Slightly center icons and tighten spacing */
    .pricing-section .pricing-grid > .feature-card .feature-icon {
        margin: 0 0 0.75rem 0;
    }
}

/* Extra small screens tweaks */
@media (max-width: 480px) {
    /* Slightly smaller badge for narrow screens */
    .coming-soon-badge {
        top: 8px;
        right: 8px;
        font-size: 0.8rem;
        padding: 4px 8px;
    }
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
    overflow: visible;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Export button styling - Glass Aero */
.export-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(0, 212, 255, 0.1);
    color: #00d4ff;
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 12px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.export-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: #00d4ff;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
    transform: translateY(-2px);
}

.export-btn i {
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .export-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        width: 100%;
        justify-content: center;
    }
}

@media (min-width: 1024px) {
    .charts-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    
    .charts-grid-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Chart Cards */
.chart-card {
    padding: 2rem;
    overflow: visible !important; /* Allow chart hover effects to extend beyond card */
    clip-path: none !important;
    -webkit-clip-path: none !important;
    min-width: 0; /* Prevent grid blowout */
    max-width: 100%;
    box-sizing: border-box;
}

/* Ensure all chart-card child containers don't clip content */
.chart-card .chart-container,
.chart-card .doughnut-container,
.chart-card canvas {
    overflow: visible !important;
}

.chart-card.chart-wide {
    grid-column: span 1;
}

.chart-card.chart-full {
    grid-column: span 1;
}

@media (min-width: 1024px) {
    .chart-card.chart-wide {
        grid-column: span 2;
    }
    
    .chart-card.chart-full {
        grid-column: span 3;
    }
    
    .charts-grid-2 .chart-card.chart-full {
        grid-column: span 2;
    }
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.chart-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0 0 0.25rem 0;
}

.chart-subtitle {
    font-size: 0.75rem;
    color: rgba(148, 163, 184, 0.6);
    margin: 0;
}

.chart-menu-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: rgba(148, 163, 184, 0.6);
    cursor: pointer;
    transition: all 0.2s ease;
}

.chart-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 280px;
    overflow: visible !important; /* Allow hover effects to extend beyond container */
}

.chart-container.chart-tall {
    height: 360px;
}

.chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Doughnut Chart Center */
.doughnut-container {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 0 auto;
    padding: 30px; /* Extra space for hover zoom effect */
    box-sizing: content-box;
    overflow: visible !important;
}

.doughnut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
    z-index: 1; /* Keep below tooltips */
}

.doughnut-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #f1f5f9;
}

.doughnut-label {
    display: block;
    font-size: 0.625rem;
    font-weight: 600;
    color: rgba(148, 163, 184, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Legend List */
.legend-list {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Expandable Legend Containers */
.legend-visible-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.legend-hidden-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
    animation: slideDown 0.3s ease-out;
}

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

/* Toggle Button for Show More/Less */
.legend-toggle-btn {
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem !important;
    background: rgba(0, 212, 255, 0.08);
    border: 1px dashed rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.legend-toggle-btn:hover {
    background: rgba(0, 212, 255, 0.15);
    border-color: rgba(0, 212, 255, 0.5);
}

.legend-toggle-btn .legend-name {
    color: rgba(0, 212, 255, 0.8);
}

.legend-toggle-btn:hover .legend-name {
    color: #00d4ff;
}

.legend-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.legend-item-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.legend-item-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.legend-name {
    color: rgba(148, 163, 184, 0.8);
    font-weight: 500;
    transition: color 0.2s ease;
}

.legend-item-row:hover .legend-name {
    color: #f1f5f9;
}

.legend-value {
    font-weight: 700;
    color: #f1f5f9;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.legend-item-row:hover .legend-value {
    background: rgba(255, 255, 255, 0.1);
}

/* Inline Chart Legend */
.chart-legend-inline {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: rgba(148, 163, 184, 0.8);
    font-weight: 500;
}

.legend-item .legend-dot {
    width: 8px;
    height: 8px;
}

.legend-dot.bg-emerald { background: #10b981; }
.legend-dot.bg-rose { background: #f43f5e; }
.legend-dot.bg-blue { background: #3b82f6; }

/* Featured Chart Card (Sales) */
.chart-card.chart-featured {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(6, 182, 212, 0.05) 100%);
    border-color: rgba(16, 185, 129, 0.2);
}

.chart-card.chart-featured::before {
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.3), rgba(6, 182, 212, 0.2), transparent);
}

.chart-card.chart-featured:hover {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 60px rgba(16, 185, 129, 0.15);
}

.chart-card.chart-featured .chart-title {
    color: #34d399;
}

/* Large Doughnut for Featured */
.doughnut-large {
    height: 280px !important;
    max-width: 280px;
}

.doughnut-large .doughnut-center .doughnut-value {
    font-size: 1.5rem;
    color: #f1f5f9;
    -webkit-text-fill-color: #f1f5f9;
}

/* ====== 3D Glowy Tube Effect for Doughnut Charts (DESKTOP ONLY) ====== */
/* These effects are disabled on mobile to prevent chart rendering issues */
@media (min-width: 769px) {
    .doughnut-container {
        /* Add outer glow to container */
        filter: drop-shadow(0 0 12px rgba(0, 212, 255, 0.3));
        z-index: 1;
    }

    .doughnut-container:hover {
        z-index: 10; /* Bring to front on hover */
    }

    .doughnut-container canvas {
        /* Pseudo 3D effect - subtle perspective */
        transform: perspective(800px) rotateX(8deg);
        transform-origin: center center;
        transition: transform 0.4s ease;
        overflow: visible;
    }

    .doughnut-container:hover canvas {
        transform: perspective(800px) rotateX(2deg) scale(1.02);
    }
}

/* Glowing ring effect behind the chart (DESKTOP ONLY) */
@media (min-width: 769px) {
    .doughnut-container::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        /* Use fixed size to maintain perfect circle */
        width: 200px;
        height: 200px;
        transform: translate(-50%, -50%);
        border-radius: 50%;
        background: radial-gradient(circle, transparent 50%, rgba(0, 212, 255, 0.15) 70%, transparent 100%);
        animation: pulseGlow 3s ease-in-out infinite;
        pointer-events: none;
        z-index: -1;
    }

    /* Outer glowing halo */
    .doughnut-container::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        /* Use fixed size to maintain perfect circle */
        width: 260px;
        height: 260px;
        transform: translate(-50%, -50%);
        border-radius: 50%;
        background: conic-gradient(
            from 0deg,
            rgba(16, 185, 129, 0.2),
            rgba(59, 130, 246, 0.15),
            rgba(139, 92, 246, 0.2),
            rgba(245, 158, 11, 0.15),
            rgba(6, 182, 212, 0.2),
            rgba(236, 72, 153, 0.15),
            rgba(16, 185, 129, 0.2)
        );
        filter: blur(25px);
        opacity: 0.6;
        animation: rotateGlow 8s linear infinite;
        pointer-events: none;
        z-index: -2;
    }
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.7;
        transform: translate(-50%, -50%) scale(1.05);
    }
}

@keyframes rotateGlow {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* 3D tube-like gradient overlay for chart segments */
.chart-card.chart-featured .doughnut-container {
    /* Enhanced glow for featured charts */
    filter: drop-shadow(0 0 20px rgba(16, 185, 129, 0.4)) drop-shadow(0 8px 16px rgba(0, 0, 0, 0.3));
}

.chart-card.chart-featured .doughnut-container::after {
    background: conic-gradient(
        from 0deg,
        rgba(16, 185, 129, 0.3),
        rgba(6, 182, 212, 0.25),
        rgba(59, 130, 246, 0.3),
        rgba(139, 92, 246, 0.25),
        rgba(16, 185, 129, 0.3)
    );
    opacity: 0.7;
}

/* Inner shadow for depth */
.doughnut-center {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.doughnut-center::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.2) 0%, transparent 60%);
    pointer-events: none;
    z-index: -1;
}

/* Specular highlight for 3D tube effect */
.doughnut-container .specular-highlight {
    position: absolute;
    top: 10%;
    left: 15%;
    width: 30%;
    height: 15%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent);
    border-radius: 50%;
    filter: blur(8px);
    pointer-events: none;
    opacity: 0.6;
}

/* Dashboard Responsive */
@media (max-width: 640px) {
    .dashboard-main {
        padding: 1rem;
        padding-top: 90px;
    }
    
    .dashboard-title {
        font-size: 1.5rem;
    }
    
    .kpi-grid {
        gap: 1rem;
    }
    
    .liquid-card {
        padding: 1.25rem;
    }
    
    .card-value {
        font-size: 1.5rem;
    }
    
    .chart-card {
        padding: 1.25rem;
    }
    
    .chart-container {
        height: 220px;
        min-height: 220px;
        width: 100%;
    }
    
    .chart-legend-inline {
        display: none;
    }
    
    .doughnut-large {
        height: 220px !important;
        width: 220px !important;
        max-width: 100%;
    }
    
    .doughnut-container {
        height: 220px !important;
        width: 220px !important;
        max-width: 100%;
        padding: 10px !important;
        box-sizing: border-box !important;
        margin: 0 auto;
        /* Mobile-specific: ensure container is visible and not transformed */
        transform: none !important;
        -webkit-transform: none !important;
        filter: none !important;
        -webkit-filter: none !important;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* CRITICAL: Ensure canvas has proper dimensions on mobile */
    .chart-container canvas,
    .doughnut-container canvas {
        width: 100% !important;
        height: 100% !important;
        max-width: 200px !important;
        max-height: 200px !important;
        display: block !important;
        transform: none !important;
        -webkit-transform: none !important;
    }
    
    /* Force specific canvas sizes for doughnut charts on mobile */
    .doughnut-container canvas {
        width: 200px !important;
        height: 200px !important;
    }
    
    .doughnut-container:hover canvas {
        transform: none !important;
        -webkit-transform: none !important;
    }
    
    /* Disable heavy filter effects on mobile for performance */
    .doughnut-container {
        filter: none !important;
        -webkit-filter: none !important;
    }
    
    .chart-card.chart-featured .doughnut-container {
        filter: none !important;
        -webkit-filter: none !important;
    }
    
    /* Disable pseudo-element glow animations on mobile */
    .doughnut-container::before,
    .doughnut-container::after {
        display: none !important;
        content: none !important;
    }
    
    /* Ensure chart cards don't overflow on mobile */
    .chart-card {
        overflow: hidden !important;
    }
    
    .liquid-card.chart-card {
        min-height: 300px;
    }
}

/* Additional mobile fixes for tablets and larger phones */
@media (max-width: 768px) {
    /* Disable 3D transforms on all mobile/tablet devices */
    .doughnut-container canvas {
        transform: none !important;
        -webkit-transform: none !important;
    }
    
    .doughnut-container {
        filter: none !important;
        -webkit-filter: none !important;
    }
    
    .doughnut-container::before,
    .doughnut-container::after {
        display: none !important;
        content: none !important;
    }
}

/* Dashboard Info Footer Override */
.dashboard-page .info {
    position: fixed;
    z-index: 50;
}