:root{--bg:#f4f5f7;--ink:#202630;--muted:#738091;--border:#e4e8ed;--accent:#d85b2a}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:14px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}aside{width:216px;height:100vh;position:fixed;background:#202833;color:#fff;padding:32px 20px;display:flex;flex-direction:column}.brand{display:flex;gap:12px;align-items:center;margin-bottom:54px;font-size:22px;font-weight:700}.brand b{background:#ed743c;color:white;border-radius:12px;width:43px;height:43px;text-align:center;line-height:43px}.brand small{display:block;color:#a8b3c2;font-size:11px;font-weight:400;letter-spacing:2px}nav button{background:transparent;color:#aebac9;display:flex;justify-content:space-between;width:100%;text-align:left;margin:6px 0;padding:14px 12px;border-radius:7px}nav button.active{background:#34404f;color:white}nav span{opacity:.45;font-size:11px}.aside-note{margin-top:auto;font-size:12px;color:#d2dbe6}.aside-note small{display:block;line-height:2;color:#8c9aab;margin-top:8px}.dot{display:inline-block;border-radius:50%;width:7px;height:7px;background:#77c6a1;margin-right:6px}main{margin-left:216px;padding:38px 38px 22px;max-width:1920px}header{display:flex;justify-content:space-between;align-items:center;margin-bottom:25px}h1{font-size:29px;margin:4px 0;font-weight:650;letter-spacing:-.7px}h2{font-size:17px;margin:0}p{color:var(--muted);font-size:12px;margin:4px 0 12px}.eyebrow{font-size:10px;letter-spacing:2px;color:var(--accent);font-weight:700}.header-actions{display:flex;align-items:center;gap:16px;font-size:11px;color:var(--muted)}button,.button{display:inline-block;text-decoration:none;border:0;cursor:pointer;background:var(--accent);color:#fff;padding:10px 16px;border-radius:6px;font:inherit;font-size:12px;font-weight:550}button:hover,.button:hover{filter:brightness(.96)}button:disabled{opacity:.45;cursor:wait}.secondary{background:white;color:#4c5868;border:1px solid var(--border)}.metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:24px}.metric{padding:20px 24px;background:white;border:1px solid var(--border);border-radius:9px}.metric small{color:var(--muted);font-size:12px}.metric b{display:block;font-size:28px;margin:6px 0 0;font-weight:650}.metric em{font-style:normal;color:var(--muted);font-size:11px}.filters{display:flex;gap:14px;align-items:flex-end;padding:18px 20px;background:#fff;border:1px solid var(--border);border-radius:8px;margin-bottom:26px}label{display:flex;flex-direction:column;gap:5px;color:#5a6676;font-size:12px}.filters label{flex:1}.filters input{min-width:80px}.filters select{min-width:120px}input,select,textarea{width:100%;border:1px solid #dce1e8;border-radius:5px;padding:9px 10px;background:white;color:var(--ink);font:inherit}input:focus,select:focus,textarea:focus{outline:2px solid #f2c7b1;outline-offset:1px}.section-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;gap:12px}.section-head button{margin-left:5px}.table-wrap{overflow-x:auto;background:white;border:1px solid var(--border);border-radius:7px}table{width:100%;border-collapse:collapse;text-align:left;white-space:nowrap;font-size:12px}th{background:#fafbfc;color:#7b8797;font-weight:500;padding:13px 15px;border-bottom:1px solid var(--border)}td{padding:16px 15px;border-bottom:1px solid #edf0f3}tbody tr:last-child td{border:0}tbody tr:hover{background:#fafbfc}td small{display:block;color:var(--muted);font-size:10px}td strong{font-weight:550}.badge{display:inline-block;font-size:10px;line-height:1.8;padding:2px 7px;border-radius:4px;background:#eef1f5;color:#64748b;margin:2px}.good{background:#e6f4ed;color:#358362}.bad{background:#fcece8;color:#b2644d}.waiting{background:#fff3d8;color:#a48227}.mini{padding:5px 9px;font-size:11px}.card{background:white;padding:16px;border:1px solid var(--border);border-radius:7px;margin-top:18px}summary{cursor:pointer;font-size:12px;color:#5d6c7c}.card .table-wrap{margin-top:15px;border:0}.batch-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.batch{background:white;border:1px solid var(--border);padding:22px;border-radius:9px}.batch h3{font-size:15px;margin:7px 0}.batch small{color:var(--muted);font-size:11px}.progress{height:5px;background:#edf0f3;border-radius:5px;margin:18px 0 10px;overflow:hidden}.progress i{display:block;height:100%;background:#5eaa91}.batch-footer{border-top:1px solid var(--border);margin-top:15px;padding-top:16px;display:flex;justify-content:space-between;gap:10px}footer{color:#96a0ad;font-size:11px;padding:28px 0 0}.empty{text-align:center;padding:55px;color:var(--muted)}dialog{border:1px solid var(--border);border-radius:12px;width:min(580px,94vw);padding:28px;box-shadow:0 20px 80px #0003;max-height:90vh}dialog::backdrop{background:#16233188;backdrop-filter:blur(2px)}dialog form{display:flex;flex-direction:column;gap:15px}.dialog-head{display:flex;justify-content:space-between;align-items:center}.close{background:none;color:#8190a0;font-size:26px;padding:0 6px}.two{display:grid;grid-template-columns:1fr 1fr;gap:14px}.check{display:flex;flex-direction:row;align-items:center}.check input{width:auto}fieldset{border:1px solid var(--border);border-radius:6px;padding:12px}legend{font-size:12px;color:var(--muted)}#run-endpoints{display:grid;grid-template-columns:1fr 1fr;gap:10px}output{color:#4e7e6b;font-size:12px;white-space:normal;word-break:break-all}#notice{background:#fff7e9;border:1px solid #f2d6a8;padding:13px 18px;border-radius:6px;margin-bottom:18px;white-space:pre-wrap;overflow-wrap:anywhere;color:#825c2a;font-size:12px}.tab[hidden]{display:none}@media(max-width:1150px){main{padding:25px 20px}.batch-grid{grid-template-columns:repeat(2,1fr)}.metrics{gap:10px}.metric{padding:16px}aside{width:175px;padding:28px 15px}main{margin-left:175px}.section-head{align-items:flex-start}.section-head>div:last-child{display:flex;flex-wrap:wrap;gap:5px}}@media(max-width:760px){aside{position:static;width:100%;height:auto;padding:15px}.brand{margin:0 0 10px}.brand small,.aside-note{display:none}nav{display:flex}nav button{padding:9px;margin:0}nav span{display:none}main{margin:0;padding:20px 14px}.metrics{grid-template-columns:1fr 1fr}.filters{flex-wrap:wrap}.filters label{min-width:40%}.header-actions span{display:none}.batch-grid{grid-template-columns:1fr}.section-head{display:block}.two{grid-template-columns:1fr}h1{font-size:24px}}

button.danger{color:#b34436;border-color:#e2b7b0}.batch-footer{flex-wrap:wrap}.batch .check{margin-bottom:8px}.batch .check input{width:auto}

.batch>small{display:block;margin-top:4px}

#failure-response-dialog{width:min(900px,94vw)}#failure-response-body{white-space:pre-wrap;overflow-wrap:anywhere;max-height:65vh;overflow:auto;font-size:12px}

#local-batches-grid:not(:empty){margin-bottom:16px}#local-run-dialog{width:min(1050px,96vw)}#local-run-body .table-wrap{max-height:38vh;margin:12px 0;overflow:auto}.batch.local-batch small{display:block;margin-top:5px;overflow-wrap:anywhere}.local-batch .batch-footer{flex-wrap:wrap}

.proxy-layout{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin-bottom:24px}.proxy-layout form{display:flex;flex-direction:column;gap:12px}.proxy-layout p{font-size:13px;color:#64748b}.proxy-layout h3{margin:0}#tab-proxies>.card{margin:20px 0}#tab-proxies .table-wrap{margin-top:14px}#tab-proxies input[type=checkbox]{width:auto}#tab-proxies .card{padding:22px}@media(max-width:1000px){.proxy-layout{grid-template-columns:1fr}}

#tab-proxies [hidden]{display:none!important}

body[data-page="proxies"] .filters,body[data-page="proxies"] #metrics{display:none}
body[data-page="protocol"] .filters,body[data-page="protocol"] #metrics{display:none}
#tab-protocol>.card{padding:22px;margin:20px 0}#tab-protocol .table-wrap{margin-top:14px}
#protocol-alert{padding:14px 20px;border-left:4px solid #d97706;margin-bottom:18px}
#protocol-events small{display:block;margin-top:6px}

/* Let content reflow at browser zoom levels as well as narrow window sizes. */
main{max-width:none;min-width:0}
aside{overflow-y:auto}
header,.header-actions{flex-wrap:wrap;gap:12px}
.metrics{grid-template-columns:repeat(4,minmax(0,1fr))}
.metric,.tab,.card,.batch,.section-head>div{min-width:0}
.filters{display:grid;grid-template-columns:repeat(6,minmax(0,1fr)) auto;gap:12px}
.filters label{min-width:0}
.filters input,.filters select{min-width:0;max-width:100%}
.section-head{flex-wrap:wrap;align-items:flex-start;gap:12px 20px}
.section-head>div:first-child{flex:1 1 440px}
.section-head>div:last-child:not(:first-child){display:flex;flex-wrap:wrap;align-items:center;gap:8px;max-width:100%}
.section-head button{margin-left:0}
.section-head p{max-width:85ch;font-size:13px;line-height:1.7;margin:6px 0 0}
.table-wrap{min-width:0;max-width:100%}
table{white-space:normal;overflow-wrap:anywhere}
th,td{vertical-align:top}
td small{font-size:11px}
input,select,textarea{min-width:0;max-width:100%}
.batch h3,.batch>small,.proxy-layout{overflow-wrap:anywhere}
button:focus-visible,.button:focus-visible,summary:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
dialog pre{white-space:pre-wrap;overflow-wrap:anywhere}

.accounts-table{table-layout:fixed;font-size:13px}
.accounts-table th,.accounts-table td{padding:16px 12px}
.accounts-table th:nth-child(1){width:22%}
.accounts-table th:nth-child(2){width:11%}
.accounts-table th:nth-child(3){width:25%}
.accounts-table th:nth-child(4){width:17%}
.accounts-table th:nth-child(5){width:15%}
.accounts-table th:nth-child(6){width:10%}
.accounts-table th{font-size:12px;color:#596778}
.accounts-table td small{line-height:1.7;color:#64748b}
.accounts-table .badge{font-size:11px;margin:0;padding:2px 6px}
.account-name{display:block;font-size:14px;margin-bottom:4px}
.account-environment{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 7px;font-size:11px;color:#64748b;margin:10px 0 3px}
.account-level .badge{margin-bottom:6px}
.capability-list{display:grid;gap:8px}
.capability-row{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:2px 6px;font-size:12px}
.capability-row>span:last-child{display:flex;align-items:center;flex-wrap:wrap;gap:5px}
.http-status{font-size:11px;color:#64748b;font-variant-numeric:tabular-nums}
.capability-details{margin-top:12px}
.capability-details summary{font-size:11px;color:#56677d;line-height:1.8}
.capability-details[open] summary{margin-bottom:10px}
.capability-time{border-left:2px solid var(--border);padding-left:8px;margin-top:10px;font-size:11px}
.account-day{border-bottom:1px solid var(--border);padding-bottom:9px;margin-bottom:9px}
.account-counts strong{font-size:15px;font-variant-numeric:tabular-nums}
.account-activity>div+div{margin-top:8px}
.account-activity time{display:block;font-size:12px;font-variant-numeric:tabular-nums}
.account-actions>div{display:flex;flex-direction:column;align-items:stretch;gap:7px}
.account-actions button{min-height:32px;padding:5px 7px;font-size:12px;white-space:normal}

@media(max-width:1500px){
 .filters{grid-template-columns:repeat(3,minmax(0,1fr)) auto}
 .filters label:nth-child(3){grid-column:3 / 5}
 .section-head>div:last-child:not(:first-child){flex-basis:100%}
}
@media(max-width:1279px){
 #tab-accounts>.table-wrap{overflow:visible;border:0;background:transparent}
 .accounts-table,.accounts-table tbody{display:block}
 .accounts-table thead{display:none}
 .accounts-table tbody{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,390px),1fr));gap:16px}
 .accounts-table tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;padding:20px;background:#fff;border:1px solid var(--border);border-radius:9px}
 .accounts-table th,.accounts-table td{width:auto;min-width:0;padding:0;border:0}
 .accounts-table td[data-label]::before{content:attr(data-label);display:block;color:#64748b;font-size:11px;font-weight:550;margin-bottom:8px}
 .accounts-table .account-identity{grid-column:1 / -1}
 .accounts-table td.account-identity::before,.accounts-table td.account-actions::before{display:none}
 .accounts-table .account-level{grid-column:1 / -1;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
 .accounts-table td.account-level::before,.accounts-table .account-level .badge{margin:0}
 .accounts-table .account-capabilities{grid-column:1 / -1;border-top:1px solid var(--border);padding-top:14px}
 .capability-row{justify-content:flex-start;gap:6px 12px}
 .capability-row>span:first-child{flex:0 1 125px}
 .accounts-table .account-actions{grid-column:1 / -1;border-top:1px solid var(--border);padding-top:14px}
 .account-actions>div{flex-direction:row;flex-wrap:wrap}
 .account-actions button{padding:7px 12px}
 .accounts-table tr:has(.empty){grid-column:1 / -1}
 .accounts-table .empty{grid-column:1 / -1;padding:30px 10px}
}
@media(max-width:760px){
 aside{overflow:visible}
 nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
 nav button{width:100%;justify-content:center;white-space:normal}
 .metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
 .filters{grid-template-columns:repeat(2,minmax(0,1fr));padding:16px;gap:12px}
 .filters label{min-width:0}
 .filters label:nth-child(3){grid-column:auto}
 #apply-filter{grid-column:1 / -1}
 .section-head{display:flex}
 .section-head>div:first-child{flex-basis:100%}
 .section-head>div:last-child:not(:first-child){gap:8px}
 .header-actions{gap:8px}
 dialog{padding:20px}
 .card,#tab-proxies .card,#tab-protocol>.card{padding:16px}
}
@media(max-width:420px){
 .account-counts,.account-activity{grid-column:1 / -1}
 .account-activity{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px}
 .accounts-table td.account-activity::before{grid-column:1 / -1;margin-bottom:0}
 .account-activity>div+div{margin:0}
 .metric{padding:14px}
}

.health-overview{background:#fff;border:1px solid var(--border);border-radius:9px;padding:20px;margin-bottom:26px}
.health-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:16px}
.health-head h2{margin:0}.health-head p{margin:5px 0 0;font-size:12px}.health-head>span{color:var(--muted);font-size:11px;white-space:nowrap}
.account-health-summary{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin-bottom:16px}
.health-count{border:1px solid var(--border);border-radius:7px;padding:11px 12px;background:#fafbfc}.health-count small{display:block;color:var(--muted);font-size:11px}.health-count strong{display:block;font-size:21px;margin-top:2px;font-variant-numeric:tabular-nums}
.health-table-wrap{border-radius:6px}.health-table-wrap table{table-layout:fixed}.health-table-wrap th,.health-table-wrap td{padding:11px 10px}.health-table-wrap th:nth-child(1){width:25%}.health-table-wrap th:nth-child(2){width:10%}.health-table-wrap th:nth-child(3),.health-table-wrap th:nth-child(4),.health-table-wrap th:nth-child(5),.health-table-wrap th:nth-child(6){width:9%}.health-table-wrap th:nth-child(7){width:15%}.health-table-wrap th:nth-child(8){width:14%}.health-table-wrap td small{display:block}.health-table-wrap .badge{font-size:10px;margin:0}
@media(max-width:760px){.health-overview{padding:16px}.health-head{display:block}.health-head>span{display:block;margin-top:8px}.account-health-summary{grid-template-columns:repeat(3,minmax(0,1fr))}.health-table-wrap{overflow-x:auto}.health-table-wrap table{min-width:720px}}

.export-options{display:grid;gap:14px}.export-options .check{align-items:flex-start;gap:10px}.export-options small{display:block;font-size:12px;color:var(--muted);line-height:1.6;margin-top:4px}.export-downloads{display:flex;flex-wrap:wrap;gap:10px}#export-result p,#export-progress{font-size:13px;line-height:1.7}#export-result{border-top:1px solid var(--border);margin-top:18px;padding-top:14px}#export-dialog [hidden]{display:none}#notice a{font-weight:600;text-decoration:underline}

body[data-page="activities"] .filters,body[data-page="activities"] #metrics,body[data-page="activities"] #health-overview{display:none}
#tab-activities .table-wrap{margin-top:18px;overflow-x:auto}#tab-activities .table-wrap table{min-width:860px}#tab-activities td:nth-child(3){max-width:460px}
#activity-plan-options{display:grid;gap:8px}#activity-evidence p{overflow-wrap:anywhere}#activity-missing{padding-left:20px;font-size:12px;color:var(--muted)}

.activity-run-form{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;align-items:end}.activity-run-form button,.activity-run-form p{grid-column:1 / -1}.activity-run-form p{margin:0}@media(max-width:900px){.activity-run-form{grid-template-columns:1fr}}

/* Keep activity prices and dates readable inside the horizontal table scroll. */
#activity-result-table.dish-results{min-width:1800px}
#activity-result-table.dish-results th,#activity-result-table.dish-results td{white-space:nowrap;word-break:normal;overflow-wrap:normal}
#activity-result-table.dish-results td:nth-child(2),#activity-result-table.dish-results td:nth-child(3),#activity-result-table.dish-results td:nth-child(4),#activity-result-table.dish-results td:nth-child(15){white-space:normal;min-width:140px;max-width:230px}
#activity-account-checks{margin:16px 0}
#activity-trigger-hours{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:6px}#activity-trigger-hours label{flex-direction:row;align-items:center;gap:3px}#activity-trigger-hours input{width:auto}#activity-trigger-log{white-space:pre-wrap;overflow-wrap:anywhere;max-height:320px;overflow:auto;font-size:11px;background:#fafbfc;padding:10px;border-radius:5px}@media(max-width:760px){#activity-trigger-hours{grid-template-columns:repeat(6,minmax(0,1fr))}}
#tab-executions th,#tab-executions td:is(:nth-child(1),:nth-child(3),:nth-child(4),:nth-child(5),:nth-child(7)){white-space:nowrap;overflow-wrap:normal}
#tab-executions td:nth-child(6){min-width:220px}
.diagnostics summary,.history-points summary{font-size:11px;color:#56677d}
.diagnostics small,.history-points small{line-height:1.7}
.history-points .activity-issue{color:#a6543f;white-space:normal;overflow-wrap:anywhere}
.history-table{font-size:12px}
.history-table td{padding:9px 12px}
.history-table td:first-child,.history-table th{white-space:nowrap}
.history-table td strong{font-size:13px}
.history-links span{display:inline-block;white-space:nowrap;margin-right:16px}

/* Activity catalog: homepage entry image thumbnails. */
.activity-thumb{max-width:120px;max-height:60px;border-radius:4px;display:block}
.activity-thumb-missing{color:var(--muted,#888);font-size:12px}
/* Activities tab: scheduled tasks / activity catalog switch. */
[data-activity-view].active{background:var(--accent);color:#fff;border-color:var(--accent)}
/* Activities: activities the parsers cannot read (missed) and the nav count. */
.activity-alert{border-color:#e7a18b;background:#fff4f0}
.activity-alert h3{color:#b2442a;margin:0 0 4px}
.nav-alert{background:#d84a2a;color:#fff;border-radius:9px;padding:0 7px;font-size:11px;line-height:18px;margin-left:6px;font-weight:600}
/* Administrator login page (farm/web/auth.py). */
.login-body{min-height:100vh}
.login-page{max-width:380px;margin:12vh auto;padding:28px}
.login-page form{display:flex;flex-direction:column;gap:14px;margin-top:14px}
.login-brand{margin-bottom:22px;color:var(--ink)}
.login-error{color:#b2442a;margin:0}
