﻿


    /* --- 1. CSS Variables & Global Setup --- */
/* CSS Variables are now defined in css-variables.css */

    * { margin: 0; padding: 0; box-sizing: border-box; }
    html, body { width: 100%; height: 100%; overflow: hidden; }

    body {
        font-family: 'Montserrat', sans-serif;
        display: flex;
        flex-direction: row;
        background-color: #1A202C;
        background-image:
            linear-gradient(160deg, rgba(26, 32, 44, 0.95) 20%, rgba(45, 55, 72, 0.95) 100%),
            url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.06'%3E%3Cpath d='M0 38.59l2.83-2.83 1.41 1.41L1.41 40H0v-1.41zM0 1.4l2.83 2.83 1.41-1.41L1.41 0H0v1.41zM38.59 40l-2.83-2.83 1.41-1.41L40 38.59V40h-1.41zM40 1.41l-2.83 2.83-1.41-1.41L38.59 0H40v1.41zM20 18.6l2.83-2.83 1.41 1.41L21.41 20l2.83 2.83-1.41 1.41L20 21.41l-2.83 2.83-1.41-1.41L18.59 20l-2.83-2.83 1.41-1.41L20 18.59z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
        transition: background-color 0.3s ease, background-image 0.3s ease;
    }

    /* Light theme body background */
    [data-theme="light"] body {
        background-color: #F0F2F5;
        background-image: none;
    }

    /* Dark theme body background - DISABLED to prevent text color issues */
    [data-theme="dark"] body {
        /* Dark theme disabled to prevent text color changes */
    }

    @keyframes fadeInSidebar {
        from { opacity: 0; transform: translateX(-30px); }
        to { opacity: 1; transform: translateX(0); }
    }

    /* --- 2. Main Sidebar & Navigation Structure --- */
#main-sidebar {
    position: absolute;
    width: var(--sidebar-width);
    /* height: 100vh; <-- DELETE or comment this out */
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--sidebar-padding);
    z-index: 1000;
    background-color: rgba(10, 12, 20, 0.3);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 5px 0 15px rgba(0,0,0,0.2);
    opacity: 0;
    animation: fadeInSidebar 0.5s ease-out 0.1s forwards;

    /* === [ADD THESE TWO LINES] === */
    top: 61px; /* Pushes the sidebar down by the header's height */
    height: calc(100vh - 60px); /* Resizes it to fill the rest of the screen */
}

