/* Flat UI Header Styles to match sidebar design */

.site-header {
    background: rgba(255, 255, 255, 0.85) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(63, 77, 238, 0.14) !important;
    border-radius: 40px;
    width: 88%;
    max-width: 1400px;
    margin: 2rem auto 0;
    box-shadow:
        0 0 1px rgba(63, 77, 238, 0.15),
        0 25px 60px -40px rgba(63, 77, 238, 0.3) !important;
    padding: 0.75rem 1.75rem !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    z-index: 100;
}

.site-header:hover {
    transform: translateY(-1px);
    box-shadow:
        0 0 1px rgba(63, 77, 238, 0.25),
        0 30px 70px -45px rgba(63, 77, 238, 0.4) !important;
}

/* Dark mode header */
@media (prefers-color-scheme: dark) {
    .site-header {
        background: rgb(254 254 255) !important;
        border-color: rgba(63, 77, 238, 0.25) !important;
        box-shadow: 0 0 1px rgba(255, 255, 255, 0.14), 0 25px 60px -40px rgba(0, 0, 0, 0.5) !important;
    }
    
    .site-header:hover {
        box-shadow:
            0 0 1px rgba(255, 255, 255, 0.2),
            0 30px 70px -45px rgba(0, 0, 0, 0.6) !important;
    }
}

/* Update header icons and buttons */
.site-header-icon {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 0.2s;
    color: #111827;
    background: rgba(248, 250, 252, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 12px;
    justify-content: center;
    align-items: center;
    width: 2.5rem;
    height: 2.5rem;
    transition-duration: 0.2s;
    display: inline-flex;
}

.site-header-icon:hover {
    border-color: rgba(63, 77, 238, 0.45);
    transform: translateY(-1px);
}

.sidebar-toggle {
    border-style: solid;
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 0.2s;
    color: #1e293b;
    background: rgb(248 250 252);
    border: 1px solid rgb(226 232 240);
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0.5rem;
    transition-duration: 0.2s;
    display: inline-flex;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.sidebar-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(63, 77, 238, 0.05) 0%, rgba(99, 102, 241, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sidebar-toggle:hover {
    background: rgb(241 245 249);
    border-color: rgb(203 213 225);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    transform: translateY(-1px);
}

.sidebar-toggle:hover::before {
    opacity: 1;
}

.sidebar-toggle:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05), 0 1px 1px -1px rgb(0 0 0 / 0.05);
}

.sidebar-toggle.is-active {
    background: linear-gradient(135deg, rgb(63 77 238) 0%, rgb(99 102 241) 100%);
    border-color: rgb(63 77 238);
    box-shadow: 0 4px 6px -1px rgb(63 77 238 / 0.3), 0 2px 4px -2px rgb(63 77 238 / 0.2);
    color: white;
}

.sidebar-toggle.is-active::before {
    opacity: 0;
}

.sidebar-toggle.is-active:hover {
    background: linear-gradient(135deg, rgb(55 66 238) 0%, rgb(89 92 241) 100%);
    box-shadow: 0 6px 8px -1px rgb(63 77 238 / 0.4), 0 3px 6px -2px rgb(63 77 238 / 0.3);
    transform: translateY(-1px);
}

/* Icon animations */
.sidebar-toggle__icon-stack {
    height: calc(var(--spacing) * 7);
    width: calc(var(--spacing) * 7);
    display: inline-flex;
    position: relative;
}

.sidebar-toggle__icon {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 0.2s;
    justify-content: center;
    align-items: center;
    display: flex;
    position: absolute;
    top: 50%;
    left: 50%;
    font-size: 1.25rem;
    line-height: 1;
    transform: translate(-50%, -50%);
}

.sidebar-toggle__icon.material-symbols-outlined {
    font-size: 1.25rem;
    line-height: 1;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-toggle__icon.sidebar-toggle__icon--menu {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(0) rotate(0) scale(1);
}

.sidebar-toggle__icon.sidebar-toggle__icon--close {
    opacity: 0;
    transform: translate(-50%, -50%) translateY(6px) rotate(-10deg) scale(0.75);
}

.sidebar-toggle.is-active .sidebar-toggle__icon.sidebar-toggle__icon--menu {
    opacity: 0;
    transform: translate(-50%, -50%) translateY(-6px) rotate(10deg) scale(0.75);
}

.sidebar-toggle.is-active .sidebar-toggle__icon.sidebar-toggle__icon--close {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(0) rotate(0) scale(1);
}

/* Dark mode buttons and icons */
@media (prefers-color-scheme: dark) {
    .site-header-icon {
        color: #f9fafb;
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.12);
    }
    
    .sidebar-toggle {
        color: #e2e8f0;
        background: rgb(30 41 59);
        border-color: rgb(51 65 85);
        box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.3), 0 1px 2px -1px rgb(0 0 0 / 0.3);
    }
    
    .sidebar-toggle:hover {
        background: rgb(51 65 85);
        border-color: rgb(71 85 105);
    }
    
    .sidebar-toggle.is-active {
        background: linear-gradient(135deg, rgb(63 77 238) 0%, rgb(99 102 241) 100%);
        border-color: rgb(63 77 238);
        color: white;
        box-shadow: 0 4px 6px -1px rgb(63 77 238 / 0.3), 0 2px 4px -2px rgb(63 77 238 / 0.2);
    }
    
    .sidebar-toggle.is-active:hover {
        background: linear-gradient(135deg, rgb(55 66 238) 0%, rgb(89 92 241) 100%);
    }
}

