/* Tier 1 activity registration and compact cockpit. */
body[data-pf-department] .pf-tier-shell{top:var(--pf-tier-topbar-bottom,83px)!important;bottom:0!important}
body[data-pf-department] .pf-tier-wrap{padding-top:16px!important}
body[data-pf-department] .pf-tier-banner,
body[data-pf-department] .page-content .pf-cockpit-banner{position:relative;display:flex;align-items:center;min-height:108px;margin:0 0 18px;padding:18px 26px 18px 34px;border-radius:12px;background:linear-gradient(135deg,#006B65,#004f4b)!important;color:#fff!important;overflow:hidden}
body[data-pf-department] .pf-tier-banner::before,body[data-pf-department] .pf-cockpit-banner::before{content:"";position:absolute;left:14px;top:16px;bottom:16px;width:4px;border-radius:4px;background:#a0e1d0}
body[data-pf-department] .pf-tier-banner h2,body[data-pf-department] .pf-cockpit-banner h2{margin:4px 0!important;color:#fff!important;font-size:clamp(23px,2vw,28px)!important;font-weight:800!important;line-height:1.2}
body[data-pf-department] .pf-tier-banner small,body[data-pf-department] .pf-cockpit-banner small{color:#e5f5f0!important;font-size:12px!important;font-weight:750!important}
body[data-pf-department] .pf-tier-banner p,body[data-pf-department] .pf-cockpit-banner p{margin:0;color:#e5f5f0!important;font-size:14px!important}
body[data-pf-department] .sidebar .nav-group .pf-tier-menu-button{width:100%;margin:0;padding:10px 12px;background:transparent;color:#effaf7;text-align:left}
body[data-pf-department] .sidebar .nav-group .pf-tier-menu-button.active{background:#fff!important;color:#004f4b!important}

/* The React cockpit summary remains mounted for app state, but operators see the Tier form. */
body[data-pf-department] .cockpit-page>:not(.pf-cockpit-activity){display:none!important}
body[data-pf-department] .cockpit-page{width:100%;max-width:none}
.pf-cockpit-activity{font-size:14px;color:#17332f}
.pf-cockpit-controls{display:flex;flex-wrap:wrap;align-items:stretch;gap:10px;margin:0 0 14px}
.pf-cockpit-controls>.pf-tier-choice-nav{min-width:min(100%,255px);flex:1 1 240px}
.pf-cockpit-controls>label{display:grid;gap:4px;align-content:center;padding:5px 10px;border:1px solid #cbded8;border-radius:10px;background:#fff;font-size:14px;font-weight:700}
.pf-cockpit-controls input{min-height:38px;border:0;background:#fff;color:#17332f;font:inherit}
.pf-cockpit-shifts{display:flex;flex:2 1 320px;gap:7px}
.pf-cockpit-shifts button{flex:1;min-width:95px;min-height:55px;padding:7px;border:1px solid #cbded8;border-radius:10px;background:#fff;color:#195b50;font:inherit;font-weight:750;cursor:pointer}
.pf-cockpit-shifts button.active{border-color:#006B65;background:#006B65;color:#fff}
.pf-cockpit-shifts small{display:block;margin-top:2px;font-size:12px;opacity:.85}
.pf-cockpit-form{max-width:1400px;padding:18px;border:1px solid #d0e0db;border-radius:14px;background:#fff;box-shadow:0 5px 18px #143d330d}
.pf-cockpit-form label{font-size:14px;font-weight:700;color:#355b51}
.pf-cockpit-form :is(input,select,textarea){box-sizing:border-box;min-width:0;width:100%;height:42px;padding:8px 10px;border:1px solid #b9d3cb;border-radius:8px;background:#fff;color:#17332f;font:inherit;font-size:14px}
.pf-cockpit-form input[readonly]{background:#f3f8f6}
.pf-cockpit-form :is(input,select,textarea):focus-visible,.pf-activity-dialog button:focus-visible{outline:3px solid #006B65;outline-offset:2px}
.pf-cockpit-totals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:20px}
.pf-cockpit-totals>*{min-width:0;padding:12px;border-radius:10px;background:#edf7f4}
.pf-cockpit-totals>label{display:grid;gap:6px}
.pf-cockpit-totals>div{display:grid;align-content:center;gap:4px}
.pf-cockpit-totals small{font-size:12px;font-weight:750;color:#41675d}
.pf-cockpit-totals strong{font-size:20px;color:#004f4b}
.pf-cockpit-section-heading{margin:0 0 10px}
.pf-cockpit-section-heading small{font-size:12px;font-weight:800;letter-spacing:.03em;color:#2b7464}
.pf-cockpit-section-heading h3{margin:4px 0 0;font-size:18px;color:#164b41}
.pf-cockpit-activity-row{display:grid;grid-template-columns:minmax(135px,1.1fr) minmax(130px,1fr) 88px 95px minmax(130px,1.5fr) 44px;gap:8px;align-items:end;padding:12px 8px;border-top:1px solid #e1ebe6;border-left:5px solid var(--activity-color,#a0bcb5);border-radius:3px}
.pf-cockpit-activity-row:has([data-edit="batchNumber"]){grid-template-columns:minmax(135px,1.1fr) minmax(130px,1fr) 88px 95px 105px minmax(130px,1.5fr) 44px}
.pf-cockpit-activity-row label{display:grid;min-width:0;gap:5px}
.pf-cockpit-activity-row>button{height:42px;border:0;border-radius:8px;background:#fde8e4;color:#b14335;font-size:25px;cursor:pointer}
.pf-cockpit-add,body[data-pf-department] #batch-add{display:grid;place-items:center;width:44px;height:44px;min-height:44px;margin-top:10px;padding:0;border:1px solid #006B65;border-radius:8px;background:#006B65;color:white;font-size:28px;font-weight:750;line-height:1;cursor:pointer}
.pf-cockpit-handover{display:grid;gap:7px;margin-top:22px}
.pf-cockpit-handover textarea{height:90px;resize:vertical}
.pf-cockpit-message{margin:12px 0 0;font-weight:700;color:#006B65}
.pf-cockpit-loading,.pf-cockpit-error{padding:20px;background:#fff;border-radius:12px}

/* Reference activity palette, with readable foregrounds. */
.pf-activity-not_planned{--activity-color:#8bbce8;--activity-ink:#083654}
.pf-activity-stop{--activity-color:#77d0ed;--activity-ink:#063f51}
.pf-activity-setup{--activity-color:#f7e800;--activity-ink:#372f00}
.pf-activity-organizational{--activity-color:#ffc83d;--activity-ink:#453000}
.pf-activity-breakdown{--activity-color:#e3262d;--activity-ink:#fff}
.pf-activity-quality{--activity-color:#ffad16;--activity-ink:#4a2c00}
.pf-activity-production{--activity-color:#55da25;--activity-ink:#173700}
.pf-activity-backdrop{position:fixed;inset:0;z-index:10100;display:grid;place-items:center;padding:18px;background:#001f1dc2}
.pf-activity-dialog{box-sizing:border-box;width:min(100%,560px);max-height:min(95vh,800px);overflow:auto;padding:22px;border-radius:18px;background:#fff;color:#17332f;box-shadow:0 25px 75px #001e1d7a}
.pf-activity-dialog h2{margin:0 0 20px;font-size:clamp(22px,4vw,27px);line-height:1.2}
.pf-activity-prompt{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:14px}
.pf-activity-prompt button{min-height:105px;padding:14px;border:1px solid #b9d3cb;border-radius:13px;background:var(--activity-color,#006B65);color:var(--activity-ink,#fff);font:inherit;font-size:18px;font-weight:800;cursor:pointer}
.pf-activity-prompt button[data-show-choices]{background:#006B65;color:#fff}
.pf-activity-prompt small,.pf-activity-prompt strong,.pf-activity-prompt span{display:block}
.pf-activity-prompt small{font-size:13px}.pf-activity-prompt strong{margin:6px 0;font-size:20px}.pf-activity-prompt span{font-size:14px}
.pf-activity-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.pf-activity-choices[hidden]{display:none}
.pf-activity-choices button{min-height:56px;padding:10px;border:1px solid #154e45;border-radius:9px;background:var(--activity-color,#006B65);color:var(--activity-ink,#fff);font:inherit;font-size:15px;font-weight:800;cursor:pointer}
.pf-activity-dialog [data-cancel-activity]{width:100%;min-height:44px;margin-top:14px;border:1px solid #bfd6cf;border-radius:8px;background:#fff;color:#004f4b;font:inherit;font-size:14px;font-weight:750;cursor:pointer}
body[data-pf-department] .pf-tier-batch-row{grid-template-columns:minmax(135px,1.1fr) minmax(120px,1fr) 95px 95px minmax(140px,1.5fr) 44px;align-items:end;border-left:5px solid var(--activity-color,#a0bcb5);padding-inline:8px}
body[data-pf-department] .pf-tier-batch-row:has([data-b="number"]){grid-template-columns:minmax(135px,1.1fr) minmax(120px,1fr) 95px 95px 105px minmax(140px,1.5fr) 44px}
body[data-pf-department] .pf-tier-batch-row>button{height:42px}
body[data-pf-department] .pf-kpi-statuses .pf-status-row{box-sizing:border-box;grid-template-columns:minmax(135px,180px) 116px minmax(150px,1fr);gap:14px;width:100%}
body[data-pf-department] .pf-kpi-statuses .pf-status-row>input{box-sizing:border-box;min-width:0;width:100%}
body[data-pf-department] .pf-status-picker{gap:8px}
body[data-pf-department] .pf-status-picker button{box-sizing:border-box;width:32px!important;height:32px!important;min-width:32px!important;min-height:32px!important}
body[data-pf-department] .pf-status-picker button.selected::after{font-size:16px!important}
.pf-activity-label{display:inline-block;padding:4px 8px;border-radius:6px;background:var(--activity-color,#dcefeb);color:var(--activity-ink,#17332f);font-weight:750}
@media(max-width:1080px){.pf-cockpit-activity-row,.pf-cockpit-activity-row:has([data-edit="batchNumber"]),body[data-pf-department] .pf-tier-batch-row,body[data-pf-department] .pf-tier-batch-row:has([data-b="number"]){grid-template-columns:repeat(2,minmax(0,1fr)) 44px}.pf-cockpit-activity-row label:nth-last-of-type(1),.pf-tier-batch-row label:nth-last-of-type(1){grid-column:span 2}}
@media(max-width:620px){.pf-cockpit-totals{grid-template-columns:repeat(2,minmax(0,1fr))}.pf-cockpit-totals>label{grid-column:1/-1}.pf-cockpit-shifts{overflow-x:auto}.pf-activity-dialog{padding:16px}.pf-cockpit-form{padding:12px}body[data-pf-department] .pf-kpi-statuses .pf-status-row{grid-template-columns:minmax(0,1fr) 116px}body[data-pf-department] .pf-kpi-statuses .pf-status-row>input{grid-column:1/-1}}
@media(max-width:430px){.pf-cockpit-activity-row,.pf-cockpit-activity-row:has([data-edit="batchNumber"]),body[data-pf-department] .pf-tier-batch-row,body[data-pf-department] .pf-tier-batch-row:has([data-b="number"]){grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.pf-cockpit-activity-row>button,.pf-tier-batch-row>button{grid-column:2;justify-self:end;width:44px}.pf-activity-choices{grid-template-columns:1fr}}
@media print{body[data-pf-department] .pf-tier-banner,body[data-pf-department] .page-content .pf-cockpit-banner{background:#fff!important;color:#111!important}body[data-pf-department] .pf-tier-banner :is(h2,p,small),body[data-pf-department] .page-content .pf-cockpit-banner :is(h2,p,small){color:#111!important}}

/* One shared seven-column grid for every activity, including non-production. */
body[data-pf-department] .pf-tier-batches>div,
body[data-pf-department] .pf-cockpit-activities{overflow-x:auto;overscroll-behavior-inline:contain}
body[data-pf-department] :is(.pf-tier-batch-row,.pf-tier-batch-row:has([data-b="number"]),.pf-cockpit-activity-row,.pf-cockpit-activity-row:has([data-edit="batchNumber"])){box-sizing:border-box;display:grid!important;grid-template-columns:minmax(155px,1.25fr) minmax(140px,1.15fr) 98px 98px 115px minmax(180px,1.5fr) 44px!important;gap:8px!important;align-items:end;min-width:900px;max-width:none;min-height:76px;padding:8px!important}
body[data-pf-department] :is(.pf-tier-batch-row,.pf-cockpit-activity-row)>*{box-sizing:border-box;grid-column:auto!important;min-width:0;max-width:100%}
body[data-pf-department] :is(.pf-tier-batch-row,.pf-cockpit-activity-row) label{display:grid;align-content:end;gap:5px;min-width:0;min-height:60px;margin:0!important}
body[data-pf-department] .pf-activity-empty{display:block;min-height:60px}
body[data-pf-department] :is(.pf-tier-batch-row,.pf-cockpit-activity-row)>button{box-sizing:border-box;display:grid;place-items:center;justify-self:end;align-self:end;width:44px!important;height:44px!important;min-width:44px!important;max-width:44px!important;min-height:44px!important;max-height:44px!important;padding:0!important;border:0;border-radius:8px!important;font-size:24px;line-height:1;cursor:pointer}
body[data-pf-department] :is(#batch-add,.pf-cockpit-add){box-sizing:border-box;margin:10px 8px 0 auto!important;width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;padding:0!important;border-radius:8px!important}
.pf-activity-prompt[hidden],.pf-activity-dialog [data-cancel-activity][hidden]{display:none!important}