/* And find this... */
#main-content-area {
    flex-grow: 1;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background-color: var(--content-area-bg);
    background-image: var(--content-area-bg-image);
    transition: background-color 0.3s ease;

    /* === [ADD THIS LINE] === */
    padding-top: 60px; /* Pushes the content (header + A4 page) down */
}

    #main-nav-wrapper {
        display: flex;
        flex-direction: column;
        align-items: center;
        flex-grow: 1;
        width: 100%;
        min-height: 0;
        position: relative;
    }

    #main-nav {
        position: absolute;
        display: flex;
        align-items: center;
        overflow-y: auto;
        overflow-x: hidden;
        scrollbar-width: none;
        flex-grow: 1;
        width: 100%;
        padding: calc(var(--arrow-height) + var(--arrow-spacing)) 10px;
        -webkit-mask-image: linear-gradient(to bottom, transparent, black calc(var(--arrow-height) + var(--arrow-spacing)), black calc(100% - var(--arrow-height) - var(--arrow-spacing)), transparent);
        mask-image: linear-gradient(to bottom, transparent, black calc(var(--arrow-height) + var(--arrow-spacing)), black calc(100% - var(--arrow-height) - var(--arrow-spacing)), transparent);
    }
    #main-nav::-webkit-scrollbar { display: none; }

    #main-nav::before {
        content: '';
        position: absolute; top: 0; left: 0;
        width: 100%; height: 100%;
        background: radial-gradient(circle at var(--mouse-x) var(--mouse-y), rgba(255, 255, 255, 0.08), transparent 250px);
        z-index: 2; pointer-events: none; opacity: 0;
        transition: opacity 0.3s ease-out;
    }
    #main-nav:hover::before { opacity: 1; }

    .scroll-arrow {
        position: absolute; left: 50%; transform: translateX(-50%);
        width: var(--arrow-height); height: var(--arrow-height);
        border-radius: 50%;
        display: flex; align-items: center; justify-content: center;
        cursor: pointer; z-index: 10; opacity: 0;
        transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
        pointer-events: none; background-color: #384252;
        box-shadow: 0 2px 5px rgba(0,0,0,0.25);
        border: 1px solid rgba(0,0,0,0.1);
        padding: 0;
    }
    .scroll-arrow:hover { background-color: #4a5568; transform: translateX(-50%) scale(1.05); }
    .scroll-arrow.active { opacity: 1; pointer-events: auto; }
    .scroll-arrow.up { top: 0; }
    .scroll-arrow.down { bottom: 0; }
    .scroll-arrow svg path { fill: white; }

    /* --- 3. Navigation Links & Active Indicator --- */
    #nav-link-container {
        position: relative;
        display: flex;
        flex-direction: column;
        width: 100%;
        align-items: center;
        gap: var(--nav-gap);
        z-index: 1;
    }
    #active-nav-indicator {
        position: absolute;
        width: 4px; /* Thicker line */
        left: -6px; /* Move 4 more pixels to the left from -2px */
        background: var(--active-indicator-color);
        border-radius: 2px; /* Curvy on top and bottom */
        z-index: 10; /* Higher z-index to appear above buttons */
        transition: var(--elastic-transition); /* LIQUID EFFECT */
        opacity: 0;
        border: none; /* Remove border */
        box-shadow: 0 0 8px rgba(255, 191, 35, 0.3); /* Subtle glow */
        transform: translateY(var(--indicator-y, 0px));
        height: calc(100% - 16px); /* Shorter than the button */
        top: 2px; /* Move up even more */
    }
    @keyframes indicatorLoad {
        from { opacity: 0; transform: scale(0.9) translateY(var(--indicator-y)); }
        to { opacity: 1; transform: scale(1) translateY(var(--indicator-y)); }
    }
    #main-nav a {
        text-decoration: none; color: var(--nav-text-color);
        font-weight: 600; font-size: 14px;
        padding: 12px 16px;
        display: flex; align-items: center;
        gap: 12px;
        white-space: nowrap; border-radius: 10px;
        width: 100%;
        transition: color 0.3s ease, background 0.3s ease, transform 0.4s ease, box-shadow 0.4s ease;
        background: linear-gradient(145deg, var(--inactive-bg-color-top), var(--inactive-bg-color-bottom));
        border: 1px solid rgba(0, 0, 0, 0.2);
        box-shadow: inset 0 1.5px 1px rgba(255, 255, 255, 0.1), 0 3px 5px rgba(10, 12, 20, 0.4);
        z-index: 1;
    }
    #main-nav a:hover {
        background: linear-gradient(145deg, #5a6578, #3c4a5f);
        transform: translateX(4px);
        box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 5px 8px rgba(10, 12, 20, 0.5);
    }
    #main-nav a:hover .nav-icon {
        fill: var(--active-indicator-color); /* Yellow icon on hover */
        transform: scale(1.1); /* Slight scale up */
    }
    #main-nav a:active { transform: translateX(0); box-shadow: inset 0 1.5px 2px rgba(0,0,0,0.2), 0 1px 2px rgba(10, 12, 20, 0.4); transition-duration: 0.1s; }
    #main-nav a:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
    #main-nav a.active { 
        color: var(--nav-text-hover-color); 
        background: #3B82F6; /* Solid blue background - very visible */
        box-shadow: none; 
        border-color: transparent; 
        transform: none; 
    }
    #main-nav a.active .nav-icon { 
        fill: var(--active-icon-color); /* Blue icon */
    }
    .nav-icon { 
        width: 20px; 
        height: 20px; 
        fill: var(--nav-icon-color); 
        transition: fill 0.3s ease, transform 0.3s ease; 
        opacity: 1; /* Ensure icons are visible */
        display: block; /* Ensure icons are displayed */
    }

    /* --- 4. Sidebar Header (Command Bar) & Icon Interactivity --- */
    .sidebar-header {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 5px;
        margin-bottom: 10px;
    }
    .logo-wrapper {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 60px; width: 60px; min-height: 60px;
        border-radius: 50%;
        background: linear-gradient(145deg, #4A5568, #2D3748);
        border: 1px solid rgba(0,0,0,0.1);
        margin-bottom: 0; /* Let header control spacing */
        transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
        animation: breathing-glow 5s ease-in-out infinite;
    }
    .logo-icon { width: 34px; height: 34px; fill: var(--nav-icon-color); transition: all 0.2s ease-in-out; }
    .logo-wrapper:hover {
        transform: scale(1.1);
        background: linear-gradient(145deg, #5f6c80, #414f63);
        box-shadow: inset 0 1px 1px rgba(255,255,255,0.15), 0 5px 15px rgba(0,0,0,0.4), 0 0 15px rgba(135, 206, 250, 0.3);
    }
    .logo-wrapper:hover .logo-icon {
        transform: rotate(-15deg) scale(1.1);
        fill: #FFFFFF;
    }
    .logo-wrapper:active {
        transform: scale(1.05);
        box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
        transition-duration: 0.1s;
    }
    @keyframes breathing-glow {
        0% { box-shadow: inset 0 1px 1px rgba(255,255,255,0.15), 0 3px 6px rgba(0,0,0,0.3), 0 0 8px rgba(135, 206, 250, 0.2); }
        50% { box-shadow: inset 0 1px 1px rgba(255,255,255,0.15), 0 3px 6px rgba(0,0,0,0.3), 0 0 20px rgba(135, 206, 250, 0.5); }
        100% { box-shadow: inset 0 1px 1px rgba(255,255,255,0.15), 0 3px 6px rgba(0,0,0,0.3), 0 0 8px rgba(135, 206, 250, 0.2); }
    }

    /* --- 5. [REMOVED] Old Theme Switcher Styles --- */
    /* All styles for the large, circular #theme-switcher that was in the sidebar have been removed from here. */

  /* === [IMPROVEMENT] Sidebar Icon Micro-interaction === */
.nav-link:hover .nav-icon {
    transform: scale(1.35) rotate(-5deg); /* Add a little bounce and tilt */
}

.nav-link .nav-icon {
    transition: transform 0.25s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

/* Make the active icon stand out more */
.nav-link.active .nav-icon {
    transform: scale(1.3);
}
  /* ========================================================================= */
/* === [UPGRADED] V4.0 - MASTER STYLESHEET FOR PROPOSAL OUTLINE SIDEBAR === */
/* ========================================================================= */
/* ========================================================================= */
/* === V4.1 - MASTER STYLESHEET FOR PROPOSAL OUTLINE SIDEBAR === */
/* ========================================================================= */

/* --- 1. CSS Variables --- */
/* CSS Variables are now defined in css-variables.css */

/* --- 2. Global Setup --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    font-family: var(--text-font);
    background: #1A202C linear-gradient(160deg, rgba(26, 32, 44, 0.95) 20%, rgba(45, 55, 72, 0.95) 100%), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.06'%3E%3Cpath d='M0 38.59l2.83-2.83 1.41 1.41L1.41 40H0v-1.41zM0 1.4l2.83 2.83 1.41-1.41L1.41 0H0v1.41zM38.59 40l-2.83-2.83 1.41-1.41L40 38.59V40h-1.41zM40 1.41l-2.83 2.83-1.41-1.41L38.59 0H40v1.41zM20 18.6l2.83-2.83 1.41 1.41L21.41 20l2.83 2.83-1.41 1.41L20 21.41l-2.83 2.83-1.41-1.41L18.59 20l-2.83-2.83 1.41-1.41L20 18.59z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}



/* --- Sidebar and Header styles remain unchanged, except for main-content-area */
#main-content-area {
    flex-grow: 1;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    background-color: #FFFFFF;
    padding-top: var(--header-height);
    transition: background-color 0.3s ease;
}

/* Light theme main content area */
[data-theme="light"] #main-content-area {
    background-color: #FFFFFF;
}

/* Dark theme main content area - DISABLED to prevent text color issues */
[data-theme="dark"] #main-content-area {
    /* Dark theme disabled to prevent text color changes */
}


