/* ── Reset & Base ──────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f6fa;
    color: #2c3e50;
    line-height: 1.6;
}

a {
    color: #3498db;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* ── Navbar ───────────────────────────────────────────────────── */
.navbar {
    background: #2c3e50;
    color: white;
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-brand a {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
}
.nav-brand a:hover {
    text-decoration: none;
    opacity: 0.9;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.nav-links a {
    color: #ecf0f1;
    font-size: 0.95rem;
}

/* ── Container ────────────────────────────────────────────────── */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
}

.page-header {
    margin-bottom: 1.5rem;
}
.page-header h1 {
    font-size: 1.6rem;
    font-weight: 600;
}
.subtitle {
    color: #7f8c8d;
    font-size: 0.95rem;
}

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 0.4rem 1rem;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}
.btn:hover {
    background: #ecf0f1;
}
.btn-primary {
    background: #3498db;
    color: white;
    border-color: #3498db;
}
.btn-primary:hover {
    background: #2980b9;
}
.btn-sm {
    padding: 0.25rem 0.6rem;
    font-size: 0.8rem;
}

/* ── Filters ──────────────────────────────────────────────────── */
.filters-bar {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.filter-group label {
    font-size: 0.85rem;
    color: #7f8c8d;
    font-weight: 500;
}
.filter-group select,
.filter-group input[type="range"] {
    font-size: 0.85rem;
    padding: 0.3rem 0.5rem;
    border: 1px solid #dcdde1;
    border-radius: 4px;
    background: white;
}
.filter-group select {
    min-width: 150px;
}

/* ── Tables ───────────────────────────────────────────────────── */
.table-wrapper {
    overflow-x: auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.runs-table,
.compare-table,
.stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.runs-table th,
.runs-table td,
.compare-table th,
.compare-table td,
.stats-table th,
.stats-table td {
    padding: 0.6rem 0.8rem;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

.runs-table th,
.compare-table th,
.stats-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #636e72;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    position: sticky;
    top: 0;
}

.runs-table tbody tr:hover {
    background: #f8f9fa;
}

.sortable {
    cursor: pointer;
    user-select: none;
}
.sortable:hover {
    color: #3498db;
}

.date-cell {
    font-size: 0.8rem;
    color: #95a5a6;
    white-space: nowrap;
}

/* ── AUC Color Coding ────────────────────────────────────────── */
.auc-high {
    color: #27ae60;
    font-weight: 600;
}
.auc-mid {
    color: #f39c12;
    font-weight: 600;
}
.auc-low {
    color: #e74c3c;
    font-weight: 600;
}

/* ── Best Value Highlight ────────────────────────────────────── */
.best-value {
    background: #d4efdf;
    font-weight: 600;
}

/* ── Metric Cards ─────────────────────────────────────────────── */
.metric-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.metric-card {
    background: white;
    border-radius: 8px;
    padding: 1.2rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.metric-value {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.metric-label {
    font-size: 0.8rem;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Charts ───────────────────────────────────────────────────── */
.charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.chart-container {
    background: white;
    border-radius: 8px;
    padding: 1.2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.chart-container h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: #2c3e50;
}

/* ── Score Labels ─────────────────────────────────────────────── */
.fake-label {
    color: #e74c3c;
    font-weight: 600;
}
.real-label {
    color: #27ae60;
    font-weight: 600;
}

/* ── Sections ─────────────────────────────────────────────────── */
.section {
    margin-bottom: 1.5rem;
}

.section h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

/* ── Figures Gallery ──────────────────────────────────────────── */
.figures-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1rem;
}

.figure-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.figure-card img {
    width: 100%;
    height: auto;
    display: block;
}

.figure-name {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    color: #7f8c8d;
    text-align: center;
    border-top: 1px solid #ecf0f1;
}

/* ── Detection Examples ───────────────────────────────────────── */
.examples-category {
    margin-bottom: 1.2rem;
}

.examples-category-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
}

.examples-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.example-card {
    width: 120px;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.example-thumb {
    width: 120px;
    height: 90px;
    overflow: hidden;
    cursor: pointer;
    background: #ecf0f1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.example-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.15s;
}

.example-thumb:hover img {
    transform: scale(1.05);
}

.thumb-placeholder {
    color: #95a5a6;
    font-size: 0.75rem;
}

.example-info {
    padding: 0.4rem 0.5rem;
}

.example-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.example-prediction {
    font-size: 0.7rem;
    color: #636e72;
    margin-top: 0.15rem;
}

.example-score {
    font-weight: 600;
}

.example-gender {
    font-size: 0.65rem;
    color: #95a5a6;
    margin-top: 0.1rem;
}

.example-filename {
    font-size: 0.6rem;
    color: #b2bec3;
    margin-top: 0.1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Thumbnail Modal ─────────────────────────────────────────── */
.thumb-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

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

.thumb-modal img {
    max-width: 80%;
    max-height: 80%;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

/* ── Empty State ──────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #95a5a6;
}
.empty-state .hint {
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* ── Sync Indicator ───────────────────────────────────────────── */
.sync-indicator {
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}
.sync-ok {
    color: #2ecc71;
}
.sync-error {
    color: #e74c3c;
}

/* ── Tab Switcher ────────────────────────────────────────────── */
.tab-bar {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #ecf0f1;
}

.tab-btn {
    padding: 0.6rem 1.5rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: #7f8c8d;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}
.tab-btn:hover {
    color: #2c3e50;
}
.tab-btn.active {
    color: #3498db;
    border-bottom-color: #3498db;
    font-weight: 600;
}

.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}

/* ── Rankings ─────────────────────────────────────────────────── */
.ranking-row {
    cursor: pointer;
}
.ranking-row:hover {
    background: #f8f9fa;
}

.rank-badge {
    display: inline-block;
    width: 1.8rem;
    height: 1.8rem;
    line-height: 1.8rem;
    text-align: center;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.85rem;
    background: #ecf0f1;
    color: #636e72;
}
.rank-1 {
    background: #fef9e7;
    color: #d4ac0d;
    box-shadow: 0 0 0 2px #f1c40f;
}
.rank-2 {
    background: #f2f3f4;
    color: #7f8c8d;
    box-shadow: 0 0 0 2px #95a5a6;
}
.rank-3 {
    background: #fbeee6;
    color: #cd6133;
    box-shadow: 0 0 0 2px #e67e22;
}

.expand-btn {
    cursor: pointer;
    color: #95a5a6;
    font-size: 0.8rem;
    user-select: none;
}

.detail-row {
    display: none;
    background: #f8f9fa;
}
.detail-row.expanded {
    display: table-row;
}

.detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    margin: 0.5rem 0;
}
.detail-table th {
    background: #eef1f3;
    font-weight: 600;
    color: #636e72;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 0.5rem 0.8rem;
    border-bottom: 1px solid #dcdde1;
}
.detail-table td {
    padding: 0.5rem 0.8rem;
    border-bottom: 1px solid #ecf0f1;
}
.detail-table tbody tr:hover {
    background: #eef5fb;
}

/* ── Info Cards (catalog) ────────────────────────────────────── */
.info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 50%;
    background: #3498db;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    font-style: italic;
    cursor: pointer;
    margin-left: 0.4rem;
    vertical-align: middle;
    line-height: 1;
}
.info-btn:hover {
    background: #2980b9;
}

.info-row {
    display: none;
}
.info-row.expanded {
    display: table-row;
}

.info-card {
    background: #fafbfc;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    padding: 1rem 1.2rem;
    margin: 0.4rem 0;
}
.info-card-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}
.info-year {
    background: #ecf0f1;
    color: #636e72;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
}
.info-description {
    font-size: 0.88rem;
    color: #4a5568;
    line-height: 1.5;
    margin-bottom: 0.6rem;
}
.info-architecture {
    font-size: 0.85rem;
    color: #636e72;
    font-style: italic;
    margin-bottom: 0.6rem;
}
.info-links {
    display: flex;
    gap: 0.75rem;
}
.info-link {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    border: 1px solid #3498db;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #3498db;
    font-weight: 500;
    transition: all 0.15s;
}
.info-link:hover {
    background: #3498db;
    color: white;
    text-decoration: none;
}

/* Algorithm type badge */
.algo-type {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 0.15rem 0.45rem;
    border-radius: 3px;
    margin-left: 0.4rem;
    vertical-align: middle;
}
.algo-type-face {
    background: #ebf5fb;
    color: #2e86c1;
}
.algo-type-audio {
    background: #fef9e7;
    color: #d4ac0d;
}

/* ── Threshold Slider ────────────────────────────────────────── */
.threshold-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}
.threshold-preset {
    padding: 4px 12px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.15s;
}
.threshold-preset:hover {
    border-color: #3498db;
}
.threshold-preset.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}
.threshold-slider {
    flex: 1;
    min-width: 150px;
}
.threshold-value {
    font-family: monospace;
    font-size: 0.95rem;
    font-weight: 600;
    min-width: 3em;
}
.cm-metrics {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: #636e72;
    flex-wrap: wrap;
}

/* ── Filter Bar (Rankings) ───────────────────────────────────── */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    align-items: center;
    padding: 0.6rem 0.75rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.filter-label {
    font-weight: 600;
    color: #7f8c8d;
    font-size: 0.85rem;
    margin-right: 0.25rem;
}
.filter-chip {
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid #bdc3c7;
    background: white;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.15s;
}
.filter-chip:hover {
    border-color: #3498db;
}
.filter-chip.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

/* ── Test Set Panel ──────────────────────────────────────────── */
.testset-panel {
    background: white;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.testset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.4rem;
    margin: 0.75rem 0;
}
.testset-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
}
.testset-item label {
    cursor: pointer;
    font-size: 0.9rem;
}
.testset-item input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}
.testset-meta {
    color: #95a5a6;
    font-size: 0.8rem;
}
.testset-summary {
    margin: 0.75rem 0;
    color: #7f8c8d;
    font-size: 0.9rem;
}
.testset-results {
    margin-top: 1rem;
}

