/* Layout */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Elegant Sidebar */
.sidebar {
    width: 260px;
    background: rgba(253, 252, 254, 0.85);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(201, 160, 220, 0.2);
    display: flex;
    flex-direction: column;
    padding: 35px 15px;
    z-index: 10;
    box-shadow: 4px 0 20px rgba(155, 127, 165, 0.08);
    position: relative;
    overflow: hidden;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: var(--primary-gradient);
    opacity: 0.03;
    z-index: -1;
}

.logo-container {
    margin-bottom: 50px;
    text-align: center;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 0;
    text-decoration: none;
}

.logo-wedding {
    font-family: 'Times New Roman', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.5px;
    font-style: italic;
}

.logo-eevee {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 900;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
    text-transform: uppercase;
}

.sidebar-nav ul li {
    padding: 0 !important;
    /* Fix for clickable area */
    margin-bottom: 6px;
    border-radius: 16px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.14rem;
    transition: all 0.3s ease;
    color: var(--text-muted);
    position: relative;
    overflow: hidden;
}

.sidebar-nav ul li a {
    display: block;
    padding: 14px 20px;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.sidebar-nav ul li::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--shimmer-gradient);
    transition: left 0.6s ease;
}

.sidebar-nav ul li:hover::before {
    left: 100%;
}

.sidebar-nav ul li:hover {
    background: rgba(201, 160, 220, 0.15);
    color: var(--accent-color);
    transform: translateX(5px);
}

.sidebar-nav ul li.active {
    background: var(--primary-gradient);
    color: var(--text-light);
    box-shadow: 0 4px 15px rgba(155, 127, 165, 0.25);
}

.sidebar-footer {
    margin-top: auto;
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: transparent;
    position: relative;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    border-bottom: 2px solid rgba(201, 160, 220, 0.2);
    padding: 0 45px;
    height: 60px;
}

.tab-links {
    display: flex;
    height: 100%;
}

.tab-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 28px;
    height: 100%;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.tab-item .tab-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.tab-item:hover {
    color: var(--accent-color);
    background: rgba(201, 160, 220, 0.08);
}

.tab-item:hover .tab-icon {
    opacity: 1;
    transform: scale(1.1);
}

.tab-item.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
    font-weight: 700;
}

.tab-item.active .tab-icon {
    opacity: 1;
}

/* User Actions in Tab Navigation */
.user-actions {
    display: flex;
    align-items: center;
}

.top-bar {
    padding: 22px 45px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(201, 160, 220, 0.15);
    box-shadow: 0 2px 20px rgba(155, 127, 165, 0.06);
}

.top-bar h2 {
    font-family: 'Times New Roman', serif;
    font-size: 1.8rem;
    color: var(--text-dark);
    font-weight: 800;
    letter-spacing: -0.5px;
}

.content-scroll-area {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
}

/* Mobile Menu Toggle - Hidden on Desktop */
.mobile-menu-toggle {
    display: none;
}

/* Responsive - Mobile Styles */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }

    /* Show Mobile Menu Button */
    .mobile-menu-toggle {
        display: inline-flex !important;
    }

    /* Off-canvas Sidebar */
    .sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        background: rgba(253, 252, 254, 0.98);
        backdrop-filter: blur(20px);
        z-index: 1000;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 4px 0 25px rgba(0, 0, 0, 0.1);
        padding-top: 40px;
        overflow-y: auto;
        /* Enable vertical scrolling */
    }

    .sidebar.active {
        left: 0;
    }

    .logo-container {
        margin-bottom: 30px;
        justify-content: center;
    }

    .logo {
        font-size: 1.6rem;
    }

    .sidebar-nav {
        display: block;
        width: 100%;
        margin-top: 10px;
    }

    .sidebar-footer {
        display: block;
        margin-top: auto;
        padding-bottom: 20px;
    }

    .main-content {
        height: 100vh;
        width: 100%;
    }

    /* Ensure Tab Navigation is Sticky on Mobile */
    .tab-navigation {
        padding: 0 20px;
        height: 60px;
        position: sticky;
        top: 0;
        z-index: 100;
        width: 100%;
        background: rgba(255, 255, 255, 0.85);
        /* Slightly more opaque for better visibility */
    }

    .tab-item {
        padding: 0 15px;
        /* Adjust padding for mobile */
        font-size: 0.9rem;
    }

    .tab-item .tab-icon {
        width: 24px;
        height: 24px;
    }

    .top-bar h2 {
        font-size: 1.3rem;
    }

    .content-scroll-area {
        padding: 20px;
    }
}

@media (min-width: 769px) {
    .mobile-menu-btn {
        display: none;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Page Transition - Font Loading */
.page-wrapper {
    opacity: 0;
    filter: blur(6px);
    transform: translateY(4px);
    transition:
        opacity .25s ease-out,
        filter .35s ease-out,
        transform .35s ease-out;
}

.page-wrapper.font-ready {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

/* Floating Scroll-to-Top Button */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.5);
    /* 50% opacity initially */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    visibility: hidden;
    z-index: 900;
    /* Below sidebar (1000) but above content */
    transform: translateY(20px);
}

.scroll-top-btn i {
    color: var(--accent-color);
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.scroll-top-btn.visible {
    opacity: 1;
    /* Make visible but keep background transparent via rgba */
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 6px 20px rgba(155, 127, 165, 0.2);
    transform: translateY(-3px);
}

.scroll-top-btn:hover i {
    transform: translateY(-2px);
}

/* Mobile Adjustment */
@media (max-width: 768px) {
    .scroll-top-btn {
        bottom: 25px;
        right: 20px;
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, 0.65);
        /* Slightly less transparent on mobile for visibility */
    }
}