/* =============================================================================
   admin-header.css
   Header bar only. 4rem. Brand column matches the Main Rail.
   ============================================================================= */

.admin-header {
    --sb-width: 3.35rem;
    height: 4rem;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.admin-header-inner {
    display: flex;
    align-items: center;
    height: 4rem;
    width: 100%;
}

.admin-header-brand {
    flex: 0 0 var(--sb-width);
    width: var(--sb-width);
    max-width: var(--sb-width);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.admin-header-brand img {
    height: 2.15rem;
    width: 2.15rem;
    border-radius: 9999px;
    object-fit: contain;
}

.admin-header-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1rem 0 0.2rem;
}

.admin-header-wordmark {
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
}

.admin-header-tools {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.admin-header-dropdown {
    position: relative;
}

.admin-header-account {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: transparent;
    color: var(--text);
    font-size: 0.875rem;
    cursor: pointer;
}

.admin-header-name {
    font-weight: 500;
    max-width: 10rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-header-tenant {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.admin-header-caret {
    width: 1rem;
    height: 1rem;
    opacity: 0.6;
    flex-shrink: 0;
}

.admin-header-theme {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: transparent;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.admin-header-theme-icon {
    width: 1.15rem;
    height: 1.15rem;
    display: block;
}

.admin-header-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    width: 14rem;
    padding: 0.25rem 0;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: var(--bg-elevated);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
    z-index: 50;
}

.admin-header-menu--theme {
    width: 11rem;
}

.admin-header-menu-item {
    display: block;
    width: 100%;
    padding: 0.6rem 1rem;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 0.875rem;
    text-align: left;
    cursor: pointer;
}

.admin-header-menu-item:hover {
    opacity: 0.8;
}

.admin-header-menu-rule {
    margin: 0.25rem 0;
    border-top: 1px solid var(--border);
}
