:root {
    --bg: #0a0a0f;
    --surface: #12121f;
    --surface-strong: #1a1a2e;
    --ink: #e8e8f0;
    --muted: #8a8aa0;
    --line: #1a1a2a;
    --line-strong: #2a2a3a;
    --brand: #2a2a5a;
    --brand-strong: #3a3a7a;
    --accent: #4a4a8a;
    --accent-ink: #a0a0e0;
    --shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
    --green: #2a5a3a;
    --green-ink: #6adf9a;
    --yellow: #5a4a1a;
    --yellow-ink: #dfbf6a;
    --red: #5a1a1a;
    --red-ink: #df7a7a;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.4rem;
    gap: 1rem;
}

.app-header-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: var(--ink);
    flex-shrink: 0;
}

.app-header-mark {
    width: 2rem;
    height: 2rem;
    border-radius: 0.55rem;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    box-shadow: 0 4px 14px rgba(74, 74, 138, 0.4);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-header-mark svg {
    width: 1.1rem;
    height: 1.1rem;
    fill: var(--accent-ink);
    opacity: 0.9;
}

.app-header-title {
    font-family: 'Sora', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.app-header-nav {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    flex: 1;
    justify-content: flex-start;
    padding-left: 1.5rem;
}

.app-header-nav a {
    text-decoration: none;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 500;
    padding: 0.4rem 0.75rem;
    border-radius: 0.55rem;
    transition: color 0.15s, background 0.15s;
}

.app-header-nav a:hover {
    color: var(--ink);
    background: var(--line);
}

.app-header-nav a.active {
    color: var(--accent-ink);
    background: color-mix(in srgb, var(--brand) 50%, transparent);
}

.app-header-auth {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}

.app-header-email {
    font-size: 0.82rem;
    color: var(--muted);
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 640px) {
    .app-header {
        padding: 0.7rem 0.9rem;
    }
    .app-header-nav {
        display: none;
    }
    .app-header-title {
        font-size: 0.9rem;
    }
    .app-header-email {
        max-width: 100px;
    }
}
