:root {
    --app-top-navbar-height: 50px;
    --app-top-navbar-bg: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    --app-top-navbar-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    --app-top-navbar-border: 1px solid rgba(255, 255, 255, 0.1);
    --app-top-navbar-padding-x: 0.8rem;
    --app-top-navbar-gap: 0.75rem;
}

.app-top-navbar {
    background: var(--app-top-navbar-bg);
    color: #ffffff;
    height: var(--app-top-navbar-height);
    min-height: var(--app-top-navbar-height);
    box-shadow: var(--app-top-navbar-shadow);
    border-bottom: var(--app-top-navbar-border);
}

.app-top-navbar.main-navbar,
.app-top-navbar.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.app-top-navbar .navbar-container,
.app-top-navbar .navbar-content {
    min-height: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 var(--app-top-navbar-padding-x);
    box-sizing: border-box;
}

.app-top-navbar .navbar-container {
    max-width: 100%;
    width: 100%;
}

.app-top-navbar .navbar-content {
    width: 100%;
    max-width: 100%;
}

.app-top-navbar .navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    margin: 0;
    padding: 0;
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.01em;
    text-decoration: none;
    white-space: nowrap;
}

.app-top-navbar a.navbar-brand:hover,
.app-top-navbar a.navbar-brand:focus-visible {
    color: #ffffff;
    opacity: 0.92;
}

.app-top-navbar .navbar-title {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    line-height: 1;
    white-space: nowrap;
}

.app-top-navbar .z-logo,
.app-top-navbar .brand-logo {
    flex-shrink: 0;
}

.app-top-navbar .z-logo:empty::before {
    content: "Z";
}

.app-top-navbar .navbar-nav,
.app-top-navbar .navbar-actions,
.app-top-navbar .project-navbar-actions {
    display: flex;
    align-items: center;
    gap: var(--app-top-navbar-gap);
    flex-shrink: 0;
}

.app-top-navbar .navbar-actions,
.app-top-navbar .project-navbar-actions {
    justify-content: flex-end;
}

.app-top-navbar .navbar-center {
    flex: 0 1 auto;
    min-width: max-content;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    padding: 0 12px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.app-top-navbar .navbar-center .navbar-nav {
    flex-shrink: 0;
}

.app-top-navbar .navbar-center::-webkit-scrollbar {
    display: none;
}

.app-top-navbar .navbar-meta {
    color: rgba(255, 255, 255, 0.78);
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
}

.app-top-navbar .nav-link,
.app-top-navbar .project-navbar-home-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.88);
    background: transparent;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    box-shadow: none;
}

.app-top-navbar .nav-link:hover,
.app-top-navbar .nav-link:focus-visible,
.app-top-navbar .project-navbar-home-link:hover,
.app-top-navbar .project-navbar-home-link:focus-visible {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.18);
}

.app-top-navbar .nav-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
}

.app-top-navbar .navbar-actions .btn,
.app-top-navbar .project-navbar-actions .btn,
.app-top-navbar .project-navbar-actions a.btn,
.app-top-navbar .navbar-actions a.btn {
    height: 32px;
    padding: 0 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    box-shadow: none;
}

.app-top-navbar .navbar-actions .btn:hover,
.app-top-navbar .project-navbar-actions .btn:hover,
.app-top-navbar .project-navbar-actions a.btn:hover,
.app-top-navbar .navbar-actions a.btn:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.24);
    color: #ffffff;
}

.app-top-navbar button.nav-link.contact-support-trigger {
    appearance: none;
    cursor: pointer;
}

.app-top-navbar .contact-support-trigger {
    white-space: nowrap;
}

body.contact-support-open {
    overflow: hidden;
}

.contact-support-modal {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.48);
    opacity: 0;
    transition: opacity 0.18s ease;
}

.contact-support-modal.is-open {
    opacity: 1;
}

.contact-support-card {
    position: relative;
    width: min(420px, calc(100vw - 32px));
    padding: 26px 24px 22px;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid #dbe4f0;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18), 0 12px 24px rgba(15, 23, 42, 0.08);
    transform: translateY(10px) scale(0.985);
    transition: transform 0.18s ease;
}