@keyframes fadeInSidebar {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}



/* --- Sidebar Header & Navigation Structure --- */
.sidebar-header {
    padding: 10px 10px 20px 10px;
    flex-shrink: 0;
}

.sidebar-header h4 {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--nav-text-hover-color);
    letter-spacing: 0.5px;
}

#main-nav-wrapper {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    width: 100%;
    min-height: 0;
    position: relative;
}

#main-nav {
    flex-grow: 1;
    overflow-y: auto;
    scrollbar-width: none;
}
#main-nav::-webkit-scrollbar { display: none; }

/* --- Navigation Links & Section Headers (REDESIGNED) --- */
#nav-link-container {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0 5px;
}

.nav-section-header {
    font-size: 11px;
    font-weight: 900;
    color: var(--nav-section-header);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 25px 10px 10px 10px;
}
.nav-section-header:first-of-type {
    padding-top: 0;
}

/* Navigation styles are defined in the original section above */

    /* Colors work fine in both light and dark modes - no special adjustments needed */

/* --- Scroll Arrows --- */
.scroll-arrow {
    position: absolute; left: 50%; transform: translateX(-50%);
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 10; opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
    pointer-events: none;
    background-color: rgba(0,0,0,0.3);
}
.scroll-arrow.active { opacity: 1; pointer-events: auto; }
.scroll-arrow.up { top: 10px; }
.scroll-arrow.down { bottom: 10px; }
.scroll-arrow svg path { fill: white; }
.scroll-arrow svg { width: 20px; height: 20px; }


    /* ==========================================================
         STYLES FOR THE USER PROFILE MENU & NEW THEME TOGGLE
         ========================================================== */

    /* --- Profile Menu Container --- */
    #user-profile-menu {
        position: relative;
    }

    /* --- User Avatar (The Circle Trigger) --- */
    .user-avatar {
        width: 38px;
        height: 38px;
        border-radius: 50%;
        background-color: #4A5568;
        color: #E2E8F0;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 600;
        border: 2px solid rgba(255,255,255,0.3);
        cursor: pointer;
        transition: all 0.2s ease;
    }
    .user-avatar:hover {
        transform: scale(1.1);
        box-shadow: 0 0 10px rgba(135, 206, 250, 0.5);
    }
    
    /* Light theme user avatar styles */
    [data-theme="light"] .user-avatar {
        background-color: #E2E8F0;
        color: #2D3748;
        border-color: #CBD5E0;
    }

    /* --- Dropdown Panel --- */
    .profile-dropdown {
        position: fixed; /* Changed from absolute to fixed */
        top: 75px; /* Position below header */
        right: 25px; /* Position from right edge */
        width: 260px;
        background-color: #2D3748;
        border-radius: 8px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.3);
        border: 1px solid rgba(255,255,255,0.1);
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
        transition: all 0.2s ease-out;
        z-index: 99999; /* Maximum z-index */
        padding: 5px 0; /* Add some padding */
    }
    #user-profile-menu.open .profile-dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    /* --- Dropdown Header (User Info) --- */
    .dropdown-header {
        padding: 10px 15px 15px 15px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        margin-bottom: 5px; /* Space below header */
    }
    .dropdown-header strong { display: block; color: #fff; font-size: 15px; }
    .dropdown-header span { font-size: 13px; color: #9ab0c9; }

    /* --- Standard Dropdown Links (<a> tags) --- */
    .dropdown-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 15px;
        color: #E2E8F0;
        font-size: 14px;
        text-decoration: none !important;
        border-radius: 4px;
        margin: 0 5px; /* Spacing for items */
        width: calc(100% - 10px);
    }
    .dropdown-item:hover {
        background-color: rgba(255,255,255,0.05);
        color: #fff;
    }
    .dropdown-item i { width: 18px; text-align: center; color: #9ab0c9; }

    /* --- Divider --- */
    .dropdown-divider { height: 1px; background: rgba(255,255,255,0.1); margin: 5px 0; }




    /* Ã¢â€“Â¼Ã¢â€“Â¼Ã¢â€“Â¼Ã¢â€“Â¼Ã¢â€“Â¼ STYLES FOR THEME TOGGLE INSIDE DROPDOWN Ã¢â€“Â¼Ã¢â€“Â¼Ã¢â€“Â¼Ã¢â€“Â¼Ã¢â€“Â¼ */

    /* --- Container for the Toggle Item --- */
    .dropdown-item-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between; /* Pushes label and switch apart */
        padding: 10px 15px;
        margin: 0 5px;
        width: calc(100% - 10px);
        border-radius: 4px;
        cursor: default; /* Not a clickable link */
    }

    .dropdown-item-toggle:hover {
        background-color: rgba(255,255,255,0.05);
    }


    /* --- Label on the left (Icon + Text) --- */
    .dropdown-item-label {
        display: flex;
        align-items: center;
        gap: 12px;
        color: #E2E8F0;
        font-size: 14px;
    }

    .dropdown-item-label i { width: 18px; text-align: center; color: #9ab0c9; }


    /* --- The Switch on the right --- */
    #theme-switcher-dropdown {
        position: relative;
    }
    #theme-toggle-checkbox {
        display: none;
    }

    /* The track/background of the switch */
    #theme-switcher-dropdown .theme-toggle-label {
        background-color: #4A5568; /* Darker background for contrast */
        border-radius: 50px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 3px;
        position: relative;
        height: 22px; /* Smaller */
        width: 42px;  /* Smaller */
        transition: background-color 0.3s ease;
    }



    /* The moving ball */
    #theme-switcher-dropdown .ball {
        background-color: #fff;
        border-radius: 50%;
        position: absolute;
        top: 2px;
        left: 2px;
        height: 18px; /* Smaller */
        width: 18px;  /* Smaller */
        transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    }

    /* Sun/Moon Icons */
    #theme-switcher-dropdown .fa-moon,
    #theme-switcher-dropdown .fa-sun {
        font-size: 10px; /* Smaller */
        transition: opacity 0.3s ease, transform 0.3s ease;
    }
    #theme-switcher-dropdown .fa-moon { color: #f1c40f; }
    #theme-switcher-dropdown .fa-sun { color: #f39c12; }

    /* Checked state (Light Mode) */
    #theme-toggle-checkbox:checked + .theme-toggle-label {
        background-color: #73C0F4;
    }
    #theme-toggle-checkbox:checked + .theme-toggle-label .ball {
        transform: translateX(20px); /* Adjusted for smaller size */
    }

    /* Icon visibility logic */
    #theme-toggle-checkbox:checked + .theme-toggle-label .fa-moon { opacity: 0; transform: rotate(90deg); }
    #theme-toggle-checkbox:checked + .theme-toggle-label .fa-sun { opacity: 1; transform: rotate(0deg); }
    #theme-switcher-dropdown .theme-toggle-label .fa-moon { opacity: 1; transform: rotate(0deg); }
    #theme-switcher-dropdown .theme-toggle-label .fa-sun { opacity: 0; transform: rotate(-90deg); }

    /* Ã¢â€“Â²Ã¢â€“Â²Ã¢â€“Â²Ã¢â€“Â²Ã¢â€“Â² END OF NEW STYLES Ã¢â€“Â²Ã¢â€“Â²Ã¢â€“Â²Ã¢â€“Â²Ã¢â€“Â² */


     /* ==========================================================
   STYLES FOR THE NEW, CORRECTED HEADER
   ========================================================== */

