body.datav3-layout .search-header {
    gap: 0.35rem;
    padding: 1.2rem 1rem 0.9rem;
    background: #ffffff;
}

.v3-product-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    justify-self: end;
    gap: .5rem;
    margin-left: auto;
}

.v3-product-actions .notifications-bell {
    width: 36px;
    height: 36px;
}

body.datav3-layout .search-header .logo {
    width: 64px;
    height: 64px;
    margin-bottom: 0;
}

.v3-unified-main {
    width: 100%;
    padding: 1.4rem 1rem 3rem;
}

.v3-unified-main > .content {
    width: min(1120px, 100%);
    margin-inline: auto;
}

.v3-page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.v3-page-title {
    margin: 0;
    color: #172033;
    font-size: clamp(2rem, 4.2vw, 3.6rem);
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.02;
}

.v3-page-title-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.v3-primary-action {
    align-self: center;
    min-height: 36px;
    padding: 0.38rem 0.72rem;
    border: 1px solid #0099ab;
    border-radius: 12px;
    background: #0099ab;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 800;
}

.v3-primary-action:hover,
.v3-primary-action:focus-visible {
    border-color: #033d52;
    background: #033d52;
    color: #fff;
}

.v3-page-description {
    max-width: 620px;
    margin: 0.55rem 0 0;
    color: #5b677a;
    font-size: 1rem;
    line-height: 1.5;
}

.v3-page-toolbar {
    position: sticky;
    top: 96px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    margin: 0 -0.25rem 1rem;
    padding: 0.75rem 0.25rem;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
}

.v3-page-search {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 520px;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 44px;
    padding: 0 0.82rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 8px;
    background: #ffffff;
    color: #64748b;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.v3-page-search:focus-within {
    border-color: rgba(0, 153, 171, 0.42);
    box-shadow: 0 0 0 4px rgba(0, 153, 171, 0.1);
}

.v3-page-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #172033;
    font: inherit;
    font-size: 0.95rem;
}

.v3-page-search input::placeholder {
    color: #94a3b8;
}

/* Reusable single-line input with a trailing action button. */
.v3-page-input-action,
.lookup-add-title .v3-page-input-action {
    display: flex;
    align-items: center;
    gap: 0;
    width: 100%;
    max-width: 520px;
    min-height: 44px;
    padding: 0;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 8px;
    background: #fff;
    color: #64748b;
    box-shadow: none;
}

.v3-page-input-action:focus-within,
.lookup-add-title .v3-page-input-action:focus-within {
    border-color: rgba(0, 153, 171, 0.42);
    box-shadow: 0 0 0 4px rgba(0, 153, 171, 0.1);
}

.v3-page-input-action__input,
.lookup-add-title .v3-page-input-action__input {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 0;
    padding: 0 0.82rem;
    border: 0;
    outline: 0;
    background: transparent;
    color: #172033;
    font: inherit;
    font-size: 0.95rem;
}

.v3-page-input-action__input::placeholder,
.lookup-add-title .v3-page-input-action__input::placeholder {
    color: #94a3b8;
}

.v3-page-input-action__button,
.lookup-add-title .v3-page-input-action__button {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    width: 44px;
    padding: 0;
    border: 0;
    border-left: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 0 8px 8px 0;
    background: var(--brand-light);
    color: #fff;
    line-height: 1;
}

.v3-page-input-action__button:hover,
.v3-page-input-action__button:focus-visible,
.lookup-add-title .v3-page-input-action__button:hover,
.lookup-add-title .v3-page-input-action__button:focus-visible {
    background: var(--brand-dark);
    color: #fff;
    outline: none;
}

.v3-page-status {
    flex: 0 0 auto;
    color: #64748b;
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: right;
}

.v3-page-status.is-danger {
    color: #b42318;
}

.v3-page-stats {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(118px, auto));
    gap: 0.65rem;
}

.v3-page-stat {
    min-width: 130px;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(0, 153, 171, 0.18);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.06);
    text-align: right;
}

.v3-page-stat-primary {
    border-color: rgba(0, 103, 146, 0.2);
}

body.alerts-body .v3-page-stat,
body.datasets-body .v3-page-stat,
body.tracking-page-mode .v3-page-stat,
body.asx-monitor-body .v3-page-stat {
    box-shadow: none;
}

.v3-page-stat span {
    display: block;
}

.v3-page-stat span:first-child {
    color: #044e68;
    font-size: 1.75rem;
    font-weight: 850;
    line-height: 1;
}

.v3-page-stat span:last-child {
    margin-top: 0.2rem;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
}

.v3-empty-state {
    width: 100%;
    padding: 3rem 1rem;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    text-align: center;
}

.v3-empty-state h2 {
    margin: 0;
    color: #17212b;
    font-size: 1.05rem;
    font-weight: 850;
    letter-spacing: 0;
}

.v3-empty-state p {
    margin: 0.4rem 0 0;
    color: #64748b;
    font-size: 0.92rem;
    line-height: 1.45;
}

@media (max-width: 767.98px) {
    .v3-unified-main {
        padding: 1rem 0.75rem 2.4rem;
    }

    .v3-page-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .v3-page-toolbar {
        position: static;
        align-items: stretch;
        flex-direction: column;
        margin-inline: 0;
    }

    .v3-page-search {
        max-width: none;
    }

    .v3-page-status {
        text-align: left;
    }

    .v3-page-stats {
        align-self: flex-start;
    }

    .v3-page-stat {
        text-align: left;
    }
}

@media (max-width: 575.98px) {
    body.datav3-layout .search-header .logo {
        width: 56px;
        height: 56px;
    }

    .v3-page-stats {
        width: 100%;
        grid-template-columns: 1fr 1fr;
    }
}
