/* Numira Eval — Minimal Dark Theme */

:root {
    --bg: #0d1117;
    --bg-card: #161b22;
    --bg-hover: #1c2128;
    --border: #30363d;
    --text: #c9d1d9;
    --text-muted: #8b949e;
    --accent: #58a6ff;
    --pass: #3fb950;
    --fail: #f85149;
    --warn: #d29922;
    --skip: #8b949e;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

/* Navbar */
.navbar {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent);
}

.nav-links { display: flex; gap: 1rem; }

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background 0.15s;
}
.nav-link:hover { color: var(--text); background: var(--bg-hover); }

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

h1 { margin-bottom: 1rem; font-size: 1.5rem; }
h2 { margin-bottom: 0.75rem; font-size: 1.15rem; color: var(--text-muted); }

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th, td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

tr.clickable { cursor: pointer; }
tr.clickable:hover { background: var(--bg-hover); }

.truncate {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mono { font-family: 'SF Mono', 'Fira Code', monospace; font-size: 0.85em; }
.muted { color: var(--text-muted); text-align: center; }

.pass { color: var(--pass); }
.fail { color: var(--fail); }
.warn { color: var(--warn); }

/* Badges */
.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-pending { background: #30363d; color: var(--text-muted); }
.badge-running { background: #1f3a5f; color: var(--accent); }
.badge-completed { background: #1a3a2a; color: var(--pass); }
.badge-failed { background: #3d1a1a; color: var(--fail); }
.badge-cancelled { background: #3d2e1a; color: var(--warn); }

/* Verdicts */
.verdict { font-weight: 700; font-size: 0.85rem; }
.verdict.pass { color: var(--pass); }
.verdict.fail { color: var(--fail); }
.verdict.warn { color: var(--warn); }
.verdict.skip { color: var(--skip); }

/* Forms */
input, select, textarea {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
    outline: none;
}
input:focus, select:focus { border-color: var(--accent); }

button, .btn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    font-weight: 600;
    transition: opacity 0.15s;
}
button:hover { opacity: 0.85; }
button:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-danger { background: var(--fail); }
.btn-sm { padding: 0.25rem 0.5rem; font-size: 0.8rem; }

.inline-form {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    align-items: end;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.form-group label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.error-msg {
    color: var(--fail);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* Filter bar */
.filter-bar {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
}

.filter-bar label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Run header */
.run-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.run-meta {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* Summary bar */
.summary-bar {
    display: flex;
    gap: 1.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.summary-item {
    font-size: 0.95rem;
    font-weight: 600;
}

/* Steps table */
.steps-table { font-size: 0.85rem; }
.step-row[data-status="running"] { background: rgba(88, 166, 255, 0.05); }

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 1rem;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 900px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    padding: 0.25rem 0.5rem;
}
.modal-close:hover { color: var(--text); }

.modal-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}
.modal-section:first-of-type { border-top: none; }

.modal-section h4 {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.modal-text {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.75rem;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.85rem;
    max-height: 300px;
    overflow-y: auto;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    .container { padding: 0.75rem; }
    .inline-form { flex-direction: column; align-items: stretch; }
    .summary-bar { flex-direction: column; gap: 0.5rem; }
    .truncate { max-width: 100px; }
}