/* --- 1. Main Header Structure --- */
#top-application-header {
    position: fixed; top: 0; left: 0; width: 100%; height: 60px;
    background-color: #FFFFFF; color: #2D3748; /* Changed default to light */
    border-bottom: 1px solid #E2E8F0;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 25px; z-index: 2000; box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    transition: background-color 0.3s ease, border-color 0.3s ease;
    overflow: hidden; /* Prevent content from sticking out */
}

/* Light theme header styles */
[data-theme="light"] #top-application-header {
    background-color: #FFFFFF; color: #2D3748; border-color: #E2E8F0;
}

/* Dark theme header styles */
[data-theme="dark"] #top-application-header {
    background-color: #1A202C;
    color: #E2E8F0;
    border-color: #2D3748;
}

/* Light theme specific header element styles */
[data-theme="light"] #propokit-icon-logo {
    color: #2D3748;
}

/* Ensure logo-kit stays yellow in light mode too - more specific selector */
[data-theme="light"] #propokit-icon-logo .logo-kit {
    background: linear-gradient(45deg, #FFC300, #FFD644) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    color: #FFC300 !important;
}

[data-theme="light"] #propokit-icon-logo:hover .logo-kit {
    background: linear-gradient(45deg, #FFD644, #FFE066) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    color: #FFD644 !important;
}

