:root {
    --agents-bg: #08111f;
    --agents-panel: rgba(15, 23, 42, 0.76);
    --agents-border: rgba(148, 163, 184, 0.18);
    --action-green: #2dd4bf;
    --action-green-warm: #34d399;
    --action-green-deep: #0f766e;
    --action-green-text: #03251f;
    --action-green-soft: rgba(45, 212, 191, 0.16);
}

body {
    background: var(--agents-bg);
    color: var(--text-primary);
    font-family: var(--font-family);
}

.agents-header {
    min-height: 72px;
    border-bottom: 1px solid var(--agents-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    background: rgba(8, 17, 31, 0.92);
}

.agents-brand {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.agents-brand span,
.summary-label {
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.agents-brand strong {
    font-size: 1.1rem;
}

.agents-header-actions,
.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-link {
    position: relative;
}

.attention-badge {
    align-items: center;
    background: #ef4444;
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 999px;
    box-shadow: 0 0 0 2px rgba(8, 17, 31, 0.95);
    color: #fff;
    display: none;
    font-size: 0.68rem;
    font-weight: 900;
    height: 18px;
    justify-content: center;
    line-height: 1;
    min-width: 18px;
    padding: 0 5px;
    position: absolute;
    right: -9px;
    top: -9px;
}

.attention-badge.visible {
    display: inline-flex;
}

.agents-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 28px;
}

.admin-menu-bar {
    align-items: center;
    backdrop-filter: blur(14px);
    background: rgba(8, 17, 31, 0.94);
    border: 1px solid rgba(45, 212, 191, 0.26);
    border-radius: 8px;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    margin-bottom: 18px;
    padding: 12px 14px;
    position: sticky;
    top: 8px;
    z-index: 20;
}

.menu-group,
.superadmin-menu-items {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.menu-btn {
    background: rgba(15, 118, 110, 0.28);
    border: 1px solid rgba(45, 212, 191, 0.38);
    border-radius: 8px;
    color: #d1fae5;
    cursor: pointer;
    font-weight: 800;
    min-height: 38px;
    padding: 0.5rem 0.75rem;
}

.menu-btn:hover,
.menu-btn:focus-visible {
    background: linear-gradient(135deg, var(--action-green), var(--action-green-warm));
    color: var(--action-green-text);
    outline: none;
}

.superadmin-menu {
    position: relative;
}

.superadmin-menu summary {
    background: rgba(251, 191, 36, 0.14);
    border: 1px solid rgba(251, 191, 36, 0.34);
    border-radius: 8px;
    color: #fde68a;
    cursor: pointer;
    font-weight: 900;
    list-style: none;
    min-height: 38px;
    padding: 0.55rem 0.85rem;
}

.superadmin-menu summary::-webkit-details-marker {
    display: none;
}

.superadmin-menu[open] .superadmin-menu-items {
    background: rgba(8, 17, 31, 0.98);
    border: 1px solid rgba(251, 191, 36, 0.28);
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
    max-width: min(680px, calc(100vw - 56px));
    padding: 12px;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: max-content;
    z-index: 30;
}

.global-status-bar {
    align-items: center;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid var(--agents-border);
    border-radius: 8px;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(280px, 1fr) minmax(360px, 1.35fr) auto;
    margin-bottom: 18px;
    padding: 18px 20px;
}

.global-status-main {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.global-status-main strong {
    font-size: 1.3rem;
    line-height: 1;
    text-transform: uppercase;
}

.global-deploy-status {
    color: var(--text-secondary);
    line-height: 1.35;
}

.global-status-metrics {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.global-status-metrics div {
    background: rgba(8, 17, 31, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 8px;
    min-height: 72px;
    padding: 12px;
}

.global-status-metrics span {
    color: var(--text-secondary);
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.global-status-metrics strong {
    display: block;
    font-size: 1rem;
    line-height: 1.25;
}

.global-status-green {
    border-color: rgba(52, 211, 153, 0.52);
    box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.08);
}

.global-status-green .global-status-main strong {
    color: #86efac;
}

.global-status-yellow {
    border-color: rgba(250, 204, 21, 0.58);
    box-shadow: inset 0 0 0 1px rgba(250, 204, 21, 0.08);
}

.global-status-yellow .global-status-main strong {
    color: #fde047;
}

.global-status-red,
.global-status-rollback {
    border-color: rgba(248, 113, 113, 0.72);
    box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.1);
}

.global-status-red .global-status-main strong,
.global-status-rollback .global-status-main strong {
    color: #fca5a5;
}

.agents-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.reorderable-panel {
    position: relative;
}

.panel-order-controls {
    align-items: center;
    display: inline-flex;
    gap: 6px;
    position: absolute;
    right: 12px;
    top: 10px;
    z-index: 3;
}

.agents-summary .panel-order-controls,
.admin-grid .panel-order-controls {
    top: -18px;
}

.panel-order-btn {
    align-items: center;
    background: rgba(52, 211, 153, 0.16);
    border: 1px solid rgba(52, 211, 153, 0.42);
    border-radius: 6px;
    color: #a7f3d0;
    cursor: pointer;
    display: inline-flex;
    font-size: 0.9rem;
    font-weight: 900;
    height: 28px;
    justify-content: center;
    line-height: 1;
    width: 30px;
}

.panel-order-btn:hover {
    background: rgba(52, 211, 153, 0.28);
    color: #ecfdf5;
}

.panel-order-btn:disabled {
    cursor: not-allowed;
    opacity: 0.32;
}

.start-panel {
    align-items: start;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.18), rgba(15, 23, 42, 0.88));
    border: 1px solid rgba(20, 184, 166, 0.45);
    border-radius: 8px;
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
    margin-bottom: 24px;
    padding: 22px;
}

.start-panel h1 {
    font-size: 1.8rem;
    margin: 6px 0;
}

.start-panel p {
    color: var(--text-secondary);
    line-height: 1.45;
    margin: 0;
    max-width: 820px;
}

.start-panel-actions {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    max-width: 620px;
    width: 100%;
}

.start-panel .control-status {
    grid-column: 1 / -1;
    margin-bottom: 0;
}

.start-btn-large {
    font-size: 1rem;
    min-height: 48px;
    min-width: 180px;
}

.start-panel-actions .project-select {
    min-height: 48px;
    min-width: 280px;
}

.summary-card,
.agents-section {
    background: var(--agents-panel);
    border: 1px solid var(--agents-border);
    border-radius: 8px;
}

.summary-card {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.summary-card strong {
    font-size: 1.05rem;
}

.agents-section {
    padding: 20px;
}

.admin-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-tile {
    align-items: flex-start;
    background: var(--agents-panel);
    border: 1px solid var(--agents-border);
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    min-height: 168px;
    padding: 20px;
}

.admin-tile .primary-btn {
    flex-shrink: 0;
    min-width: 148px;
}

.admin-tile h2 {
    font-size: 1.1rem;
    margin: 8px 0;
}

.admin-tile p {
    color: var(--text-secondary);
    line-height: 1.45;
    max-width: 560px;
}

.section-header {
    justify-content: space-between;
    margin-bottom: 18px;
}

.section-header h1 {
    font-size: 1.35rem;
}

.table-wrapper {
    overflow-x: auto;
    border-radius: 8px;
}

.agents-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.agents-table th,
.agents-table td {
    padding: 0.78rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    text-align: left;
    white-space: nowrap;
}

.agents-table th {
    color: var(--text-secondary);
    background: rgba(15, 23, 42, 0.9);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.compact-table {
    border-collapse: collapse;
    font-size: 0.82rem;
    width: 100%;
}

.compact-table th,
.compact-table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.62rem 0.7rem;
    text-align: left;
    vertical-align: top;
    white-space: nowrap;
}

.compact-table th {
    background: rgba(15, 23, 42, 0.82);
    color: var(--text-secondary);
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.cost-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    margin-top: 14px;
}

.cost-table-card {
    background: rgba(2, 6, 23, 0.34);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 8px;
    overflow-x: auto;
    padding: 12px;
}

.cost-table-card h3 {
    font-size: 0.92rem;
    margin: 0 0 10px;
}

.loading-cell {
    color: var(--text-secondary);
    font-style: italic;
    padding: 2rem !important;
    text-align: center !important;
}

.text-secondary {
    color: var(--text-secondary);
}

.metric-up {
    color: #34d399;
    font-weight: 700;
}

.metric-down {
    color: #fb7185;
    font-weight: 700;
}

.metric-flat {
    color: var(--text-secondary);
    font-weight: 700;
}

.query-row {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    margin-bottom: 0.35rem;
    max-width: 320px;
    white-space: normal;
}

.query-row span {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.badge {
    border-radius: 16px;
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.22rem 0.55rem;
}

.badge-active {
    background: rgba(52, 211, 153, 0.16);
    color: #34d399;
}

.badge-inactive {
    background: rgba(251, 113, 133, 0.16);
    color: #fb7185;
}

.badge-pending {
    background: rgba(251, 191, 36, 0.16);
    color: #fbbf24;
}

.badge-opportunity {
    background: rgba(56, 189, 248, 0.16);
    color: #38bdf8;
}

.badge-urgent {
    background: rgba(239, 68, 68, 0.2);
    color: #fecaca;
}

.badge-muted {
    background: rgba(148, 163, 184, 0.14);
    color: #cbd5e1;
}

.jobs-section {
    margin-top: 16px;
}

.review-section {
    margin-top: 16px;
}

.review-list {
    display: grid;
    gap: 14px;
}

.review-card {
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--agents-border);
    border-radius: 8px;
    padding: 16px;
}

.review-card-head {
    align-items: flex-start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.review-card h2 {
    font-size: 1rem;
    margin: 4px 0 8px;
}

.review-meta {
    color: var(--text-secondary);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.78rem;
}

.review-preview {
    background: rgba(2, 6, 23, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 8px;
    color: #dbeafe;
    font-family: Consolas, "Liberation Mono", monospace;
    font-size: 0.78rem;
    line-height: 1.42;
    margin: 12px 0;
    max-height: 260px;
    overflow: auto;
    padding: 12px;
    white-space: pre-wrap;
}

.review-preview-compact {
    max-height: 120px;
}

.review-textarea {
    background: rgba(2, 6, 23, 0.72);
    border: 1px solid rgba(45, 212, 191, 0.34);
    border-radius: 8px;
    color: #e0f2fe;
    font: 0.9rem/1.5 Inter, system-ui, sans-serif;
    margin: 12px 0;
    min-height: 180px;
    padding: 12px;
    resize: vertical;
    width: 100%;
}

.review-textarea:focus {
    border-color: rgba(52, 211, 153, 0.72);
    outline: none;
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.14);
}

.review-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.codex-packet summary {
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    margin: 10px 0 0;
    text-transform: uppercase;
}

.codex-result-textarea {
    min-height: 120px;
    white-space: pre-wrap;
}

.intake-routing-grid {
    margin-top: 12px;
}

.timeline-list {
    display: grid;
    gap: 8px;
    margin: 10px 0;
}

.timeline-item {
    background: rgba(2, 6, 23, 0.42);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 8px;
    padding: 10px 12px;
}

.timeline-item strong {
    color: var(--text-primary);
    display: block;
    font-size: 0.84rem;
}

.timeline-item span {
    color: var(--text-secondary);
    display: block;
    font-size: 0.74rem;
    margin-top: 2px;
}

.timeline-item p {
    color: #dbeafe;
    font-size: 0.82rem;
    line-height: 1.45;
    margin: 6px 0 0;
}

.danger-btn {
    background: rgba(251, 113, 133, 0.12);
    border: 1px solid rgba(251, 113, 133, 0.34);
    border-radius: 8px;
    color: #fb7185;
    cursor: pointer;
    font-weight: 800;
    padding: 0.65rem 1rem;
}

.control-plane-section {
    margin-top: 16px;
}

.orchestration-section {
    margin-top: 16px;
}

.section-note {
    color: var(--text-secondary);
    line-height: 1.45;
    margin: 6px 0 0;
    max-width: 820px;
}

.orchestration-actions {
    align-items: center;
    display: flex;
    gap: 10px;
}

.start-btn {
    background: linear-gradient(135deg, var(--action-green-warm), var(--action-green));
    border-color: rgba(94, 234, 212, 0.86);
    color: var(--action-green-text);
    min-width: 104px;
    text-transform: uppercase;
}

.start-btn:hover {
    background: linear-gradient(135deg, #86efac, #5eead4);
    border-color: #99f6e4;
}

.orchestration-list {
    display: grid;
    gap: 14px;
}

.orchestration-run-card {
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--agents-border);
    border-radius: 8px;
    padding: 16px;
}

.orchestration-steps {
    display: grid;
    gap: 10px;
}

.orchestration-step {
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    display: grid;
    gap: 12px;
    grid-template-columns: 40px minmax(0, 1fr);
    padding: 12px;
}

.step-index {
    background: rgba(20, 184, 166, 0.16);
    border-radius: 50%;
    color: #5eead4;
    display: grid;
    font-weight: 900;
    height: 34px;
    place-items: center;
    width: 34px;
}

.step-head {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.orchestration-step span {
    color: var(--text-secondary);
    display: block;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    margin-top: 2px;
    text-transform: uppercase;
}

.orchestration-step p {
    color: var(--text-secondary);
    line-height: 1.42;
    margin: 7px 0 0;
}

.step-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.step-details > span,
.hypothesis-chip {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.74rem;
    padding: 0.34rem 0.55rem;
}

.hypothesis-chip {
    display: inline-flex;
    gap: 7px;
    align-items: center;
}

.hypothesis-chip strong {
    color: var(--text-primary);
}

.hypothesis-chip em {
    color: #5eead4;
    font-style: normal;
}

.hypothesis-chip small {
    color: var(--text-secondary);
}

.hypothesis-chip.wildcard {
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.28);
}

.hypothesis-chip.wildcard em {
    color: #fbbf24;
}

.control-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
    font-family: var(--font-family);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.5rem 0.85rem;
}

.tab-btn.active {
    background: rgba(20, 184, 166, 0.16);
    border-color: rgba(20, 184, 166, 0.55);
    color: #5eead4;
}

.control-status {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 14px;
}

.control-status.error {
    color: #fb7185;
}

.control-tab-panel {
    display: none;
}

.control-tab-panel.active {
    display: block;
}

.config-list {
    display: grid;
    gap: 14px;
}

.config-list.compact {
    margin-top: 10px;
}

.config-card {
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--agents-border);
    border-radius: 8px;
    padding: 16px;
}

.agent-accordion {
    padding: 0;
}

.agent-accordion-summary {
    cursor: pointer;
    list-style: none;
    margin-bottom: 0;
    padding: 16px;
}

.agent-accordion-summary::-webkit-details-marker {
    display: none;
}

.agent-accordion-summary:hover {
    background: rgba(255, 255, 255, 0.035);
}

.agent-accordion-meta {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.accordion-cue {
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.accordion-cue::after {
    content: " +";
}

.agent-accordion[open] .accordion-cue::after {
    content: " -";
}

.agent-accordion[open] .accordion-cue {
    color: #5eead4;
}

.agent-accordion-body {
    border-top: 1px solid var(--agents-border);
    padding: 16px;
}

.compact-card {
    padding: 12px;
}

.config-card-head {
    align-items: flex-start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 14px;
}

.config-card h2 {
    font-size: 1rem;
    margin: 5px 0 6px;
}

.config-card p {
    color: var(--text-secondary);
    line-height: 1.45;
    margin: 0;
}

.config-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.usage-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin: 12px 0 16px;
}

.routine-runtime-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.usage-metric {
    background: rgba(2, 6, 23, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 8px;
    padding: 10px;
}

.usage-metric span,
.usage-metric small {
    color: var(--text-secondary);
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.usage-metric strong {
    display: block;
    font-size: 1rem;
    margin: 5px 0 3px;
}

.field-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.field-block span,
.check-row span {
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.field-block input,
.field-block select,
.field-block textarea {
    background: rgba(2, 6, 23, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.86rem;
    min-height: 38px;
    padding: 0.55rem 0.65rem;
    width: 100%;
}

.field-block textarea {
    font-family: Consolas, "Liberation Mono", monospace;
    line-height: 1.42;
    min-height: 96px;
    resize: vertical;
    white-space: pre;
}

.check-row {
    align-items: center;
    align-self: end;
    display: flex;
    gap: 8px;
    min-height: 38px;
}

.check-row input {
    height: 16px;
    width: 16px;
}

.config-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 4px;
}

.config-actions.add-row {
    margin-bottom: 14px;
}

.routine-toolbar {
    justify-content: space-between;
}

.inline-select {
    align-items: center;
    display: inline-flex;
    gap: 8px;
}

.inline-select span {
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.inline-select select {
    background: rgba(2, 6, 23, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.82rem;
    min-height: 38px;
    min-width: 220px;
    padding: 0.45rem 0.6rem;
}

.site-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.site-chip {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    padding: 0.28rem 0.6rem;
}

.subsection-title {
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    margin: 18px 0 10px;
    text-transform: uppercase;
}

.empty-state {
    border: 1px dashed rgba(148, 163, 184, 0.24);
    border-radius: 8px;
    color: var(--text-secondary);
    padding: 18px;
    text-align: center;
}

.insights-section {
    margin-top: 16px;
}

.kpi-section {
    margin-top: 16px;
}

.insights-list {
    display: grid;
    gap: 12px;
}

.insight-item {
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--agents-border);
    border-radius: 8px;
    padding: 16px;
}

.insight-head {
    align-items: flex-start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.insight-item h2 {
    font-size: 1rem;
    margin: 6px 0 10px;
}

.insight-item p,
.insight-item li {
    color: var(--text-secondary);
    line-height: 1.45;
}

.insight-item ul {
    margin: 10px 0;
    padding-left: 20px;
}

.kpi-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}

.kpi-chip {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    padding: 0.25rem 0.55rem;
}

.run-summary {
    max-width: 520px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.run-meta {
    color: var(--text-secondary);
    display: block;
    font-size: 0.76rem;
    margin-top: 4px;
}

.secondary-btn,
.primary-btn,
.project-select {
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-family);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.5rem 1rem;
}

.secondary-btn {
    background: var(--action-green-soft);
    border: 1px solid rgba(52, 211, 153, 0.54);
    color: #bbf7d0;
}

.primary-btn {
    background: linear-gradient(135deg, var(--action-green-warm), var(--action-green));
    border: 1px solid rgba(94, 234, 212, 0.86);
    box-shadow: 0 10px 22px rgba(20, 184, 166, 0.18);
    color: var(--action-green-text);
}

.primary-btn:hover,
.secondary-btn:hover {
    background: linear-gradient(135deg, #86efac, #5eead4);
    border-color: #99f6e4;
    color: #031018;
}

.primary-btn:focus-visible,
.secondary-btn:focus-visible,
.tab-btn:focus-visible {
    outline: 2px solid #bbf7d0;
    outline-offset: 2px;
}

.project-select {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--text-primary);
    min-height: 36px;
}

.publish-diagnostics {
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    margin-top: 0.8rem;
    padding: 0.8rem;
}

.publish-diagnostics.diag-ready {
    border-color: rgba(52, 211, 153, 0.45);
}

.publish-diagnostics.diag-blocked {
    border-color: rgba(251, 113, 133, 0.45);
}

.diag-summary {
    align-items: center;
    color: var(--text-primary);
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.55rem;
}

.diag-summary span {
    color: var(--text-muted);
}

.diag-steps {
    display: grid;
    gap: 0.4rem;
}

.diag-step {
    align-items: center;
    color: var(--text-muted);
    display: grid;
    gap: 0.5rem;
    grid-template-columns: 10px minmax(130px, 0.3fr) 1fr;
    line-height: 1.35;
}

.diag-dot {
    border-radius: 999px;
    display: inline-block;
    height: 8px;
    width: 8px;
}

.diag-passed .diag-dot {
    background: #34d399;
}

.diag-blocked .diag-dot {
    background: #fb7185;
}

.diag-not_checked .diag-dot {
    background: #fbbf24;
}

.diag-label {
    color: var(--text-primary);
    font-weight: 700;
}

.diag-message {
    color: var(--text-muted);
}

@media (max-width: 800px) {
    .agents-header,
    .section-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .global-status-bar {
        grid-template-columns: 1fr;
    }

    .global-status-metrics {
        grid-template-columns: 1fr;
    }

    .admin-menu-bar {
        align-items: stretch;
        flex-direction: column;
        top: 0;
    }

    .menu-group,
    .superadmin-menu-items {
        align-items: stretch;
        flex-direction: column;
    }

    .superadmin-menu[open] .superadmin-menu-items {
        max-width: 100%;
        position: static;
        width: auto;
    }

    .agents-summary {
        grid-template-columns: 1fr;
    }

    .start-panel {
        grid-template-columns: 1fr;
    }

    .start-panel-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .start-panel-actions .project-select,
    .start-panel-actions .primary-btn {
        width: 100%;
    }

    .admin-grid {
        grid-template-columns: 1fr;
    }

    .config-grid {
        grid-template-columns: 1fr;
    }

    .usage-grid {
        grid-template-columns: 1fr;
    }

    .admin-tile {
        flex-direction: column;
    }

    .orchestration-actions {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .orchestration-actions .project-select,
    .orchestration-actions .primary-btn {
        width: 100%;
    }
}
