/* NEXUS Admin — Dark Theme */

:root {
    --bg-primary: #080b12;
    --bg-secondary: #0e1420;
    --bg-card: #131b2a;
    --bg-input: #0c1119;
    --border: #1a2536;
    --border-subtle: rgba(255,255,255,0.04);
    --text-primary: #e8ecf4;
    --text-secondary: #8b9ab8;
    --text-muted: #5a6a82;
    --accent: #4f8ff7;
    --accent-hover: #3a7ce8;
    --accent-glow: rgba(79,143,247,0.12);
    --success: #34d399;
    --warning: #fbbf24;
    --error: #f87171;
    --critical: #ef4444;
    --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
    --radius: 10px;
    --card-shadow: 0 1px 3px rgba(0,0,0,0.3), 0 4px 12px rgba(0,0,0,0.15);
}

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

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Layout */
.container { max-width: 1400px; margin: 0 auto; padding: 20px; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 768px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header h1 { font-size: 20px; font-weight: 700; letter-spacing: 2px; }
.header h1 span { color: var(--accent); }
.header nav { display: flex; gap: 24px; }
.header nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}
.header nav a:hover, .header nav a.active { color: var(--accent); }

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    overflow: hidden;
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.card-header h2 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-secondary); }
.card-body { padding-top: 4px; }
.card-header .badge {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

/* Status badges */
.badge-active { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.badge-idle { background: rgba(148, 163, 184, 0.15); color: var(--text-secondary); }
.badge-busy { background: rgba(59, 130, 246, 0.15); color: var(--accent); }
.badge-error { background: rgba(239, 68, 68, 0.15); color: var(--error); }
.badge-offline { background: rgba(100, 116, 139, 0.15); color: var(--text-muted); }
.badge-blocked { background: rgba(234, 179, 8, 0.15); color: var(--warning); }

/* Status bar */
.status-bar {
    display: flex;
    gap: 32px;
    padding: 16px 24px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.status-item { display: flex; align-items: center; gap: 8px; }
.status-item .label { color: var(--text-muted); }
.status-item .value { color: var(--text-primary); font-weight: 600; font-family: var(--font-mono); }

/* Stat boxes */
.stat { text-align: center; padding: 16px; }
.stat .number { font-size: 32px; font-weight: 700; font-family: var(--font-mono); }
.stat .label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* KPI Cards */
.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 16px;
    text-align: center;
    transition: border-color 0.2s;
}
.kpi-card:hover { border-color: rgba(255,255,255,0.1); }
.kpi-value {
    font-size: 26px;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-primary);
    line-height: 1.2;
}
.kpi-label {
    font-size: 9px;
    color: var(--text-muted);
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
}
.kpi-sub {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
    font-family: var(--font-mono);
}
.muted { color: var(--text-muted); font-size: 13px; }

/* Bar chart rows */
.bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-size: 13px;
}
.bar-row-label {
    min-width: 100px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bar-row-track {
    flex: 1;
    height: 18px;
    background: rgba(255,255,255,0.04);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}
.bar-row-fill {
    height: 100%;
    border-radius: 3px;
    min-width: 2px;
    transition: width 0.3s ease;
}
.bar-row-value {
    min-width: 70px;
    text-align: right;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-secondary);
}

/* Status pills in dashboard */
.status-pill {
    display: inline-block;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}
.status-pill-active { background: rgba(34,197,94,0.15); color: var(--success); }
.status-pill-complete { background: rgba(59,130,246,0.15); color: var(--accent); }
.status-pill-pending { background: rgba(148,163,184,0.15); color: var(--text-secondary); }
.status-pill-blocked { background: rgba(234,179,8,0.15); color: var(--warning); }
.status-pill-cancelled { background: rgba(100,116,139,0.15); color: var(--text-muted); }

/* ── Unified row design (all dashboard tables) ── */
.dash-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 13px;
    transition: background 0.15s, transform 0.1s;
}
.dash-row:last-child { border-bottom: none; }
.dash-row:hover { background: rgba(255,255,255,0.03); }
.dash-row-icon {
    font-size: 12px;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}
.dash-row-title {
    flex: 1;
    color: var(--text-primary);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}