/* Dark theme specific header element styles */
[data-theme="dark"] #propokit-icon-logo {
    color: #E2E8F0;
}

/* Ensure logo-kit stays yellow in dark mode */
[data-theme="dark"] #propokit-icon-logo .logo-kit {
    background: linear-gradient(45deg, #FFC300, #FFD644) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    color: #FFC300 !important;
}

[data-theme="dark"] #propokit-icon-logo:hover .logo-kit {
    background: linear-gradient(45deg, #FFD644, #FFE066) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    color: #FFD644 !important;
}

[data-theme="light"] .header-btn {
    border-color: rgba(45, 55, 72, 0.2);
    color: #2D3748;
}

[data-theme="light"] .header-btn:hover {
    background-color: rgba(45, 55, 72, 0.1);
    color: #2D3748;
}

[data-theme="light"] .header-divider {
    background-color: rgba(45, 55, 72, 0.15);
}

[data-theme="light"] #header-document-title {
    color: #2D3748;
    background-color: transparent;
}

[data-theme="light"] #header-document-title:hover {
    border-color: rgba(45, 55, 72, 0.2);
}

[data-theme="light"] #header-document-title:focus {
    border-color: #3a8dff;
    background-color: rgba(58, 141, 255, 0.1);
}

[data-theme="light"] .zoom-controls {
    background-color: rgba(45, 55, 72, 0.15);
    border-color: rgba(45, 55, 72, 0.2);
}