/* ── Video Analysis (Difficult Videos) ────────────────────────── */
.video-analysis-section {
    margin-bottom: 2rem;
}
.video-analysis-section h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.video-analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.video-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: box-shadow 0.15s, transform 0.15s;
    overflow: hidden;
}
.video-card:hover {
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.video-card-thumb {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    background: #ecf0f1;
}

.thumb-placeholder-large {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ecf0f1;
    color: #95a5a6;
    font-size: 0.85rem;
}

.video-card-info {
    padding: 0.75rem;
}

.video-card-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #2c3e50;
    margin-bottom: 0.15rem;
}

.video-card-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 0.5rem;
}

.error-rate-bar {
    height: 6px;
    background: #ecf0f1;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.3rem;
}
.error-rate-bar-fill {
    height: 100%;
    border-radius: 3px;
    background: #e74c3c;
    transition: width 0.3s;
}

.error-rate-text {
    font-size: 0.8rem;
    color: #636e72;
}

.video-detail {
    display: none;
    grid-column: 1 / -1;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 1rem;
    margin-bottom: 0.5rem;
}
.video-detail.expanded {
    display: block;
}

.video-detail table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.video-detail th {
    background: #f8f9fa;
    font-weight: 600;
    color: #636e72;
    font-size: 0.75rem;
    text-transform: uppercase;
    padding: 0.5rem 0.6rem;
    text-align: left;
    border-bottom: 1px solid #dcdde1;
}
.video-detail td {
    padding: 0.45rem 0.6rem;
    border-bottom: 1px solid #ecf0f1;
}