.dash-row-sub {
    color: var(--text-muted);
    font-size: 11px;
    min-width: 60px;
}
.dash-row-badge {
    font-size: 9px;
    padding: 3px 8px;
    border-radius: 3px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 50px;
    text-align: center;
    flex-shrink: 0;
}
.dash-row-badge-low { background: rgba(100,116,139,0.15); color: #94a3b8; }
.dash-row-badge-normal { background: rgba(59,130,246,0.15); color: #60a5fa; }
.dash-row-badge-high { background: rgba(245,158,11,0.15); color: #fbbf24; }
.dash-row-badge-critical { background: rgba(239,68,68,0.15); color: #f87171; }
.dash-row-badge-active { background: rgba(34,197,94,0.15); color: #4ade80; }
.dash-row-badge-complete { background: rgba(59,130,246,0.15); color: #60a5fa; }
.dash-row-badge-pending { background: rgba(148,163,184,0.12); color: #94a3b8; }
.dash-row-badge-blocked { background: rgba(234,179,8,0.15); color: #fbbf24; }
.dash-row-badge-idle { background: rgba(148,163,184,0.12); color: #94a3b8; }
.dash-row-time {
    min-width: 50px;
    color: var(--text-muted);
    font-size: 10px;
    font-family: var(--font-mono);
    text-align: right;
}
/* Clickable row */
.dash-row-link { cursor: pointer; }
.dash-row-link:hover { background: rgba(79,143,247,0.06); }

/* Legacy alias */
.task-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 13px; transition: background 0.15s; }
.task-row:last-child { border-bottom: none; }
.task-row:hover { background: rgba(255,255,255,0.03); }

/* Project row */
.project-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.15s;
}
.project-row:last-child { border-bottom: none; }
.project-row:hover { background: rgba(255,255,255,0.03); }
.project-row-icon { font-size: 12px; width: 20px; text-align: center; flex-shrink: 0; }
.project-row-name { font-weight: 600; min-width: 140px; color: var(--text-primary); font-size: 13px; }
.project-row-bar { flex: 1; height: 6px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden; }
.project-row-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.3s; }
.project-row-pct { font-size: 11px; font-family: var(--font-mono); color: var(--text-secondary); min-width: 36px; text-align: right; }
.project-row-stats { display: flex; gap: 12px; font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); }

/* Tasks overview compact */
.tasks-status-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.tasks-status-item {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1 1 0;
    min-width: 80px;
    padding: 8px 10px;
    background: rgba(255,255,255,0.03);
    border-radius: 6px;
}
.tasks-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.tasks-status-count {
    font-size: 15px;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-primary);
    line-height: 1;
}
.tasks-status-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: capitalize;
}

/* Agent grid (legacy) */
.agent-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.agent-row:last-child { border-bottom: none; }

/* Agent Table (dashboard) */
.agent-table-row {
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.15s;
}
.agent-table-row:last-child { border-bottom: none; }
.agent-table-row:hover { background: rgba(255,255,255,0.03); }
.agent-table-header {
    display: grid;
    grid-template-columns: 24px 1fr 90px 70px 90px 85px 40px;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 13px;
}
.agent-table-label-row {
    display: grid;
    grid-template-columns: 24px 1fr 90px 70px 90px 85px 40px;
    gap: 10px;
    padding: 8px 14px;
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.agent-table-name {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.agent-table-name strong {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}
.agent-table-name span {
    font-size: 11px;
    color: var(--text-muted);
}
.agent-table-cell {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-secondary);
    text-align: right;
}
.agent-table-cell.cost { color: #fbbf24; font-weight: 600; }
.agent-table-expand {
    font-size: 10px;
    color: var(--text-muted);
    transition: transform 0.2s;
}
.agent-table-expand.open { transform: rotate(90deg); }
.agent-table-details {
    display: none;
    padding: 4px 14px 14px 48px;
    background: rgba(255,255,255,0.015);
    border-top: 1px solid rgba(255,255,255,0.03);
}
.agent-table-details.open { display: block; }
.agent-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 8px;
}
.agent-detail-box {
    background: rgba(255,255,255,0.03);
    border-radius: 6px;
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,0.04);
}
.agent-detail-box h4 {
    font-size: 9px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0 0 8px 0;
    letter-spacing: 0.8px;
    font-weight: 600;
}
.agent-mini-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    margin-bottom: 4px;
}
.agent-mini-bar-track {
    flex: 1;
    height: 5px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
}
.agent-mini-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s;
}
.agent-mini-bar-label { min-width: 55px; color: var(--text-muted); text-transform: capitalize; }
.agent-mini-bar-value { min-width: 30px; text-align: right; font-family: var(--font-mono); color: var(--text-secondary); }

/* Agent detail action buttons */
.agent-detail-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.04);
}
.dash-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 500;
    font-family: var(--font-sans);
    color: var(--text-secondary);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}
.dash-action-btn:hover {
    background: var(--accent-glow);
    border-color: rgba(79,143,247,0.3);
    color: var(--accent);
}