[data-theme="light"] .zoom-controls .header-btn-icon-only {
    background-color: rgba(45, 55, 72, 0.05);
    border-color: rgba(45, 55, 72, 0.2);
}

[data-theme="light"] .zoom-controls .header-btn-icon-only:hover {
    background-color: rgba(45, 55, 72, 0.1);
    border-color: rgba(45, 55, 72, 0.3);
}

[data-theme="light"] #zoom-level-display {
    color: #2D3748;
}

[data-theme="light"] #header-title-container:hover {
    background-color: rgba(45, 55, 72, 0.1);
}


[data-theme="light"] .auth-status-indicator {
    color: #6b7280;
}

[data-theme="light"] .auth-status-indicator .auth-status-text {
    color: #2D3748;
}

/* Dark theme specific header element styles */
[data-theme="dark"] .header-btn {
    border-color: rgba(226, 232, 240, 0.2);
    color: #E2E8F0;
}

[data-theme="dark"] .header-btn:hover {
    background-color: rgba(226, 232, 240, 0.1);
    color: #E2E8F0;
}

/* Keep download and print buttons colored in dark mode */
[data-theme="dark"] .header-btn-download {
    background-color: #38A169;
    color: #FFFFFF;
}

[data-theme="dark"] .header-btn-download:hover {
    background-color: #2F855A;
}

[data-theme="dark"] .header-btn-print {
    background-color: #3182CE;
    color: #FFFFFF;
}

[data-theme="dark"] .header-btn-print:hover {
    background-color: #2C5282;
}

[data-theme="dark"] .header-divider {
    background-color: rgba(226, 232, 240, 0.15);
}

[data-theme="dark"] #header-document-title {
    color: #E2E8F0;
    background-color: transparent;
}

[data-theme="dark"] #header-document-title:hover {
    border-color: rgba(226, 232, 240, 0.2);
}

[data-theme="dark"] #header-document-title:focus {
    border-color: #63B3ED;
    background-color: rgba(99, 179, 237, 0.1);
}

[data-theme="dark"] .zoom-controls {
    background-color: rgba(226, 232, 240, 0.15);
    border-color: rgba(226, 232, 240, 0.2);
}

[data-theme="dark"] .zoom-controls .header-btn-icon-only {
    background-color: rgba(226, 232, 240, 0.05);
    border-color: rgba(226, 232, 240, 0.2);
}

[data-theme="dark"] .zoom-controls .header-btn-icon-only:hover {
    background-color: rgba(226, 232, 240, 0.1);
    border-color: rgba(226, 232, 240, 0.3);
}

[data-theme="dark"] #zoom-level-display {
    color: #E2E8F0;
}

[data-theme="dark"] #header-title-container:hover {
    background-color: rgba(226, 232, 240, 0.05);
}

[data-theme="dark"] .header-btn-tool {
    background-color: transparent;
    border-color: rgba(226, 232, 240, 0.2);
    color: #E2E8F0;
}

[data-theme="dark"] .header-btn-tool {
    background-color: transparent;
    border-color: rgba(226, 232, 240, 0.2);
    color: #E2E8F0;
}

[data-theme="dark"] .header-btn-tool:hover {
    background-color: rgba(226, 232, 240, 0.1);
    color: #E2E8F0;
}


[data-theme="dark"] .auth-status-indicator {
    color: #A0AEC0;
}

[data-theme="dark"] .auth-status-indicator .auth-status-text {
    color: #E2E8F0;
}

/* --- 2. Logo Styles --- */
#propokit-icon-logo {
    font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1.7rem;
    text-decoration: none !important; display: flex; align-items: center;
    gap: 4px; cursor: pointer; color: #2D3748; /* Changed to dark for light theme default */
}