/* User menu dropdown with flat UI */
.user-menu-dropdown {
    background: rgb(254 254 255) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(63, 77, 238, 0.14) !important;
    box-shadow:
        0 0 1px rgba(63, 77, 238, 0.15),
        0 30px 70px -45px rgba(63, 77, 238, 0.2) !important;
    border-radius: 18px !important;
    width: 20rem !important;
    padding: 0 !important;
    overflow: hidden;
    position: relative;
    z-index: 200;
}

/* Optimize dropdown items */
.user-menu-dropdown .floating-nav__stack {
    padding: 0.75rem;
}

.user-menu-dropdown .floating-nav__nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.user-menu-dropdown .floating-nav__nav-link {
    border-radius: 12px !important;
    padding: 0.75rem 1rem !important;
    transition: all 0.2s ease !important;
    background: transparent;
    border: 1px solid transparent;
}

.user-menu-dropdown .floating-nav__nav-link:hover {
    background: rgba(63, 77, 238, 0.08) !important;
    border-color: rgba(63, 77, 238, 0.15);
    transform: translateY(-1px);
}

.user-menu-dropdown .floating-nav__nav-link--active {
    background: rgba(63, 77, 238, 0.12) !important;
    border-color: rgba(63, 77, 238, 0.25);
}

.user-menu-dropdown .floating-nav__nav-icon {
    background: rgba(63, 77, 238, 0.1) !important;
    color: #3f4dee !important;
    border-radius: 10px;
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1.2rem;
}

.user-menu-dropdown .floating-nav__nav-link:hover .floating-nav__nav-icon {
    background: rgba(63, 77, 238, 0.15) !important;
}

.user-menu-dropdown .floating-nav__nav-link--active .floating-nav__nav-icon {
    background: #3f4dee !important;
    color: white !important;
    box-shadow: 0 4px 12px -4px rgba(63, 77, 238, 0.4);
}

/* Optimize status card */
.user-menu-dropdown .floating-nav__status-card {
    background: rgba(248, 250, 252, 0.9) !important;
    border: 1px solid rgba(148, 163, 184, 0.2) !important;
    border-radius: 14px !important;
    padding: 1rem !important;
    margin-top: 0.5rem;
    box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.05);
}

.user-menu-dropdown .floating-nav__status-icon {
    background: rgba(63, 77, 238, 0.1) !important;
    color: #3f4dee !important;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 10px;
}

.user-menu-dropdown .floating-nav__status-title,
.user-menu-dropdown .floating-nav__status-desc {
    color: #1f2937 !important;
}

.user-menu-dropdown .floating-nav__status-meta {
    background: rgba(63, 77, 238, 0.05) !important;
    color: #4b5563 !important;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    margin-top: 0.75rem;
}

