/* Unified page header */
.page-header {
    --ph-accent: #0d6efd;
    --ph-accent-soft: rgba(13, 110, 253, 0.12);
    --ph-accent-mid: rgba(13, 110, 253, 0.22);
    margin-bottom: 1.5rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 55%, #f1f5f9 100%);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--ph-accent), color-mix(in srgb, var(--ph-accent) 60%, #fff));
    border-radius: 16px 0 0 16px;
}

.page-header--success { --ph-accent: #198754; --ph-accent-soft: rgba(25, 135, 84, 0.12); --ph-accent-mid: rgba(25, 135, 84, 0.22); }
.page-header--warning { --ph-accent: #fd7e14; --ph-accent-soft: rgba(253, 126, 20, 0.12); --ph-accent-mid: rgba(253, 126, 20, 0.22); }
.page-header--danger  { --ph-accent: #dc3545; --ph-accent-soft: rgba(220, 53, 69, 0.12); --ph-accent-mid: rgba(220, 53, 69, 0.22); }
.page-header--info    { --ph-accent: #0dcaf0; --ph-accent-soft: rgba(13, 202, 240, 0.14); --ph-accent-mid: rgba(13, 202, 240, 0.24); }

.page-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem 1.25rem;
    position: relative;
    z-index: 1;
}

.page-header__main {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex: 1 1 280px;
    min-width: 0;
}

.page-header__icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--ph-accent-soft);
    color: var(--ph-accent);
    font-size: 1.45rem;
    box-shadow: inset 0 0 0 1px var(--ph-accent-mid);
}

.page-header__text {
    min-width: 0;
}

.page-header__title {
    margin: 0 0 0.35rem;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.25;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.page-header__subtitle {
    margin: 0 0 0.5rem;
    font-size: 0.9375rem;
    color: #64748b;
    line-height: 1.45;
    max-width: 52rem;
}

.page-header__meta {
    margin: 0;
    font-size: 0.8125rem;
    color: #94a3b8;
}

.page-header__crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.35rem;
    margin: 0.5rem 0 0;
    padding: 0;
    list-style: none;
    font-size: 0.8125rem;
}

.page-header__crumbs li {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #94a3b8;
}

.page-header__crumbs li:not(:last-child)::after {
    content: "\F285";
    font-family: "bootstrap-icons";
    font-size: 0.65rem;
    color: #cbd5e1;
    margin-left: 0.15rem;
}

.page-header__crumbs a {
    color: var(--ph-accent);
    text-decoration: none;
    font-weight: 500;
}

.page-header__crumbs a:hover {
    text-decoration: underline;
}

.page-header__crumbs .active {
    color: #475569;
    font-weight: 600;
}

.page-header__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    flex: 0 1 auto;
}

.page-header__actions .btn {
    border-radius: 10px;
    font-weight: 500;
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    .page-header {
        padding: 1rem 1.1rem;
    }
    .page-header__title {
        font-size: 1.25rem;
    }
    .page-header__actions {
        width: 100%;
        justify-content: stretch;
    }
    .page-header__actions .btn {
        flex: 1 1 auto;
    }
}
