﻿/* =========================================================
   Dashboard: 2-column layout (projects + ad rail) - LARGER
   ========================================================= */

.dash-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-4);
    align-items: start;
}

@media (min-width: 992px) {
    .dash-grid {
        /* wider rail + more breathing room */
        grid-template-columns: minmax(520px, 1fr) 420px;
        gap: var(--s-6);
    }
}

.dash-grid__rail {
    min-width: 0;
}

/* =========================================================
   Client-facing projects dashboard
   ========================================================= */

.client-dashboard {
    display: grid;
    gap: 16px;
    padding: 14px;
    background:
        radial-gradient(circle at 0% 0%, rgba(13, 110, 253, .10), transparent 24rem),
        radial-gradient(circle at 100% 10%, rgba(14, 165, 233, .08), transparent 22rem),
        linear-gradient(180deg, #f8fafc, #eef2f7);
    border-radius: 24px;
}

.client-dashboard__hero,
.client-create-project,
.client-projects-panel {
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 22px;
    background:
        linear-gradient(135deg, rgba(255,255,255,.96), rgba(248,250,252,.84)),
        radial-gradient(circle at 100% 0%, rgba(13,110,253,.10), transparent 18rem);
    box-shadow: 0 16px 42px rgba(15, 23, 42, .075);
}

.client-dashboard__hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
}

.client-dashboard__hero-copy {
    min-width: 0;
}

.client-dashboard__eyebrow {
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.client-dashboard__title,
.client-create-project__title,
.client-projects-panel__title {
    margin: 2px 0 0;
    color: #0f172a;
    font-weight: 950;
    letter-spacing: -.03em;
    line-height: 1.08;
}

.client-dashboard__title {
    font-size: clamp(1.4rem, 2.2vw, 2rem);
}

.client-create-project__title,
.client-projects-panel__title {
    font-size: clamp(1.1rem, 1.5vw, 1.35rem);
}

.client-dashboard__subtitle,
.client-create-project__subtitle {
    margin: 7px 0 0;
    max-width: 680px;
    color: #64748b;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.4;
}

.client-dashboard__hero-actions,
.client-dashboard__summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.client-dashboard__hero-actions {
    justify-content: flex-end;
    flex: 0 0 auto;
}

.client-dashboard__summary-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 11px;
    border: 1px solid rgba(13,110,253,.16);
    border-radius: 999px;
    background: rgba(13,110,253,.07);
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 850;
    line-height: 1;
    white-space: nowrap;
}

.client-dashboard__primary-btn,
.client-dashboard__secondary-btn {
    appearance: none;
    min-height: 38px;
    border-radius: 999px;
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 850;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 120ms ease, box-shadow 140ms ease, border-color 140ms ease, background 140ms ease;
}

