/* ============================================
   组件：站点头部
   依赖：themes/*.css
   结构：.app-header > .app-header__inner > (品牌 / 操作区)
   ============================================ */

.app-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: var(--app-surface);
    border-bottom: 1px solid var(--app-border);
    /* 移动端安全区（刘海屏） */
    padding-top: env(safe-area-inset-top);
}

.app-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .75rem 1rem;
}

/* ---------- 品牌 ---------- */
.brand {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: var(--app-text);
    font-weight: 700;
    font-size: 1.05rem;
    white-space: nowrap;
}
.brand:hover {
    color: var(--app-text);
}
.brand__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: var(--app-accent);
    color: #fff;
    font-size: 1.05rem;
    flex-shrink: 0;
}
.brand__text {
    display: inline-flex;
    flex-direction: column;
    line-height: 1.15;
}
.brand__sub {
    font-size: .68rem;
    font-weight: 400;
    color: var(--app-text-muted);
    letter-spacing: .04em;
}

/* ---------- 右侧操作区 ---------- */
.header-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;              /* 触摸目标 >= 38，配合 padding 达标 */
    height: 38px;
    border: 1px solid var(--app-border);
    border-radius: 10px;
    background: var(--app-surface);
    color: var(--app-text-muted);
    font-size: 1rem;
    cursor: pointer;
    transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.icon-btn:hover {
    color: var(--app-accent);
    border-color: var(--app-accent);
    background: var(--app-accent-soft);
}

/* ---------- 提交友联按钮 ---------- */
.btn-submit {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    height: 38px;
    padding: 0 .9rem;
    border-radius: 10px;
    background: var(--app-accent);
    color: #fff;
    font-size: .875rem;
    font-weight: 500;
    white-space: nowrap;
    transition: filter .16s ease, transform .16s ease;
}
.btn-submit:hover {
    color: #fff;
    filter: brightness(1.08);
    transform: translateY(-1px);
}
.btn-submit:active {
    transform: none;
}

/* ---------- 主题切换下拉 ---------- */
.theme-menu {
    min-width: 210px;
    padding: .6rem;
    border: 1px solid var(--app-border);
    border-radius: 12px;
    box-shadow: var(--app-shadow-lg);
}
.theme-menu__label {
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .06em;
    color: var(--app-text-muted);
    padding: .25rem .5rem .4rem;
    text-transform: uppercase;
}
.theme-menu__list {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    padding: 0 .25rem .15rem;
}
.theme-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    width: 100%;
    padding: .5rem .6rem;
    border: 0;
    background: transparent;
    color: var(--app-text);
    border-radius: 8px;
    cursor: pointer;
    font-size: .9rem;
    text-align: left;
    transition: background-color .15s ease, color .15s ease;
}
.theme-item:hover {
    background: var(--app-surface-alt);
}
.theme-item__dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
}
.theme-item__label {
    flex: 1;
}
.theme-item__check {
    opacity: 0;
    color: var(--app-accent);
}
.theme-item.is-active {
    background: var(--app-accent-soft);
    color: var(--app-accent);
    font-weight: 600;
}
.theme-item.is-active .theme-item__check {
    opacity: 1;
}

/* 下拉项激活标记 */
.theme-menu .dropdown-item.is-active {
    background: var(--app-accent-soft);
    color: var(--app-accent);
    font-weight: 600;
}

/* ---------- 响应式 ---------- */
@media (min-width: 768px) {
    .app-header__inner {
        padding: .9rem 1.5rem;
    }
    .brand {
        font-size: 1.15rem;
    }
    .brand__mark {
        width: 36px;
        height: 36px;
    }
}

@media (min-width: 992px) {
    .app-header__inner {
        padding: 1rem 2rem;
    }
}
