/* Fleet layout. Card sections follow their information hierarchy, without compact overrides. */
#bots-page { --bot-muted:#8fa7b6; --bot-ink:#d6e6ed; --bot-line:#89b8cc20; }
#bots-page .bots-page-heading { align-items:flex-end; gap:20px; margin-bottom:22px; }
#bots-page .bots-page-heading h1 { font-size:28px; line-height:1.2; letter-spacing:-.8px; }
#bots-page .bots-page-heading .page-subtitle { max-width:620px; margin-top:9px; font-size:13px; line-height:1.6; }
#bots-page .bots-page-heading .eyebrow { margin-bottom:10px; }
.bots-stats { display:flex; flex-wrap:wrap; align-items:center; gap:12px 28px; padding:0 0 20px; margin-bottom:24px; border-bottom:1px solid var(--bot-line,#89b8cc20); }
.bots-stats>div { display:flex; align-items:baseline; gap:9px; min-width:0; }
.bots-stats>div>span { display:inline-flex; align-items:center; gap:7px; font-size:12px; color:#8fa7b6; }
.bots-stats strong { font-size:19px; font-weight:600; color:#d5e6ed; font-variant-numeric:tabular-nums; }
.bots-stats [data-bots-online] { color:#8ce5ca; }
.bots-stats [data-bots-offline] { color:#e6a1aa; }
.bots-stats .bots-total-balance { margin-left:auto; padding-left:28px; border-left:1px solid #89b8cc20; }
.bots-total-balance small,.bots-stats>p { display:none; }
.fleet-dot { width:6px; height:6px; flex:none; border-radius:50%; }
.fleet-dot.is-online { background:#7bddc0; box-shadow:0 0 0 3px #7bddc010; }
.fleet-dot.is-offline { background:#d795a1; }
.bots-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:22px; }
.bot-card { min-width:0; position:relative; padding:22px; border:1px solid #7596a52e; border-radius:18px; background:linear-gradient(135deg,#11212eee,#0d1925f5); box-shadow:0 8px 28px #00000013; }
.bot-card.is-online:not(.is-away) { border-color:#74bba432; }
.bot-card.is-away { border-color:#bd9a5a44; }
.bot-card.is-offline { border-color:#bb7d8c42; }
.bot-card-top { display:flex; align-items:center; gap:12px; margin-bottom:18px; min-width:0; }
.bot-avatar { display:grid; place-items:center; flex:none; width:42px; height:42px; border:1px solid #76d8bf32; border-radius:12px; background:#3b8b7818; color:#a5eedc; font-size:14px; font-weight:650; }
.bot-card.is-offline .bot-avatar { border-color:#ae8c9a30; background:#8f677015; color:#c69eaa; }
.bot-card.is-away .bot-avatar { border-color:#cbad7838; background:#b3965d13; color:#dfc491; }
.bot-identity { min-width:0; flex:1; }
.bot-identity h2 { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#e0ebef; font-size:18px; font-weight:620; line-height:1.35; letter-spacing:-.3px; }
.bot-identity p { max-width:240px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; margin-top:4px; color:#829eaf; font-size:11px; }
.bot-identity-meta { display:flex; align-items:center; flex-wrap:wrap; gap:7px; margin-top:4px; }
.bot-type { display:inline-flex; align-items:center; max-width:100%; font-size:11px; line-height:1.5; color:#9ebbc7; }
.bot-protocol { color:#718e9e; font-size:10px; line-height:1.5; font-variant-numeric:tabular-nums; }
.bot-protocol::before { content:'·'; margin-right:7px; color:#476574; }
.bot-protocol strong { font-weight:500; }
.bot-status { display:inline-flex; align-items:center; flex:none; gap:6px; padding:5px 8px; border:1px solid #70cdb12a; border-radius:20px; background:#63c7a90b; color:#9be1cb; font-size:11px; line-height:1.4; white-space:nowrap; }
.bot-status i { width:5px; height:5px; border-radius:50%; background:currentColor; }
.bot-status.is-offline { border-color:#c58b9830; background:#bf7d8d0a; color:#d59ca7; }
.bot-status.is-away { border-color:#ccad7332; background:#c6a66a0a; color:#ddc28d; }

/* Current work is the visual anchor. */
.bot-workspace { min-width:0; padding:14px 16px; border:1px solid #70b8b322; border-radius:12px; background:#08192377; }
.bot-scan-state { display:flex; justify-content:space-between; align-items:baseline; gap:12px; }
.bot-scan-state>span { color:#829eae; font-size:11px; line-height:1.6; }
.bot-scan-state>strong { min-width:0; color:#cce4e6; font-size:13px; font-weight:550; line-height:1.55; text-align:right; overflow-wrap:anywhere; }
.bot-workspace .bot-scan-state>strong { color:#c7eee0; font-size:14px; }
.bot-live-activity { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; margin-top:6px; color:#94acba; font-size:11px; line-height:1.6; overflow-wrap:anywhere; }
.bot-live-activity.is-alert { color:#e0bd83; }
.bot-command-note { margin-top:9px; color:#d7bb89; font-size:11px; line-height:1.6; overflow-wrap:anywhere; }
.bot-command-note.is-confirmed { color:#8dc9b4; }
.bot-action-error,.bot-state-message { margin-top:9px; color:#e5a4af; font-size:11px; line-height:1.7; overflow-wrap:anywhere; }
.bot-workspace .bot-action-error,.bot-workspace .bot-state-message { max-height:64px; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; }
.bot-workspace .bot-action-error:focus-visible,.bot-workspace .bot-state-message:focus-visible { outline:2px solid #8ee8d4; outline-offset:3px; }
.bot-scan-mode { margin-top:6px; color:#839eaf; font-size:11px; line-height:1.6; }

/* Progress and durability share an explicit fill, independent of browser meter painting. */
.bot-meter { display:block; position:relative; overflow:hidden; width:100%; height:6px; margin-top:7px; border-radius:6px; background:#809faa24; --bot-meter-color:#8bd6bd; }
.bot-meter[hidden] { display:none!important; }
.bot-meter-fill { display:block; height:100%; max-width:100%; border-radius:inherit; background:var(--bot-meter-color); transition:width .2s ease; }
.bot-meter[data-level=warning] { --bot-meter-color:#d8b677; }
.bot-meter[data-level=low] { --bot-meter-color:#dc8b98; }
.bot-excavation-progress { min-width:0; padding-top:12px; }
.bot-excavation-progress-top { display:flex; align-items:baseline; justify-content:space-between; gap:10px; }
.bot-excavation-progress h3 { color:#9bb6c1; font-size:11px; font-weight:500; }
.bot-excavation-progress-top>span { margin-left:auto; color:#87a6b4; font-size:11px; font-variant-numeric:tabular-nums; }
.bot-excavation-progress>p { margin-top:4px; color:#8ea7b6; font-size:11px; line-height:1.5; }
.bot-excavation-progress.is-stale>p { color:#dbbb84; }
.bot-excavation-counts { display:flex; align-items:baseline; flex-wrap:wrap; justify-content:space-between; gap:3px 10px; margin-top:7px; font-size:12px; line-height:1.6; font-variant-numeric:tabular-nums; }
.bot-excavation-counts strong { color:#c4e3e3; font-weight:550; }
.bot-excavation-counts>span { color:#97b5c0; }
.bot-excavation-progress>small { display:block; margin-top:6px; color:#7897a6; font-size:10px; line-height:1.5; }
.bot-workspace .bot-excavation-progress h3,.bot-workspace .bot-excavation-progress:not(.is-stale)>p { display:none; }
.bot-workspace .bot-excavation-progress-top { min-height:0; }

/* At-a-glance telemetry. */
.bot-overview { display:grid; grid-template-columns:minmax(95px,.8fr) minmax(0,1.7fr); align-items:center; gap:18px; padding:17px 0; }
.bot-balance { min-width:0; }
.bot-balance>span { display:block; color:#87a2b0; font-size:11px; line-height:1.5; }
.bot-balance>strong { display:block; margin-top:4px; color:#d1e6df; font-size:19px; font-weight:570; line-height:1.3; letter-spacing:-.3px; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.bot-balance>strong.is-unknown { color:#819aa9; font-size:14px; font-weight:450; }
.bot-balance>small { display:block; margin-top:5px; color:#738f9f; font-size:10px; }
.bot-world-state { min-width:0; }
.bot-world-state h3 { display:none; }
.bot-world-status { margin-bottom:6px; color:#8ba5b3; font-size:11px; line-height:1.5; }
.bot-world-state.is-stale .bot-world-status { color:#dcbd86; }
.bot-world-state:has([data-bot-world-measured]:not([hidden])):not(.is-stale) .bot-world-status { display:none; }
.bot-world-coordinates { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:0; }
.bot-world-coordinates>div { min-width:0; }
.bot-world-coordinates dt { color:#6e8d9c; font-size:10px; line-height:1.5; }
.bot-world-coordinates dd { margin:3px 0 0; color:#bdd2dc; font-size:12px; font-weight:500; line-height:1.6; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.bot-world-vitals { display:flex; flex-wrap:wrap; gap:5px 17px; margin:8px 0 0; }
.bot-world-vitals>div { display:flex; align-items:baseline; gap:6px; min-width:0; }
.bot-world-vitals dt { color:#7896a5; font-size:10px; }
.bot-world-vitals dd { margin:0; color:#bcd6dc; font-size:11px; line-height:1.5; font-variant-numeric:tabular-nums; }
.bot-world-measured,.bot-tools-measured { display:none; }

/* Equipment stays compact; detailed custody notes live in Diagnostics. */
.bot-equipment { padding:13px 0 15px; border-top:1px solid #89b8cc18; }
.bot-tools-state { min-width:0; }
.bot-tools-state h3 { margin:0; color:#8da9b6; font-size:11px; font-weight:500; }
.bot-tools-state>p { margin-top:5px; color:#809ca9; font-size:11px; line-height:1.5; }
.bot-tools-state.is-stale>[data-bot-tools-status] { color:#d6b982; }
.bot-tools-state:has([data-bot-tool]):not(.is-stale)>[data-bot-tools-status] { display:none; }
.bot-tools-state ul { display:grid; gap:9px; max-height:108px; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; list-style:none; padding:0; margin:9px 0 0; }
.bot-tools-state li { min-width:0; }
.bot-tools-state li>div:not(.bot-meter) { display:flex; justify-content:space-between; flex-wrap:wrap; gap:2px 12px; font-size:11px; line-height:1.5; }
.bot-tools-state li span { color:#9bb6c2; }
.bot-tools-state li strong { color:#c0d8dc; font-weight:500; font-variant-numeric:tabular-nums; }
.bot-tools-state li>.bot-meter { height:4px; margin-top:4px; }
.bot-tools-empty { color:#7592a1; font-size:11px; line-height:1.5; }
[data-bot-tools-list]:focus-visible { outline:2px solid #8ee8d4; outline-offset:3px; }
.bot-kit-summary { display:flex; align-items:baseline; justify-content:space-between; gap:10px; padding-top:12px; color:#7f9eac; font-size:11px; line-height:1.5; }
.bot-kit-summary>strong,.bot-kit-summary [data-mining-kit-state] { min-width:0; color:#b4d7d6; font-size:11px; font-weight:500; text-align:right; overflow-wrap:anywhere; }
.bot-mining-kit { min-width:0; }
.bot-equipment .bot-mining-kit { padding:0; border:0; }

/* Primary actions are always visible. Secondary operations expand below them. */
.bot-primary-actions { display:flex; align-items:stretch; flex-wrap:wrap; gap:8px; padding-bottom:14px; border-bottom:1px solid #89b8cc20; }
.bot-primary-actions>.bot-scan-start { flex:1 1 110px; }
.bot-primary-actions>.bot-scan-stop { flex:0 0 auto; }
.bot-primary-actions .bot-brain-toggle { display:flex; align-items:center; justify-content:center; flex:0 0 auto; width:auto; min-height:38px; margin:0; padding:8px 11px; border:1px solid #83b3c330; border-radius:8px; background:#83b3c307; color:#9dbdc8; font-size:11px; }
.bot-primary-actions .bot-brain-toggle>small,.bot-primary-actions .bot-brain-toggle-mark { display:none; }
.bot-primary-actions .bot-brain-toggle:hover { border-color:#8bcbb24d; background:#83b3c310; color:#c2e6df; }
.bot-scan-buttons { display:flex; align-items:stretch; flex-wrap:wrap; gap:8px; margin-top:12px; }
.bot-scan-start,.bot-scan-stop,.bot-join-button { min-height:38px; padding:9px 13px; border:1px solid #71bda64a; border-radius:8px; background:#68bba715; color:#b1e7d8; font-size:12px; font-weight:500; line-height:1.5; text-align:center; }
.bot-scan-start:hover { background:#68bba728; border-color:#8cd6bf6b; }
.bot-scan-stop { border-color:#b8a38335; background:#b59a7110; color:#ccb895; }
.bot-scan-stop:hover { background:#b59a7120; border-color:#cdb48b61; }
.bot-primary-actions>.bot-scan-start { border-color:#84d7bf80; background:#8bd9bd; color:#0f2d29; font-weight:600; }
.bot-primary-actions>.bot-scan-start:not(:disabled):hover { background:#a4e6ce; border-color:#b0efda; }
.bot-primary-actions>.bot-scan-start:disabled { background:#83b3c30b; border-color:#83b3c330; color:#93acb9; }
.bot-scan-buttons>button { flex:1 1 110px; }
.bot-card button:disabled,.bot-excavation-form input:disabled { opacity:.4; cursor:not-allowed; }
.bot-card button:focus-visible,.bot-card a:focus-visible { outline:2px solid #8ee8d4; outline-offset:3px; }
.bot-join-actions { margin-top:12px; }
.bot-join-actions:first-child { margin-top:0; }
.bot-join-button { width:100%; border-color:#86b8cf40; background:#78aec410; color:#b1d2e1; }
.bot-join-button:hover { background:#78aec41e; border-color:#9ecbd255; }
.bot-connect-link { display:inline-flex; align-items:center; justify-content:center; text-decoration:none; }
.bot-connect-link:hover { text-decoration:none; }
.bot-scan-control { padding:15px 0 0; }
.bot-work-controls .bot-scan-control { padding:4px 0 0; }
.bot-details { margin:0; }
.bot-details+ .bot-details { border-top:1px solid #89b8cc15; }
.bot-details>summary { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:40px; cursor:pointer; list-style:none; color:#91afbd; font-size:12px; line-height:1.5; }
.bot-details>summary>small { margin-left:auto; color:#688897; font-size:11px; font-weight:400; }
.bot-details>summary::-webkit-details-marker { display:none; }
.bot-details>summary::after { content:'+'; color:#6f8e9d; font-size:18px; font-weight:400; line-height:1; }
.bot-details[open]>summary::after { content:'−'; color:#9ed6c9; }
.bot-details>summary:hover { color:#c7e4e6; }
.bot-details>summary:focus-visible { outline:2px solid #8ee8d4; outline-offset:3px; border-radius:5px; }
.bot-details-content { padding:0 0 12px; }
.bot-details-content>.bot-command-note { margin-bottom:10px; }
.bot-details .bot-scan-mode { display:block; }
.bot-excavation-form { display:grid; gap:9px; margin-top:17px; padding-top:17px; border-top:1px solid #89b8cc20; }
.bot-excavation-form h3 { color:#c0d8de; font-size:13px; font-weight:550; line-height:1.6; }
.bot-excavation-dimensions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.bot-excavation-dimensions label { display:grid; gap:5px; min-width:0; color:#8eabb8; font-size:11px; }
.bot-excavation-dimensions input { box-sizing:border-box; min-width:0; width:100%; height:38px; padding:8px 10px; border:1px solid #83b3c338; border-radius:7px; background:#83b3c306; color:#d0e6e8; font-size:13px; font-variant-numeric:tabular-nums; }
.bot-excavation-dimensions input:focus-visible { outline:2px solid #8ee8d4; outline-offset:2px; }
.bot-excavation-dimensions input[aria-invalid=true] { border-color:#d5a57a99; }
.bot-excavation-limits,.bot-excavation-hint,.bot-excavation-note { color:#819daa; font-size:11px; line-height:1.7; }
.bot-excavation-note { color:#cfb486; }
.bot-excavation-form>button { width:100%; margin-top:3px; }
.bot-excavation-error[hidden] { display:none; }
.bot-excavation-error { font-size:11px; line-height:1.6; overflow-wrap:anywhere; }

/* Diagnostic information and destructive actions are grouped together. */
.bot-central-state { padding:13px 0; border-bottom:1px solid #89b8cc18; }
.bot-central-state h3 { color:#9bb5c1; font-size:12px; font-weight:550; }
.bot-central-saved { margin-top:6px; color:#8ca7b5; font-size:11px; line-height:1.6; }
.bot-central-saved.is-saved { color:#9cd8c1; }
.bot-central-meta { display:grid; gap:7px; margin:10px 0 0; }
.bot-central-meta>div { display:flex; align-items:baseline; justify-content:space-between; gap:12px; min-width:0; font-size:11px; line-height:1.6; }
.bot-central-meta dt { color:#7f9caa; }
.bot-central-meta dd { min-width:0; margin:0; color:#afc9d4; text-align:right; overflow-wrap:anywhere; }
.bot-central-freshness { margin-top:7px; color:#7e9aa8; font-size:11px; line-height:1.6; }
.bot-central-freshness.is-stale { color:#d5b784; }
.bot-central-farmer { margin-top:12px; padding-top:10px; border-top:1px solid #89b8cc18; }
.bot-central-detail { margin-top:8px; color:#9eb6c3; font-size:11px; line-height:1.7; white-space:pre-wrap; overflow-wrap:anywhere; }
.bot-info { display:grid; gap:10px; padding:15px 0; }
.bot-info>div { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; min-width:0; font-size:11px; line-height:1.6; }
.bot-info>div>span { display:flex; align-items:center; gap:6px; flex:none; color:#7e9aa9; }
.bot-info svg { width:13px; height:13px; }
.bot-info time,.bot-info strong { min-width:0; color:#afc8d3; text-align:right; font-size:11px; font-weight:450; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.bot-card-bottom { display:flex; align-items:center; justify-content:space-between; gap:12px; padding-top:12px; border-top:1px solid #89b8cc18; }
.bot-card-bottom>small { color:#7693a2; font-size:11px; }
.bot-delete-button { display:grid; place-items:center; width:32px; min-height:32px; border:1px solid #b47e8d2b; border-radius:7px; background:#c2809008; color:#ae8d9a; }
.bot-delete-button svg { width:15px; height:15px; }
.bot-delete-button:hover { border-color:#d69ba84d; background:#c2809015; color:#efafbd; }
.bot-delete-confirm { padding:14px; margin-top:14px; border:1px solid #c88c9c3d; border-radius:10px; background:#38233055; }
.bot-delete-confirm>strong { color:#e8bcc5; font-size:12px; font-weight:550; }
.bot-delete-confirm p { margin-top:6px; color:#b799a7; font-size:11px; line-height:1.7; }
.bot-delete-confirm>div { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.bot-confirm-danger,.bot-cancel { min-height:35px; padding:7px 12px; border:1px solid #b982903d; border-radius:7px; background:#8e4d6040; color:#e6b3be; font-size:11px; }
.bot-cancel { border-color:#83b6c32b; background:#182d3b80; color:#a7c2ce; }
.bot-confirm-danger:hover { background:#a35d7155; border-color:#d99ba756; }
.bot-cancel:hover { background:#24415399; }

/* Unlinked clients and Microsoft sign-in use the same visual language. */
.bots-auth-section { margin-bottom:26px; }
.bots-grid+.bots-auth-section { margin-top:28px; }
.bots-auth-heading { margin:0 0 16px; }
.bots-auth-heading h2 { color:#cfe3e9; font-size:18px; font-weight:570; letter-spacing:-.3px; }
.bots-auth-heading p { max-width:580px; margin-top:7px; color:#88a4b3; font-size:12px; line-height:1.7; }
.bots-auth-loading { display:flex; align-items:center; gap:12px; padding:12px 0; color:#8da7b5; font-size:12px; }
.bot-auth-body { padding:3px 0 18px; }
.bot-auth-state { display:grid; gap:6px; }
.bot-auth-state>span { color:#89a5b3; font-size:11px; }
.bot-auth-state>strong { color:#c3e2df; font-size:15px; font-weight:550; line-height:1.6; }
.bot-auth-note { margin-top:10px; color:#8eabb9; font-size:12px; line-height:1.8; }
.bot-microsoft-actions { margin-top:15px; }
.bot-microsoft-button { display:flex; align-items:center; justify-content:center; gap:6px; width:100%; min-height:40px; padding:10px 12px; border:1px solid #78c6ae4d; border-radius:8px; background:#4b9f8420; color:#b1e8d7; font-size:12px; font-weight:550; line-height:1.6; text-align:center; text-decoration:none; }
.bot-microsoft-button:hover { border-color:#98dfc767; background:#4b9f8435; text-decoration:none; }
.bot-microsoft-button.is-secondary { border-color:#82acbd30; background:#1f354247; color:#abc5d1; }
.bot-microsoft-button.is-secondary:hover { background:#29475470; }
.bot-microsoft-code { padding:15px; margin:15px 0; border:1px solid #73c7b13d; border-radius:10px; background:#173d3a33; }
.bot-microsoft-code>span { display:block; color:#95b9ba; font-size:11px; }
.bot-microsoft-code>strong { display:block; margin:8px 0 12px; color:#ace7d8; font:700 24px/1.5 monospace; letter-spacing:3px; overflow-wrap:anywhere; }
.bot-microsoft-code>small { display:block; margin-top:9px; color:#82a0b0; font-size:11px; }
.bot-auth-connected { display:flex; justify-content:space-between; gap:12px; padding:12px 0; border-bottom:1px solid #89b8cc18; color:#87a6b5; font-size:11px; }
.bot-auth-connected strong { color:#97ceba; font-size:11px; font-weight:500; }
.bot-auth-client-card .bot-delete-button { width:auto; padding:0 10px; }

/* Overview summary and empty/error states. */
.bots-summary { display:grid; grid-template-columns:42px minmax(120px,1fr) minmax(160px,auto) auto auto; align-items:center; gap:16px; padding:18px 20px; margin:-5px 0 23px; border:1px solid #77b2c728; border-radius:14px; background:linear-gradient(105deg,#15333c80,#0b1726c7); }
.bots-summary-icon { display:grid; place-items:center; width:42px; height:42px; border:1px solid #70c7b329; border-radius:12px; background:#53ead20b; color:#8adbc5; }
.bots-summary-icon svg { width:22px; height:22px; }
.bots-summary-heading { display:grid; gap:4px; min-width:0; }
.bots-summary-heading>span { color:#d0e5eb; font-size:13px; font-weight:600; }
.bots-summary-heading small { color:#8ba7b6; font-size:11px; line-height:1.5; }
.bots-summary-balance { display:grid; gap:4px; min-width:0; padding:0 18px; border-left:1px solid #89b8cc22; border-right:1px solid #89b8cc22; }
.bots-summary-balance>span { color:#8faab9; font-size:11px; }
.bots-summary-balance>strong { color:#c2e8db; font-size:20px; font-weight:580; line-height:1.3; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.bots-summary-balance>small { color:#7897a7; font-size:10px; line-height:1.5; }
.bots-summary-count { display:flex; align-items:baseline; gap:7px; color:#86abbd; }
.bots-summary-count strong { color:#92dec7; font-size:25px; font-weight:620; letter-spacing:-.6px; font-variant-numeric:tabular-nums; }
.bots-summary-count>span { font-size:12px; white-space:nowrap; }
.bots-summary-count.is-offline strong { color:#dc9eaa; }
.bots-summary.is-stale { border-color:#d2ab6540; }
.bots-summary.is-stale .bots-summary-heading small { color:#d4b682; }
.bots-summary .panel-link { white-space:nowrap; }
.bots-error { display:flex; align-items:flex-start; gap:12px; padding:16px 18px; margin-bottom:20px; border:1px solid #c2a16b40; border-radius:12px; background:#42351c3d; color:#d8b981; }
.bots-error>svg { flex:none; width:18px; height:18px; margin-top:2px; }
.bots-error>div { min-width:0; flex:1; }
.bots-error strong { font-size:12px; font-weight:500; line-height:1.7; }
.bots-error p { margin-top:4px; color:#b7a78e; font-size:11px; line-height:1.8; }
.bots-error .panel-link { flex:none; color:#dfc28e; }
.bots-empty,.bots-loading { padding:55px 25px; border:1px solid var(--line,#89b8cc20); border-radius:15px; background:var(--panel,#101e2b); text-align:center; }
.bots-empty>svg { width:38px; height:38px; margin:0 auto 19px; color:#7399aa; }
.bots-empty h2 { color:#c8dde7; font-size:21px; font-weight:550; letter-spacing:-.4px; }
.bots-empty p { max-width:450px; margin:11px auto 0; color:#87a5b6; font-size:12px; line-height:1.8; }
.bots-empty>span { display:inline-block; margin-top:19px; padding:6px 10px; border:1px solid #75adbf20; border-radius:7px; color:#789aa9; font-size:11px; }
.bots-loading { display:grid; place-items:center; gap:16px; color:#8daabb; font-size:12px; }
.bots-loading .loader { width:23px; height:23px; }

@media(max-width:1100px) {
  .bots-grid { gap:18px; }
  .bot-card { padding:19px; }
  .bot-overview { grid-template-columns:minmax(85px,.8fr) minmax(0,1.7fr); gap:14px; }
  .bots-summary { grid-template-columns:42px minmax(0,1fr) auto; }
  .bots-summary-balance { grid-column:2; grid-row:2; padding:0; border:0; }
  .bots-summary-count { grid-column:3; grid-row:1; }
  .bots-summary .panel-link { grid-column:3; grid-row:2; }
}
@media(max-width:900px) {
  .bots-grid { grid-template-columns:1fr; }
  .bot-card { padding:22px; }
}
@media(max-width:600px) {
  #bots-page .bots-page-heading { align-items:flex-start; margin-bottom:19px; }
  #bots-page .bots-page-heading h1 { font-size:25px; }
  #bots-page .bots-page-heading .page-subtitle { font-size:12px; }
  .bots-stats { gap:10px 19px; padding-bottom:17px; margin-bottom:18px; }
  .bots-stats>div { gap:7px; }
  .bots-stats>div>span { font-size:11px; }
  .bots-stats strong { font-size:17px; }
  .bots-stats .bots-total-balance { flex-basis:100%; margin-left:0; padding:9px 0 0; border-left:0; border-top:1px solid #89b8cc18; }
  .bot-card { padding:17px; border-radius:15px; }
  .bot-card-top { gap:10px; margin-bottom:15px; }
  .bot-avatar { width:37px; height:37px; border-radius:10px; font-size:12px; }
  .bot-identity h2 { font-size:17px; }
  .bot-status { gap:5px; padding:4px 6px; font-size:10px; }
  .bot-status i { width:4px; height:4px; }
  .bot-workspace { padding:12px; }
  .bot-scan-state { flex-wrap:wrap; gap:4px 10px; }
  .bot-workspace .bot-scan-state>strong { font-size:13px; }
  .bot-overview { gap:12px; grid-template-columns:minmax(80px,.75fr) minmax(0,1.7fr); padding:15px 0; }
  .bot-balance>strong { font-size:17px; }
  .bot-world-coordinates { gap:5px; }
  .bot-world-coordinates dd { font-size:11px; }
  .bot-world-vitals { gap:5px 9px; }
  .bot-world-vitals dd { font-size:11px; }
  .bot-equipment { padding:12px 0 14px; }
  .bot-excavation-counts { font-size:11px; }
  .bot-tools-state li>div:not(.bot-meter) { font-size:11px; }
  .bot-details>summary { min-height:41px; }
  .bot-excavation-dimensions { gap:8px; }
  .bot-excavation-dimensions input { height:40px; font-size:14px; }
  .bot-scan-start,.bot-scan-stop,.bot-join-button { min-height:40px; font-size:12px; }
  .bot-primary-actions { display:grid; grid-template-columns:minmax(0,1fr) auto; row-gap:3px; }
  .bot-primary-actions .bot-brain-toggle { grid-column:1/-1; justify-content:flex-start; width:100%; min-height:36px; padding:6px 0; border:0; background:transparent; }
  .bot-info>div,.bot-info time,.bot-info strong { font-size:11px; }
  .bots-summary { grid-template-columns:38px minmax(0,1fr); gap:12px; padding:16px; }
  .bots-summary-icon { width:38px; height:38px; border-radius:11px; }
  .bots-summary-heading { grid-column:2; grid-row:1; }
  .bots-summary-balance { grid-column:1/-1; grid-row:2; padding-top:12px; border-top:1px solid #89b8cc22; }
  .bots-summary-count { grid-column:1; grid-row:3; }
  .bots-summary .panel-link { grid-column:2; grid-row:3; justify-self:end; }
  .bots-error { flex-wrap:wrap; }
  .bots-error .panel-link { margin-left:30px; }
  .bots-empty,.bots-loading { padding:40px 20px; }
}
@media(max-width:380px) {
  .bot-card { padding:14px; }
  .bot-overview { grid-template-columns:1fr; gap:12px; }
  .bot-balance { display:flex; align-items:baseline; justify-content:space-between; gap:12px; }
  .bot-balance>strong { margin-top:0; }
  .bot-world-coordinates { gap:14px; }
  .bot-world-vitals { gap:6px 18px; }
}
@media(prefers-reduced-motion:reduce) {
  .bot-meter-fill { transition:none; }
}

/* The live decision tree opens outside its compact card and owns no game controls. */
.bot-brain-toggle{display:flex;align-items:center;gap:7px;width:100%;min-width:0;min-height:34px;margin-top:9px;padding:7px 0;border:0;border-top:1px solid var(--line,#88b5cf24);border-radius:0;background:transparent;text-align:left;color:var(--foreground-soft,#c4d5e1);font-size:11px}
.bot-brain-graph-node-preview{display:block;max-width:100%;font-size:9px;line-height:1.4;color:var(--muted,#9aafbe);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.bot-brain-toggle>svg{width:16px;height:16px;flex-shrink:0;color:var(--green,#53ead2)}.bot-brain-toggle>span:not(.bot-brain-toggle-mark){flex-shrink:0}.bot-brain-toggle>small{margin-left:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:9px;color:var(--foreground-faint,#7d96aa)}
.bot-brain-toggle-mark{flex-shrink:0;font-size:17px;line-height:1;color:var(--foreground-faint,#7d96aa)}.bot-brain-toggle:hover,.bot-brain-toggle.is-expanded{color:var(--green,#53ead2)}.bot-brain-toggle:focus-visible,.bot-brain-close:focus-visible,.bot-brain-node summary:focus-visible{outline:2px solid var(--green,#53ead2);outline-offset:3px;border-radius:5px}
.bot-brain-modal{box-sizing:border-box;width:calc(100vw - 16px);max-width:none;height:calc(100dvh - 16px);max-height:calc(100dvh - 16px);padding:0;margin:auto;border:1px solid var(--accent-line,#53ead240);border-radius:12px;background:#0b1522;color:var(--ink,#e7f1f7);box-shadow:0 30px 140px #000b;overflow:hidden;display:grid;grid-template-rows:auto auto minmax(0,1fr) auto auto}
.bot-brain-modal:not([open]){display:none}.bot-brain-modal::backdrop{background:#02070de0;backdrop-filter:blur(8px)}
.bot-brain-modal-header{position:relative;display:flex;align-items:flex-start;gap:16px;padding:20px 64px 15px 22px;border-bottom:1px solid var(--line,#88b5cf24);background:linear-gradient(110deg,#17423530,transparent 65%)}.bot-brain-modal-header>div{min-width:0}.bot-brain-modal .bot-brain-eyebrow{font-size:10px;color:var(--green,#53ead2);letter-spacing:.035em;overflow-wrap:anywhere}.bot-brain-modal-header h2{font-size:22px;line-height:1.5;font-weight:550;letter-spacing:-.5px;margin:2px 0 0}.bot-brain-modal-header p{font-size:10px;line-height:1.6;color:var(--muted,#9aafbe);margin-top:4px}.bot-brain-modal.is-live .bot-brain-modal-header p::before{content:'';display:inline-block;width:6px;height:6px;margin-right:6px;border-radius:50%;background:var(--green,#53ead2)}.bot-brain-modal.is-historical .bot-brain-modal-header p{color:var(--amber,#e9bd79)}
.bot-brain-modal-close{position:absolute;right:16px;top:16px;display:flex;align-items:center;justify-content:center;width:35px;height:35px;border:1px solid var(--line,#88b5cf24);border-radius:8px;background:#88b5cf07;color:var(--muted,#9aafbe);font-size:25px;line-height:1}.bot-brain-modal-close:hover{border-color:#9bc5d760;background:#88b5cf12;color:var(--ink,#e7f1f7)}.bot-brain-modal button:focus-visible,.bot-brain-viewport:focus-visible{outline:2px solid var(--green,#53ead2);outline-offset:3px}
.bot-brain-modal-summary{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;padding:14px 22px;border-bottom:1px solid var(--line,#88b5cf24)}.bot-brain-modal-summary>div{min-width:0}.bot-brain-modal-summary>div>span{display:block;color:var(--foreground-faint,#7d96aa);font-size:9px;line-height:1.5}.bot-brain-modal-summary strong{display:block;font-size:15px;line-height:1.7;font-weight:550;color:var(--foreground-soft,#c4d5e1);overflow-wrap:anywhere}.bot-brain-modal-summary p{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:10px;line-height:1.65;color:var(--muted,#9aafbe);margin-top:3px;overflow-wrap:anywhere}.bot-brain-modal-summary .bot-brain-next{color:var(--amber,#e9bd79)}.bot-brain-modal-process{border-left:1px solid var(--line,#88b5cf24);padding-left:16px}
.bot-brain-canvas-shell{display:grid;grid-template-rows:auto minmax(0,1fr) auto;min-height:0;overflow:hidden}.bot-brain-graph-toolbar{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px;padding:10px 16px;border-bottom:1px solid var(--line,#88b5cf24)}.bot-brain-modal .bot-brain-legend{display:flex;flex-wrap:wrap;gap:9px;font-size:9px;color:var(--muted,#9aafbe)}.bot-brain-modal .bot-brain-legend>span::before{content:'';display:inline-block;width:5px;height:5px;vertical-align:1px;margin-right:5px;border-radius:50%;background:var(--green,#53ead2)}.bot-brain-modal .bot-brain-legend>.is-requested::before{background:var(--amber,#e9bd79)}.bot-brain-modal .bot-brain-legend>.is-blocked::before{background:var(--red,#ff8d9d)}
.bot-brain-camera-controls{display:flex;align-items:center;flex-wrap:wrap;gap:5px}.bot-brain-camera-controls button{min-width:31px;min-height:31px;padding:5px 8px;border:1px solid var(--line,#88b5cf24);border-radius:6px;background:#88b5cf07;color:var(--foreground-soft,#c4d5e1);font-size:10px;line-height:1.5}.bot-brain-camera-controls button:hover{background:#88b5cf15;border-color:var(--accent-line,#53ead240)}.bot-brain-camera-controls button[data-brain-zoom-in],.bot-brain-camera-controls button[data-brain-zoom-out]{font-size:17px;padding:2px}.bot-brain-camera-controls button:disabled{opacity:.35;cursor:not-allowed}.bot-brain-camera-controls>[data-brain-zoom-label]{min-width:40px;text-align:center;font-size:10px;color:var(--muted,#9aafbe);font-variant-numeric:tabular-nums}
.bot-brain-viewport{position:relative;min-height:120px;overflow:hidden;background-color:#080f19;background-image:radial-gradient(#7194a533 1px,transparent 1px);background-size:22px 22px;cursor:grab;touch-action:none;overscroll-behavior:contain;user-select:none}.bot-brain-viewport[data-dragging=true]{cursor:grabbing}.bot-brain-stage{position:absolute;left:0;top:0;transform-origin:0 0;will-change:transform;pointer-events:none}.bot-brain-stage[hidden]{display:none}.bot-brain-edges,.bot-brain-nodes{position:absolute;inset:0;overflow:visible;pointer-events:none}.bot-brain-edge{fill:none;stroke:#60839866;stroke-width:1.5;vector-effect:non-scaling-stroke}.bot-brain-edge.is-active{stroke:var(--green,#53ead2);stroke-width:2;filter:drop-shadow(0 0 3px #53ead238)}.bot-brain-edge.is-requested{stroke:var(--amber,#e9bd79);stroke-width:2;stroke-dasharray:6 5}.bot-brain-edge.is-blocked{stroke:var(--red,#ff8d9d);stroke-width:2}
.bot-brain-graph-node{box-sizing:border-box;position:absolute;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:4px;min-width:0;padding:11px 13px;border:1px solid #48637680;border-radius:11px;background:linear-gradient(130deg,#182b3a,#0f1d2c);color:var(--foreground-soft,#c4d5e1);text-align:left;pointer-events:auto;cursor:pointer;box-shadow:0 6px 20px #0003;overflow:hidden}.bot-brain-graph-node:hover{border-color:#93b4c6b3;background:linear-gradient(130deg,#1d3446,#132537)}.bot-brain-graph-node.is-root{border-color:#8bb8c7a6;background:linear-gradient(130deg,#23434c,#142936)}.bot-brain-graph-node.is-root strong{font-size:17px}.bot-brain-graph-node strong{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:14px;line-height:1.35;font-weight:550;overflow-wrap:anywhere;max-width:100%}.bot-brain-graph-node-kind{font-size:9px;line-height:1.3;color:#83a9ba;letter-spacing:.035em}.bot-brain-graph-node-badges{display:flex;align-items:center;flex-wrap:wrap;gap:5px;max-width:100%}.bot-brain-graph-node-state{display:inline-block;max-width:100%;font-size:9px;line-height:1.5;color:#8aa9ba;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.bot-brain-graph-node .bot-brain-requested{padding:1px 4px;font-size:8px;line-height:1.5;border-radius:3px;background:#e9bd7914;color:var(--amber,#e9bd79)}
.bot-brain-graph-node.is-active{border-color:#53ead2b3;background:linear-gradient(130deg,#153e3b,#10282b);box-shadow:0 0 0 1px #53ead214,0 6px 24px #0005}.bot-brain-graph-node.is-active strong{color:var(--green-dark,#8af6e3)}.bot-brain-graph-node.is-requested{border-color:#e9bd7977;background:linear-gradient(130deg,#3b3527,#25291f)}.bot-brain-graph-node.state-running .bot-brain-graph-node-state,.bot-brain-graph-node.state-true .bot-brain-graph-node-state{color:var(--green-dark,#8af6e3)}.bot-brain-graph-node.state-pausing .bot-brain-graph-node-state{color:var(--amber,#e9bd79)}.bot-brain-graph-node.state-blocked{border-color:#ff8d9d99;background:linear-gradient(130deg,#3b2633,#241d2c)}.bot-brain-graph-node.state-blocked strong,.bot-brain-graph-node.state-blocked .bot-brain-graph-node-state{color:var(--red,#ff8d9d)}.bot-brain-graph-node.is-selected{outline:2px solid #b2d8eb;outline-offset:3px}.bot-brain-graph-node.is-historical{border-color:#536f8166;background:linear-gradient(130deg,#1b2632,#111b27);box-shadow:0 6px 20px #0003}.bot-brain-graph-node.is-historical strong{color:var(--muted,#9aafbe)}
.bot-brain-canvas-hint{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:8px 16px;border-top:1px solid var(--line,#88b5cf24);font-size:9px;line-height:1.6;color:var(--foreground-faint,#7d96aa)}.bot-brain-canvas-hint>[data-brain-sampled-at]{font-variant-numeric:tabular-nums;white-space:nowrap}.bot-brain-graph-empty{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:24px;text-align:center;pointer-events:none}.bot-brain-graph-empty[hidden]{display:none}.bot-brain-graph-empty>span{font-size:38px;color:var(--foreground-faint,#7d96aa)}.bot-brain-graph-empty>strong{font-size:15px;font-weight:500;color:var(--foreground-soft,#c4d5e1)}.bot-brain-graph-empty>p{max-width:460px;font-size:11px;line-height:1.8;color:var(--muted,#9aafbe)}
.bot-brain-graph-node{gap:3px;padding:9px 11px}.bot-brain-graph-node strong{font-size:13px}
.bot-brain-node-inspector{max-height:90px;overflow:auto;padding:10px 20px;border-top:1px solid var(--line,#88b5cf24);background:#10202c;user-select:text}.bot-brain-node-inspector[hidden]{display:none}.bot-brain-node-inspector>strong{font-size:12px;font-weight:550;color:var(--foreground-soft,#c4d5e1);margin-right:12px}.bot-brain-node-inspector>span{font-size:10px;color:var(--green,#53ead2)}.bot-brain-node-inspector>p{font-size:10px;line-height:1.8;color:var(--muted,#9aafbe);margin-top:4px;white-space:pre-wrap;overflow-wrap:anywhere}.bot-brain-modal-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:11px 20px;border-top:1px solid var(--line,#88b5cf24)}.bot-brain-modal-footer>p{font-size:9px;line-height:1.7;color:var(--foreground-faint,#7d96aa)}.bot-brain-resource-chips{display:flex;flex-wrap:wrap;gap:5px}.bot-brain-resource-chips>span{font-size:9px;line-height:1.6;padding:2px 6px;border:1px solid var(--line,#88b5cf24);border-radius:4px;background:#88b5cf06;color:var(--muted,#9aafbe)}
@media(max-width:600px){.bot-brain-modal{width:calc(100vw - 16px);height:calc(100dvh - 16px);max-height:calc(100dvh - 16px);border-radius:12px}.bot-brain-modal-header{padding:14px 54px 11px 14px}.bot-brain-modal-header h2{font-size:19px}.bot-brain-modal-header p{font-size:9px}.bot-brain-modal .bot-brain-eyebrow{font-size:9px}.bot-brain-modal-close{top:11px;right:11px;width:33px;height:33px}.bot-brain-modal-summary{padding:10px 14px;gap:8px;grid-template-columns:minmax(0,1fr)}.bot-brain-modal-summary strong{font-size:13px;line-height:1.5}.bot-brain-modal-summary>div>span,.bot-brain-modal-summary p{font-size:9px}.bot-brain-modal-summary p{-webkit-line-clamp:1}.bot-brain-modal-process{padding-left:0;padding-top:6px;border-left:0;border-top:1px solid var(--line,#88b5cf24)}.bot-brain-modal-summary .bot-brain-next{-webkit-line-clamp:2}.bot-brain-graph-toolbar{padding:8px;gap:8px}.bot-brain-camera-controls{justify-content:center;gap:4px;width:100%}.bot-brain-camera-controls button{min-height:32px;font-size:9px;padding:5px 6px}.bot-brain-camera-controls>[data-brain-zoom-label]{font-size:9px;min-width:32px}.bot-brain-modal .bot-brain-legend{font-size:8px}.bot-brain-canvas-hint{font-size:8px;padding:7px 9px;gap:4px}.bot-brain-node-inspector{padding:8px 12px;max-height:75px}.bot-brain-modal-footer{padding:8px 12px;gap:6px}.bot-brain-modal-footer>p{font-size:8px}.bot-brain-resource-chips{gap:4px}.bot-brain-resource-chips>span{font-size:8px;padding:1px 4px}}
@media(max-width:600px){.bot-brain-toggle{font-size:11px;min-height:38px}.bot-brain-toggle>small{max-width:100px;font-size:9px}}
