/* 
  Lavdin Navbar & Auth Page Component
  ─────────────────────────────────────────────
  Extracted from core/components/navbar.php
*/

:root {
    --auth-card-max-width: 1100px;
}

body.is-register-page {
    --auth-card-max-width: 1150px;
}

@media screen and (min-width: 992px) {

    /* Remove top padding of main container on auth pages to allow exact centering */
    body.is-login-page main.main-content,
    body.is-register-page main.main-content {
        padding-top: 0 !important;
        min-height: 100vh !important;
    }

    body.is-login-page .auth-page-wrapper,
    body.is-register-page .auth-page-wrapper {
        width: 100%;
        min-height: 100vh !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 40px 20px !important;
        box-sizing: border-box;
    }

    body.is-login-page .auth-container-premium,
    body.is-register-page .auth-container-premium {
        margin: auto !important;
        height: calc(100vh - 160px) !important;
    }

    .auth-crd-arr-fxd {
        width: 100%;
        max-width: var(--auth-card-max-width, 1100px);
        margin-left: auto;
        margin-right: auto;
        position: relative;
        font-size: 20px;
        padding: 0;
        display: flex;
        justify-content: flex-start;
        top: 2.5rem;
        /* Positioned cleanly in the middle of the 80px space above the card */
    }
}

@media screen and (max-width: 991px) {
    .auth-crd-arr-fxd {
        width: 100%;
        height: 100%;
        padding: 0;
        margin: 0;
        position: relative;
        top: 0;
        display: flex;
        justify-content: center;
        align-items: center;
    }
}

/* --- Extracted from navbar.php --- */

@media screen and (min-width: 764px) {
    body:not(.tenant-page):not(.forum-page) #sidebarToggle {
        display: none !important;
    }
}

body.tenant-page.theme-compact .header.header-glass:not(.sticky) .nav-hamburger span {
    background-color: var(--color-primary) !important;
}

/* --- Extracted from toolbox_navbar.php --- */
/* Sleek floating alert banner 30px above bottom */
.lavdin-toolbox-navbar {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: 8px 12px 8px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 1050;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    transition: all 0.3s var(--transition-bezier);
    color: var(--color-slate-50);
    min-width: max-content;
    justify-content: center;
}

.lavdin-toolbox-navbar:hover {
    transform: translateX(-50%) translateY(-4px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.15) inset;
    border-color: rgba(59, 130, 246, 0.4);
}

@media (min-width: 992px) {
    body.admin-dashboard-body:not(.tenant-page) .lavdin-toolbox-navbar {
        left: calc(50% + (var(--sidebar-width, 280px) / 2));
    }
}

.lavdin-toolbox-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #38bdf8;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) inset;
}

.lavdin-toolbox-text-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    cursor: default;
}

.lavdin-toolbox-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 6px;
}

.lavdin-toolbox-subtitle {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 2px;
}

.lavdin-toolbox-subtitle strong {
    color: #e2e8f0;
    font-weight: 600;
}

.lavdin-toolbox-divider {
    width: 1px;
    height: 32px;
    background: rgba(255, 255, 255, 0.15);
}

.lavdin-toolbox-btn {
    color: var(--color-white);
    background: var(--color-primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 20px;
    border-radius: var(--radius-xl);
    transition: all 0.2s ease;
    text-decoration: none !important;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    box-shadow: 0 4px 15px var(--color-primary-soft);
    cursor: pointer;
}

.lavdin-toolbox-btn:hover {
    color: var(--color-white);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--color-primary-glow);
}

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

/* Superadmin Floating Toolbox Styles */
.sa-floating-toolbox {
    display: none;
}

.sa-floating-toolbox.active {
    display: flex !important;
    animation: slideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.btn-sa-tool {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none;
    color: #e2e8f0;
    width: 40px;
    height: 40px;
    padding: 0 !important;
    border-radius: 50% !important;
    justify-content: center;
}

.btn-sa-tool:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    color: #fff;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .lavdin-toolbox-navbar {
        min-width: auto;
        max-width: 100%;
        bottom: 15px;
        gap: 10px;
        padding: 8px 12px;
        justify-content: flex-start;
        overflow-x: auto;
        border-radius: 12px;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .lavdin-toolbox-navbar::-webkit-scrollbar {
        display: none;
    }

    .lavdin-toolbox-text-container,
    .lavdin-toolbox-divider {
        display: none !important;
    }

    .lavdin-toolbox-btn,
    .lavdin-toolbox-icon {
        white-space: nowrap;
        flex-shrink: 0;
    }
}

/* --- Extracted from navbar.php --- */

.navbar-brand-box {
    border-radius: 30px;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.navbar-brand-img {
    border-radius: 20px;
    width: 65%;
    height: 65%;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.lh-1 {
    line-height: 1;
}

.navbar-community-text {
    font-size: 0.55rem;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    opacity: 0.7;
    line-height: 1;
    color: var(--fr-primary, #60a5fa);
}

.filter-invert {
    filter: brightness(0) invert(1);
}

.navbar-mobile-logo {
    height: 24px;
    width: auto;
    filter: var(--logo-filter, none);
}

.cursor-pointer {
    cursor: pointer;
}

.nav-action-btn {
    width: 38px;
    height: 38px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    background: transparent;
    color: inherit;
    text-decoration: none;
    padding: 0;
    flex-shrink: 0;
}

body.light-theme .nav-action-btn {
    background: transparent;
    color: var(--color-text-main, #1e293b);
}

.nav-action-btn:hover,
.nav-action-btn:focus,
.nav-action-btn[aria-expanded="true"] {
    background: rgba(128, 128, 128, 0.1);
    transform: translateY(-1px);
    color: inherit;
}

.nav-action-btn i {
    font-size: 1.1rem;
}

.w-h-100-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.navbar-user-dropdown-btn {
    border-radius: 20px;
    height: 38px;
    padding: 0 16px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: none;
}

.navbar-user-dropdown-btn:hover,
.navbar-user-dropdown-btn[aria-expanded="true"] {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.text-white-imp {
    color: white !important;
}

.navbar-badge {
    display: none;
    font-size: 0.65rem;
    border-radius: 0;
}

.navbar-mobile-badge {
    display: none;
    font-size: 0.75rem;
    border-radius: 0;
}

.nav-btn-transition {
    transition: all 0.2s;
    border-radius: 12px;
}

.nav-btn-transition-slow {
    transition: all 0.3s;
    border-radius: 12px;
}

.w-20px {
    width: 20px;
}

.navbar-mobile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 12px;
}

.navbar-mobile-avatar-container {
    border-radius: 12px;
    width: 36px;
    height: 36px;
    margin: 0;
}

.fr-text-color {
    color: var(--fr-text, #fff);
}

.admin-subtitle {
    font-size: 0.55rem;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    opacity: 0.7;
    line-height: 1;
}

/* Enhanced Dropdown */
.premium-dropdown {
    border-radius: 16px;
    min-width: 260px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 8px;
    border: 1px solid rgba(128, 128, 128, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: var(--color-bg-card, #ffffff);
}

:root.dark-theme .premium-dropdown {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.premium-dropdown .dropdown-item {
    border-radius: 8px;
    padding: 10px 16px;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.9rem;
}

.premium-dropdown .dropdown-item:hover {
    background: rgba(128, 128, 128, 0.1);
    transform: translateX(2px);
}

.header-glass {
    background: rgba(15, 23, 42, 0.85) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

body.light-theme .header-glass {
    background: rgba(255, 255, 255, 0.85) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}