.logo-text { display: flex; align-items: center; transition: color 0.3s ease; }
.logo-icon-svg {
    width: 1em; height: 1em; position: relative; top: -0.05em; stroke: #3a8dff;
    transition: transform 0.6s cubic-bezier(0.64, 0, 0.2, 1.5); margin: 0 -2px;
}
.logo-kit { 
    background: linear-gradient(45deg, #FFC300, #FFD644);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: #FFC300; 
}
#propokit-icon-logo:hover .logo-icon-svg { transform: rotate(360deg); }
#propokit-icon-logo:hover .logo-text { color: #3a8dff; }
#propokit-icon-logo:hover .logo-kit { 
    background: linear-gradient(45deg, #FFD644, #FFE066);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: #FFD644; 
}

/* --- 3. Header Containers & Divider --- */
.header-left, .header-right { display: flex; align-items: center; gap: 15px; }
.header-divider { height: 28px; width: 1px; background-color: rgba(255, 255, 255, 0.15); }


/* --- 4. General Header Button Styles --- */
.header-btn {
    display: flex; align-items: center; gap: 8px; background-color: transparent;
    border: 1px solid rgba(255,255,255,0.2); padding: 8px 12px;
    border-radius: 6px; font-size: 14px; font-weight: 500; cursor: pointer;
    transition: all 0.2s ease; text-decoration: none; color: inherit;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 200px; /* Prevent buttons from getting too wide */
}
.header-btn:hover { background-color: rgba(255,255,255,0.1); transform: translateY(-1px); color: #fff; text-decoration: none;}

.header-btn i { 
    font-size: 16px; 
    display: inline-block;
    width: 16px;
    height: 16px;
    text-align: center;
}

/* Ensure all Font Awesome icons in header display properly */
#top-application-header .fas,
#top-application-header .fa {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    display: inline-block !important;
}

/* Smaller icons specifically for zoom controls */
.zoom-controls .header-btn-icon-only i {
    font-size: 12px !important;
}
.header-btn-icon-only { padding: 8px; width: 38px; height: 38px; justify-content: center; border-radius: 50%; }

/* --- 5. Specific Button Colors --- */
.header-btn-tool { background-color: transparent; border-color: rgba(255,255,255,0.2); }
.header-btn-tool:hover { background-color: rgba(255,255,255,0.1); }

.header-btn-download { background-color: #E67E22; border-color: transparent; color: #ffffff !important; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.header-btn-download:hover { background-color: #f39c12; color: #ffffff !important; }
.header-btn-print { background-color: #27ae60; border-color: transparent; color: #ffffff !important; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.header-btn-print:hover { background-color: #2ecc71; color: #ffffff !important; }

/* --- 6. Zoom Controls --- */
.zoom-controls {
    display: flex;
    flex-direction: row; /* Ensure horizontal layout */
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 10px;
    border-radius: 8px;
    background-color: rgba(74, 85, 104, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.15);
    margin: 0 2px;
    height: 36px;
    min-height: 36px;
    max-height: 36px;
    box-sizing: border-box;
    /* Ensure perfect alignment with header */
    align-self: center;
    flex-shrink: 0;
    /* Match header button alignment */
    line-height: 1;
    /* Force vertical centering */
    margin-top: auto;
    margin-bottom: auto;
    /* Better visual integration */
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}



#zoom-level-display {
    font-size: 12px;
    font-weight: 600;
    width: 45px;
    min-width: 45px;
    text-align: center;
    user-select: none;
    -webkit-user-select: none;
    color: #ffffff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    top: 0;
}

/* Force zoom controls to center vertically in header */
.header-right .zoom-controls {
    display: flex !important;
    flex-direction: row !important; /* Ensure horizontal layout */
    align-items: center !important;
    justify-content: center !important;
    height: 36px !important;
    margin: auto 2px !important;
    align-self: center !important;
    /* Move even higher for perfect centering */
    position: relative !important;
    top: 0px !important;
}

/* Zoom control buttons specific styling */
.zoom-controls .header-btn-icon-only {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    max-width: 28px;
    max-height: 28px;
    padding: 3px;
    margin: 0 1px;
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    position: relative;
    top: 0;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.zoom-controls .header-btn-icon-only:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Additional zoom controls layout fixes */
.zoom-controls {
    flex-direction: row !important; /* Force horizontal layout */
}

.zoom-controls > * {
    flex-direction: row !important; /* Ensure all direct children are horizontal */
}

/* Ensure zoom controls layout is always horizontal */
#zoom-out-btn,
#zoom-level-display,
#zoom-in-btn {
    display: inline-block !important;
    vertical-align: middle !important;
}








    /* Style the entire wrapper to be clickable */
#header-title-container {
    cursor: pointer;
    padding: 4px 12px;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}

#header-title-container:hover {
    background-color: rgba(255, 255, 255, 0.1);
}