.error-row {
    background: #fef2f2;
}
.error-row:hover {
    background: #fde8e8;
}

.video-analysis-summary {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.va-summary-card {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.va-summary-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c3e50;
}
.va-summary-label {
    font-size: 0.78rem;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 0.2rem;
}

.va-dataset-select {
    font-size: 0.9rem;
    padding: 0.35rem 0.6rem;
    border: 1px solid #bdc3c7;
    border-radius: 6px;
    background: white;
    margin-bottom: 1rem;
    min-width: 220px;
}

.va-always-correct {
    background: white;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.va-always-correct h3 {
    margin-bottom: 0.75rem;
}
.va-ac-stat {
    font-size: 0.9rem;
    color: #2c3e50;
    margin-bottom: 0.4rem;
}
.va-ac-stat strong {
    color: #27ae60;
}
.va-ac-datasets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.va-ac-chip {
    font-size: 0.8rem;
    background: #f0faf4;
    color: #27ae60;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    border: 1px solid #d4efdf;
}

.va-loader {
    text-align: center;
    padding: 3rem;
    color: #95a5a6;
}
.va-loader .spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid #ecf0f1;
    border-top-color: #3498db;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 0.75rem;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Forms ────────────────────────────────────────────────────── */
.form-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.form-card h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
    flex: 1;
}
.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.3rem;
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #dcdde1;
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52,152,219,0.15);
}
.form-group input:disabled,
.form-group textarea:disabled {
    background: #f5f6fa;
    color: #95a5a6;
}

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

