/* One page frame for all four Shield tools. Load after page-specific styles. */
html{scrollbar-gutter:stable}
body>header:is(header,.site-header),body>main,body>main.planner-main,body>main.container{box-sizing:border-box}
body>header:is(header,.site-header){position:relative;display:flex;align-items:center;justify-content:space-between;height:84px;min-height:84px;gap:24px;margin:0;padding:14px max(28px,calc((100% - 1104px)/2));background:#fff;border-bottom:1px solid #dbe3ed}
body>header:is(header,.site-header) img,body>header:is(header,.site-header).site-header .brand img{display:block;width:156px;max-height:44px;object-fit:contain;object-position:left}
body>header:is(header,.site-header) .header-controls{display:contents}
body>header:is(header,.site-header) .workspace-week{flex:0 1 260px;width:260px!important;max-width:260px;min-width:0;margin:0 0 0 auto;font:650 9px/1.5 system-ui!important;letter-spacing:.1em;color:#65747f}
body>header:is(header,.site-header) .workspace-week select{display:block;width:100%;max-width:100%;margin-top:2px;padding:8px 10px;min-height:36px;font:600 13px/1.4 system-ui;border-radius:10px}
body>header:is(header,.site-header) #logout{position:absolute;right:max(28px,calc((100% - 1104px)/2));bottom:3px;margin:0;padding:0;font-size:10px;line-height:1.4;min-height:0}
body>main,body>main.planner-main,body>main.container{width:100%;max-width:1160px;margin:0 auto;padding:28px 28px 80px}
body>main .workspace-bar{width:100%;margin:0 0 32px;padding:0;gap:0}
body>main .workspace-bar .workspace-nav{margin:0!important}
@media(max-width:720px){
 body>header:is(header,.site-header),body>header:is(header,.site-header).site-header{height:76px;min-height:76px;padding:12px 20px;gap:12px}
 body>header:is(header,.site-header) img,body>header:is(header,.site-header).site-header .brand img{width:110px;max-height:42px}
 body>header:is(header,.site-header) .workspace-week{flex:0 1 210px;max-width:calc(100% - 122px);width:210px!important}
 body>header:is(header,.site-header) .workspace-week select{font-size:12px;min-height:36px;padding:8px 10px}
 body>header:is(header,.site-header) #logout{right:20px;bottom:2px}
 body>main,body>main.planner-main,body>main.container{padding:24px 20px 64px}
 body>main .workspace-bar{margin-bottom:26px}
}
@media print{html{scrollbar-gutter:auto}}

.schedule-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:24px;margin:0 0 24px}.schedule-heading h1{font-size:30px;line-height:1.2;letter-spacing:-.025em;margin:0}.schedule-heading #week-label{font-size:15px;line-height:1.5;margin:8px 0 0;color:#60738c}.schedule-heading #updated-at{font-size:12px;color:#60738c}.schedule-actions{display:flex;align-items:center;gap:16px}.schedule-actions>span{font-size:14px;color:#60738c}.schedule-actions .button.primary{min-height:44px;font-size:15px;padding:11px 20px;border-radius:6px;background:#d91f32;border-color:#d91f32;color:#fff}.schedule-heading+section .state-card{margin:0 0 20px}
@media(max-width:720px){.schedule-heading{gap:14px;flex-direction:column}.schedule-heading h1{font-size:28px}.schedule-actions{width:100%;flex-direction:row;justify-content:space-between;gap:12px}.schedule-actions .button.primary{font-size:14px;padding:11px 14px}.schedule-actions>span{font-size:12px}.schedule-heading #week-label{font-size:14px}}
@media(max-width:360px){.schedule-heading h1{font-size:25px}.schedule-actions .button.primary{font-size:13px;padding:10px 12px}.schedule-heading #week-label{font-size:13px}}

.schedule-package-link{margin:24px 0 0;font-size:14px}.schedule-package-link a{color:#60738c;text-underline-offset:3px}

/* Scheduling gestures preserve the click-to-edit alternative. */
.drag-grip{float:right;color:#60738c;font-size:24px;line-height:1;min-width:28px;min-height:28px;cursor:grab;touch-action:none;user-select:none}
[data-movable="true"]{cursor:grab}
.job-dragging [data-movable="true"]{cursor:grabbing}
.day-cell.drag-target{outline:3px solid #d91f32;outline-offset:-3px;background:#fff2f4}
.drag-ghost{position:fixed;z-index:10000;pointer-events:none;transform:translate(-50%,-110%);max-width:220px;padding:12px 18px;background:#112c51;color:white;border-radius:8px;box-shadow:0 8px 24px #112c5140;font-weight:700}

[data-movable="true"]{user-select:none}
#ai-draft-panel{margin:12px 0;border-top:1px solid #dbe3ed;padding-top:12px}
#ai-results>summary{cursor:pointer;font-weight:700;font-size:13px;padding:10px 0}
#ai-draft-panel .ai-tools{padding:8px 0;margin:0;background:transparent;border:0;display:block}
#ai-draft-panel #generate-plan{width:100%;font-size:13px;min-height:44px}
#ai-draft-panel #generation-progress{padding:12px;display:block;margin:12px 0}
#ai-draft-panel #progress-title{font-size:16px}
#ai-draft-panel #progress-detail,#ai-draft-panel #worker-status{font-size:12px;line-height:1.5}
#ai-draft-panel #progress-quip,#ai-draft-panel .progress-spinner{display:none}
#ai-results{margin:16px 0;background:white;border:1px solid #dbe3ed;border-radius:12px;padding:8px 16px}
@media(max-width:850px){
 .board-layout:not(.queue-collapsed) #queue-pane{display:block;max-height:340px;overflow:auto;margin-bottom:16px}
 #toggle-queue{display:block;min-height:44px}
 .drag-grip{min-width:44px;min-height:44px;font-size:30px}
 #mobile-days{position:sticky;top:0;z-index:10;background:#f5f7fa}
}

/* Shared page titles keep their baseline fixed when changing tools. */
body>main .workspace-title,body>main .hero.workspace-title.crew-selected{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;padding:0;margin:0 0 24px;min-height:74px}
body>main .workspace-title h1{font-size:30px;line-height:1.2;letter-spacing:-.025em;margin:0}
body>main .workspace-title>div>p,body>main .workspace-title #plan-status,body>main .workspace-title #progress{font-size:14px;line-height:1.5;color:#60738c;margin:8px 0 0;max-width:620px}
body>main .workspace-title #refresh-intake{margin-top:0}
body>main .workspace-title .pay-hero-actions{margin:0}
/* Job and crew cards share the rounded Shield accent; booking and risk colors remain visible. */
body>main :is(.job,.crew-card,.crew-choice,.scheduled-pay-job,.pay-job,.queue-job,.pay-summary){background:#fff;border:1px solid #dbe3ed;border-left:4px solid #d91f32;border-radius:12px;box-shadow:none}
body>main .board-job{border-radius:12px}
body>main :is(.state-card,.pay-source-card,.pay-empty){border-radius:12px}
.scheduled-amount .text-button{font-size:14px;min-height:36px;text-decoration:underline;text-underline-offset:3px}
.scheduled-amount .amount-note{font-size:12px;line-height:1.4;color:#60738c}
#amount-dialog{width:min(520px,calc(100% - 32px));border:1px solid #dbe3ed;border-left:4px solid #d91f32;border-radius:12px;padding:24px}
#amount-dialog label{display:block;margin:16px 0;font-weight:600}
#amount-dialog input{display:block;width:100%;margin-top:6px;min-height:44px;padding:10px;box-sizing:border-box}
#amount-dialog .amount-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:20px}
@media(max-width:720px){body>main .workspace-title{gap:14px;min-height:74px}body>main .workspace-title h1{font-size:28px}body>main .workspace-title>div>p{font-size:14px}body>main .schedule-heading.workspace-title{flex-direction:column}body>main .hero.workspace-title{flex-wrap:wrap}}

body>main.planner-main .planner-top.workspace-title{padding:0;margin:0 0 24px;align-items:flex-start}
body>main.planner-main .planner-top.workspace-title h1{font-size:30px;line-height:1.2;margin:0;letter-spacing:-.025em}
body>main.planner-main .planner-top.workspace-title #plan-status{font-size:14px;line-height:1.5;margin:8px 0 0}
.roof-waste-control{max-width:360px;margin:16px 0}.roof-waste-control p{font-size:13px;color:#60738c;line-height:1.5}
@media(max-width:720px){body>main.planner-main .planner-top.workspace-title h1{font-size:28px}}

body>main .scheduled-pay-job{padding:18px;margin:12px 0}.hero.crew-selected .pay-hero-actions{display:none}
body>main .pay-job{padding:18px;margin:12px 0}

body>main.planner-main .queue-job{border:1px solid #dbe3ed;border-left:4px solid #d91f32;border-radius:12px}
