/* =========================================================
   StepX Navigation Header - Redesigned Pixel/Cyberpunk Theme
   ========================================================= */

/* html stability */
html {
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

/* ==================== GLOBAL POPUP MODAL NO-SCROLL LOCK ==================== */
html.no-scroll,
body.no-scroll {
    overflow: hidden !important;
    height: 100vh !important;
    touch-action: none;
}

/* Base custom element / header wrapper */
nav-header,
.nav-header,
header.nav-header {
    width: 100% !important;
    max-width: none !important;
    height: 56px !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    z-index: 9999 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    background: #000000 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5) !important;
    pointer-events: auto !important;
    display: flex !important;
    justify-content: center !important;
}

/* Navigation Floating Card Container (Pixel / Dark Industrial Theme) */
.stepx-nav-card {
    position: relative;
    pointer-events: auto;
    width: 440px;
    max-width: calc(100vw - 32px);
    height: 56px;
    margin: 0 auto;
    background: transparent;
    border-radius: 0;
    border: none;
    box-shadow: none;
    overflow: visible;
    font-family: 'MiSans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    user-select: none;
    -webkit-user-select: none;
    box-sizing: border-box;
}

.stepx-nav-card:hover,
.stepx-nav-card.is-expanded {
    box-shadow: none;
    border: none;
}

/* 1. Header Top Bar (Always Visible) */
.stepx-nav-bar {
    position: relative;
    height: 56px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    border: none;
    cursor: pointer;
    box-sizing: border-box;
}

.stepx-nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    line-height: 1;
    z-index: 1;
}

.stepx-nav-logo img {
    height: 12px;
    width: auto;
    object-fit: contain;
    display: block;
}

.stepx-nav-dots {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 3px;
    line-height: 1;
    pointer-events: none;
}

.stepx-nav-dot {
    width: 5px;
    height: 5px;
    background-color: #FF4D15;
    border-radius: 0;
    display: inline-block;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.stepx-nav-card:hover .stepx-nav-dot {
    background-color: #FF4D15;
}

.stepx-nav-menu-btn {
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    line-height: 1;
    z-index: 1;
}

/* 2. Collapsible Dropdown Content */
.stepx-nav-dropdown {
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    transition: max-height 0.38s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1),
        visibility 0.38s;
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top: none;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.95);
    z-index: 10000;
    box-sizing: border-box;
}

.stepx-nav-card:hover .stepx-nav-dropdown,
.stepx-nav-card.is-expanded .stepx-nav-dropdown {
    max-height: 580px;
    opacity: 1;
    visibility: visible;
}

/* Menu Items List */
.stepx-nav-menu-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 16px 12px 16px;
    background: #000000;
    border: none;
    box-sizing: border-box;
}

.stepx-nav-menu-item {
    position: relative;
    height: 50px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #000000;
    text-decoration: none;
    color: #FFFFFF;
    transition: background-color 0.18s ease, color 0.18s ease;
    cursor: pointer;
    box-sizing: border-box;
    border: none;
}

.stepx-nav-item-num {
    font-size: 16px;
    font-weight: 400;
    color: #FFFFFF;
    transition: color 0.18s ease;
    line-height: 1;
    z-index: 1;
}

.stepx-nav-item-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.5px;
    line-height: 1;
    white-space: nowrap;
    pointer-events: none;
}

.stepx-nav-item-bullet {
    width: 5px;
    height: 5px;
    background-color: #FF4D15;
    border-radius: 0;
    display: inline-block;
    margin-right: 4px;
}

.stepx-nav-item-arrow {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    line-height: 1;
    z-index: 1;
}

.stepx-nav-item-arrow img {
    width: 16px;
    height: 16px;
    object-fit: contain;
    display: block;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

/* Item Active / Hover State */
.stepx-nav-menu-item:hover,
.stepx-nav-menu-item.active {
    background-color: #FF4D15;
    color: #000000;
}

.stepx-nav-menu-item:hover .stepx-nav-item-num,
.stepx-nav-menu-item.active .stepx-nav-item-num {
    color: #000000;
    font-weight: 500;
}

.stepx-nav-menu-item:hover .stepx-nav-item-center,
.stepx-nav-menu-item.active .stepx-nav-item-center {
    color: #000000;
    font-weight: 500;
}

.stepx-nav-menu-item:hover .stepx-nav-item-bullet,
.stepx-nav-menu-item.active .stepx-nav-item-bullet {
    background-color: #000000;
}

.stepx-nav-menu-item:hover .stepx-nav-item-arrow img,
.stepx-nav-menu-item.active .stepx-nav-item-arrow img {
    opacity: 1;
    transform: translateX(0);
}

/* 3. Footer Section - Unlogged State */
.stepx-nav-unlogged-footer {
    height: 56px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #000000;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 10px;
    box-sizing: border-box;
}

.stepx-nav-unlogged-text {
    font-size: 14px;
    color: #FFFFFF;
    letter-spacing: 0.2px;
}

.stepx-nav-unlogged-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #FF4D15;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.15s ease;
}

.stepx-nav-unlogged-btn img {
    width: 12px;
    height: 12px;
    object-fit: contain;
    display: block;
}

.stepx-nav-unlogged-btn:hover {
    opacity: 0.85;
    transform: translateX(2px);
}

/* 4. Footer Section - Logged In State */
.stepx-nav-user-header {
    height: 60px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #000000;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 10px;
    box-sizing: border-box;
}