.contact-support-modal.is-open .contact-support-card {
    transform: translateY(0) scale(1);
}

.contact-support-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.contact-support-close:hover,
.contact-support-close:focus-visible {
    background: #e2e8f0;
    color: #334155;
}

.contact-support-header {
    padding-right: 36px;
    text-align: center;
}

.contact-support-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
    color: #0f172a;
}

.contact-support-subtitle {
    margin-top: 6px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
}

.contact-support-qr-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 18px;
}

.contact-support-qr-image {
    width: min(280px, 100%);
    max-width: 100%;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.contact-support-wechat-box {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.contact-support-wechat-label {
    color: #64748b;
    font-size: 12px;
    line-height: 1;
}

.contact-support-wechat-row {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
    margin-top: 10px;
}

.contact-support-wechat-id {
    margin: 0;
    padding: 0;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    background: transparent;
}

.contact-support-copy-btn {
    flex-shrink: 0;
    min-width: 76px;
    height: 34px;
    padding: 0 14px;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.contact-support-copy-btn:hover,
.contact-support-copy-btn:focus-visible {
    background: #dbeafe;
}

.contact-support-copy-btn:disabled {
    opacity: 0.72;
    cursor: default;
}

.contact-support-tip,
.contact-support-hours {
    margin-top: 12px;
    color: #475569;
    font-size: 13px;
    line-height: 1.7;
}

.contact-support-hours {
    color: #64748b;
}

.app-top-navbar .navbar-version {
    display: inline-flex;
    align-items: center;
    height: 18px;
    padding: 0 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.72);
    font-size: 11px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 500;
    letter-spacing: 0.4px;
    line-height: 1;
    user-select: none;
}

.app-top-navbar .project-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
}

.app-top-navbar .member-home-strip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 32px;
    padding: 0 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    box-shadow: none;
}

.app-top-navbar .member-info-item {
    gap: 0.35rem;
}

.app-top-navbar .member-icon {
    font-size: 0.85rem;
}

.app-top-navbar .member-val {
    font-size: 12px;
    line-height: 1;
}

.app-top-navbar .member-sub {
    font-size: 11px;
    line-height: 1;
}

.app-top-navbar .member-divider {
    height: 12px;
}

.app-top-navbar .member-tooltip::after {
    z-index: 1100;
}

@media (max-width: 1200px) {
    .app-top-navbar .member-home-strip {
        display: none;
    }
}

@media (max-width: 768px) {
    .app-top-navbar {
        height: 44px;
        min-height: 44px;
    }

    .app-top-navbar .navbar-container,
    .app-top-navbar .navbar-content {
        gap: 10px;
        padding: 0 8px;
    }

    .app-top-navbar .navbar-brand {
        gap: 10px;
        font-size: 15px;
    }

    .app-top-navbar .navbar-nav,
    .app-top-navbar .navbar-actions,
    .app-top-navbar .project-navbar-actions {
        gap: 8px;
    }

    .app-top-navbar .navbar-center {
        flex: 1 1 auto;
        min-width: 0;
        justify-content: flex-start;
        margin: 0;
        padding: 0 4px;
    }

    .app-top-navbar .nav-link,
    .app-top-navbar .project-navbar-home-link,
    .app-top-navbar .navbar-actions .btn,
    .app-top-navbar .project-navbar-actions .btn,
    .app-top-navbar .project-navbar-actions a.btn,
    .app-top-navbar .navbar-actions a.btn {
        height: 30px;
        padding: 0 10px;
        font-size: 12px;
    }

    .contact-support-modal {
        padding: 16px;
        align-items: flex-end;
    }

    .contact-support-card {
        width: 100%;
        padding: 22px 18px 18px;
        border-radius: 18px 18px 14px 14px;
    }

    .contact-support-qr-image {
        width: min(260px, 100%);
    }

    .contact-support-wechat-row {
        flex-wrap: wrap;
    }

    .contact-support-copy-btn {
        width: 100%;
    }


    .app-top-navbar .project-badge {
        min-height: 28px;
        padding: 0 10px;
        font-size: 12px;
    }

    .app-top-navbar .navbar-version {
        display: none;
    }
}