.required {
    color: #e74c3c;
}

.form-hint {
    display: block;
    font-size: 0.78rem;
    color: #95a5a6;
    margin-top: 0.2rem;
}

/* ── API Contract Card ───────────────────────────────────────── */
.api-contract-card {
    background: #f8f9fa;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.api-contract-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.code-block {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.82rem;
    line-height: 1.5;
    white-space: pre;
    overflow-x: auto;
}

.contract-note {
    font-size: 0.85rem;
    color: #636e72;
    margin-top: 1rem;
}
.contract-note code {
    background: #ecf0f1;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-size: 0.82rem;
}

/* ── Smoke Test Checks ───────────────────────────────────────── */
.check-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    margin-bottom: 0.3rem;
    font-size: 0.88rem;
}
.check-pass {
    background: #f0faf4;
    color: #27ae60;
}
.check-fail {
    background: #fef2f2;
    color: #e74c3c;
}
.check-icon {
    font-size: 1rem;
    font-weight: 700;
    width: 1.2rem;
    text-align: center;
    flex-shrink: 0;
}
.check-detail {
    color: #636e72;
    font-size: 0.82rem;
    margin-left: auto;
}

/* ── Status Badges ───────────────────────────────────────────── */
.status-badge {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.status-pending {
    background: #fef9e7;
    color: #d4ac0d;
}
.status-verified {
    background: #d4efdf;
    color: #27ae60;
}
.status-error {
    background: #fadbd8;
    color: #e74c3c;
}

/* ── Detectors Grid ──────────────────────────────────────────── */
.detectors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1rem;
}

.detector-card {
    background: white;
    border-radius: 8px;
    padding: 1.2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.detector-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.detector-card-header h3 {
    font-size: 1rem;
    font-weight: 600;
}
.detector-card-url {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-bottom: 0.5rem;
    word-break: break-all;
}
.detector-card-desc {
    font-size: 0.88rem;
    color: #4a5568;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}
.detector-card-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.82rem;
    margin-bottom: 0.5rem;
}
.detector-card-meta span {
    color: #636e72;
}
.detector-card-date {
    font-size: 0.78rem;
    color: #95a5a6;
    margin-bottom: 0.75rem;
}
.detector-card-actions {
    display: flex;
    gap: 0.5rem;
}
.detector-test-results {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #ecf0f1;
}

/* ── Delete Button ───────────────────────────────────────────── */
.btn-danger {
    color: #e74c3c;
    border-color: #e74c3c;
}
.btn-danger:hover {
    background: #e74c3c;
    color: white;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 900px) {
    .charts-row {
        grid-template-columns: 1fr;
    }
    .container {
        padding: 1rem;
    }
    .filters-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    .figures-gallery {
        grid-template-columns: 1fr;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .detectors-grid {
        grid-template-columns: 1fr;
    }
    .api-contract-card > div[style*="grid"] {
        grid-template-columns: 1fr !important;
    }
}