.stepx-nav-user-left {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.stepx-nav-user-avatar-box {
    width: 38px;
    height: 38px;
    background-color: #000000;
    border: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.stepx-nav-user-avatar {
    width: 30px;
    height: 30px;
    object-fit: contain;
    display: block;
}

.stepx-nav-user-name {
    font-size: 15px;
    font-weight: 400;
    color: #FFFFFF;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stepx-nav-user-chevron {
    width: 25px;
    height: 25px;
    object-fit: contain;
    display: block;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.stepx-nav-user-chevron.is-open {
    transform: rotate(180deg);
}

.stepx-nav-user-right {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    cursor: pointer;
}

.stepx-nav-bean-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    display: block;
}

.stepx-nav-bean-val {
    font-size: 16px;
    font-weight: 400;
    color: #FFFFFF;
}

/* User Info Expanded Panel */
.stepx-nav-user-expand-panel {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.32s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    background: #000000;
    border: none;
    padding: 0 24px;
    box-sizing: border-box;
}

.stepx-nav-user-expand-panel.is-open {
    max-height: 250px;
    opacity: 1;
    padding: 12px 24px 20px 24px;
}

.stepx-nav-actions-grid {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 0 16px 0;
}

.stepx-nav-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.stepx-nav-action-btn:hover {
    transform: translateY(-2px);
}

.stepx-nav-action-circle {
    position: relative;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background-color: #000000;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.stepx-nav-action-badge {
    position: absolute;
    top: 6px;
    right: 5px;
    width: 22px;
    height: 22px;
    min-width: 20px;
    padding: 0;
    background-color: #FF3B30;
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 700;
    font-family: Arial, sans-serif;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    z-index: 2;
}

.stepx-nav-action-btn:hover .stepx-nav-action-circle {
    background-color: #141414;
    box-shadow: 0 6px 16px rgba(255, 82, 34, 0.2);
}

.stepx-nav-action-circle img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    display: block;
}

.stepx-nav-action-label {
    font-size: 13px;
    color: #FFFFFF;
    font-weight: 400;
}

.stepx-nav-divider {
    width: 100%;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.08);
    margin-bottom: 14px;
}

.stepx-nav-logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: #FF4D15;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 0;
    transition: opacity 0.2s ease, transform 0.15s ease;
    user-select: none;
}

.stepx-nav-logout-bracket {
    font-size: 22px;
    font-weight: bold;
    font-family: 'MiSans', 'Inter', monospace, sans-serif;
    color: #FF4D15;
    margin-left: 6px;
    margin-right: -3px;
    line-height: 1;
    display: inline-block;
    transform: translateY(-1px);
}

.stepx-nav-logout-btn img {
    width: 14px;
    height: 14px;
    object-fit: contain;
    display: block;
}

.stepx-nav-logout-btn:hover {
    opacity: 0.85;
    transform: translateX(2px);
}

/* Hide on mobile */
@media (max-width: 768px) {

    nav-header,
    .nav-header,
    header.nav-header {
        display: none !important;
    }
}

/* ==================== TOAST NOTIFICATIONS ==================== */
.header-toast-container {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    z-index: 100000;
    pointer-events: none;
    opacity: 0;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-toast-container.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.header-toast {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 28px;
    background: rgba(18, 18, 18, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7);
    pointer-events: auto;
    color: #FFFFFF;
}

.header-toast.success {
    border-left: 4px solid #10B981;
}

.header-toast.error {
    border-left: 4px solid #EF4444;
}

.header-toast.info {
    border-left: 4px solid #FF5222;
}

.header-toast-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.header-toast-icon svg {
    width: 22px;
    height: 22px;
    display: block;
}

.header-toast.success .header-toast-icon {
    color: #10B981;
}

.header-toast.error .header-toast-icon {
    color: #EF4444;
}

.header-toast.info .header-toast-icon {
    color: #FF5222;
}

.header-toast-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.header-toast-title {
    font-size: 14px;
    font-weight: 600;
    color: #FFFFFF;
    line-height: 1.4;
}

.header-toast-desc {
    font-size: 12px;
    color: #A0A0A0;
    line-height: 1.3;
}

/* ==================== LOGOUT MODAL ==================== */
[v-cloak] .nav-logout-overlay {
    display: none !important;
}

.nav-logout-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: nav-overlay-in 0.2s ease;
    pointer-events: auto;
    overscroll-behavior: contain;
}

@keyframes nav-overlay-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.nav-logout-modal {
    background: #141414;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 36px 32px 28px;
    width: 340px;
    max-width: calc(100vw - 48px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8);
    animation: nav-modal-in 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    color: #FFFFFF;
}

@keyframes nav-modal-in {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(12px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.nav-logout-modal-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 82, 34, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.nav-logout-modal-icon svg {
    width: 26px;
    height: 26px;
    color: #FF5222;
}

.nav-logout-modal-title {
    font-size: 17px;
    font-weight: 650;
    color: #FFFFFF;
    margin: 0;
    line-height: 1.3;
}

.nav-logout-modal-desc {
    font-size: 13px;
    color: #A0A0A0;
    margin: 0;
    text-align: center;
    line-height: 1.6;
}

.nav-logout-modal-actions {
    display: flex;
    gap: 10px;
    width: 100%;
    margin-top: 8px;
}

.nav-logout-btn-cancel,
.nav-logout-btn-confirm {
    flex: 1;
    height: 42px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 550;
    cursor: pointer;
    border: none;
    outline: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.nav-logout-btn-cancel {
    background: #242424;
    color: #d1d5db;
}

.nav-logout-btn-cancel:hover:not(:disabled) {
    background: #303030;
}

.nav-logout-btn-confirm {
    background: #FF5222;
    color: #ffffff;
}

.nav-logout-btn-confirm:hover:not(:disabled) {
    background: #e04417;
    box-shadow: 0 4px 16px rgba(255, 82, 34, 0.4);
}

.nav-logout-btn-cancel:disabled,
.nav-logout-btn-confirm:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.nav-logout-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: nav-spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes nav-spin {
    to {
        transform: rotate(360deg);
    }
}