/* ---- App Shell ---- */
body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
}

.app-shell {
    min-height: 100vh;
}

.app-shell--auth .header {
    display: none;
}

.app-shell--auth .main-content {
    padding: 0;
}

/* ---- Text Logo ---- */
.logo-text {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    user-select: none;
    display: inline-flex;
    align-items: baseline;
}

.logo-text--lg {
    font-size: 2rem;
}

.logo-text__ai {
    background: linear-gradient(135deg, var(--brand-cyan), var(--brand-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
}

/* ---- Header ---- */
.header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-xl);
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header__left {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.header__brand {
    display: flex;
    align-items: baseline;
    gap: var(--space-sm);
}

.header__title {
    font-size: var(--text-xl);
    font-weight: 700;
}

.header__brand-sub {
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--text-tertiary);
    letter-spacing: 0.02em;
}

.header__brand-sub .logo-text__ai {
    font-size: var(--text-xs);
    font-weight: 800;
}

.header__right {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* ---- Auth Card Brand Sub ---- */
.auth-card__brand-sub {
    display: block;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-tertiary);
    margin-top: var(--space-xs);
}

.auth-card__brand-sub .logo-text__ai {
    font-size: var(--text-sm);
    font-weight: 800;
}

/* ---- App Switcher ---- */
.app-switcher {
    position: relative;
}

.app-switcher__trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    padding: 6px 10px;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.app-switcher__trigger:hover {
    background: var(--bg-secondary);
    border-color: var(--border-subtle);
    color: var(--text-primary);
}

.app-switcher__trigger svg {
    opacity: 0.6;
}

.app-switcher__dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 160px;
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    padding: var(--space-xs);
    z-index: 100;
}

.app-switcher__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.app-switcher__item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.app-switcher__item--active {
    color: var(--brand-purple);
    font-weight: 600;
}

.app-switcher__item-check {
    font-size: var(--text-xs);
    color: var(--brand-purple);
}

/* ---- Main Content ---- */
.main-content {
    padding: var(--space-xl);
    min-height: calc(100vh - var(--header-height));
}