.client-dashboard__primary-btn {
    border: 1px solid rgba(37,99,235,.26);
    background: linear-gradient(180deg, #2563eb, #0d6efd);
    color: #fff;
    box-shadow: 0 10px 22px rgba(37,99,235,.18);
}

.client-dashboard__secondary-btn {
    border: 1px solid rgba(15,23,42,.12);
    background: rgba(255,255,255,.88);
    color: #334155;
    box-shadow: 0 6px 16px rgba(15,23,42,.045);
}

.client-dashboard__primary-btn:hover,
.client-dashboard__secondary-btn:hover {
    transform: translateY(-1px);
}

.client-dashboard__primary-btn:focus-visible,
.client-dashboard__secondary-btn:focus-visible,
.client-dashboard .project-card:focus-visible {
    outline: 3px solid rgba(37,99,235,.20);
    outline-offset: 2px;
}

.client-create-project {
    padding: 16px;
}

.client-create-project__header,
.client-projects-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.client-create-project__header {
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(15,23,42,.07);
    margin-bottom: 14px;
}

.client-create-project__step {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border: 1px solid rgba(16,185,129,.18);
    border-radius: 999px;
    background: rgba(16,185,129,.09);
    color: #047857;
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
}

.client-create-project__grid {
    display: grid;
    grid-template-columns: minmax(280px, .95fr) minmax(320px, 1.05fr);
    gap: 12px;
}

.client-create-project__section {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(15,23,42,.08);
    border-radius: 18px;
    background: linear-gradient(180deg, #fff, rgba(248,250,252,.72));
}

.client-create-project__section-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.client-create-project__section-head h3 {
    margin: 0;
    color: #0f172a;
    font-size: 14px;
    font-weight: 900;
}

.client-create-project__section-head p {
    margin: 3px 0 0;
    color: #64748b;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.35;
}

.client-create-project__number {
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(37,99,235,.18);
    background: rgba(219,234,254,.78);
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 900;
}

.client-create-project__field {
    display: grid;
    gap: 6px;
}

.client-create-project__field span {
    color: #334155;
    font-size: 12px;
    font-weight: 850;
}

.client-create-project__field strong {
    color: #dc2626;
}

.client-create-project__field .form-control {
    min-height: 42px;
    border-radius: 13px;
    border-color: rgba(15,23,42,.14);
    background: #fff;
    font-size: 14px;
}

.client-create-project__field .form-control:focus {
    border-color: rgba(37,99,235,.42);
    box-shadow: 0 0 0 4px rgba(37,99,235,.12);
}

.client-create-project__fields {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(92px, .7fr) minmax(110px, .8fr);
    gap: 10px;
}

.client-create-project__footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(15,23,42,.07);
}

.client-dashboard__grid {
    align-items: start;
}

.client-projects-panel {
    padding: 16px;
}

.client-projects-panel__header {
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(15,23,42,.07);
}

.client-dashboard .project-cards {
    max-width: none;
    gap: 10px;
}

.client-dashboard .project-card {
    padding: 14px;
    border-color: rgba(15,23,42,.08);
    border-radius: 18px;
    background: linear-gradient(180deg, #fff, rgba(248,250,252,.80));
    box-shadow: 0 8px 20px rgba(15,23,42,.035);
}

.client-dashboard .project-card:hover {
    border-color: rgba(37,99,235,.22);
    background: linear-gradient(180deg, #fff, rgba(239,246,255,.74));
    box-shadow: 0 16px 34px rgba(15,23,42,.075);
    transform: translateY(-1px);
}

.client-dashboard .pc-kicker {
    margin-bottom: 4px;
    color: #64748b;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.client-dashboard .pc-address {
    color: #0f172a;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.24;
}

.client-dashboard .pc-sub {
    margin-top: 5px;
    color: #64748b;
    font-size: 12px;
    font-weight: 650;
}

.client-dashboard .pc-right {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #1d4ed8;
}

.client-dashboard .pc-open-text {
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.client-dashboard .pc-chevron {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(37,99,235,.16);
    border-radius: 999px;
    background: rgba(219,234,254,.58);
    color: #1d4ed8;
    font-size: 22px;
}

.client-dashboard .empty-state {
    max-width: none;
    border-color: rgba(37,99,235,.18);
    border-radius: 18px;
    background:
        radial-gradient(circle at 0% 0%, rgba(37,99,235,.08), transparent 13rem),
        rgba(248,250,252,.82);
    padding: 22px;
}

.client-dashboard .empty-title {
    color: #0f172a;
    font-size: 16px;
    font-weight: 900;
}

.client-dashboard .empty-sub {
    max-width: 520px;
    color: #64748b;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.4;
}

.empty-state__action {
    margin-top: 14px;
}

/* Sticky rail on desktop so it feels "app-like" */
@media (min-width: 992px) {
    .ad-rail {
        position: sticky;
        top: var(--s-4);
    }
}

/* =========================================================
   Ad rail container
   ========================================================= */

.ad-rail {
    padding: var(--s-5);
    border: 1px solid rgba(15,23,42,.08);
    border-radius: 22px;
    box-shadow: 0 16px 42px rgba(15,23,42,.07);
    background:
        radial-gradient(circle at 100% 0%, rgba(13,110,253,.08), transparent 15rem),
        linear-gradient(180deg, #fff, rgba(248,250,252,.84));
}

.ad-rail__header {
    margin-bottom: var(--s-4);
}

.ad-rail__title {
    font-size: var(--text-lg);
    font-weight: 950;
    color: var(--text-primary);
    line-height: 1.2;
}

.ad-rail__sub {
    font-size: var(--text-md);
    color: var(--text-secondary);
    margin-top: var(--s-1);
}

/* =========================================================
   Partner / Ad cards
   ========================================================= */

.ad-card {
    background: linear-gradient(180deg, #fff, rgba(248,250,252,.78));
    border: 1px solid rgba(15,23,42,.08);
    border-radius: 18px;
    box-shadow: 0 8px 20px rgba(15,23,42,.035);
    padding: var(--s-4);
    margin-top: var(--s-4);
}

.ad-card__top {
    display: flex;
    align-items: center;
    gap: var(--s-4);
    padding-bottom: var(--s-4);
    border-bottom: 1px solid var(--border);
}

.ad-card__logo {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    border: 1px solid rgba(15,23,42,.08);
    object-fit: contain;
    background: var(--bg-surface);
    padding: 8px;
}

.ad-card__company-name {
    font-size: var(--text-lg);
    font-weight: var(--fw-bold);
    color: var(--text-primary);
    line-height: 1.15;
}

.ad-card__pill {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 12px;
    border-radius: var(--r-pill);
    font-size: 12px;
    font-weight: var(--fw-bold);
    letter-spacing: 0.02em;
    color: #1d4ed8;
    background: rgba(37,99,235,.08);
    border: 1px solid rgba(37,99,235,.16);
    margin-top: var(--s-2);
    width: fit-content;
}

.ad-card__pill--green {
    color: #047857;
    background: rgba(16,185,129,.09);
    border: 1px solid rgba(16,185,129,.18);
}

.ad-card__person {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: var(--s-4);
    padding-top: var(--s-4);
    align-items: start;
}

.ad-card__avatar {
    width: 52px;
    height: 52px;
    border-radius: var(--r-pill);
    border: 1px solid rgba(15,23,42,.08);
    object-fit: cover;
    background: var(--bg-surface-2);
}

.ad-card__name {
    font-size: var(--text-md);
    font-weight: var(--fw-bold);
    color: var(--text-primary);
    margin-bottom: var(--s-2);
}

.ad-card__link {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    font-size: var(--text-md);
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: var(--s-2);
}

    .ad-card__link:hover {
        color: var(--brand-primary);
        text-decoration: none;
    }

@media (max-width: 991.98px) {
    .client-dashboard__hero,
    .client-create-project__header,
    .client-projects-panel__header {
        flex-direction: column;
    }

    .client-dashboard__hero-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .client-create-project__grid,
    .client-create-project__fields {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .client-dashboard {
        padding: 10px;
        border-radius: 18px;
    }

    .client-dashboard__hero,
    .client-create-project,
    .client-projects-panel,
    .ad-rail {
        border-radius: 18px;
        padding: 14px;
    }

    .client-dashboard__hero-actions,
    .client-create-project__footer {
        align-items: stretch;
        flex-direction: column;
    }

    .client-dashboard__primary-btn,
    .client-dashboard__secondary-btn {
        width: 100%;
    }

    .client-dashboard .project-card {
        align-items: flex-start;
    }

    .client-dashboard .pc-right {
        align-self: center;
    }
}

.ad-rail__footer {
    display: flex;
    justify-content: flex-end;
    margin-top: var(--s-4);
}

.ad-rail__sponsored {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

/* =========================================================
   ScopeBuilder Theme Polish: Client Dashboard
   Keeps internal reviewer/admin dashboard styles untouched.
   ========================================================= */

.client-dashboard.sb-section-shell {
    border-radius: var(--sb-radius);
    background: var(--sb-page-bg);
    padding: 14px;
}

.client-dashboard .client-dashboard__hero.sb-gradient-header {
    border: 0;
    border-radius: var(--sb-radius);
    background: linear-gradient(135deg, var(--sb-blue-start) 0%, var(--sb-blue-end) 100%);
    box-shadow: var(--sb-shadow);
    color: #ffffff;
}

.client-dashboard .client-dashboard__hero.sb-gradient-header .client-dashboard__eyebrow,
.client-dashboard .client-dashboard__hero.sb-gradient-header .client-dashboard__title,
.client-dashboard .client-dashboard__hero.sb-gradient-header .client-dashboard__subtitle {
    color: #ffffff;
}

.client-dashboard .client-dashboard__hero.sb-gradient-header .client-dashboard__subtitle {
    color: rgba(255, 255, 255, .84);
}

.client-dashboard .client-dashboard__hero.sb-gradient-header .client-dashboard__summary-chip.sb-summary-tile {
    border-color: rgba(255, 255, 255, .24);
    background: rgba(255, 255, 255, .16);
    color: #ffffff;
    box-shadow: none;
}

.client-dashboard .client-create-project.sb-card,
.client-dashboard .client-projects-panel.sb-card,
.client-dashboard .ad-rail.sb-card,
.client-dashboard .project-card.sb-card {
    border-color: var(--sb-card-border);
    border-radius: var(--sb-radius);
    background: var(--sb-card-bg);
    box-shadow: var(--sb-shadow);
}

.client-dashboard .client-create-project__header.sb-card-header,
.client-dashboard .client-projects-panel__header.sb-card-header,
.client-dashboard .ad-rail__header.sb-card-header {
    margin: -16px -16px 14px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--sb-card-border);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.client-dashboard .client-dashboard__summary-chip.sb-summary-tile,
.client-dashboard .client-create-project__step.sb-summary-tile {
    border-color: rgba(14, 165, 233, .24);
    border-radius: var(--sb-inner-radius);
    background: #eff6ff;
    color: var(--sb-navy);
    box-shadow: none;
}

.client-dashboard .client-dashboard__primary-btn.sb-action-btn,
.client-dashboard .client-dashboard__secondary-btn.sb-action-btn {
    min-height: 30px;
    border-radius: var(--sb-radius);
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.client-dashboard .client-dashboard__primary-btn.sb-action-btn {
    border-color: var(--sb-navy);
    background: var(--sb-navy);
    color: #ffffff;
    box-shadow: 0 6px 14px rgba(15, 42, 92, .16);
}

.client-dashboard .client-dashboard__secondary-btn.sb-action-btn {
    border-color: rgba(30, 58, 138, .35);
    background: #ffffff;
    color: var(--sb-navy);
    box-shadow: none;
}

.client-dashboard .client-dashboard__primary-btn.sb-action-btn:hover,
.client-dashboard .client-dashboard__secondary-btn.sb-action-btn:hover {
    transform: translateY(-1px);
}

.client-dashboard .project-card.sb-card {
    box-shadow: 0 5px 16px rgba(15, 23, 42, .05);
}

.client-dashboard .project-card.sb-card:hover {
    border-color: rgba(14, 165, 233, .34);
    background: #f8fbff;
    box-shadow: 0 12px 26px rgba(15, 23, 42, .08);
}

.client-dashboard .pc-chevron {
    border-radius: var(--sb-inner-radius);
    background: #eff6ff;
    color: var(--sb-navy);
}

.client-dashboard .empty-state {
    border-color: var(--sb-card-border);
    border-radius: var(--sb-radius);
    background: #f8fbff;
}

@media (max-width: 640px) {
    .client-dashboard.sb-section-shell {
        padding: 10px;
    }

    .client-dashboard .client-create-project__header.sb-card-header,
    .client-dashboard .client-projects-panel__header.sb-card-header,
    .client-dashboard .ad-rail__header.sb-card-header {
        margin: -14px -14px 12px;
        padding: 12px 14px;
    }
}

/* =========================================================
   Internal reviewer/admin dashboard
   ========================================================= */

.ops-dashboard {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ops-filters,
.ops-projects {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.ops-filters {
    padding: 18px 20px;
}

.ops-filters__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.ops-filters__title {
    font-size: 1rem;
    font-weight: 800;
    color: #102a43;
}

.ops-filters__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.ops-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ops-field span {
    font-size: 12px;
    font-weight: 700;
    color: #334e68;
}

.ops-callout {
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(180, 83, 9, 0.20);
    background: #fff8eb;
    color: #8d5b14;
    font-size: 0.95rem;
}

.ops-callout--success {
    border-color: rgba(21, 128, 61, 0.18);
    background: #eefcf3;
    color: #166534;
}

.ops-projects__head,
.ops-project-row {
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) minmax(140px, 1fr) minmax(130px, 0.9fr) minmax(150px, 0.9fr);
    gap: 14px;
    align-items: center;
}

.ops-projects__head {
    padding: 14px 20px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #627d98;
}

.ops-projects__body {
    display: flex;
    flex-direction: column;
}

.ops-project-row {
    padding: 18px 20px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.07);
    cursor: pointer;
    transition: background-color 120ms ease, box-shadow 120ms ease;
}

.ops-project-row:last-child {
    border-bottom: 0;
}

.ops-project-row:hover {
    background: #f8fbfd;
}

.ops-project-row:focus-visible {
    outline: 0;
    box-shadow: inset 0 0 0 2px rgba(15, 95, 109, 0.18);
}

.ops-project-row.is-archived {
    background: #f7f7f8;
}

.ops-project-row.is-archived:hover {
    background: #f1f3f5;
}

.ops-project-row__primary,
.ops-project-row__location,
.ops-project-row__updated,
.ops-project-row__actions {
    min-width: 0;
}

.ops-project-row__title {
    font-size: 1rem;
    font-weight: 800;
    color: #102a43;
    line-height: 1.25;
}

.ops-project-row__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.ops-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border-radius: 999px;
    background: #edf2f7;
    color: #334e68;
    font-size: 11px;
    font-weight: 700;
}

.ops-chip--archived {
    background: rgba(100, 116, 139, 0.14);
    color: #475569;
}

.ops-project-row__location,
.ops-project-row__updated {
    color: #102a43;
    font-weight: 600;
}

.ops-project-row__location-sub {
    margin-top: 4px;
    color: #627d98;
    font-size: 12px;
    font-weight: 500;
}

.ops-project-row__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.ops-project-row__go {
    color: #0f5f6d;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ops-empty-state {
    max-width: none;
}

@media (max-width: 991.98px) {
    .ops-filters__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ops-projects__head {
        display: none;
    }

    .ops-project-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .ops-project-row__actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .ops-filters__grid {
        grid-template-columns: 1fr;
    }

    .ops-filters,
    .ops-projects {
        border-radius: 16px;
    }

    .ops-project-row {
        padding: 16px;
    }
}

/* =========================================================
   ScopeBuilder Theme Polish: Internal Reviewer/Manager/Admin
   ========================================================= */

.ops-dashboard.sb-section-shell {
    display: grid;
    gap: 16px;
    padding: 14px;
    border-radius: var(--sb-radius);
    background: var(--sb-page-bg);
}

.ops-dashboard__hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
}

.ops-dashboard .ops-dashboard__hero.sb-gradient-header {
    border: 0;
    border-radius: var(--sb-radius);
    background: linear-gradient(135deg, var(--sb-blue-start) 0%, var(--sb-blue-end) 100%);
    box-shadow: var(--sb-shadow);
    color: #ffffff;
}

.ops-dashboard__hero-copy {
    min-width: 0;
}

.ops-dashboard__eyebrow {
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.ops-dashboard .ops-dashboard__hero.sb-gradient-header .ops-dashboard__eyebrow,
.ops-dashboard .ops-dashboard__hero.sb-gradient-header .ops-dashboard__title,
.ops-dashboard .ops-dashboard__hero.sb-gradient-header .ops-dashboard__subtitle {
    color: #ffffff;
}

.ops-dashboard .ops-dashboard__hero.sb-gradient-header .ops-dashboard__subtitle {
    color: rgba(255, 255, 255, .84);
}

.ops-dashboard__title {
    margin: 2px 0 0;
    font-size: clamp(1.4rem, 2.2vw, 2rem);
    font-weight: 950;
    letter-spacing: -.03em;
    line-height: 1.08;
}

.ops-dashboard__subtitle {
    margin: 7px 0 0;
    max-width: 680px;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.4;
}

.ops-dashboard__summary {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.ops-dashboard__summary-tile.sb-summary-tile {
    display: inline-flex;
    min-width: 104px;
    min-height: 54px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 3px;
    padding: 8px 12px;
    border-color: rgba(255, 255, 255, .24);
    border-radius: var(--sb-inner-radius);
    background: rgba(255, 255, 255, .16);
    color: #ffffff;
    box-shadow: none;
}

.ops-dashboard__summary-tile strong {
    font-size: 1.2rem;
    font-weight: 950;
    line-height: 1;
}

.ops-dashboard__summary-tile span {
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .07em;
    line-height: 1;
    text-transform: uppercase;
}

.ops-dashboard .ops-filters.sb-card,
.ops-dashboard .ops-projects.sb-card,
.ops-dashboard .ops-empty-state.sb-card {
    border-color: var(--sb-card-border);
    border-radius: var(--sb-radius);
    background: var(--sb-card-bg);
    box-shadow: var(--sb-shadow);
}

.ops-dashboard .ops-filters.sb-card {
    padding: 16px;
}

.ops-dashboard .ops-filters__header.sb-card-header {
    margin: -16px -16px 14px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--sb-card-border);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.ops-dashboard .ops-filters__title {
    margin-top: 2px;
    color: var(--sb-text);
    font-size: clamp(1rem, 1.4vw, 1.2rem);
    font-weight: 950;
    letter-spacing: -.02em;
}

.ops-dashboard .ops-field span {
    color: #334155;
    font-size: 12px;
    font-weight: 850;
}

.ops-dashboard .ops-field .form-control,
.ops-dashboard .ops-field .form-select {
    min-height: 40px;
    border-color: rgba(15, 23, 42, .14);
    border-radius: var(--sb-inner-radius);
    background-color: #ffffff;
    color: var(--sb-text);
    font-size: 13px;
}

.ops-dashboard .ops-field .form-control:focus,
.ops-dashboard .ops-field .form-select:focus {
    border-color: rgba(14, 165, 233, .46);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, .14);
}

.ops-dashboard .ops-callout {
    border-color: rgba(14, 165, 233, .22);
    border-radius: var(--sb-inner-radius);
    background: #f0f9ff;
    color: var(--sb-navy);
    font-size: 13px;
    font-weight: 700;
}

.ops-dashboard .ops-callout--success {
    border-color: rgba(14, 165, 233, .22);
    background: #f0f9ff;
    color: var(--sb-navy);
}

.ops-dashboard .ops-projects.sb-card {
    overflow: hidden;
}

.ops-dashboard .ops-projects__head {
    border-bottom: 1px solid var(--sb-card-border);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    color: #475569;
}

.ops-dashboard .ops-projects__body {
    gap: 10px;
    padding: 12px;
}

.ops-dashboard .ops-project-row {
    border: 1px solid var(--sb-card-border);
    border-radius: var(--sb-inner-radius);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 5px 16px rgba(15, 23, 42, .05);
    transition: transform 120ms ease, background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.ops-dashboard .ops-project-row:last-child {
    border-bottom: 1px solid var(--sb-card-border);
}

.ops-dashboard .ops-project-row:hover {
    border-color: rgba(14, 165, 233, .34);
    background: #f8fbff;
    box-shadow: 0 12px 26px rgba(15, 23, 42, .08);
    transform: translateY(-1px);
}

.ops-dashboard .ops-project-row:focus-visible {
    outline: 3px solid rgba(14, 165, 233, .20);
    outline-offset: 2px;
    box-shadow: 0 12px 26px rgba(15, 23, 42, .08);
}

.ops-dashboard .ops-project-row.is-archived {
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
    opacity: .9;
}

.ops-dashboard .ops-project-row__title,
.ops-dashboard .ops-project-row__location,
.ops-dashboard .ops-project-row__updated {
    color: var(--sb-text);
}

.ops-dashboard .ops-project-row__title {
    font-weight: 950;
}

.ops-dashboard .ops-project-row__location-sub {
    color: var(--sb-muted);
    font-weight: 650;
}

.ops-dashboard .ops-chip {
    border: 1px solid rgba(14, 165, 233, .20);
    border-radius: var(--sb-inner-radius);
    background: #eff6ff;
    color: var(--sb-navy);
    font-weight: 800;
}

.ops-dashboard .ops-chip--archived {
    border-color: rgba(100, 116, 139, .20);
    background: #f1f5f9;
    color: #475569;
}

.ops-dashboard .ops-action-btn.sb-action-btn {
    min-height: 30px;
    border-radius: var(--sb-radius);
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.ops-dashboard .ops-action-btn.sb-action-btn-secondary {
    border-color: rgba(30, 58, 138, .30);
    background: #ffffff;
    color: var(--sb-navy);
    box-shadow: none;
}

.ops-dashboard .ops-action-btn.sb-action-btn-secondary:hover {
    border-color: rgba(14, 165, 233, .40);
    background: #eff6ff;
}

.ops-dashboard .ops-project-row__go {
    color: var(--sb-navy);
}

.ops-dashboard .ops-empty-state.sb-card {
    max-width: none;
    padding: 22px;
    background:
        radial-gradient(circle at 0% 0%, rgba(14, 165, 233, .08), transparent 13rem),
        #f8fbff;
}

.ops-dashboard .ops-empty-state .empty-title {
    color: var(--sb-text);
    font-weight: 950;
}

.ops-dashboard .ops-empty-state .empty-sub {
    color: var(--sb-muted);
    font-weight: 650;
}

.ops-role-panel.sb-card {
    max-width: none;
    padding: 22px;
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(248, 251, 255, .95)),
        #ffffff;
}

.ops-role-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.ops-role-panel__title {
    margin: 4px 0 6px;
    color: var(--sb-text);
    font-size: 1.05rem;
    font-weight: 950;
}

.ops-role-panel__copy,
.ops-role-panel__item p {
    margin: 0;
    color: var(--sb-muted);
    font-weight: 650;
    line-height: 1.45;
}

.ops-role-panel__pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(12, 47, 65, .08);
    color: var(--sb-navy);
    font-size: .78rem;
    font-weight: 900;
    white-space: nowrap;
}

.ops-role-panel__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.ops-role-panel__item {
    display: flex;
    min-height: 132px;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    border: 1px solid rgba(12, 47, 65, .1);
    border-radius: 12px;
    background: rgba(255, 255, 255, .86);
    color: inherit;
    text-decoration: none;
}

.ops-role-panel__item span {
    color: var(--sb-muted);
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.ops-role-panel__item strong {
    color: var(--sb-text);
    font-size: 1rem;
    font-weight: 950;
}

.ops-role-panel__item--link:hover {
    border-color: rgba(14, 99, 117, .28);
    box-shadow: 0 16px 28px rgba(12, 47, 65, .08);
    transform: translateY(-1px);
}

@media (max-width: 991.98px) {
    .ops-dashboard__hero,
    .ops-dashboard .ops-filters__header.sb-card-header,
    .ops-role-panel__header {
        flex-direction: column;
    }

    .ops-dashboard__summary {
        justify-content: flex-start;
        width: 100%;
    }

    .ops-role-panel__grid {
        grid-template-columns: 1fr;
    }

    .ops-dashboard .ops-project-row__actions {
        align-items: flex-start;
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .ops-dashboard.sb-section-shell {
        padding: 10px;
    }

    .ops-dashboard__hero,
    .ops-dashboard .ops-filters.sb-card,
    .ops-dashboard .ops-projects.sb-card,
    .ops-dashboard .ops-empty-state.sb-card {
        border-radius: 18px;
    }

    .ops-dashboard__summary-tile.sb-summary-tile {
        min-width: calc(50% - 4px);
    }

    .ops-dashboard .ops-projects__body {
        padding: 10px;
    }
}

.ops-public-orders.sb-card {
    display: grid;
    gap: 16px;
    max-width: none;
    padding: 22px;
    border-color: var(--sb-card-border);
    border-radius: var(--sb-radius);
}

.ops-public-orders__header,
.ops-public-orders__row,
.ops-public-order-detail__header,
.ops-public-order-detail__actions,
.ops-public-orders__pager {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.ops-public-orders__metrics,
.ops-public-orders__filters,
.ops-public-order-detail__grid {
    display: grid;
    gap: 12px;
}

.ops-public-orders__metrics {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.ops-public-orders__metric {
    appearance: none;
    display: grid;
    gap: 5px;
    min-height: 84px;
    padding: 14px;
    border: 1px solid rgba(14, 165, 233, .18);
    border-radius: var(--sb-inner-radius);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    color: var(--sb-text);
    text-align: left;
    cursor: pointer;
}

.ops-public-orders__metric span,
.ops-public-orders__meta,
.ops-public-order-detail__section span {
    color: var(--sb-muted);
    font-size: 12px;
    font-weight: 750;
}

.ops-public-orders__metric strong {
    font-size: 1.45rem;
    font-weight: 950;
    line-height: 1;
}

.ops-public-orders__metric--warn {
    border-color: rgba(220, 38, 38, .22);
    background: linear-gradient(180deg, #fff 0%, #fef2f2 100%);
}

.ops-public-orders__filters {
    grid-template-columns: minmax(240px, 1.3fr) minmax(190px, .7fr) auto auto;
    align-items: end;
    padding: 14px;
    border: 1px solid var(--sb-card-border);
    border-radius: var(--sb-inner-radius);
    background: #f8fbff;
}

.ops-public-orders__toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    color: #334155;
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
}

.ops-public-orders__alert,
.ops-public-orders__empty {
    padding: 13px 14px;
    border: 1px solid rgba(14, 165, 233, .22);
    border-radius: var(--sb-inner-radius);
    background: #f0f9ff;
    color: #0f3f59;
    font-weight: 750;
}

.ops-public-orders__alert--error {
    border-color: rgba(220, 38, 38, .22);
    background: #fef2f2;
    color: #991b1b;
}

.ops-public-orders__rows {
    display: grid;
    gap: 10px;
}

.ops-public-orders__row {
    padding: 14px;
    border: 1px solid var(--sb-card-border);
    border-radius: var(--sb-inner-radius);
    background: #ffffff;
}

.ops-public-orders__row:hover {
    border-color: rgba(14, 165, 233, .34);
    background: #f8fbff;
}

.ops-public-orders__row.is-archived {
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
    opacity: .92;
}

.ops-public-orders__main {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.ops-public-orders__row-top,
.ops-public-orders__meta,
.ops-public-orders__chips,
.ops-project-row__actions,
.ops-public-order-detail__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.ops-public-orders__row-top strong,
.ops-public-order-detail__header h3,
.ops-public-order-detail__section strong {
    color: var(--sb-text);
}

.ops-public-orders__address {
    color: #334155;
    font-weight: 750;
}

.ops-public-orders__error {
    padding: 8px 10px;
    border-radius: var(--sb-inner-radius);
    background: #fef2f2;
    color: #991b1b;
    font-size: 12px;
    font-weight: 750;
}

.ops-public-orders__row-side {
    display: grid;
    justify-items: end;
    gap: 10px;
    min-width: 260px;
}

.ops-public-orders__status {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 5px 9px;
    border: 1px solid rgba(14, 165, 233, .22);
    border-radius: var(--sb-inner-radius);
    background: #e0f2fe;
    color: #075985;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
}

.ops-public-orders__status--failed,
.ops-public-orders__status--rejected {
    border-color: rgba(220, 38, 38, .22);
    background: #fee2e2;
    color: #991b1b;
}

.ops-public-orders__status--converted {
    border-color: rgba(22, 163, 74, .22);
    background: #dcfce7;
    color: #166534;
}

.ops-public-orders__status--sent {
    border-color: rgba(14, 165, 233, .24);
    background: #e0f2fe;
    color: #075985;
}

.ops-public-orders__status--expired {
    border-color: rgba(245, 158, 11, .28);
    background: #fef3c7;
    color: #92400e;
}

.ops-public-orders__status--archived,
.ops-public-orders__status--duplicate {
    border-color: rgba(100, 116, 139, .22);
    background: #f1f5f9;
    color: #475569;
}

.ops-public-orders__pager {
    align-items: center;
    justify-content: flex-end;
    color: var(--sb-muted);
    font-size: 12px;
    font-weight: 850;
}

.ops-public-order-detail {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(14, 165, 233, .26);
    border-radius: var(--sb-radius);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 18px 36px rgba(15, 23, 42, .08);
}

.ops-public-order-detail__header h3 {
    margin: 8px 0 4px;
    font-size: 1.2rem;
    font-weight: 950;
}

.ops-public-order-detail__header p {
    margin: 0;
    color: var(--sb-muted);
    font-weight: 750;
}

.ops-public-order-detail__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ops-public-order-detail__section {
    display: grid;
    gap: 9px;
    padding: 14px;
    border: 1px solid var(--sb-card-border);
    border-radius: var(--sb-inner-radius);
    background: #ffffff;
}

.ops-public-order-detail__section h4,
.ops-public-order-detail__raw h4 {
    margin: 0;
    color: var(--sb-text);
    font-size: .9rem;
    font-weight: 950;
}

.ops-public-order-detail__section div {
    display: grid;
    grid-template-columns: minmax(110px, .45fr) minmax(0, 1fr);
    gap: 10px;
}

.ops-public-order-detail__section strong {
    font-weight: 750;
    overflow-wrap: anywhere;
}

.ops-public-order-detail__raw {
    padding: 14px;
    border: 1px solid var(--sb-card-border);
    border-radius: var(--sb-inner-radius);
    background: #ffffff;
}

.ops-public-order-detail__raw summary {
    color: var(--sb-text);
    font-weight: 950;
    cursor: pointer;
}

.ops-public-order-detail__raw section {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.ops-public-order-detail__raw pre {
    max-height: 260px;
    overflow: auto;
    padding: 12px;
    border-radius: var(--sb-inner-radius);
    background: #0f172a;
    color: #e2e8f0;
    font-size: 12px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

@media (max-width: 991.98px) {
    .ops-public-orders__header,
    .ops-public-orders__row,
    .ops-public-order-detail__header {
        flex-direction: column;
    }

    .ops-public-orders__metrics,
    .ops-public-orders__filters,
    .ops-public-order-detail__grid {
        grid-template-columns: 1fr;
    }

    .ops-public-orders__row-side {
        justify-items: start;
        min-width: 0;
    }
}

/* Compact employee control panel */
.ops-dashboard.sb-section-shell {
    gap: 10px;
    padding: 10px;
}

.ops-dashboard .ops-dashboard__hero.sb-gradient-header {
    align-items: center;
    padding: 14px 16px;
    min-height: auto;
}

.ops-dashboard__title {
    margin-top: 1px;
    font-size: 1.45rem;
    letter-spacing: 0;
}

.ops-dashboard__subtitle {
    margin-top: 4px;
    font-size: 12px;
}

.ops-dashboard__eyebrow {
    font-size: 10px;
    letter-spacing: 0;
}

.ops-dashboard__summary {
    gap: 7px;
}

.ops-dashboard__summary-tile.sb-summary-tile {
    min-width: 82px;
    min-height: 42px;
    padding: 8px 10px;
    border-radius: var(--sb-inner-radius);
}

.ops-dashboard__summary-tile strong {
    font-size: 1rem;
}

.ops-dashboard__summary-tile span {
    font-size: 10px;
    letter-spacing: 0;
}

.ops-kpi-strip {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
}

.ops-kpi-tile {
    display: grid;
    gap: 3px;
    min-height: 58px;
    padding: 10px 12px;
    border: 1px solid var(--sb-card-border);
    border-radius: var(--sb-inner-radius);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 8px 18px rgba(15, 23, 42, .045);
}

.ops-kpi-tile span {
    color: var(--sb-muted);
    font-size: 11px;
    font-weight: 850;
    line-height: 1.1;
}

.ops-kpi-tile strong {
    color: var(--sb-text);
    font-size: 1.15rem;
    font-weight: 950;
    line-height: 1;
}

.ops-kpi-tile--alert {
    border-color: rgba(220, 38, 38, .18);
    background: linear-gradient(180deg, #ffffff 0%, #fff7ed 100%);
}

.ops-public-orders.sb-card {
    gap: 10px;
    padding: 14px;
    border-radius: var(--sb-radius);
}

.ops-public-orders__header {
    align-items: center;
    gap: 10px;
}

.ops-public-orders .ops-role-panel__title {
    margin: 2px 0 3px;
    font-size: 1rem;
}

.ops-public-orders .ops-role-panel__copy {
    font-size: 12px;
}

.ops-public-orders .ops-role-panel__pill {
    min-height: 26px;
    padding: 5px 9px;
    font-size: 11px;
}

.ops-public-orders__metrics {
    gap: 8px;
}

.ops-public-orders__metric {
    min-height: 54px;
    padding: 9px 10px;
    gap: 2px;
    border-radius: var(--sb-inner-radius);
}

.ops-public-orders__metric span {
    font-size: 10px;
    line-height: 1.1;
}

.ops-public-orders__metric strong {
    font-size: 1.1rem;
}

.ops-public-orders__filters {
    grid-template-columns: minmax(260px, 1fr) minmax(160px, .42fr) auto auto;
    gap: 8px;
    padding: 9px;
}

.ops-public-orders__toggle {
    min-height: 34px;
    font-size: 11px;
}

.ops-public-orders .ops-field span,
.ops-dashboard .ops-field span {
    font-size: 11px;
    line-height: 1.1;
}

.ops-public-orders .ops-field .form-control,
.ops-public-orders .ops-field .form-select,
.ops-dashboard .ops-field .form-control,
.ops-dashboard .ops-field .form-select {
    min-height: 34px;
    padding-top: 6px;
    padding-bottom: 6px;
    font-size: 12px;
}

.ops-public-orders__rows {
    gap: 6px;
}

.ops-public-orders__row {
    align-items: center;
    padding: 9px 10px;
    gap: 10px;
}

.ops-public-orders__main {
    gap: 4px;
}

.ops-public-orders__row-top strong {
    font-size: .9rem;
    line-height: 1.2;
}

.ops-public-orders__address {
    font-size: 12px;
    line-height: 1.2;
}

.ops-public-orders__meta {
    gap: 7px;
    font-size: 11px;
    line-height: 1.2;
}

.ops-public-orders__error {
    padding: 5px 7px;
    font-size: 11px;
}

.ops-public-orders__row-side {
    gap: 6px;
    min-width: 300px;
}

.ops-public-orders__chips,
.ops-public-orders .ops-project-row__actions {
    justify-content: flex-end;
    gap: 5px;
}

.ops-public-orders__status {
    min-height: 22px;
    padding: 4px 7px;
    font-size: 10px;
}

.ops-public-orders__pager {
    padding-top: 2px;
    font-size: 11px;
}

.ops-public-order-detail {
    gap: 10px;
    padding: 12px;
}

.ops-public-order-detail__grid {
    gap: 8px;
}

.ops-public-order-detail__section {
    gap: 6px;
    padding: 10px;
}

.ops-public-order-detail__section div {
    grid-template-columns: minmax(100px, .4fr) minmax(0, 1fr);
    gap: 8px;
}

.ops-dashboard .ops-filters.sb-card {
    padding: 10px 12px;
}

.ops-dashboard .ops-filters__header.sb-card-header {
    align-items: center;
    margin: 0 0 8px;
    padding: 0;
    border-bottom: 0;
    background: transparent;
}

.ops-dashboard .ops-filters__title {
    margin-top: 1px;
    font-size: 1rem;
}

.ops-filters__grid {
    gap: 8px;
}

.ops-dashboard .ops-projects.sb-card {
    border-radius: var(--sb-radius);
}

.ops-dashboard .ops-projects__head {
    padding: 8px 12px;
    font-size: 10px;
    letter-spacing: 0;
}

.ops-dashboard .ops-projects__body {
    gap: 6px;
    padding: 8px;
}

.ops-dashboard .ops-project-row {
    grid-template-columns: minmax(0, 2.1fr) minmax(120px, .82fr) minmax(110px, .72fr) minmax(126px, auto);
    gap: 10px;
    align-items: center;
    padding: 9px 10px;
    box-shadow: none;
}

.ops-dashboard .ops-project-row:hover {
    box-shadow: 0 8px 18px rgba(15, 23, 42, .055);
    transform: none;
}

.ops-dashboard .ops-project-row__title {
    font-size: .92rem;
    line-height: 1.2;
}

.ops-dashboard .ops-project-row__meta {
    gap: 5px;
    margin-top: 5px;
}

.ops-dashboard .ops-project-row__location,
.ops-dashboard .ops-project-row__updated {
    font-size: 12px;
    line-height: 1.25;
}

.ops-dashboard .ops-project-row__location-sub {
    font-size: 11px;
}

.ops-dashboard .ops-chip {
    min-height: 22px;
    padding: 3px 7px;
    font-size: 10px;
}

.ops-dashboard .ops-action-btn.sb-action-btn {
    min-height: 27px;
    padding: 4px 8px;
    font-size: 11px;
}

.ops-dashboard .ops-project-row__actions {
    justify-content: flex-end;
    gap: 6px;
}

.ops-dashboard .ops-project-row__go {
    font-size: 12px;
    font-weight: 850;
}

.ops-dashboard .ops-callout {
    padding: 8px 10px;
    font-size: 12px;
}

.ops-dashboard .ops-empty-state.sb-card {
    padding: 14px;
}

@media (max-width: 1180px) {
    .ops-kpi-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .ops-public-orders__row {
        align-items: flex-start;
    }

    .ops-public-orders__chips,
    .ops-public-orders .ops-project-row__actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .ops-kpi-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ops-dashboard__summary-tile.sb-summary-tile {
        min-width: calc(33.33% - 5px);
    }
}

/* Public intake queue polish */
.ops-public-orders__row {
    padding: 8px 10px;
}

.ops-public-orders__row-side {
    min-width: 250px;
}

.ops-public-orders .ops-project-row__actions {
    gap: 4px;
}

.ops-public-order-detail {
    gap: 8px;
    padding: 10px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .07);
}

.ops-public-order-detail__header {
    align-items: center;
    gap: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--sb-card-border);
}

.ops-public-order-detail__summary {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.ops-public-order-detail__header h3 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.18;
}

.ops-public-order-detail__header p {
    font-size: 12px;
    line-height: 1.25;
}

.ops-public-order-detail__actions {
    justify-content: flex-end;
    gap: 5px;
}

.ops-public-order-detail__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

.ops-public-order-detail__section {
    gap: 5px;
    padding: 8px;
}

.ops-public-order-detail__section h4,
.ops-public-order-detail__raw h4 {
    font-size: .78rem;
    line-height: 1.15;
}

.ops-public-order-detail__section div {
    grid-template-columns: minmax(86px, .38fr) minmax(0, 1fr);
    gap: 6px;
    align-items: baseline;
}

.ops-public-order-detail__section span {
    font-size: 10px;
    line-height: 1.2;
}

.ops-public-order-detail__section strong {
    font-size: 11px;
    line-height: 1.25;
}

.ops-public-order-detail__section strong.is-empty,
.ops-public-order-detail__empty {
    color: var(--sb-muted);
    font-weight: 650;
}

.ops-public-order-detail__empty {
    margin: 0;
    font-size: 11px;
}

.ops-public-order-detail__raw {
    padding: 9px;
}

.ops-public-order-detail__raw section {
    gap: 5px;
    margin-top: 9px;
}

.ops-public-order-detail__raw pre {
    max-height: 180px;
    padding: 9px;
    font-size: 11px;
    line-height: 1.35;
}

@media (max-width: 1180px) {
    .ops-public-order-detail__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .ops-public-order-detail__actions {
        justify-content: flex-start;
    }

    .ops-public-order-detail__grid {
        grid-template-columns: 1fr;
    }
}

/* Public intake right-side inspector */
.ops-public-order-inspector__scrim {
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(15, 23, 42, .10);
    backdrop-filter: blur(1px);
}

.ops-public-order-inspector {
    position: fixed;
    top: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 1041;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: clamp(420px, 34vw, 520px);
    max-width: calc(100vw - 24px);
    overflow: hidden;
    border: 1px solid rgba(14, 165, 233, .24);
    border-radius: var(--sb-radius);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 22px 48px rgba(15, 23, 42, .18);
}

.ops-public-order-inspector .ops-public-order-detail__header {
    position: sticky;
    top: 0;
    z-index: 1;
    align-items: flex-start;
    padding: 11px 12px 9px;
    border-bottom: 1px solid var(--sb-card-border);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.ops-public-order-inspector .ops-public-order-detail__summary {
    gap: 4px;
}

.ops-public-order-inspector .ops-public-order-detail__header h3 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.16;
}

.ops-public-order-inspector .ops-public-order-detail__header p,
.ops-public-order-detail__submitted {
    margin: 0;
    color: var(--sb-muted);
    font-size: 11px;
    font-weight: 750;
    line-height: 1.25;
}

.ops-public-order-inspector .ops-public-order-detail__actions {
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
}

.ops-public-order-inspector__body {
    display: grid;
    align-content: start;
    gap: 8px;
    min-height: 0;
    overflow: auto;
    padding: 10px;
}

.ops-public-order-detail__stack {
    display: grid;
    gap: 7px;
}

.ops-public-order-detail__warning {
    display: grid;
    gap: 4px;
    padding: 8px 9px;
    border: 1px solid rgba(220, 38, 38, .20);
    border-radius: var(--sb-inner-radius);
    background: #fef2f2;
    color: #991b1b;
}

.ops-public-order-detail__warning strong {
    font-size: 12px;
    font-weight: 950;
    line-height: 1.15;
}

.ops-public-order-detail__warning span {
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.ops-public-order-inspector .ops-public-order-detail__section {
    display: block;
    padding: 0;
    border: 1px solid var(--sb-card-border);
    border-radius: var(--sb-inner-radius);
    background: #ffffff;
    overflow: hidden;
}

.ops-public-order-inspector .ops-public-order-detail__section summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 9px;
    cursor: pointer;
    list-style: none;
}

.ops-public-order-inspector .ops-public-order-detail__section summary::-webkit-details-marker {
    display: none;
}

.ops-public-order-inspector .ops-public-order-detail__section summary span {
    color: var(--sb-text);
    font-size: 12px;
    font-weight: 950;
    line-height: 1.15;
}

.ops-public-order-inspector .ops-public-order-detail__section summary small {
    color: var(--sb-muted);
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.ops-public-order-inspector .ops-public-order-detail__section[open] summary {
    border-bottom: 1px solid var(--sb-card-border);
    background: #f8fbff;
}

.ops-public-order-inspector .ops-public-order-detail__section div {
    display: grid;
    grid-template-columns: minmax(92px, .42fr) minmax(0, 1fr);
    gap: 8px;
    align-items: baseline;
    padding: 6px 9px;
}

.ops-public-order-inspector .ops-public-order-detail__section div + div {
    border-top: 1px solid rgba(15, 23, 42, .055);
}

.ops-public-order-inspector .ops-public-order-detail__section span {
    color: var(--sb-muted);
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
}

.ops-public-order-inspector .ops-public-order-detail__section strong {
    color: var(--sb-text);
    font-size: 11px;
    font-weight: 750;
    line-height: 1.28;
    overflow-wrap: anywhere;
}

.ops-public-order-invitation__hero,
.ops-public-order-invitation__actions,
.ops-public-order-invitation__form-actions {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap;
    gap: 6px !important;
}

.ops-public-order-invitation__note {
    color: #92400e !important;
    font-size: 10px !important;
    font-weight: 900 !important;
}

.ops-public-order-invitation__send-error {
    border-top: 1px solid rgba(220, 38, 38, .12) !important;
    background: #fef2f2;
}

.ops-public-order-invitation__send-error strong {
    color: #991b1b !important;
}

.ops-public-order-invitation__actions {
    padding: 8px 9px !important;
    border-top: 1px solid rgba(15, 23, 42, .055);
    background: #f8fbff;
}

.ops-public-order-invitation__form {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    padding: 9px !important;
    border-top: 1px solid var(--sb-card-border);
    background: #f8fbff;
}

.ops-public-order-invitation__form .ops-field {
    display: grid;
    gap: 4px;
}

.ops-public-order-invitation__form p {
    margin: 0;
    color: var(--sb-muted);
    font-size: 10px;
    font-weight: 750;
    line-height: 1.3;
}

.ops-chip--invite-sent {
    border-color: rgba(14, 165, 233, .20);
    background: #e0f2fe;
    color: #075985;
}

.ops-chip--invite-accepted {
    border-color: rgba(22, 163, 74, .22);
    background: #dcfce7;
    color: #166534;
}

.ops-chip--invite-failed {
    border-color: rgba(220, 38, 38, .22);
    background: #fee2e2;
    color: #991b1b;
}

.ops-chip--invite-expired {
    border-color: rgba(245, 158, 11, .28);
    background: #fef3c7;
    color: #92400e;
}

.ops-public-order-inspector .ops-public-order-detail__section strong.is-empty,
.ops-public-order-inspector .ops-public-order-detail__empty {
    color: var(--sb-muted);
    font-weight: 650;
}

.ops-public-order-inspector .ops-public-order-detail__empty {
    margin: 0;
    padding: 7px 9px;
    font-size: 11px;
}

.ops-public-order-inspector .ops-public-order-detail__raw {
    padding: 0;
    border: 1px solid var(--sb-card-border);
    border-radius: var(--sb-inner-radius);
    background: #ffffff;
    overflow: hidden;
}

.ops-public-order-inspector .ops-public-order-detail__raw summary {
    padding: 8px 9px;
    color: var(--sb-text);
    font-size: 12px;
    font-weight: 950;
}

.ops-public-order-inspector .ops-public-order-detail__raw section {
    gap: 5px;
    margin-top: 0;
    padding: 8px 9px;
    border-top: 1px solid var(--sb-card-border);
}

.ops-public-order-inspector .ops-public-order-detail__raw pre {
    max-height: 220px;
    margin: 0;
    padding: 8px;
    font-size: 10px;
    line-height: 1.35;
}

@media (max-width: 640px) {
    .ops-public-order-inspector {
        inset: 0;
        width: 100vw;
        max-width: none;
        border-radius: 0;
        border-left: 0;
        border-right: 0;
    }

    .ops-public-order-inspector .ops-public-order-detail__header {
        flex-direction: column;
    }

    .ops-public-order-inspector .ops-public-order-detail__actions {
        justify-content: flex-start;
        width: 100%;
    }

    .ops-public-order-inspector .ops-public-order-detail__section div {
        grid-template-columns: minmax(82px, .38fr) minmax(0, 1fr);
    }
}

/* Employee operations two-column layout */
.ops-workgrid,
.ops-workgrid__projects {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.ops-workgrid__intake,
.ops-workgrid__projects {
    min-width: 0;
}

.ops-workgrid--projects-only {
    grid-template-columns: 1fr;
}

@media (min-width: 1200px) {
    .ops-workgrid--with-intake {
        grid-template-columns: minmax(420px, .9fr) minmax(560px, 1.2fr);
        align-items: stretch;
        height: max(440px, calc(100vh - 235px));
        max-height: calc(100vh - 235px);
        min-height: 0;
        overflow: hidden;
    }

    .ops-workgrid--with-intake .ops-workgrid__intake,
    .ops-workgrid--with-intake .ops-workgrid__projects {
        height: 100%;
        min-height: 0;
        overflow: hidden;
    }
}

.ops-workgrid__intake .ops-public-orders.sb-card {
    min-height: 0;
}

.ops-workgrid__intake .ops-public-orders .ops-role-panel__copy {
    display: none;
}

.ops-workgrid__intake .ops-public-orders__metrics {
    gap: 6px;
}

.ops-workgrid__intake .ops-public-orders__metric {
    min-height: 48px;
    padding: 7px 8px;
}

.ops-workgrid__intake .ops-public-orders__metric strong {
    font-size: 1rem;
}

.ops-workgrid__intake .ops-public-orders__filters {
    grid-template-columns: minmax(0, 1fr) minmax(128px, .52fr);
    align-items: end;
}

.ops-workgrid__intake .ops-public-orders__toggle {
    min-height: 28px;
}

.ops-workgrid__intake .ops-public-orders__row {
    align-items: flex-start;
    flex-direction: column;
}

.ops-workgrid__intake .ops-public-orders__row-side {
    width: 100%;
    min-width: 0;
    justify-items: start;
}

.ops-workgrid__intake .ops-public-orders__chips,
.ops-workgrid__intake .ops-public-orders .ops-project-row__actions {
    justify-content: flex-start;
}

.ops-workgrid__intake .ops-public-orders .ops-project-row__actions {
    max-width: 100%;
}

.ops-workgrid__projects .ops-filters__grid {
    grid-template-columns: minmax(240px, 1.25fr) minmax(110px, .45fr) minmax(150px, .62fr);
}

.ops-workgrid__projects .ops-projects__head,
.ops-workgrid__projects .ops-project-row {
    grid-template-columns: minmax(0, 2.05fr) minmax(104px, .62fr) minmax(96px, .56fr) minmax(112px, auto);
}

@media (min-width: 1200px) {
    .ops-workgrid__intake .ops-public-orders.sb-card {
        display: flex;
        flex-direction: column;
        height: 100%;
        max-height: 100%;
        overflow: hidden;
    }

    .ops-workgrid__intake .ops-public-orders__header,
    .ops-workgrid__intake .ops-public-orders__metrics,
    .ops-workgrid__intake .ops-public-orders__filters,
    .ops-workgrid__intake .ops-public-orders__alert,
    .ops-workgrid__intake .ops-public-orders__empty,
    .ops-workgrid__intake .ops-public-orders__pager {
        flex: 0 0 auto;
    }

    .ops-workgrid__intake .ops-public-orders__rows {
        flex: 1 1 auto;
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        padding-right: 4px;
        scrollbar-gutter: stable;
    }

    .ops-workgrid__projects {
        display: flex;
        flex-direction: column;
    }

    .ops-workgrid__projects .ops-filters,
    .ops-workgrid__projects .ops-callout {
        flex: 0 0 auto;
    }

    .ops-workgrid__projects .ops-projects.sb-card {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        min-height: 0;
        overflow: hidden;
    }

    .ops-workgrid__projects .ops-projects__head {
        flex: 0 0 auto;
    }

    .ops-workgrid__projects .ops-projects__body {
        flex: 1 1 auto;
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        padding-right: 10px;
        scrollbar-gutter: stable;
    }

    .ops-workgrid__intake .ops-public-orders__rows,
    .ops-workgrid__projects .ops-projects__body {
        scrollbar-color: rgba(30, 58, 138, .35) transparent;
        scrollbar-width: thin;
    }

    .ops-workgrid__intake .ops-public-orders__rows::-webkit-scrollbar,
    .ops-workgrid__projects .ops-projects__body::-webkit-scrollbar {
        width: 8px;
    }

    .ops-workgrid__intake .ops-public-orders__rows::-webkit-scrollbar-thumb,
    .ops-workgrid__projects .ops-projects__body::-webkit-scrollbar-thumb {
        border: 2px solid transparent;
        border-radius: 999px;
        background: rgba(30, 58, 138, .28);
        background-clip: padding-box;
    }

    .ops-workgrid__intake .ops-public-orders__rows::-webkit-scrollbar-track,
    .ops-workgrid__projects .ops-projects__body::-webkit-scrollbar-track {
        background: transparent;
    }
}

@media (max-width: 1199.98px) {
    .ops-workgrid--with-intake {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .ops-workgrid__projects .ops-filters__grid,
    .ops-workgrid__intake .ops-public-orders__filters {
        grid-template-columns: 1fr;
    }

    .ops-workgrid__projects .ops-projects__head {
        display: none;
    }

    .ops-workgrid__projects .ops-project-row {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }

    .ops-workgrid__projects .ops-project-row__actions {
        justify-content: flex-start;
    }
}
