* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #1a1a2e;
    color: #e0e0e0;
    min-height: 100vh;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: #16213e;
    border-bottom: 1px solid #0f3460;
}

.nav-brand {
    font-size: 1.2rem;
    font-weight: 700;
    color: #e94560;
    text-decoration: none;
}

.nav-brand:hover { color: #ff6b81; }

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 4px;
}

.nav-toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: #a0a0b0;
    border-radius: 1px;
    transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle-active .nav-toggle-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle-active .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle-active .nav-toggle-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav-links a {
    color: #a0a0b0;
    text-decoration: none;
    margin-left: 1.5rem;
    transition: color 0.2s;
}

.nav-links a:hover { color: #fff; }

.nav-link.active {
    color: #e94560;
    font-weight: 600;
}

main { padding: 2rem; max-width: 1400px; margin: 0 auto; }

h2 { margin-bottom: 1.5rem; color: #fff; }
h3 { margin-bottom: 1rem; color: #ccc; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.card {
    background: #16213e;
    border-radius: 8px;
    padding: 1.5rem;
    border-left: 3px solid #0f3460;
}

.card-accent { border-left-color: #e94560; }

.card-value {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.25rem;
}

.card-label {
    font-size: 0.85rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Login */
.login-container {
    max-width: 400px;
    margin: 10vh auto;
    text-align: center;
}

.login-container h1 {
    font-size: 2rem;
    color: #e94560;
    margin-bottom: 0.25rem;
}

.subtitle { color: #888; margin-bottom: 2rem; }

.login-container form {
    background: #16213e;
    padding: 2rem;
    border-radius: 8px;
    text-align: left;
}

.login-container label {
    display: block;
    margin-bottom: 0.3rem;
    color: #aaa;
    font-size: 0.85rem;
}

.login-container input {
    width: 100%;
    padding: 0.6rem;
    margin-bottom: 1rem;
    border: 1px solid #0f3460;
    border-radius: 4px;
    background: #1a1a2e;
    color: #e0e0e0;
    font-size: 1rem;
}

.login-container input:focus { outline: none; border-color: #e94560; }

.login-container button {
    width: 100%;
    padding: 0.7rem;
    background: #e94560;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.login-container button:hover { background: #c73750; }

.error {
    background: #3d1420;
    border: 1px solid #e94560;
    padding: 0.6rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    color: #ff8a9e;
}

/* Upload */
.upload-container { max-width: 700px; margin: 0 auto; }

.drop-zone {
    border: 2px dashed #0f3460;
    border-radius: 8px;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: #e94560;
    background: rgba(233, 69, 96, 0.05);
}

.drop-zone p { color: #888; margin: 0.3rem 0; }
.drop-zone input[type="file"] { margin-top: 0.5rem; }

.progress-container {
    margin-top: 1.5rem;
    background: #16213e;
    padding: 1.5rem;
    border-radius: 8px;
}

.file-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
}

.progress-bar {
    height: 24px;
    background: #0f3460;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #e94560;
    width: 0%;
    transition: width 0.3s;
    border-radius: 4px;
}

.status-text {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #aaa;
}

/* Dashboard Table */
.dashboard-container { width: 100%; }

.empty-state { text-align: center; padding: 3rem; color: #888; }
.empty-state a { color: #e94560; }

table {
    width: 100%;
    border-collapse: collapse;
    background: #16213e;
    border-radius: 8px;
    overflow: hidden;
}

thead { background: #0f3460; }

th, td { padding: 0.8rem 1rem; text-align: left; }

th {
    color: #aaa;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

tr { border-bottom: 1px solid #1a1a2e; }
tr:last-child { border-bottom: none; }

.status-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-pending { background: #2a2a4a; color: #aaa; }
.status-encoding { background: #1a3a5c; color: #5dade2; }
.status-validating { background: #2a2a4a; color: #f0c040; }
.status-completed { background: #1a3c2a; color: #58d68d; }
.status-optimal { background: #1a3040; color: #5dade2; }
.status-failed { background: #3d1420; color: #ff8a9e; }
.status-unimprovable { background: #3a2a10; color: #f0c040; }
.status-created { background: #2a2a4a; color: #aaa; }
.status-processing { background: #1a3a5c; color: #5dade2; }
.status-partial { background: #3a2a10; color: #f0c040; }

.btn-filter {
    padding: 0.3rem 0.8rem;
    border: 1px solid #333;
    border-radius: 4px;
    background: #16213e;
    color: #aaa;
    cursor: pointer;
    font-size: 0.82rem;
    transition: all 0.15s;
}
.btn-filter:hover { border-color: #5dade2; color: #fff; }
.btn-filter.active { background: #1a3a5c; color: #5dade2; border-color: #5dade2; }

.status-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    padding: 0.75rem 1rem;
    margin-top: 1rem;
    background: #16213e;
    border-radius: 6px;
    font-size: 0.82rem;
    color: #8899aa;
}
.status-legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.status-legend-item .status-badge {
    font-size: 0.75rem;
    padding: 0.1rem 0.4rem;
}

td .progress-bar { height: 16px; }

/* Validation badges */
.validation-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
}

.validation-passed { background: #1a3c2a; color: #58d68d; }
.validation-failed { background: #3d1420; color: #ff8a9e; }
.validation-running { background: #2a2a4a; color: #f0c040; }
.validation-pending { background: #2a2a4a; color: #888; }

/* VMAF score colors */
.vmaf-good { color: #58d68d; }
.vmaf-ok { color: #f0c040; }
.vmaf-bad { color: #ff8a9e; }

/* Buttons */
.btn {
    padding: 0.3rem 0.7rem;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8rem;
    text-decoration: none;
    display: inline-block;
}

.btn-download { background: #1a3c2a; color: #58d68d; }
.btn-download:hover { background: #245a3a; }
.btn-delete { background: #3d1420; color: #ff8a9e; }
.btn-delete:hover { background: #5a1a2a; }

/* Clickable filename */
.job-link {
    color: #5dade2;
    text-decoration: none;
    cursor: pointer;
}
.job-link:hover { text-decoration: underline; }

/* Job Detail Page */
.detail-container { max-width: 1000px; margin: 0 auto; }

.back-link {
    color: #888;
    text-decoration: none;
    font-size: 0.85rem;
    display: inline-block;
    margin-bottom: 1rem;
}
.back-link:hover { color: #e94560; }

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.detail-section {
    background: #16213e;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.detail-table {
    width: 100%;
    background: transparent;
}

.detail-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #1a1a2e;
}

.detail-table td:first-child {
    color: #888;
    width: 40%;
    font-size: 0.85rem;
}

/* Quality hero */
.quality-section { text-align: center; }

.quality-hero { margin: 1.5rem 0; }

.vmaf-large {
    font-size: 4rem;
    font-weight: 700;
}

.vmaf-label {
    font-size: 0.85rem;
    color: #888;
    text-transform: uppercase;
    margin-top: -0.5rem;
}

.quality-metrics {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 1.5rem 0;
}

.metric-item { text-align: center; }
.metric-value { font-size: 1.5rem; font-weight: 600; color: #fff; }
.metric-label { font-size: 0.75rem; color: #888; text-transform: uppercase; }

.quality-verdict {
    background: #1a1a2e;
    border-radius: 6px;
    padding: 1rem 1.5rem;
    margin-top: 1.5rem;
    text-align: left;
    font-size: 0.95rem;
    line-height: 1.6;
    border-left: 3px solid #0f3460;
}

.verdict-good { border-left-color: #58d68d; }
.verdict-warning { border-left-color: #f0c040; }
.verdict-bad { border-left-color: #ff8a9e; }

/* Validation checklist */
.validation-table td:nth-child(2) { font-weight: 600; }
.check-pass { color: #58d68d; }
.check-fail { color: #ff8a9e; }

/* Analytics */
.analytics-container { width: 100%; }

.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.chart-container {
    background: #16213e;
    border-radius: 8px;
    padding: 1.5rem;
}

.chart-container canvas {
    max-height: 300px;
}

/* Page header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.page-header h2 { margin-bottom: 0.25rem; }

.page-subtitle {
    color: #888;
    font-size: 0.9rem;
}

.btn-primary {
    background: #e94560;
    color: #fff;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-primary:hover { background: #c73750; }

/* Workflow diagram */
.workflow-diagram {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.workflow-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e94560;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.step-title {
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.25rem;
}

.step-desc {
    color: #aaa;
    font-size: 0.85rem;
    line-height: 1.4;
}

.workflow-arrow {
    width: 2px;
    height: 12px;
    background: #0f3460;
    margin-left: 15px;
}

/* Source cards */
.source-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.source-card {
    background: #1a1a2e;
    border-radius: 6px;
    padding: 1.25rem;
    border: 1px solid #0f3460;
    opacity: 0.6;
}

.source-card-active {
    opacity: 1;
    border-color: #e94560;
}

.source-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.source-title {
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
}

.source-desc {
    color: #aaa;
    font-size: 0.8rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.source-status {
    font-size: 0.75rem;
    color: #666;
    font-style: italic;
}

.source-active {
    color: #58d68d;
    font-style: normal;
    font-weight: 600;
}

/* Comparison table */
.detail-table th {
    color: #aaa;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    padding: 0.6rem 0.75rem;
    background: #0f3460;
}

/* Conversion Certificate */
.certificate-container { max-width: 1000px; margin: 0 auto; }

/* Attempt selector */
.attempt-selector {
    margin: 1rem 0 0.5rem;
}

.attempt-tabs {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.attempt-tab {
    padding: 0.4rem 1rem;
    border: 1px solid #0f3460;
    border-radius: 4px;
    background: #0a1628;
    color: #888;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.attempt-tab:hover { border-color: #00d4ff; color: #ccc; }
.attempt-tab.active { background: #0f3460; color: #fff; border-color: #00d4ff; }
.attempt-tab.attempt-passed::before { content: '\2713 '; color: #58d68d; }
.attempt-tab.attempt-failed::before { content: '\2717 '; color: #e94560; }

.cert-header {
    text-align: center;
    margin-bottom: 2rem;
}

.cert-badge {
    display: inline-block;
    padding: 0.3rem 1rem;
    background: #0f3460;
    color: #5dade2;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    border-radius: 3px;
    margin-bottom: 0.75rem;
}

.cert-id {
    color: #666;
    font-family: monospace;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.cert-outcome {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.cert-outcome.outcome-passed {
    background: #1a3c2a;
    border: 1px solid #58d68d;
}

.cert-outcome.outcome-failed {
    background: #3d1420;
    border: 1px solid #ff8a9e;
}

.outcome-icon { font-size: 2rem; }
.outcome-text { font-size: 1.1rem; font-weight: 600; }

/* Lifecycle */
.lifecycle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.lifecycle-stage { text-align: center; flex: 0 0 auto; }

.stage-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #58d68d;
    margin: 0 auto 0.5rem;
}

.stage-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #fff;
}

.stage-time {
    font-size: 0.75rem;
    color: #888;
    margin-top: 0.2rem;
}

.lifecycle-line {
    flex: 1;
    height: 2px;
    background: #58d68d;
    margin: 0 0.5rem;
    margin-bottom: 2rem;
}

/* Comparison grid */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: start;
}

.comparison-header {
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #0f3460;
}

.comparison-arrow {
    font-size: 2rem;
    color: #e94560;
    align-self: center;
    padding-top: 1.5rem;
}

/* Frame comparisons */
.frame-comparison {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #0f3460;
}

.frame-comparison:last-child { border-bottom: none; }

.frame-label {
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.frame-timestamp {
    color: #888;
    font-size: 0.8rem;
    font-weight: normal;
}

/* Before/After comparison slider */
.compare-slider {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid #0f3460;
    cursor: col-resize;
    user-select: none;
    -webkit-user-select: none;
}

.compare-slider img {
    display: block;
    width: 100%;
    pointer-events: none;
}

.compare-overlay {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 50%;
    overflow: hidden;
}

.compare-overlay img {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    max-width: none;
}

.compare-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    background: #00d4ff;
    transform: translateX(-50%);
    z-index: 2;
    pointer-events: none;
}

.compare-handle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    background: #00d4ff;
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.5);
}

.compare-handle::after {
    content: '\25C0  \25B6';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #0a1628;
    font-size: 11px;
    font-weight: 700;
    z-index: 3;
    white-space: nowrap;
    letter-spacing: 2px;
}

.compare-label {
    position: absolute;
    bottom: 0.6rem;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 0, 0, 0.7);
    color: #ccc;
    font-size: 0.75rem;
    border-radius: 3px;
    z-index: 3;
    pointer-events: none;
}

.compare-label-left {
    left: 0.6rem;
}

.compare-label-right {
    right: 0.6rem;
}

.compare-slider:not(.lightbox-compare-slider)::after {
    content: '\26F6';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.1rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    pointer-events: none;
    z-index: 3;
    transition: color 0.2s;
}

.compare-slider:not(.lightbox-compare-slider):hover::after {
    color: #fff;
}

/* Diff image below slider */
.diff-row {
    margin-top: 0.75rem;
    text-align: center;
}

.diff-row img {
    max-width: 100%;
    border-radius: 4px;
    border: 1px solid #0f3460;
    cursor: pointer;
    transition: border-color 0.2s;
}

.diff-row img:hover {
    border-color: #00d4ff;
}

.diff-label {
    font-size: 0.75rem;
    color: #888;
    margin-top: 0.3rem;
}

/* Lightbox overlay */
.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-close {
    position: fixed;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: #888;
    font-size: 2rem;
    cursor: pointer;
    z-index: 1002;
    line-height: 1;
    padding: 0.25rem 0.5rem;
    transition: color 0.2s;
}

.lightbox-close:hover {
    color: #fff;
}

/* Single-image lightbox (diff maps) */
.lightbox-single { display: none; text-align: center; }
.lightbox-single.active { display: block; }

.lightbox-single img {
    max-width: 92vw;
    max-height: 88vh;
    border-radius: 6px;
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.15);
    cursor: zoom-out;
}

.lightbox-label {
    color: #ccc;
    font-size: 0.9rem;
    margin-top: 0.75rem;
}

/* Full-screen slider lightbox */
.lightbox-slider-wrap { display: none; max-height: 90vh; }
.lightbox-slider-wrap.active { display: block; }

.lightbox-compare-slider {
    display: inline-block;
    max-width: 92vw;
    max-height: 85vh;
}

.lightbox-compare-slider .compare-base {
    max-height: 85vh;
    max-width: 92vw;
    width: auto;
}

.lightbox-hint {
    text-align: center;
    color: #666;
    font-size: 0.8rem;
    margin-top: 0.75rem;
}

.section-desc {
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* Certificate footer */
.cert-footer {
    text-align: center;
    padding: 1.5rem;
    color: #666;
    font-size: 0.8rem;
    border-top: 1px solid #0f3460;
    margin-top: 2rem;
}

.cert-footer p { margin: 0.2rem 0; }

/* Encoding explainer */
.encoding-adj-table th { text-align: left; }

.encoding-level {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: capitalize;
}

.encoding-level-low, .encoding-level-simple, .encoding-level-over_encoded {
    background: #1a3c2a;
    color: #58d68d;
}

.encoding-level-medium, .encoding-level-moderate, .encoding-level-normal {
    background: #2a2a4a;
    color: #aaa;
}

.encoding-level-high, .encoding-level-complex, .encoding-level-efficient {
    background: #3d1420;
    color: #ff8a9e;
}

.encoding-threshold {
    font-family: monospace;
    font-size: 0.85rem;
    color: #aaa;
}

.encoding-rationale {
    color: #888;
    font-size: 0.85rem;
}

.encoding-method {
    color: #666;
    font-style: italic;
}

.crf-adj, .crf-result {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    font-weight: 700;
    font-family: monospace;
    font-size: 0.9rem;
}

.crf-adj-up { background: #1a3c2a; color: #58d68d; }
.crf-adj-down { background: #3d1420; color: #ff8a9e; }
.crf-adj-neutral { background: #2a2a4a; color: #aaa; }

.example-name { font-weight: 600; color: #fff; }

.feature-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #1a1a2e;
}

.feature-item:last-child { border-bottom: none; }

.feature-name {
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.25rem;
}

.feature-desc {
    color: #aaa;
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Breadcrumbs */
.breadcrumbs {
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.breadcrumbs a {
    color: #888;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumbs a:hover { color: #e94560; }

.breadcrumb-sep {
    color: #555;
    margin: 0 0.4rem;
}

.breadcrumb-current {
    color: #ccc;
}

/* Savings Hero */
.savings-hero {
    background: #16213e;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 3px solid #e94560;
}

.savings-hero-values {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.savings-original, .savings-converted, .savings-result {
    text-align: center;
}

.savings-size {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
}

.savings-converted .savings-size { color: #58d68d; }
.savings-result .savings-pct { font-size: 1.8rem; font-weight: 700; color: #e94560; }
.savings-label { font-size: 0.75rem; color: #888; text-transform: uppercase; margin-top: 0.2rem; }

.savings-arrow {
    font-size: 1.5rem;
    color: #555;
}

.savings-bar-wrap {
    background: #0f3460;
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
}

.savings-bar-original {
    background: #555;
    height: 100%;
    width: 100%;
    position: relative;
    border-radius: 4px;
}

.savings-bar-output {
    background: #58d68d;
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}

/* Certificate savings bar */
.cert-savings-bar {
    margin-bottom: 1.5rem;
}

.cert-savings-summary {
    text-align: center;
    margin-top: 0.75rem;
    font-size: 0.95rem;
    color: #ccc;
}

/* Video Player */
.video-player-section h3 { margin-bottom: 0.5rem; }

.video-controls-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.video-sync-btn {
    background: #0f3460;
    color: #5dade2;
    border: 1px solid #0f3460;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.video-sync-btn:hover {
    background: #1a3a5c;
    border-color: #5dade2;
}

.video-sync-label {
    font-size: 0.8rem;
    color: #888;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
}

.video-sync-label input { cursor: pointer; }

.video-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.video-panel {
    position: relative;
}

.video-panel-label {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    color: #ccc;
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    z-index: 1;
    pointer-events: none;
}

.video-panel video {
    width: 100%;
    border-radius: 6px;
    border: 1px solid #0f3460;
    background: #000;
    display: block;
}

/* Attempt Timeline */
.attempt-timeline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.5rem 0;
}

.attempt-card {
    background: #0a1628;
    border: 1px solid #0f3460;
    border-radius: 6px;
    min-width: 160px;
    flex-shrink: 0;
}

.attempt-card-passed { border-color: #58d68d; }
.attempt-card-failed { border-color: #ff8a9e; }

.attempt-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #0f3460;
    font-size: 0.8rem;
}

.attempt-card-num { color: #ccc; font-weight: 600; }
.attempt-card-passed .attempt-card-status { color: #58d68d; }
.attempt-card-failed .attempt-card-status { color: #ff8a9e; }

.attempt-card-body { padding: 0.5rem 0.75rem; }

.attempt-card-stat {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    padding: 0.15rem 0;
}

.attempt-stat-label { color: #888; }
.attempt-stat-value { color: #fff; font-weight: 600; }

.attempt-arrow {
    color: #555;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Relative timestamps */
.timestamp-relative {
    cursor: help;
    border-bottom: 1px dotted #555;
}

/* Certificate permalink */
.cert-permalink {
    margin-top: 0.5rem;
}

.cert-permalink a {
    word-break: break-all;
}

/* Cost Estimator */
.estimator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.slider-group {
    margin-bottom: 1.25rem;
}

.slider-group:last-child {
    margin-bottom: 0;
}

.slider-label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: #aaa;
}

.slider-value {
    font-weight: 700;
    color: #fff;
    font-size: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: #0f3460;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e94560;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 0 6px rgba(233, 69, 96, 0.4);
    transition: box-shadow 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    box-shadow: 0 0 12px rgba(233, 69, 96, 0.7);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e94560;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 0 6px rgba(233, 69, 96, 0.4);
}

.projection-hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.projection-card {
    background: #0a1628;
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
    border: 1px solid #0f3460;
    transition: border-color 0.3s;
}

.projection-card-accent {
    border-color: #22c55e;
}

.projection-card-warn {
    border-color: #f59e0b;
}

.projection-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.25rem;
    transition: color 0.3s;
}

.projection-label {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.projection-sub {
    font-size: 0.7rem;
    color: #555;
    margin-top: 0.2rem;
}

.roi-timeline {
    position: relative;
    height: 8px;
    background: #0f3460;
    border-radius: 4px;
    overflow: visible;
    margin: 1rem 0 0.5rem;
}

.roi-timeline-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease, background 0.4s;
}

.roi-timeline-marker {
    position: absolute;
    top: -6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #e94560;
    transform: translateX(-50%);
    transition: left 0.4s ease;
    z-index: 1;
}

.roi-timeline-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: #666;
    margin-top: 0.5rem;
}

.provider-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

/* Costs Page — Hero & Layout */
.costs-hero {
    text-align: center;
    padding: 2rem 1rem 1.5rem;
    margin-bottom: 1.5rem;
    background: radial-gradient(ellipse at center top, rgba(15, 52, 96, 0.5) 0%, transparent 70%);
}

.costs-hero h2 {
    font-size: 1.75rem;
    line-height: 1.3;
    margin-bottom: 0.6rem;
    background: linear-gradient(135deg, #fff 0%, #aac8e4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.costs-hero-sub {
    color: #778899;
    font-size: 0.9rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.costs-summary {
    background: #16213e;
    border-radius: 8px;
    padding: 1.1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 3px solid #58d68d;
    font-size: 0.88rem;
    color: #bbb;
    line-height: 1.7;
}

/* Hero Net Savings Card */
.costs-hero-card {
    background: linear-gradient(160deg, #0d1f3c 0%, #0a1628 60%, #0d2818 100%);
    border-radius: 14px;
    padding: 2.5rem 2rem;
    text-align: center;
    border: 2px solid #0f3460;
    margin-bottom: 1.25rem;
    transition: border-color 0.4s, box-shadow 0.4s;
    position: relative;
    overflow: hidden;
}

.costs-hero-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

.costs-hero-card-positive {
    border-color: #22c55e;
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.08), 0 4px 20px rgba(0, 0, 0, 0.3);
}

.costs-hero-card-positive::before {
    background: radial-gradient(ellipse at center, rgba(88, 214, 141, 0.04) 0%, transparent 70%);
    opacity: 1;
}

.costs-hero-card-negative {
    border-color: #e94560;
    box-shadow: 0 0 30px rgba(233, 69, 96, 0.08), 0 4px 20px rgba(0, 0, 0, 0.3);
}

.costs-hero-value {
    font-size: 3.5rem;
    font-weight: 800;
    color: #58d68d;
    margin-bottom: 0.3rem;
    transition: color 0.3s;
    letter-spacing: -0.02em;
    text-shadow: 0 0 40px rgba(88, 214, 141, 0.2);
}

.costs-hero-card-negative .costs-hero-value {
    color: #ff8a9e;
    text-shadow: 0 0 40px rgba(255, 138, 158, 0.2);
}

.costs-hero-label {
    font-size: 0.9rem;
    color: #8899aa;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.costs-hero-sub-text {
    font-size: 0.8rem;
    color: #556677;
    margin-top: 0.4rem;
}

/* Metric Card Rows */
.costs-cards-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.costs-cards-secondary {
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 1.5rem;
}

.costs-cards-row .projection-card {
    background: #121d33;
    border-color: #1a2d4d;
    padding: 1.1rem;
}

.costs-cards-row .projection-value {
    font-size: 1.5rem;
}

/* Cost of Inaction */
.costs-inaction {
    background: linear-gradient(135deg, #2d1810 0%, #1e1420 50%, #1a1a2e 100%);
    border: 1px solid rgba(233, 69, 96, 0.25);
    border-radius: 10px;
    padding: 1.1rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: #e8c547;
    box-shadow: 0 2px 12px rgba(233, 69, 96, 0.06);
}

.costs-inaction strong {
    color: #ff8a9e;
    font-size: 1.05rem;
}

.costs-inaction-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

/* Quality Guarantee */
.costs-quality {
    border-left: 3px solid #22c55e;
    background: linear-gradient(135deg, #12231e 0%, #16213e 40%);
}

.costs-quality h3 {
    color: #58d68d;
}

.costs-quality-intro {
    color: #99aabb;
    font-size: 0.85rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.costs-quality-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.costs-quality-metric {
    background: #0a1628;
    border-radius: 8px;
    padding: 1.1rem;
    border: 1px solid #163050;
    transition: border-color 0.2s;
}

.costs-quality-metric:hover {
    border-color: #22c55e40;
}

.costs-quality-name {
    font-weight: 700;
    color: #fff;
    font-size: 1.05rem;
    margin-bottom: 0.1rem;
    letter-spacing: 0.03em;
}

.costs-quality-desc {
    color: #667788;
    font-size: 0.75rem;
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.costs-quality-threshold {
    color: #99aabb;
    font-size: 0.82rem;
    margin-bottom: 0.25rem;
}

.costs-quality-threshold strong {
    color: #fff;
}

.costs-quality-observed {
    font-size: 0.8rem;
    color: #778899;
    margin-top: 0.3rem;
    padding-top: 0.4rem;
    border-top: 1px solid #1a2d4d;
}

.costs-quality-proof {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #1a2d4d;
}

.costs-quality-proof a {
    color: #58d68d;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s;
}

.costs-quality-proof a:hover {
    color: #7de8a8;
    text-decoration: underline;
}

/* Advanced config toggle */
.costs-advanced {
    margin-top: 0.75rem;
}

.costs-advanced summary {
    color: #5dade2;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.5rem 0;
    transition: color 0.2s;
    list-style: none;
}

.costs-advanced summary::-webkit-details-marker { display: none; }

.costs-advanced summary::before {
    content: '\25B6';
    display: inline-block;
    font-size: 0.65rem;
    margin-right: 0.5rem;
    transition: transform 0.2s;
}

.costs-advanced[open] summary::before {
    transform: rotate(90deg);
}

.costs-advanced summary:hover {
    color: #fff;
}

.costs-section-note {
    color: #667788;
    font-size: 0.8rem;
    margin-bottom: 1rem;
    font-style: italic;
}

/* Cloud comparison side by side */
.costs-comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* Collapsed details sections */
.costs-details-section {
    cursor: default;
}

.costs-details-section > summary {
    cursor: pointer;
    color: #ccc;
    list-style: none;
    padding: 0.25rem 0;
}

.costs-details-section > summary::-webkit-details-marker { display: none; }

.costs-details-section > summary::before {
    content: '\25B6';
    display: inline-block;
    font-size: 0.7rem;
    margin-right: 0.6rem;
    transition: transform 0.2s;
    color: #5dade2;
}

.costs-details-section[open] > summary::before {
    transform: rotate(90deg);
}

.costs-details-section > summary:hover h3 {
    color: #fff;
}

/* CTA Section */
.costs-cta {
    background: linear-gradient(160deg, #16213e 0%, #0f3460 50%, #162040 100%);
    border-radius: 14px;
    padding: 3rem 2rem;
    text-align: center;
    margin-top: 2rem;
    border: 1px solid #1a3a6a;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.costs-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(233, 69, 96, 0.04) 0%, transparent 60%);
    pointer-events: none;
}

.costs-cta h3 {
    font-size: 1.4rem;
    color: #fff;
    margin-bottom: 0.5rem;
    text-transform: none;
    letter-spacing: normal;
    position: relative;
}

.costs-cta p {
    color: #8899aa;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    position: relative;
}

.costs-cta-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    position: relative;
}

.costs-cta .btn-primary {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    box-shadow: 0 4px 16px rgba(233, 69, 96, 0.3);
}

.costs-cta-secondary {
    color: #5dade2;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.costs-cta-secondary:hover {
    color: #fff;
}

/* Skeleton loading placeholder */
.skeleton-text {
    background: linear-gradient(90deg, #1e2a45 25%, #2a3a5a 50%, #1e2a45 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
    color: transparent !important;
    user-select: none;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Loading spinner for dashboard */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #888;
    font-size: 0.9rem;
    gap: 0.75rem;
}

.loading-spinner::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #0f3460;
    border-top-color: #e94560;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Upload error actions */
.upload-error-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    align-items: center;
}

.upload-error-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.upload-retry-btn {
    background: #e94560;
    color: #fff;
}

.upload-retry-btn:hover { background: #c73750; }

.upload-back-link {
    color: #5dade2;
    text-decoration: none;
    font-size: 0.85rem;
}

.upload-back-link:hover { color: #fff; }

.upload-error-msg {
    color: #ff8a9e;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* File validation error */
.file-validation-error {
    background: #3d1420;
    border: 1px solid #e94560;
    border-radius: 6px;
    padding: 1rem 1.5rem;
    margin-top: 1rem;
    color: #ff8a9e;
    font-size: 0.9rem;
}

/* Delete confirmation modal */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active { display: flex; }

.modal-dialog {
    background: #16213e;
    border: 1px solid #0f3460;
    border-radius: 10px;
    padding: 2rem;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
}

.modal-message {
    color: #aaa;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.modal-btn {
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.2s;
}

.modal-btn-cancel {
    background: #2a2a4a;
    color: #aaa;
}

.modal-btn-cancel:hover { background: #3a3a5a; }

.modal-btn-danger {
    background: #e94560;
    color: #fff;
}

.modal-btn-danger:hover { background: #c73750; }

/* Responsive table wrapper */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Extracted inline styles from templates (Task 12) */
.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.btn-cert-link {
    font-size: 0.8rem;
    padding: 0.4rem 1rem;
}

.text-monospace-sm {
    font-family: monospace;
    font-size: 0.8rem;
    word-break: break-all;
}

.text-monospace-xs {
    font-family: monospace;
    font-size: 0.7rem;
    word-break: break-all;
}

.validation-details-col {
    font-size: 0.8rem;
    color: #888;
}

.text-green { color: #58d68d; }
.text-green-bold { color: #58d68d; font-weight: 600; }
.text-red { color: #ff8a9e; }
.text-red-bold { color: #ff8a9e; font-weight: 600; }
.text-accent { color: #e94560; }
.text-accent-bold { color: #e94560; font-weight: 600; }
.text-muted { color: #888; }
.text-muted-sm { color: #888; font-size: 0.8rem; }
.text-muted-italic { color: #888; font-style: italic; }
.text-bold { font-weight: 600; }
.text-bold-700 { font-weight: 700; }

.inline-progress-text {
    font-size: 0.8rem;
    color: #aaa;
}

.encoding-text {
    color: #f0c040;
    font-size: 0.8rem;
}

.heading-inline {
    display: inline;
}

.section-subheading {
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.section-note {
    color: #666;
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
}

.section-note-margin {
    color: #666;
    font-size: 0.8rem;
    margin: 1rem 0;
}

.bench-heading {
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    margin: 1.5rem 0 0.75rem;
}

.costs-select {
    width: 100%;
    padding: 0.4rem;
    border-radius: 4px;
    border: 1px solid #0f3460;
    background: #0a1628;
    color: #e0e0e0;
    font-size: 0.9rem;
}

.selected-row { background: #0f3460; }

.badge-measured {
    color: #58d68d;
    font-size: 0.65rem;
    font-weight: 600;
    border: 1px solid #58d68d;
    padding: 1px 4px;
    border-radius: 3px;
}

.badge-recommended {
    color: #58d68d;
    font-size: 0.7rem;
    font-weight: 600;
}

.table-mt { margin-top: 0.75rem; }
.mt-1 { margin-top: 1rem; }

.cert-verification-note { color: #58d68d; }

.chart-container-canvas { max-height: 260px; }

/* Responsive */
@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #16213e;
        flex-direction: column;
        padding: 0.5rem 0;
        border-bottom: 1px solid #0f3460;
        z-index: 100;
    }
    .nav-links.nav-open { display: flex; }
    .nav-links a { margin-left: 0; padding: 0.75rem 2rem; }
    .nav-links a:hover { background: #1a2a4e; }
    nav { position: relative; flex-wrap: wrap; }
    .estimator-grid { grid-template-columns: 1fr; }
    .costs-cards-row { grid-template-columns: 1fr 1fr; }
    .costs-cards-secondary { grid-template-columns: 1fr; }
    .costs-quality-grid { grid-template-columns: 1fr; }
    .costs-comparison-grid { grid-template-columns: 1fr; }
    .costs-hero-value { font-size: 2.5rem; }
    .costs-hero-card { padding: 1.5rem 1rem; }
    .projection-hero { grid-template-columns: 1fr 1fr; }
    .summary-cards { grid-template-columns: 1fr 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
    .charts-grid { grid-template-columns: 1fr; }
    .quality-metrics { flex-direction: column; gap: 1rem; }
    .video-grid { grid-template-columns: 1fr; }
    .savings-hero-values { flex-wrap: wrap; gap: 1rem; }
    .comparison-grid { grid-template-columns: 1fr; }
    .comparison-arrow { display: none; }
    .attempt-timeline { flex-direction: column; align-items: stretch; }
    .attempt-arrow { text-align: center; transform: rotate(90deg); }
}

/* Print styles for certificate */
@media print {
    body { background: #fff; color: #000; }
    nav, .no-print { display: none !important; }
    main { padding: 0; max-width: 100%; }

    .certificate-container { max-width: 100%; }

    .cert-badge { background: #eee; color: #333; border: 1px solid #ccc; }
    .cert-header h2 { color: #000; }
    .cert-id { color: #666; }

    .cert-outcome { border: 2px solid; }
    .cert-outcome.outcome-passed { background: #e8f5e9; border-color: #4caf50; color: #2e7d32; }
    .cert-outcome.outcome-failed { background: #ffebee; border-color: #f44336; color: #c62828; }
    .outcome-icon { font-size: 1.5rem; }

    .cert-section, .detail-section { background: #fff; border: 1px solid #ddd; }
    h3 { color: #333; }

    .detail-table td { border-bottom-color: #eee; }
    .detail-table td:first-child { color: #666; }

    .stage-dot { background: #4caf50; }
    .lifecycle-line { background: #4caf50; }
    .stage-label { color: #333; }

    .vmaf-large { color: #000 !important; }
    .vmaf-good { color: #2e7d32 !important; }
    .vmaf-ok { color: #f57f17 !important; }
    .vmaf-bad { color: #c62828 !important; }

    .quality-verdict { background: #f5f5f5; border-left: 3px solid #999; color: #333; }
    .verdict-good { border-left-color: #4caf50; }
    .verdict-warning { border-left-color: #ff9800; }
    .verdict-bad { border-left-color: #f44336; }

    .check-pass { color: #2e7d32; }
    .check-fail { color: #c62828; }

    .compare-slider { border-color: #ddd; }
    .compare-handle { background: #999; }
    .compare-handle::before { background: #999; box-shadow: none; }
    .compare-label { background: rgba(0, 0, 0, 0.5); }

    .savings-bar-wrap { background: #eee; }
    .savings-bar-original { background: #ddd; }
    .savings-bar-output { background: #4caf50; }

    .savings-hero { background: #f5f5f5; border-left-color: #e94560; }
    .savings-size { color: #000; }

    .cert-footer { border-top-color: #ddd; color: #999; }

    .frame-comparison { page-break-inside: avoid; }
    .cert-section { page-break-inside: avoid; }
}

/* Cost-model provenance and end-to-end columns (#44) */
.costs-caveat {
    margin: 10px 2px 0;
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--text-muted, #8a8a99);
    border-left: 3px solid var(--accent-warn, #c7913f);
    padding: 8px 0 8px 12px;
}
.costs-caveat strong { color: var(--accent-warn, #c7913f); }
.costs-caveat em { color: var(--text-secondary, #b0b0bd); font-style: normal; font-weight: 600; }

/* Egress large enough to change the decision -- the thing a compute-only
   table hid entirely. */
.egress-heavy {
    display: inline-block;
    margin-left: 5px;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(199, 145, 63, 0.16);
    color: #c7913f;
}
.muted { color: var(--text-muted, #8a8a99); }
