/* Load test harness page */

.lt-body { background: #f8fafc; margin: 0; }

.lt-header {
    background: #0f172a;
    color: white;
    border-bottom: 1px solid #1e293b;
    position: sticky;
    top: 0;
    z-index: 10;
}

.lt-header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.lt-back {
    color: #94a3b8;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 10px;
    border: 1px solid #334155;
    border-radius: 6px;
    transition: background 0.12s;
}
.lt-back:hover { background: #1e293b; color: white; }

.lt-header-title {
    font-size: 18px;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.01em;
}


.lt-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 16px;
}

@media (min-width: 1100px) {
    .lt-grid {
        grid-template-columns: 480px 1fr;
        align-items: start;
    }
    .lt-col-right {
        position: sticky;
        top: 16px;
    }
}

.lt-card {
    background: white;
    border: 1.5px solid var(--border, #e5e7eb);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.lt-card-title {
    font-size: 18px;
    font-weight: 800;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.lt-section {
    border-top: 1px solid var(--border, #e5e7eb);
    padding: 12px 0;
}
.lt-section:first-of-type {
    border-top: none;
    padding-top: 0;
}

.lt-section > summary {
    font-weight: 700;
    cursor: pointer;
    padding: 4px 0;
    font-size: 14px;
    color: var(--text, #111);
    list-style: revert;
}

.lt-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 10px 0;
}

.lt-row > label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text, #111);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lt-val {
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    color: var(--accent, #2563eb);
}

.lt-row input[type="range"] {
    width: 100%;
}

.lt-row input[type="text"],
.lt-row input[type="number"],
.lt-row select,
.lt-row textarea {
    width: 100%;
    padding: 8px 10px;
    font: inherit;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 6px;
    background: white;
}

.lt-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 16px;
    margin: 8px 0;
    font-size: 13px;
}

.lt-checkbox-grid label {
    display: flex;
    gap: 6px;
    align-items: center;
    cursor: pointer;
}

.lt-radio-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 8px 0;
    font-size: 13px;
}

.lt-radio-block label {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    cursor: pointer;
    line-height: 1.4;
}

.lt-flat-label {
    display: flex;
    gap: 6px;
    align-items: center;
    font-size: 13px;
    cursor: pointer;
    padding: 6px 0;
}

.lt-hint {
    font-size: 12px;
    color: var(--text-muted, #555);
    margin: 4px 0 8px;
}

.lt-warn {
    color: #b91c1c;
    font-size: 12px;
    margin-top: 4px;
}

.lt-note {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    font-size: 12px;
    padding: 8px 10px;
    border-radius: 6px;
    margin-top: 6px;
    line-height: 1.45;
}

.lt-budget {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.5;
}
.lt-budget strong { font-variant-numeric: tabular-nums; }
.lt-budget-note { font-weight: 600; margin-top: 2px; }

.lt-budget-ok { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.lt-budget-warn { background: #fef3c7; border: 1px solid #fcd34d; color: #92400e; }
.lt-budget-danger { background: #fee2e2; border: 1px solid #fecaca; color: #991b1b; }

.lt-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border, #e5e7eb);
}

.lt-actions .btn,
.founder-key-gate .btn {
    display: inline-block;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    background: #e5e7eb;
    color: #111;
    transition: transform 0.08s, box-shadow 0.12s, opacity 0.12s;
}
.lt-actions .btn:hover,
.founder-key-gate .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}
.lt-actions .btn:active { transform: translateY(0); }

.lt-btn-primary {
    background: var(--accent, #2563eb);
    color: white;
}

.lt-btn-primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.lt-btn-stop {
    background: #b91c1c;
    color: white;
}

.lt-btn-danger {
    background: #fee2e2;
    color: #b91c1c;
    margin-left: auto;
}

.lt-snippet {
    background: #0f172a;
    color: #e2e8f0;
    padding: 12px;
    border-radius: 6px;
    font-size: 12px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Live stats */
.lt-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}

@media (min-width: 600px) {
    .lt-stats-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.lt-stat {
    background: #f8fafc;
    border: 1px solid var(--border, #e5e7eb);
    padding: 10px;
    border-radius: 8px;
}

.lt-stat-good { background: #ecfdf5; border-color: #a7f3d0; }
.lt-stat-warn { background: #fef3c7; border-color: #fcd34d; }

.lt-stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted, #555);
}

.lt-stat-val {
    font-size: 22px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    margin-top: 2px;
}

.lt-subhead {
    font-size: 14px;
    font-weight: 800;
    margin: 16px 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted, #555);
}

.lt-table-wrap { overflow-x: auto; }

.lt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.lt-table th, .lt-table td {
    padding: 6px 8px;
    text-align: left;
    border-bottom: 1px solid var(--border, #e5e7eb);
    font-variant-numeric: tabular-nums;
}

.lt-table th {
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 10px;
    color: var(--text-muted, #555);
    background: #f8fafc;
}

.lt-empty {
    color: var(--text-muted, #555);
    text-align: center;
    padding: 16px;
    font-style: italic;
}

.lt-error-list {
    font-size: 12px;
    line-height: 1.6;
    max-height: 120px;
    overflow-y: auto;
}

.lt-error-list .lt-err-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 2px 0;
    border-bottom: 1px dashed var(--border, #e5e7eb);
}

/* Pills */
.lt-pill {
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.lt-pill-idle { background: #e5e7eb; color: #374151; }
.lt-pill-info { background: #dbeafe; color: #1e40af; }
.lt-pill-running { background: #dcfce7; color: #166534; }
.lt-pill-stopping { background: #fef3c7; color: #92400e; }
.lt-pill-error { background: #fee2e2; color: #991b1b; }

/* Org list */
.lt-totals {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted, #555);
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 6px;
    margin-bottom: 12px;
}
.lt-totals strong {
    color: var(--text, #111);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

/* Founder key gate */
.founder-key-gate {
    background: #fffbeb;
    border: 1.5px solid #fbbf24;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}
.founder-key-gate h3 { margin: 0 0 8px; }
.founder-key-gate input {
    width: 100%;
    padding: 10px;
    font: inherit;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    margin: 8px 0;
}

/* Activity log */
.lt-log {
    background: #0f172a;
    color: #94a3b8;
    padding: 12px;
    border-radius: 8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
    max-height: 180px;
    overflow-y: auto;
    margin-top: 16px;
}
.lt-log .lt-log-line {
    padding: 1px 0;
    white-space: pre-wrap;
}
.lt-log .lt-log-err { color: #fca5a5; }
.lt-log .lt-log-ok { color: #86efac; }

.hidden { display: none !important; }