/* Adjust the title span itself (it's no longer an input) */



.header-document-title-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-document-title-wrapper .document-icon {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    transition: color 0.2s ease;
}

[data-theme="light"] .header-document-title-wrapper .document-icon {
    color: #6b7280;
}

[data-theme="dark"] .header-document-title-wrapper .document-icon {
    color: #A0AEC0;
}

#header-document-title {
    background: transparent;
    border: 1px solid transparent; /* Start with a hidden border */
    color: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 5px;
    text-align: center;
    transition: all 0.2s ease;
    /* Prevent the default browser outline on focus */
    outline: none;
}


#header-document-title:hover {
    /* On hover, give a subtle hint it's editable */
    border-color: rgba(255, 255, 255, 0.2);
}

#header-document-title:focus {
    /* When editing, make it obvious */
    border-color: #3a8dff;
    background-color: rgba(0,0,0,0.3);
}




    :root {
        --panel-bg: rgba(20, 30, 45, 0.9);
        --panel-text: #FFFFFF;
        --panel-success: #2ECC71;
        --panel-error: #E74C3C;
        --panel-font: 'Inter', system-ui, -apple-system, sans-serif;
    }

    #propokit-status-panel {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background-color: var(--panel-bg);
        color: var(--panel-text);
        font-family: var(--panel-font);
        border-radius: 8px;
        padding: 15px 20px;
        display: flex;
        align-items: center;
        gap: 15px;
        z-index: 99999;
        box-shadow: 0 10px 30px rgba(0,0,0,0.3);
        border: 1px solid rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);

        /* Animation properties */
        transform: translateY(calc(100% + 40px));
        opacity: 0;
        visibility: hidden;
        transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1),
                    opacity 0.4s ease,
                    visibility 0.4s;
    }

    #propokit-status-panel.visible {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    #propokit-status-panel .status-icon svg {
        width: 24px;
        height: 24px;
        display: block;
    }

    #propokit-status-panel .status-icon .icon-loader { fill: var(--panel-text); }
    #propokit-status-panel .status-icon .icon-success { fill: var(--panel-success); }
    #propokit-status-panel .status-icon .icon-error { fill: var(--panel-error); }

    #propokit-status-panel .status-text {
        font-size: 14px;
        font-weight: 500;
    }/* ============================================== */
/* === ENHANCED TOP-LEFT ICON INTERACTIVITY === */
/* ============================================== */

/* --- Home Icon (logo-wrapper) Enhancements --- */

/* Add a smooth transition to the main wrapper */
.logo-wrapper {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); /* Smoother transition */
}

/* On hover, make it grow and add a glow */
.logo-wrapper:hover {
    transform: scale(1.1); /* Slightly larger */
    background: linear-gradient(145deg, #5f6c80, #414f63); /* A bit lighter */
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.15),
                0 5px 15px rgba(0,0,0,0.4), /* Deeper shadow */
                0 0 15px rgba(135, 206, 250, 0.3); /* Subtle blue glow */
}

/* Animate the icon inside on hover */
.logo-wrapper:hover .logo-icon {
    transform: rotate(-15deg) scale(1.1);
    fill: #FFFFFF; /* Brighter white icon on hover */
}

/* When the user clicks (active state), make it feel like a button press */
.logo-wrapper:active {
    transform: scale(1.05); /* Slightly smaller than hover */
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3); /* Inset shadow for "pressed" feel */
    transition-duration: 0.1s; /* Make the press feel instant */
}


/* Progress bar width */
.progress-fill {
    width: 25%;
}

/* --- [REMOVED] Old Theme Switcher Enhancements --- */
/* The large hover/glow effects for the old switcher are no longer needed. */

/* ============================================== */
/* === FORCE LOGOUT BUTTON VISIBILITY === */
/* ============================================== */

/* When user is signed in, ensure logout button is always visible */
#user-profile-menu.open #logout-btn {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Also ensure the dropdown content is visible when menu is open */
#user-profile-menu.open .profile-dropdown {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

