:root { color-scheme: dark; --bg:#101110; --surface:#1a1c1a; --surface-2:#222522; --outline:#343834; --text:#f0f3ef; --muted:#a1a9a0; --accent:#80d76e; --accent-ink:#0a1b0a; --error:#f3a4a4; --blue:#9cc7ea; --radius:14px; font-family: Arial, Helvetica, sans-serif; font-size:16px; }
* { box-sizing:border-box; }
body { margin:0; background:var(--bg); color:var(--text); line-height:1.55; }
a { color:var(--accent); text-decoration:none; }
a:hover { text-decoration:underline; }
button,input,select,textarea { font:inherit; }
button { cursor:pointer; }
button:disabled { opacity:.35; cursor:not-allowed; }
:focus-visible { outline:3px solid var(--accent); outline-offset:2px; }
code { color:#d4e8d1; overflow-wrap:anywhere; }
hr { border:0; border-top:1px solid var(--outline); margin:6px 0; }
h1,h2,h3,p { margin-top:0; }
h1 { font-size:clamp(2rem,4.3vw,3.4rem); line-height:1.08; font-weight:750; letter-spacing:-.055em; margin-bottom:15px; }
h2 { font-size:1.15rem; letter-spacing:-.025em; }
h3 { font-size:1.04rem; }
small,.small { font-size:.82rem; }
.muted { color:var(--muted); }
.subtle { color:#849085; }
.eyebrow { color:var(--accent); font-weight:750; font-size:.7rem; letter-spacing:.13em; text-transform:uppercase; margin-bottom:15px; }
.app-shell { display:grid; grid-template-columns:252px minmax(0,1fr); min-height:100vh; }
.sidebar { background:#151715; border-right:1px solid var(--outline); position:sticky; height:100vh; top:0; display:flex; flex-direction:column; padding:28px 14px 18px; z-index:10; }
.brand { display:flex; align-items:center; gap:12px; color:var(--text); padding:0 10px 35px; }
.brand:hover { text-decoration:none; }
.brand-symbol { display:grid; place-items:center; color:var(--accent-ink); background:var(--accent); border-radius:9px; height:43px; width:43px; font-size:1.5rem; font-weight:900; }
.brand strong { display:block; font-size:1.2rem; line-height:1.05; letter-spacing:.065em; }
.brand small { display:block; font-size:.61rem; letter-spacing:.1em; color:var(--muted); margin-top:5px; }
.side-nav { display:grid; gap:5px; }
.side-nav a { display:flex; align-items:center; gap:11px; color:#c2c9c1; padding:12px 15px; border-radius:9px; font-size:.92rem; }
.side-nav a:hover { text-decoration:none; background:var(--surface-2); }
.side-nav a.active { background:#263829; color:#e6f7e5; font-weight:700; }
.nav-mark { width:7px; height:7px; flex:0 0 7px; border:1px solid #7b897b; border-radius:2px; }
.active .nav-mark { background:var(--accent); border-color:var(--accent); }
.sidebar-footer { margin-top:auto; border-top:1px solid var(--outline); padding:18px 12px 5px; }
.online-dot { font-size:.63rem; letter-spacing:.09em; font-weight:700; color:var(--muted); margin-bottom:11px; }
.online-dot::before { content:''; display:inline-block; width:7px; height:7px; background:var(--accent); border-radius:50%; margin-right:8px; }
.text-button { border:none; background:none; color:var(--muted); padding:0; }
.text-button:hover { color:var(--text); }
.main-column { min-width:0; }
.topbar { border-bottom:1px solid var(--outline); min-height:72px; padding:18px clamp(20px,3vw,50px); display:flex; align-items:center; justify-content:space-between; gap:20px; }
.topbar-location { font-size:.72rem; letter-spacing:.1em; font-weight:800; color:var(--muted); }
.topbar-right { margin-left:auto; color:var(--muted); font-size:.8rem; }
.topbar-right strong { color:var(--text); }
.menu-toggle { display:none; color:var(--text); background:transparent; border:1px solid var(--outline); padding:5px 10px; border-radius:7px; }
.content { width:100%; max-width:1580px; margin:0 auto; padding:35px clamp(20px,3vw,50px) 90px; min-height:calc(100vh - 140px); }
.page-heading { margin-bottom:32px; }
.page-heading p { max-width:720px; color:var(--muted); font-size:1.03rem; margin:0; }
.split-heading { display:flex; justify-content:space-between; align-items:end; gap:22px; }
.split-heading form { flex-shrink:0; }
.metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:13px; margin-bottom:36px; }
.metric { background:var(--surface); border:1px solid var(--outline); border-radius:var(--radius); padding:20px 22px; }
.metric span { display:block; color:var(--muted); font-size:.68rem; font-weight:800; letter-spacing:.08em; }
.metric strong { display:block; font-size:2.4rem; line-height:1.25; margin:14px 0 5px; }
.metric small { color:var(--muted); }
.section-header { display:flex; justify-content:space-between; align-items:center; gap:15px; margin-bottom:16px; }
.section-header h2 { margin:0; }
.mini-link { font-size:.8rem; font-weight:700; }
.project-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin-bottom:33px; }
.project-card,.panel,.news-card { border:1px solid var(--outline); border-radius:var(--radius); background:var(--surface); }
.project-card { padding:23px; min-width:0; display:flex; flex-direction:column; min-height:202px; }
.project-head { display:flex; justify-content:space-between; gap:15px; align-items:center; margin-bottom:21px; }
.project-icon { flex:0 0 auto; width:37px; height:37px; display:grid; place-items:center; border:1px solid #4b574b; border-radius:9px; background:#2b352b; font-weight:750; color:var(--accent); }
.project-card h3 { font-size:1.25rem; margin-bottom:4px; }
.project-card p { font-size:.85rem; color:var(--muted); }
.card-bottom { border-top:1px solid var(--outline); margin-top:auto; padding-top:14px; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:8px; }
.card-bottom small { color:var(--muted); overflow-wrap:anywhere; }
.card-bottom a { white-space:nowrap; font-size:.78rem; font-weight:700; }
.pill { display:inline-block; white-space:nowrap; border:1px solid #5a5c57; background:#30322e; color:#d2d8ce; border-radius:100px; padding:3px 9px; font-size:.68rem; font-weight:700; text-transform:capitalize; }
.pill.green { color:var(--accent); background:#233a25; border-color:#365e34; }
.pill.red { color:var(--error); background:#442c2c; border-color:#674242; }
.pill.blue { color:var(--blue); background:#243746; border-color:#3d5f78; }
.two-columns { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.two-columns.wide-left { grid-template-columns:minmax(0,1.5fr) minmax(315px,1fr); }
.panel { padding:24px; min-width:0; }
.panel>h2 { margin-bottom:20px; }
.compact-record { display:flex; justify-content:space-between; align-items:center; gap:15px; border-bottom:1px solid var(--outline); padding:14px 0; }
.compact-record:last-child { border-bottom:none; }
.compact-record strong { display:block; font-size:.86rem; }
.compact-record small { display:block; color:var(--muted); margin-top:3px; }
.news-record a { display:block; font-size:.83rem; line-height:1.35; margin-top:4px; color:var(--text); }
.empty { color:var(--muted); padding:22px 0; }
.project-row,.agent-row,.task-row,.run-row { display:flex; align-items:center; gap:14px; border-bottom:1px solid var(--outline); padding:17px 0; }
.project-row:last-child,.agent-row:last-child,.task-row:last-child,.run-row:last-child { border-bottom:0; }
.project-row strong,.agent-row strong,.task-row strong,.run-row strong { display:block; }
.project-row small,.agent-row small,.task-row small,.run-row small { color:var(--muted); display:block; }
.project-row p,.agent-row p,.task-row p,.run-row p { color:var(--muted); margin:7px 0 0; font-size:.83rem; overflow-wrap:anywhere; }
.project-row .small-icon { width:32px; height:32px; }
.grow,.agent-summary { flex:1; min-width:0; }
.agent-row,.task-row,.run-row { align-items:flex-start; justify-content:space-between; }
.record-actions { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:8px; }
.record-actions form { margin:0; }
.record-actions form:has(.status-select) { display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.btn { display:inline-flex; justify-content:center; align-items:center; gap:7px; min-height:38px; padding:8px 15px; color:var(--text); background:var(--surface-2); border:1px solid #515952; border-radius:8px; font-size:.85rem; font-weight:700; text-align:center; }
.btn:hover { text-decoration:none; border-color:#d5e4d0; background:#2b302b; }
.btn.primary { background:var(--accent); border-color:var(--accent); color:var(--accent-ink); }
.btn.primary:hover { background:#a0e493; }
.btn.subtle-button { border-color:var(--outline); background:transparent; }
.form-grid { display:grid; gap:16px; }
.form-grid label { display:grid; gap:5px; color:#d8e1d6; font-size:.8rem; font-weight:700; }
input,textarea,select { display:block; width:100%; color:var(--text); background:#101210; border:1px solid #4a504a; border-radius:7px; padding:11px 12px; min-height:43px; font-size:.9rem; }
textarea { resize:vertical; }
input::placeholder { color:#768175; }
.field-pair { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.checkbox-line { display:flex!important; flex-direction:row; align-items:center; }
.checkbox-line input { width:auto; min-height:unset; }
.status-select { min-height:37px; padding:5px 8px; width:auto; max-width:145px; font-size:.79rem; }
.settings-form { border-top:1px solid var(--outline); margin-top:23px; padding-top:22px; }
.alert { padding:13px 15px; border:1px solid #38683c; color:#dbf6d9; background:#233628; border-radius:9px; margin-bottom:20px; font-size:.89rem; }
.alert.error { color:#ffd9d9; border-color:#8f4d4d; background:#3b292a; }
.news-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:15px; }
.news-card { padding:23px; }
.news-card h2 { font-size:1.1rem; line-height:1.35; }
.news-card h2 a { color:var(--text); }
.news-card p { color:var(--muted); font-size:.83rem; }
.news-card small { color:var(--muted); }
.main-footer { padding:20px clamp(20px,3vw,50px); border-top:1px solid var(--outline); color:var(--muted); font-size:.76rem; }
.install-page,.login-page { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px; }
.install-card { width:min(100%,530px); border:1px solid var(--outline); background:var(--surface); padding:clamp(24px,5vw,42px); border-radius:18px; }
.install-card h1 { font-size:2.15rem; }
.install-card p { font-size:.92rem; }
.install-card .form-grid hr { width:100%; }
.visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
@media(min-width:1550px) { .project-grid { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media(max-width:1050px) { .two-columns,.two-columns.wide-left { grid-template-columns:1fr; } .news-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:760px) {
 .app-shell { display:block; }
 .sidebar { position:fixed; top:0; bottom:0; left:0; width:min(82vw,280px); transform:translateX(-105%); transition:transform .2s ease; box-shadow:8px 0 30px #0008; }
 .sidebar.is-open { transform:translateX(0); }
 .menu-toggle { display:inline-flex; }
 .topbar { padding:14px 17px; min-height:61px; }
 .topbar-location { display:none; }
 .content { padding:30px 17px 70px; }
 .metrics { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
 .metric { padding:14px; } .metric strong { font-size:2rem; }
 .project-grid,.news-grid { grid-template-columns:1fr; }
 .panel { padding:18px; }
 .split-heading { align-items:start; flex-direction:column; }
 .agent-row,.task-row,.run-row { flex-direction:column; align-items:stretch; }
 .record-actions { justify-content:start; }
 .project-row { flex-wrap:wrap; }
 .field-pair { grid-template-columns:1fr; }
 .main-footer { padding:20px 17px; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto!important; transition:none!important; } }

.repo-metrics { display:flex; flex-wrap:wrap; align-items:center; gap:13px; padding-bottom:13px; color:var(--muted); font-size:.72rem; }
.repo-metrics strong { color:var(--text); }

/* AGNT-X System Health: one read-only operational overview, responsive to mobile. */
.system-health { margin-bottom:32px; }
.system-health .section-header { align-items:flex-start; margin-bottom:20px; }
.system-health .section-header .eyebrow { margin-bottom:8px; }
.system-health .section-header h2 { font-size:1.3rem; margin-bottom:5px; }
.system-health .section-header p { margin:0; }
.health-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.health-item { border:1px solid var(--outline); border-radius:10px; padding:19px; background:var(--bg); min-width:0; }
.health-item-heading { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:8px; margin-bottom:14px; }
.health-item-heading h3 { margin:0; font-size:.96rem; }
.health-main { margin:0 0 12px; font-size:.85rem; color:var(--text); }
.health-item .muted.small { margin:-7px 0 10px; }
.health-facts { margin:0; display:grid; gap:9px; }
.health-facts div { display:flex; gap:10px; justify-content:space-between; border-top:1px solid var(--outline); padding-top:9px; }
.health-facts dt { color:var(--muted); font-size:.77rem; }
.health-facts dd { margin:0; font-size:.77rem; text-align:right; overflow-wrap:anywhere; max-width:64%; }
.health-time-note { color:var(--muted); }
.health-warning-details { margin-top:18px; padding-top:14px; border-top:1px solid var(--outline); font-size:.83rem; }
.health-warning-details summary { cursor:pointer; font-weight:700; }
.health-warning-details p { margin:12px 0; }
.health-warning-details ul { padding-left:21px; margin:0; }
.health-warning-details li { padding:4px 0; overflow-wrap:anywhere; }
.pill.amber { color:#f0d796; background:#423820; border-color:#77603b; }
@media(max-width:950px) { .health-grid { grid-template-columns:1fr; } }
@media(max-width:760px) {
  .health-item { padding:15px; }
  .system-health .section-header { flex-wrap:wrap; }
  .health-facts div { flex-direction:column; gap:2px; }
  .health-facts dd { max-width:100%; text-align:left; }
}

/* AGNT-X v0.2 — task control and read-only agent reports. */
.task-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:20px; }
.task-summary>div,.report-metrics>div { display:flex; flex-direction:column; gap:2px; border:1px solid var(--outline); border-radius:10px; background:var(--surface); padding:15px; }
.task-summary strong,.report-metrics strong { display:block; font-size:1.5rem; font-weight:750; line-height:1.1; }
.task-summary span,.report-metrics span { color:var(--muted); font-size:.75rem; }
.task-filters { display:flex; align-items:flex-end; flex-wrap:wrap; gap:10px; margin-bottom:14px; padding-bottom:17px; border-bottom:1px solid var(--outline); }
.task-filters label { display:grid; gap:4px; color:var(--muted); font-weight:700; font-size:.75rem; flex:1 1 135px; }
.task-filters select { min-height:38px; padding:7px 9px; }
.task-entry { border-bottom:1px solid var(--outline); padding:20px 0; }
.task-entry:last-child { border-bottom:0; padding-bottom:0; }
.task-entry-header { display:flex; align-items:flex-start; gap:12px; justify-content:space-between; }
.task-entry-title { display:flex; flex-wrap:wrap; gap:9px; align-items:center; margin-bottom:3px; }
.task-entry-title strong { font-size:1rem; line-height:1.35; }
.task-entry-header small { color:var(--muted); }
.task-entry-details { margin:10px 0 0; color:var(--muted); overflow-wrap:anywhere; font-size:.84rem; }
.task-review-note { margin-top:12px; padding:11px 13px; background:var(--bg); border:1px solid var(--outline); border-radius:9px; }
.task-review-note strong { font-size:.79rem; }
.task-review-note p { margin:3px 0 0; font-size:.82rem; color:var(--muted); overflow-wrap:anywhere; }
.task-entry-links { display:flex; flex-wrap:wrap; gap:14px; padding-top:12px; }
.task-entry-actions { display:flex; align-items:center; flex-wrap:wrap; gap:9px; margin-top:15px; }
.task-inline-form { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:0; }
.task-agent-select { max-width:230px; }
.task-entry-actions .btn,.report-actions .btn { min-height:37px; }
.reports-layout { grid-template-columns:minmax(275px,.8fr) minmax(0,1.4fr); align-items:start; }
.report-list-row { display:flex; gap:10px; align-items:center; justify-content:space-between; border-bottom:1px solid var(--outline); padding:14px 10px; border-radius:6px; color:var(--text); }
.report-list-row:hover { text-decoration:none; background:var(--surface-2); }
.report-list-row.selected { background:#293729; }
.report-list-row strong { font-size:.84rem; }
.report-list-row small { display:block; color:var(--muted); font-size:.73rem; margin-top:3px; }
.report-topline { display:flex; flex-wrap:wrap; align-items:flex-start; justify-content:space-between; gap:10px; }
.report-topline h2 { margin-bottom:2px; }
.report-topline .eyebrow { margin-bottom:7px; }
.report-actions { display:flex; flex-wrap:wrap; gap:8px; margin:8px 0 18px; }
.report-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; margin:16px 0; }
.report-detail h3 { margin:24px 0 12px; }
.report-finding { border-top:1px solid var(--outline); padding:15px 0; }
.report-finding p { font-size:.85rem; margin:0 0 10px; overflow-wrap:anywhere; }
.report-plan { border:1px solid var(--outline); border-radius:9px; background:var(--bg); padding:16px; font-size:.84rem; overflow-wrap:anywhere; }
.latest-reports-panel { margin-bottom:26px; }
.reports-home-link { text-align:right; margin-bottom:8px; }
@media(max-width:1050px) { .reports-layout { grid-template-columns:1fr; } }
@media(max-width:760px) {
 .task-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .task-entry-header { flex-wrap:wrap; }
 .task-entry-actions { align-items:stretch; flex-direction:column; }
 .task-inline-form { width:100%; }
 .task-inline-form select { flex:1; min-width:130px; max-width:none; }
 .task-inline-form .btn { flex:0 0 auto; }
 .task-entry-actions form:not(.task-inline-form) { width:100%; }
 .task-entry-actions form:not(.task-inline-form) .btn { width:100%; }
 .report-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .report-list-row { flex-wrap:wrap; }
}

/* v0.3: AI execution controls — aligned with existing AGNT-X UI components. */
.ai-policy-panel { margin-top:18px; }
.ai-policy-panel .form-grid { max-width:560px; }
.ai-policy-panel input[type=number] { max-width:160px; }
.ai-policy-panel .section-header { align-items:center; }
