
.global-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background-color: var(--app-bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.global-header.global-header-detail-page {
    position: static;
}

.global-header a { text-decoration: none; color: inherit; }
.global-header ul, .global-header li { list-style: none; margin: 0; padding: 0; }


.head-left { 
    display: flex; 
    align-items: center; 
    margin-right: 24px; 
}
cp-logo { 
    display: flex; align-items: center; gap: 8px; 
    font-weight: 800; font-size: 1.3rem; 
    cursor: pointer; 
    letter-spacing: -0.5px;
}
cp-logo img { height: 48px; object-fit: contain; border-radius: 12px; }


.head-center { 
    flex: 1; 
    display: flex; 
    justify-content: flex-start;
}
cp-search { 
    display: block; 
    position: relative; 
    width: 100%; 
    max-width: 420px;
}
cp-search-bar {
    display: flex;
    align-items: center;
    background: var(--search-bg);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 0 16px;
    height: 40px;
    transition: all 0.2s ease;
    cursor: text;
}
cp-search-bar:focus-within {
    border-color: var(--btn-green);
    box-shadow: 0 0 0 3px var(--focus-ring);
}
.search-icon { 
    color: var(--text-main); 
    display: flex; 
    margin-right: 12px; 
}
.search-icon svg { width: 15px; height: 15px; stroke-width: 0.5px; }
cp-search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    color: var(--text-main);
    font-size: 0.95rem;
    width: 100%;
}
cp-search-bar input::placeholder { color: var(--text-muted); }


cp-search-suggest-list { 
    display: none; position: absolute; top: calc(100% + 4px); left: 0; right: 0; 
    background: var(--search-bg); border-radius: 12px; box-shadow: var(--shadow-dropdown); 
    border: 1px solid var(--border); overflow: hidden; z-index: 10001;
}
cp-search-suggest-list.active { display: block; }
.suggests { display: flex; flex-direction: column; padding: 4px 4px; }
.suggest-item a { display: flex; align-items: center; padding: 10px 16px; transition: background 0.2s; border-radius: 8px; }
.suggest-item a:hover { background: var(--bg-hover); }
.suggest-content { display: flex; align-items: center; gap: 12px; width: 100%; }
.suggest-icon { 
    color: var(--text-muted); width: 32px; height: 32px; 
    display: flex; justify-content: center; align-items: center; 
    background: var(--bg); border-radius: 8px; flex-shrink: 0;
}
.suggest-route-icon-image { width: 100%; height: 100%; border-radius: 8px; object-fit: cover; }
.suggest-text { display: flex; flex-direction: column; gap: 2px; }
.main-text { font-weight: 500; font-size: 0.9rem; }
.sub-text { font-size: 0.75rem; color: var(--text-muted); }


.head-right { 
    display: flex; 
    align-items: center; 
    gap: 24px;
}


.app-secondary-nav { 
    display: flex; 
    gap: 24px;
    margin-right: 8px;
}
.nav-link { 
    font-weight: 500; 
    font-size: 0.95rem; 
    color: var(--text-main);
    transition: color 0.15s ease;
    position: relative;
}
.nav-link:hover { color: var(--text-muted); }


.main-add { position: relative; }
.main-add-btn { 
    background: var(--btn-green); 
    color: #ffffff; 
    border: none; 
    padding: 0 14px 0 18px; 
    height: 38px;
    border-radius: 20px; 
    font-weight: 600; 
    font-size: 0.95rem;
    display: flex; 
    align-items: center; 
    gap: 6px; 
    cursor: pointer; 
    transition: background 0.2s ease; 
}
.main-add-btn:hover { background: var(--btn-hover); }
.main-add-btn svg { width: 14px; height: 14px; stroke-width: 1px; }
.btn-icon-lg { display: flex; align-items: center; transition: transform 0.2s; }
.main-add-btn.active .btn-icon-lg { transform: rotate(180deg); }


[role="main-add-listbox"], .user-menu-listbox {
    display: none; position: absolute; top: calc(100% + 12px); right: 0;
    background: var(--search-bg); border-radius: 12px; box-shadow: var(--shadow-dropdown);
    border: 1px solid var(--border); min-width: 240px; overflow: hidden;
    z-index: 10001;
}
[role="main-add-listbox"].active, .user-menu-listbox.active { display: block; }



cp-user { display: block; position: relative; }
.user-account {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
}

.user-account:hover {
    background: rgba(255, 255, 255, 0.05);
}

.user-avatar {
    flex-shrink: 0;
}

.user-avatar-image {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 2px solid rgba(255, 255, 255, 0.08);
}

.user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-info-location {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-icon-lg {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.btn-icon-lg svg {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
}

.user-account.active .btn-icon-lg {
    transform: rotate(180deg);
}


.listbox-content { padding: 8px 4px; }
.listbox-option a, a.listbox-option { 
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 20px; font-size: 0.95rem; font-weight: 500; 
    border-radius: 8px;
    transition: background 0.2s ease; color: var(--text-main);
}
.listbox-option a:hover, a.listbox-option:hover { background: var(--bg-hover); }
.listbox-section-name { 
    padding: 16px 20px 8px; font-size: 0.75rem; font-weight: 700; 
    text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.5px; 
}
.listbox-divider { border: none; border-top: 1px solid var(--border); margin: 4px 0; }
.listbox-option-logout a { color: #d32f2f; }


.desktop-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.mobile-header-container {
    display: none;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.mobile-head-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-icon-btn {
    background: transparent;
    border: none;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}

.mobile-icon-btn:hover {
    background: var(--bg-hover);
}

.mobile-login-link {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--btn-green);
    text-decoration: none;
}

.mobile-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: var(--app-bg, #ffffff);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    pointer-events: none;
}

.mobile-search-overlay.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.mobile-search-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    gap: 12px;
}

.mobile-search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1.1rem;
    color: var(--text-main);
    outline: none;
    padding: 8px 0;
}

.mobile-search-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

@media (max-width: 768px) {
    .global-header {
        padding: 10px 16px;
    }

    .desktop-header-container {
        display: none; 
    }

    .mobile-header-container {
        display: flex; 
    }

    .user-menu-listbox {
        position: fixed;
        top: 60px;
        right: 16px;
        left: auto;
        width: 260px;
    }
}

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 100vh;
    height: 100dvh;
    background: var(--search-bg);
    z-index: 100000;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
}

.mobile-nav-overlay.active {
    transform: translateX(0);
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.mobile-nav-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
    display: flex;
    flex-direction: column;
}

.mobile-nav-link {
    display: block;
    padding: 14px 24px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
    transition: background 0.2s;
}

.mobile-nav-link:active {
    background: var(--bg-hover);
}

.mobile-nav-divider {
    height: 1px;
    background: var(--border);
    margin: 12px 24px;
}

.mobile-accordion-btn {
    background: transparent;
    border: none;
    width: 100%;
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
}

.mobile-accordion-btn svg {
    transition: transform 0.3s ease;
}

.mobile-accordion-btn.active svg {
    transform: rotate(180deg);
}

.mobile-accordion-btn:active {
    background: var(--bg-hover);
}

.mobile-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: rgba(0, 0, 0, 0.02);
}

.mobile-nav-sublink {
    display: block;
    padding: 12px 24px 12px 48px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
}