/* ========================================
   Navbar - Edge-to-Edge Design
   ======================================== */

/* ── DESKTOP NAV ── */
.desktop-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-secondary);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
    position: sticky;
    top: 0;
    z-index: 100;
    height: 56px;
    padding: 0 24px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(255, 85, 0, 0.15), rgba(255, 85, 0, 0.05));
    border: 1px solid rgba(255, 85, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
}

.logo-text {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

/* Centered links */
.desktop-links {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    position: relative;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 13.5px;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s, background 0.2s;
    letter-spacing: 0.2px;
    text-decoration: none;
}

.nav-link:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.nav-link.active {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.active-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 6px rgba(255, 85, 0, 0.5);
}

/* Auth Buttons */
.auth-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-register {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-hover));
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 2px 10px rgba(255, 85, 0, 0.25);
}

.btn-register:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(255, 85, 0, 0.35);
    color: #fff;
}

/* Profile Dropdown */
.profile-dropdown-wrap {
    position: relative;
    flex-shrink: 0;
}

.profile-pill {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
    border-radius: 10px;
    padding: 6px 12px 6px 6px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    transition: border-color 0.2s;
}

.profile-pill:hover {
    border-color: rgba(255, 85, 0, 0.4);
}

.avatar-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-hover));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 8px rgba(255, 85, 0, 0.3);
    overflow: hidden;
}

.avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name {
    color: var(--text-primary);
}

.chevron-icon {
    transition: transform 0.2s;
    color: var(--text-muted);
}

.profile-dropdown-wrap.open .chevron-icon,
.mobile-avatar-btn.open .chevron-icon {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-secondary);
    border-radius: 12px;
    padding: 6px;
    min-width: 160px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
}

.profile-dropdown-wrap.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.drop-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: none;
    border-radius: 8px;
    padding: 9px 12px;
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.drop-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.drop-divider {
    height: 1px;
    background: var(--border-secondary);
    margin: 4px 8px;
}

.drop-item.logout {
    color: var(--accent-primary);
}

.drop-item.logout:hover {
    background: rgba(255, 85, 0, 0.1);
}

/* ── MOBILE TOP BAR ── */
.mobile-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-secondary);
    padding: 0 16px;
    height: 52px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 3px 16px rgba(0, 0, 0, 0.35);
}

.mobile-bar .logo-icon {
    width: 28px;
    height: 28px;
}

.mobile-bar .logo-text {
    font-size: 15px;
}

.mobile-avatar-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
    border-radius: 10px;
    padding: 5px 10px 5px 5px;
    cursor: pointer;
}

.mobile-login-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
    border-radius: 8px;
    padding: 8px 14px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.2s;
}

.mobile-login-btn:hover {
    border-color: var(--accent-primary);
}

/* ── SLIDE PANEL ── */
.slide-panel {
    display: none;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-secondary);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
    z-index: 99;
}

.slide-panel.open {
    max-height: 350px;
    opacity: 1;
}

.panel-greeting {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px 14px;
}

.panel-avatar-lg {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-hover));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 12px rgba(255, 85, 0, 0.35);
    flex-shrink: 0;
    overflow: hidden;
}

.panel-avatar-lg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.panel-name {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 700;
}

.panel-email {
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 1px;
}

.panel-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-secondary) 25%, var(--border-secondary) 75%, transparent);
    margin: 4px 0;
}

.panel-row {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    border: none;
    padding: 11px 18px;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
    position: relative;
    color: var(--text-muted);
}

.panel-row:hover {
    background: var(--bg-tertiary);
}

.panel-row.active {
    background: var(--bg-tertiary);
}

.panel-row.active svg {
    color: var(--accent-primary);
    stroke: var(--accent-primary);
}

.panel-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 6px rgba(255, 85, 0, 0.5);
    position: absolute;
    left: 8px;
}

.panel-row-label {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
}

.panel-row.active .panel-row-label {
    color: var(--text-primary);
}

.panel-row.logout svg {
    color: var(--accent-primary);
    stroke: var(--accent-primary);
}

.panel-row.logout .panel-row-label {
    color: var(--accent-primary);
}

/* ── BOTTOM NAV ── */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-secondary);
    justify-content: space-around;
    align-items: center;
    height: 64px;
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

.bottom-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px 18px;
    text-decoration: none;
}

.bottom-icon-wrap {
    width: 40px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: background 0.2s;
}

.bottom-btn:hover .bottom-icon-wrap {
    background: rgba(255, 85, 0, 0.08);
}

.bottom-btn.active .bottom-icon-wrap {
    background: rgba(255, 85, 0, 0.1);
}

.bottom-btn.active .bottom-icon-wrap svg {
    stroke: var(--accent-primary);
}

.bottom-label {
    color: var(--text-muted);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: color 0.2s;
}

.bottom-btn:hover .bottom-label {
    color: var(--accent-primary);
}

.bottom-btn.active .bottom-label {
    color: var(--accent-primary);
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
    .desktop-nav {
        display: none;
    }

    .mobile-bar {
        display: flex;
    }

    .slide-panel {
        display: block;
    }

    .bottom-nav {
        display: flex;
    }

    /* Add padding to body for bottom nav */
    body {
        padding-bottom: 64px;
    }
}