/* Inline icon button (chat icon in agent row header) */
.dash-icon-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(255,255,255,0.04);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    padding: 0;
}
.dash-icon-btn:hover {
    background: var(--accent-glow);
    transform: scale(1.1);
}
.agent-table-actions {
    text-align: center !important;
}
.agent-dot { width: 8px; height: 8px; border-radius: 50%; }
.dot-idle { background: var(--text-muted); }
.dot-busy { background: var(--accent); }
.dot-error { background: var(--error); }
.dot-offline { background: #333; }
.agent-name { font-weight: 500; min-width: 160px; }
.agent-role { color: var(--text-muted); min-width: 80px; }
.agent-task { color: var(--text-secondary); flex: 1; font-size: 13px; }

/* Activity feed */
.feed-item {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 13px;
}
.feed-item:last-child { border-bottom: none; }
.feed-item:hover { background: rgba(255,255,255,0.02); }
.feed-time { color: var(--text-muted); font-family: var(--font-mono); min-width: 70px; font-size: 12px; }
.feed-severity { min-width: 16px; }
.feed-text { color: var(--text-secondary); }

/* Dashboard card section header (shared) */
.card-section-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    font-weight: 600;
    padding: 6px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* Dashboard activity item (standalone, not from office.css) */
.dash-activity {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.15s;
}
.dash-activity:last-child { border-bottom: none; }
.dash-activity:hover { background: rgba(255,255,255,0.03); }
.dash-activity.dash-row-link { cursor: pointer; }
.dash-activity.dash-row-link:hover { background: rgba(79,143,247,0.06); }
.dash-activity-icon { font-size: 10px; color: var(--text-muted); margin-top: 3px; flex-shrink: 0; }
.dash-activity-body { flex: 1; min-width: 0; }
.dash-activity-agents { font-size: 11px; font-weight: 600; color: var(--text-secondary); }
.dash-activity-text { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.dash-activity-time { font-size: 10px; color: var(--text-muted); font-family: var(--font-mono); flex-shrink: 0; }

/* Forms */
input, select, textarea {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    padding: 10px 14px;
    font-size: 14px;
    font-family: var(--font-sans);
    width: 100%;
    transition: border-color 0.2s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
}
label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}
.form-group { margin-bottom: 16px; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-sans);
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--bg-secondary); color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent); }
.btn-success { background: var(--success); color: white; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Chat */
.chat-container { display: flex; flex-direction: column; height: calc(100vh - 120px); }
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.chat-msg {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    position: relative;
}
.chat-msg-owner {
    background: var(--accent);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}
.chat-msg-owner .chat-msg-sender { color: rgba(255,255,255,0.7); }
.chat-msg-owner .chat-msg-time { color: rgba(255,255,255,0.5); }
.chat-msg-owner .chat-msg-text { color: #fff; }
.chat-msg-agent {
    background: var(--bg-card);
    border: 1px solid var(--border);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}
.chat-msg-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
    gap: 8px;
}
.chat-msg-sender {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}
.chat-msg-time {
    font-size: 9px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}
.chat-msg-text {
    color: var(--text-secondary);
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}
.chat-msg-type {
    display: inline-block;
    font-size: 8px;
    padding: 1px 5px;
    border-radius: 3px;
    background: rgba(168,85,247,0.12);
    color: #c084fc;
    margin-right: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.chat-msg-copy {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    border: none;
    background: rgba(255,255,255,0.08);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s;
    color: var(--text-muted);
    font-size: 11px;
    padding: 0;
}
.chat-msg:hover .chat-msg-copy { opacity: 1; }
.chat-msg-copy:hover { background: rgba(255,255,255,0.15); color: var(--text-primary); }
.chat-msg-owner .chat-msg-copy { background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.7); }
.chat-msg-owner:hover .chat-msg-copy { opacity: 1; }
.chat-msg-owner .chat-msg-copy:hover { background: rgba(255,255,255,0.25); color: #fff; }
.chat-file-link {
    color: #60a5fa;
    text-decoration: none;
    padding: 2px 6px;
    border-radius: 3px;
    background: rgba(96,165,250,0.1);
    font-size: 11px;
    display: inline-block;
    margin: 2px 0;
}
.chat-file-link:hover { background: rgba(96,165,250,0.2); text-decoration: underline; }
.chat-input {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
}
.chat-input input { flex: 1; }

/* Setup wizard */
.wizard { max-width: 700px; margin: 40px auto; }
.wizard-step { display: none; }
.wizard-step.active { display: block; }
.wizard-progress {
    display: flex;
    gap: 4px;
    margin-bottom: 32px;
}
.wizard-progress .step {
    flex: 1;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    transition: background 0.3s;
}
.wizard-progress .step.done { background: var(--success); }
.wizard-progress .step.current { background: var(--accent); }
.wizard-nav { display: flex; justify-content: space-between; margin-top: 32px; }

/* Test result indicators */
.test-result {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    margin-top: 8px;
}
.test-result.success { color: var(--success); }
.test-result.failure { color: var(--error); }
.test-result.loading { color: var(--text-muted); }

/* Onboarding chat */
.onboarding-chat {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 16px;
}
.onboarding-msg { margin-bottom: 12px; }
.onboarding-msg.jarvis { color: var(--accent); }
.onboarding-msg.owner { color: var(--success); text-align: right; }

/* Office stub */
.office-stub {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
}
.office-stub h2 { font-size: 24px; margin-bottom: 16px; }
.office-stub p { color: var(--text-muted); max-width: 400px; }

/* Setup wizard — enhanced */
.wizard-title { font-size: 22px; margin-bottom: 8px; }
.wizard-subtitle { color: var(--text-secondary); margin-bottom: 24px; font-size: 14px; line-height: 1.6; }
.wizard-subtitle a { text-decoration: underline; }
.wizard-divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.wizard-loading { color: var(--text-muted); font-size: 13px; padding: 8px 0; }
.wizard-hint { color: var(--text-muted); font-size: 13px; line-height: 1.7; margin-bottom: 16px; }
.section-label { font-size: 15px; font-weight: 600; margin-bottom: 12px; }

/* Preflight grid */
.preflight-grid { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.preflight-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; background: var(--bg-input);
    border: 1px solid var(--border); border-radius: var(--radius);
    font-size: 14px;
}
.pf-icon {
    font-family: var(--font-mono); font-weight: 700; font-size: 12px;
    min-width: 28px; text-align: center;
    padding: 2px 6px; border-radius: 4px;
}
.pf-ok { color: var(--success); background: rgba(34,197,94,0.1); }
.pf-warn { color: var(--warning); background: rgba(234,179,8,0.1); }
.pf-fail { color: var(--error); background: rgba(239,68,68,0.1); }
.pf-label { flex: 1; }
.pf-detail { color: var(--text-muted); font-size: 12px; font-family: var(--font-mono); }

/* Provider section */
.provider-section { margin-bottom: 8px; }
.provider-row {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; background: var(--bg-input);
    border: 1px solid var(--border); border-radius: var(--radius);
    margin-bottom: 12px;
}
.provider-info { flex: 1; }
.provider-name { font-weight: 600; display: block; }
.provider-desc { font-size: 12px; color: var(--text-muted); }
.input-row { display: flex; gap: 8px; align-items: flex-start; }
.input-row input { flex: 1; }

/* Tags */
.tag {
    display: inline-block; font-size: 11px; font-weight: 500;
    padding: 1px 6px; border-radius: 4px; margin-left: 8px;
    vertical-align: middle;
}
.tag-recommended { background: rgba(34,197,94,0.15); color: var(--success); }
.tag-optional { background: rgba(100,116,139,0.15); color: var(--text-muted); }
.tag-required { background: rgba(239,68,68,0.15); color: var(--error); }

/* More providers */
.more-providers { margin-top: 12px; }
.more-providers summary {
    cursor: pointer; color: var(--text-secondary); font-size: 14px;
    padding: 8px 0; user-select: none;
}
.more-providers summary:hover { color: var(--accent); }
.more-providers[open] summary { margin-bottom: 12px; }

/* Action rows */
.action-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }

/* Manual migration */
.manual-migration {
    background: rgba(234,179,8,0.05); border: 1px solid rgba(234,179,8,0.2);
    border-radius: var(--radius); padding: 16px; margin: 12px 0;
}
.manual-migration p { color: var(--warning); font-size: 13px; margin-bottom: 12px; }

/* Health check grid */
.health-grid { display: flex; flex-direction: column; gap: 6px; }
.health-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; border-radius: var(--radius);
    font-size: 14px;
}
.health-item.passed { background: rgba(34,197,94,0.05); border: 1px solid rgba(34,197,94,0.15); }
.health-item.failed { background: rgba(239,68,68,0.05); border: 1px solid rgba(239,68,68,0.15); }
.health-item.warning { background: rgba(100,116,139,0.05); border: 1px solid var(--border); }
.hc-icon {
    font-family: var(--font-mono); font-weight: 700; font-size: 12px;
    min-width: 36px; text-align: center; padding: 2px 6px; border-radius: 4px;
}
.hc-pass { color: var(--success); background: rgba(34,197,94,0.1); }
.hc-fail { color: var(--error); background: rgba(239,68,68,0.1); }
.hc-warn { color: var(--text-muted); background: rgba(100,116,139,0.1); }
.hc-label { flex: 1; }

/* Onboarding — improved */
.onboarding-input-row { display: flex; gap: 12px; }
.onboarding-input-row input { flex: 1; }
.onboarding-msg { margin-bottom: 12px; padding: 8px 0; }
.onboarding-msg.jarvis { color: var(--accent); }
.onboarding-msg.owner { color: var(--success); text-align: right; }
.msg-sender { font-weight: 600; font-size: 12px; margin-right: 8px; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
