html,
body {
    background: #f6f7f9;
    color: #1c2430;
    font-family: "OpenSansRegular", "Segoe UI", Arial, sans-serif;
}

button,
input,
select,
textarea {
    font: inherit;
}

.page {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    background: #17202b;
    color: #f8fafc;
    padding: 24px 18px;
}

.content {
    padding: 24px;
}

.brand-block {
    align-items: center;
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
}

.brand-block span {
    color: #9fb0c3;
    display: block;
    font-size: 0.8rem;
}

.brand-mark {
    align-items: center;
    background: #2ad4a4;
    border-radius: 8px;
    color: #102018;
    display: flex;
    font-weight: 800;
    height: 40px;
    justify-content: center;
    width: 40px;
}

.nav-stack {
    display: grid;
    gap: 8px;
}

.nav-link {
    align-items: center;
    border-radius: 8px;
    color: #d6dee9;
    display: flex;
    gap: 10px;
    padding: 10px 12px;
    text-decoration: none;
}

.nav-link.active,
.nav-link:hover {
    background: #243244;
    color: #ffffff;
}

.nav-glyph {
    align-items: center;
    border: 1px solid #526174;
    border-radius: 6px;
    display: inline-flex;
    font-size: 0.75rem;
    height: 22px;
    justify-content: center;
    width: 22px;
}

.workspace-shell {
    display: grid;
    gap: 20px;
}

.workspace-header,
.panel-header,
.workspace-actions,
.detail-heading {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.workspace-header h1,
.panel h2,
.panel h3 {
    margin: 0;
}

.workspace-header h1 {
    font-size: 1.85rem;
    font-weight: 800;
}

.eyebrow {
    color: #687589;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0;
    margin: 0 0 4px;
    text-transform: uppercase;
}

.workspace-actions {
    min-width: 320px;
}

.metric-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric,
.panel,
.empty-state,
.alert {
    background: #ffffff;
    border: 1px solid #dfe4ea;
    border-radius: 8px;
}

.metric {
    display: grid;
    gap: 8px;
    padding: 16px;
}

.metric span,
.panel-header span,
.list-item span,
.detail-grid span,
.muted {
    color: #687589;
    font-size: 0.84rem;
}

.metric strong {
    font-size: 1.55rem;
}

.workspace-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
}

.panel {
    min-width: 0;
    padding: 16px;
}

.panel-header {
    margin-bottom: 14px;
}

.compact {
    margin-bottom: 8px;
}

.quick-create,
.inline-create,
.product-stack,
.section-split,
.next-actions {
    display: grid;
    gap: 10px;
}

.quick-create {
    border-bottom: 1px solid #edf0f4;
    margin-bottom: 12px;
    padding-bottom: 14px;
}

.product-row {
    align-items: center;
    background: #fbfcfd;
    border: 1px solid #e3e8ee;
    border-radius: 8px;
    color: #1c2430;
    display: flex;
    justify-content: space-between;
    min-height: 64px;
    padding: 12px;
    text-align: left;
    width: 100%;
}

.product-row.active,
.product-row:hover {
    background: #eef8f4;
    border-color: #9bdcc7;
}

.product-row small {
    color: #687589;
    display: block;
    margin-top: 3px;
}

.stage-pill {
    background: #e8eef6;
    border-radius: 999px;
    color: #2d4058;
    display: inline-flex;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 5px 9px;
    white-space: nowrap;
}

.product-detail {
    min-height: 560px;
}

.detail-heading p {
    color: #687589;
    margin: 6px 0 0;
    max-width: 680px;
}

.detail-grid,
.section-split {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 16px;
}

.detail-grid > div {
    background: #f6f8fa;
    border-radius: 8px;
    display: grid;
    gap: 4px;
    min-height: 70px;
    padding: 12px;
}

.list-item {
    background: #fbfcfd;
    border: 1px solid #e6ebf0;
    border-radius: 8px;
    display: grid;
    gap: 4px;
    padding: 11px;
}

.review-workspace {
    border-bottom: 1px solid #edf0f4;
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
}

.review-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
}

.review-items,
.review-detail,
.review-summary,
.quality-gates,
.report-links,
.review-actions {
    display: grid;
    gap: 10px;
}

.review-item {
    background: #fbfcfd;
    border: 1px solid #e6ebf0;
    border-radius: 8px;
    color: #1c2430;
    display: grid;
    gap: 4px;
    min-height: 58px;
    padding: 11px;
    text-align: left;
}

.review-item.active,
.review-item:hover {
    background: #f4f7fb;
    border-color: #9fb4ce;
}

.review-item span,
.review-heading span,
.review-summary span,
.review-copy,
.quality-gates span,
.review-action-status {
    color: #687589;
    font-size: 0.84rem;
}

.review-heading,
.review-summary,
.review-actions {
    align-items: center;
    display: grid;
}

.review-heading {
    grid-template-columns: minmax(0, 1fr) auto;
}

.review-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.review-summary > div {
    background: #f6f8fa;
    border-radius: 8px;
    display: grid;
    gap: 4px;
    min-height: 62px;
    padding: 10px;
}

.score-pill {
    align-items: center;
    background: #1f7a5f;
    border-radius: 999px;
    color: #ffffff;
    display: inline-flex;
    font-weight: 800;
    height: 36px;
    justify-content: center;
    min-width: 36px;
    padding: 0 10px;
}

.quality-gates {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.quality-gates span {
    background: #eef8f4;
    border: 1px solid #bfe6d9;
    border-radius: 8px;
    padding: 8px 10px;
}

.artifact-gallery {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
}

.artifact-gallery a,
.report-links a {
    color: #1c536f;
    text-decoration: none;
}

.artifact-gallery a {
    display: grid;
    gap: 6px;
}

.artifact-gallery img,
.comparison-strip img {
    aspect-ratio: 16 / 10;
    background: #edf0f4;
    border: 1px solid #dfe4ea;
    border-radius: 8px;
    object-fit: cover;
    width: 100%;
}

.artifact-gallery span {
    color: #687589;
    font-size: 0.78rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recording-list video {
    background: #17202b;
    border-radius: 8px;
    max-height: 320px;
    width: 100%;
}

.report-links {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.report-links a {
    background: #f6f8fa;
    border: 1px solid #e6ebf0;
    border-radius: 8px;
    padding: 10px;
}

.comparison-strip {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr);
}

.comparison-strip span {
    color: #687589;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.review-actions {
    grid-template-columns: auto minmax(180px, 1fr) auto;
}

.empty-state,
.empty-inline,
.loading-state {
    color: #687589;
    padding: 28px;
    text-align: center;
}

.alert {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
}

#blazor-error-ui {
    background: #fff3cd;
    bottom: 0;
    display: none;
    left: 0;
    padding: 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

@media (max-width: 960px) {
    .page,
    .workspace-grid,
    .metric-grid,
    .detail-grid,
    .section-split,
    .review-grid,
    .review-summary,
    .review-actions,
    .comparison-strip {
        grid-template-columns: 1fr;
    }

    .sidebar {
        padding: 16px;
    }

    .workspace-header,
    .workspace-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .workspace-actions {
        min-width: 0;
    }
}