.user-menu-dropdown .floating-nav__cta-button {
    background: #3f4dee !important;
    color: white !important;
    border-radius: 10px !important;
    padding: 0.625rem 1rem !important;
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: 0.75rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.user-menu-dropdown .floating-nav__cta-button:hover {
    background: #3730a3 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px -4px rgba(63, 77, 238, 0.3);
}

/* Floating Nav Status Card - Modern Design */
.floating-nav__status-card {
    overflow: hidden;
    position: relative;
    background-color: #ffffff;
    text-align: left;
    border-radius: 0.5rem;
    box-shadow:
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.floating-nav__status-card:hover {
    transform: translateY(-2px);
    box-shadow:
        0 25px 35px -5px rgba(0, 0, 0, 0.12),
        0 15px 15px -5px rgba(0, 0, 0, 0.06);
}

.floating-nav__status-head {
    padding: 1.25rem 1rem 1rem 1rem;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.floating-nav__status-icon {
    display: flex;
    background-color: rgba(63, 77, 238, 0.1);
    flex-shrink: 0;
    justify-content: center;
    align-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    color: #3f4dee;
}

.floating-nav__status-icon .material-symbols-outlined {
    font-size: 1.5rem;
    width: 1.5rem;
    height: 1.5rem;
}

.floating-nav__status-copy {
    flex: 1;
    min-width: 0;
}

.floating-nav__status-title {
    color: #111827;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5rem;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.floating-nav__status-desc {
    margin-top: 0.25rem;
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.floating-nav__status-meta {
    margin: 0.75rem 1rem;
    background-color: #f9fafb;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    color: #6b7280;
    text-align: center;
    border-radius: 0.375rem;
    border-width: 1px;
    border-color: transparent;
}

.floating-nav__cta-button {
    display: inline-flex;
    margin: 0.75rem 1rem;
    padding: 0.5rem 1rem;
    background-color: #3f4dee;
    color: #ffffff;
    font-size: 0.75rem;
    line-height: 1.125rem;
    font-weight: 500;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    width: calc(100% - 2rem);
    border-radius: 0.375rem;
    border-width: 1px;
    border-color: transparent;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.floating-nav__cta-button:hover {
    background-color: #3730a3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px 0 rgba(63, 77, 238, 0.15);
}

.floating-nav__cta-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.floating-nav__cta-button .material-symbols-outlined {
    font-size: 1rem;
}

/* Dark mode dropdown */
@media (prefers-color-scheme: dark) {
    .user-menu-dropdown {
        background: rgb(254 254 255) !important;
        border-color: rgba(63, 77, 238, 0.25) !important;
        box-shadow:
            0 0 1px rgba(255, 255, 255, 0.14),
            0 30px 70px -45px rgba(0, 0, 0, 0.2) !important;
    }
    
    .user-menu-dropdown .floating-nav__status-card {
        background: rgba(248, 250, 252, 0.9) !important;
        border-color: rgba(148, 163, 184, 0.2) !important;
    }
    
    .user-menu-dropdown .floating-nav__status-title,
    .user-menu-dropdown .floating-nav__status-desc {
        color: #1f2937 !important;
    }
}

/* Update header text colors */
.site-header-brand__meta,
.site-header-brand__title {
    color: #000000 !important;
}

/* User Menu Toggle Button */
.user-menu-toggle {
    width: fit-content;
    min-width: 100px;
    height: 45px;
    padding: 8px;
    border-radius: 5px;
    border: 2.5px solid #E0E1E4;
    box-shadow: 0px 0px 20px -20px;
    cursor: pointer;
    background-color: white;
    transition: all 0.2s ease-in-out 0ms;
    user-select: none;
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-menu-toggle:hover {
    background-color: #F2F2F2;
    box-shadow: 0px 0px 20px -18px;
}

.user-menu-toggle:active {
    transform: scale(0.95);
}

.user-menu-toggle[aria-expanded="true"] {
    border-color: #3f4dee;
}

.user-menu-toggle[aria-expanded="true"]:hover {
    background-color: #F2F2F2;
    box-shadow: 0px 0px 20px -18px;
}

.user-menu-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.125rem;
}

.user-menu-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.25;
}

.user-menu-role {
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
    line-height: 1.25;
}

.user-menu-avatar {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 12px;
    background: linear-gradient(135deg, rgb(63 77 238) 0%, rgb(99 102 241) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    font-weight: 700;
    box-shadow: 0 2px 4px -1px rgba(63, 77, 238, 0.2);
}

.user-menu-chevron {
    font-size: 1.25rem;
    color: #64748b;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-menu-toggle:hover .user-menu-chevron {
    color: #3f4dee;
}

.user-menu-toggle[aria-expanded="true"] .user-menu-chevron {
    color: white;
    transform: rotate(180deg);
}

@media (prefers-color-scheme: dark) {
    .site-header-brand__meta,
    .site-header-brand__title {
        color: #000000 !important;
    }
    
    .user-menu-toggle:hover {
        background-color: #F2F2F2;
        box-shadow: 0px 0px 20px -18px;
    }
    
    .user-menu-name {
        color: #e2e8f0;
    }
    
    .user-menu-role {
        color: #94a3b8;
    }
    
    .user-menu-avatar {
        background: linear-gradient(135deg, rgb(63 77 238) 0%, rgb(99 102 241) 100%);
        box-shadow: 0 2px 4px -1px rgba(63, 77, 238, 0.3);
        color: white !important;
    }
    
    .user-menu-chevron {
        color: #94a3b8;
    }
    
    .user-menu-toggle:hover .user-menu-chevron {
        color: #818cf8;
    }
}
