/* Shared admin page header — matches Dashboard */

.admin-page-shell {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 16px;
    box-sizing: border-box;
}

.dash-admin-header {
    --admin-header-gap: 10px;
    --admin-header-border: #2d3035;
    --admin-header-card: #1a1c1e;
    --admin-header-muted: #6b7280;
    --admin-header-dim: #6b7280;
    display: grid;
    gap: var(--admin-header-gap);
    margin: 0 0 var(--admin-header-gap);
    padding: 0;
    width: 100%;
    min-width: 0;
    font-size: 14px;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.2;
    box-sizing: border-box;
}

.dash-header-right {
    display: contents;
}

.dash-title {
    font-size: 1.375em;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin: 0 0 4px;
    padding: 0;
    line-height: 1.2;
    color: #ffffff;
}

.dash-subtitle {
    font-size: 0.8125em;
    color: var(--admin-header-muted);
    font-weight: 400;
    line-height: 1.3;
    margin: 0;
    padding: 0;
}

.dash-header-right .nav-pills-custom,
.dash-calendar-slot .nav-pills-custom {
    justify-self: end;
}

.nav-pills-custom {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #101115;
    padding: 4px;
    border: 1px solid var(--admin-header-border);
    border-radius: 10px;
    flex-wrap: wrap;
}

.dash-tabs-slot .nav-pills-custom {
    flex-wrap: nowrap;
    width: fit-content;
    max-width: 100%;
}

.nav-pills-custom .btn-pill {
    background: transparent;
    color: #6b7280;
    border: none;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.nav-pills-custom .btn-pill:hover {
    color: #9ca3af;
}

.nav-pills-custom .btn-pill.active {
    background: #1d1e26;
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.search-box-wrap {
    --admin-header-border: #3a3f47;
    --admin-header-card: #1a1c1e;
    --admin-header-dim: #6b7280;
    position: relative;
    width: min(280px, 100%);
}

.search-box-wrap input {
    background: var(--admin-header-card);
    border: 1px solid var(--admin-header-border);
    color: #fff;
    border-radius: 10px;
    padding: 0 12px 0 36px;
    font-size: 0.8125rem;
    width: 100%;
    height: 38px;
    box-sizing: border-box;
}

.search-box-wrap input::placeholder {
    color: var(--admin-header-dim);
}

.search-box-wrap input:focus {
    outline: none;
    border-color: #0099ff;
    box-shadow: 0 0 0 3px rgba(0, 153, 255, 0.15);
}

.search-box-wrap i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--admin-header-dim);
    font-size: 0.9rem;
    pointer-events: none;
}

.dash-header-select {
    background: var(--admin-header-card);
    border: 1px solid var(--admin-header-border);
    color: #fff;
    border-radius: 10px;
    height: 38px;
    padding: 0 12px;
    font-size: 0.8125rem;
    font-weight: 500;
}

.dash-header-select:focus {
    outline: none;
    border-color: #0099ff;
}

.dash-header-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 38px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid var(--admin-header-border);
    background: var(--admin-header-card);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.dash-header-action:hover {
    color: #fff;
    border-color: #3a3d44;
    background: #242628;
}

.dash-header-action.is-primary {
    background: #ffd700;
    border-color: #ffd700;
    color: #000;
}

.dash-header-action.is-primary:hover {
    background: #ffe033;
    border-color: #ffe033;
    color: #000;
}

@media (min-width: 992px) {
    .dash-admin-header {
        grid-template-columns: 1fr auto;
        align-items: center;
    }
    .dash-admin-header.has-secondary {
        grid-template-areas:
            "title header-right"
            "tabs extra";
    }
    .dash-admin-header.has-secondary .dash-title-block { grid-area: title; }
    .dash-admin-header.has-secondary .dash-header-right {
        display: flex;
        align-items: center;
        gap: 10px;
        grid-area: header-right;
        justify-self: end;
    }
    .dash-admin-header.has-secondary .dash-tabs-slot { grid-area: tabs; justify-self: start; }
    .dash-admin-header.has-secondary .dash-calendar-slot { grid-area: extra; justify-self: end; }
    .dash-admin-header:not(.has-secondary) .dash-header-right {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 10px;
        flex-wrap: wrap;
    }
    .nav-pills-custom {
        gap: 6px;
    }
    .nav-pills-custom .btn-pill {
        padding: 6px 16px;
        font-size: 0.875rem;
    }
}

@media (max-width: 991.98px) {
    .dash-header-right {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
    }
    .search-box-wrap {
        width: 100%;
        min-width: 0;
        flex: 1 1 180px;
    }
    .dash-tabs-slot .nav-pills-custom {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}
