/* ─────────────────────────────────────────────────────────────────────
 * Chimera Neural Incubator Widget
 * Standalone stylesheet. Class prefix ``ni-`` to avoid collisions
 * with the main renovation.css. Colors reference the existing CSS
 * variables defined on ``:root`` in modern.css / renovation.css; any
 * unknown variable falls through to a dark-mode default.
 * ───────────────────────────────────────────────────────────────────── */

.ni-root {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    background: var(--panel-bg, #0f1217);
    border: 1px solid var(--panel-border, #1e2530);
    border-radius: 10px;
    color: var(--text-primary, #d8dee9);
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        sans-serif;
    font-size: 13px;
}

/* ── Intelligence Bar ───────────────────────────────────────────── */

.ni-intel-bar {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    background: var(--panel-bg-alt, #141821);
    border-radius: 8px;
    border: 1px solid var(--panel-border, #1e2530);
}

.ni-intel-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ni-intel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 8px currentColor;
}

.ni-dot-green {
    background: #34d399;
    color: #34d399;
}
.ni-dot-amber {
    background: #fbbf24;
    color: #fbbf24;
}
.ni-dot-disabled {
    background: #6b7280;
    color: #6b7280;
    box-shadow: none;
}
.ni-dot-offline {
    background: #ef4444;
    color: #ef4444;
}

.ni-intel-text {
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 11px;
    color: var(--text-primary, #e5e7eb);
}

.ni-intel-sentiments {
    font-size: 11px;
}

.ni-dim {
    color: var(--text-muted, #6b7280);
    font-style: italic;
}

/* ── Chips ──────────────────────────────────────────────────────── */

.ni-chip {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    white-space: nowrap;
    background: #1f2937;
    color: #9ca3af;
}

.ni-chip-armed {
    background: #065f46;
    color: #a7f3d0;
}
.ni-chip-manual {
    background: #1e3a8a;
    color: #bfdbfe;
}
.ni-chip-disabled {
    background: #374151;
    color: #9ca3af;
}
.ni-chip-dry {
    background: #78350f;
    color: #fde68a;
}
.ni-chip-live {
    background: #7f1d1d;
    color: #fecaca;
}
.ni-chip-dream {
    background: #1e1b4b;
    color: #c7d2fe;
}
.ni-chip-off {
    background: #1f2937;
    color: #6b7280;
}
.ni-chip-sent {
    background: #111827;
    color: #d1d5db;
    border: 1px solid #374151;
}
.ni-chip-warn {
    background: #7c2d12;
    color: #fed7aa;
    cursor: help;
}

/* ── Lanes ──────────────────────────────────────────────────────── */

.ni-lanes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    min-height: 240px;
}

@media (max-width: 900px) {
    .ni-lanes {
        grid-template-columns: 1fr;
    }
}

.ni-lane {
    display: flex;
    flex-direction: column;
    background: var(--panel-bg-alt, #141821);
    border: 1px solid var(--panel-border, #1e2530);
    border-radius: 8px;
    min-height: 220px;
    max-height: 520px;
}

.ni-lane-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid var(--panel-border, #1e2530);
}

.ni-lane-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--text-primary, #e5e7eb);
}

.ni-lane-hypotheses .ni-lane-title {
    color: #a78bfa;
}
.ni-lane-shadow .ni-lane-title {
    color: #fbbf24;
}
.ni-lane-live .ni-lane-title {
    color: #34d399;
}

.ni-lane-count {
    font-size: 11px;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 8px;
    background: #1f2937;
    color: #9ca3af;
}

.ni-lane-body {
    flex: 1;
    padding: 8px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ni-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted, #6b7280);
    font-style: italic;
    font-size: 11px;
    text-align: center;
    padding: 20px;
}

/* ── Cards ──────────────────────────────────────────────────────── */

.ni-card {
    background: var(--card-bg, #0b0e13);
    border: 1px solid var(--card-border, #1f2937);
    border-radius: 6px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: border-color 120ms ease;
}

.ni-card:hover {
    border-color: #374151;
}

.ni-card-draft {
    border-left: 3px solid #a78bfa;
}

.ni-card-shadow {
    border-left: 3px solid #fbbf24;
}

.ni-card-live {
    border-left: 3px solid #34d399;
}

.ni-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.ni-card-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary, #e5e7eb);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 70%;
}

.ni-card-phase {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 4px;
    background: #1f2937;
    color: #9ca3af;
}

.ni-phase-live {
    background: #065f46;
    color: #a7f3d0;
}

.ni-card-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.ni-badge-ready {
    background: #065f46;
    color: #a7f3d0;
}

.ni-badge-testing {
    background: #78350f;
    color: #fde68a;
}

.ni-card-meta,
.ni-card-stats {
    display: grid;
    gap: 4px 10px;
    font-size: 10px;
    color: var(--text-secondary, #9ca3af);
}

.ni-card-meta {
    grid-template-columns: repeat(3, 1fr);
}

.ni-card-stats {
    grid-template-columns: repeat(3, 1fr);
}

.ni-meta-label {
    display: inline-block;
    color: #6b7280;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-right: 3px;
}

.ni-card-rationale {
    margin: 0;
    font-size: 10px;
    line-height: 1.4;
    color: var(--text-muted, #9ca3af);
    font-style: italic;
}

.ni-criteria {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px 10px;
    font-size: 9px;
    color: #6b7280;
}

.ni-check-ok {
    color: #34d399;
}

.ni-check-bad {
    color: #f87171;
}

.ni-card-actions {
    display: flex;
    gap: 6px;
    margin-top: 2px;
}

.ni-card-actions button {
    flex: 1;
    padding: 5px 10px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    border: 1px solid var(--card-border, #374151);
    border-radius: 4px;
    background: transparent;
    color: var(--text-secondary, #d1d5db);
    cursor: pointer;
    transition: all 120ms ease;
}

.ni-card-actions button:hover:not(:disabled) {
    border-color: #4b5563;
    background: #111827;
    color: var(--text-primary, #e5e7eb);
}

.ni-card-actions button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── Footer ─────────────────────────────────────────────────────── */

.ni-footer {
    display: flex;
    justify-content: flex-end;
    padding: 4px 8px;
    font-size: 10px;
    color: var(--text-muted, #6b7280);
}

.ni-footer-error {
    color: #f87171;
    font-weight: 500;
}
