/* Agenda and confirmation workspace — scoped, labelled controls and one scroll region. */
.agenda-workspace,.appointment-workspace{--agenda-line:var(--gj-line,#dbe6df);--agenda-green:var(--gj-green,#137d53);--agenda-ink:var(--gj-ink,#203f31);--agenda-muted:var(--gj-muted,#637c6e);--agenda-soft:var(--gj-page,#f5f8f5);box-sizing:border-box}
.agenda-workspace [hidden],.appointment-dialog [hidden]{display:none!important}
.agenda-workspace{padding:22px!important;border:1px solid var(--agenda-line);border-radius:16px!important;box-shadow:0 5px 20px #1a453506;background:var(--gj-surface,#fff);min-width:0}
.agenda-workspace-header{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap;margin-bottom:18px}
.agenda-workspace-header h2{font-size:22px;line-height:1.35;margin:0;flex:1 1 280px}
.agenda-main-actions.toolbar,.agenda-utility-actions,.agenda-period-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0!important}
.agenda-control-row{display:flex;align-items:center;gap:16px;justify-content:space-between;padding:14px 0;border-top:1px solid var(--agenda-line);border-bottom:1px solid var(--agenda-line);margin-bottom:16px;flex-wrap:wrap}
.agenda-workspace .agenda-view-tabs{margin:0!important;display:flex;gap:4px;padding:4px;background:var(--gj-soft,#f0f5f1);border-radius:10px}
.agenda-workspace .agenda-view-tabs button{min-width:66px!important;min-height:40px!important;border-radius:8px!important}
.agenda-workspace button:not([data-job]):not(.agenda-create){font-size:13px;min-height:42px;padding:9px 12px;border-radius:8px}
.agenda-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:16px 0 20px}
.agenda-metric{display:flex;align-items:center;gap:12px;background:var(--gj-soft,#f6f9f6);border:1px solid var(--gj-line,#e3ebe5);border-radius:10px;padding:12px 16px}
.agenda-metric strong{font-size:24px;color:var(--gj-green,#215c3c)}.agenda-metric span{font-size:12px;color:var(--gj-muted,#64776c)}
.agenda-client-notification{display:flex!important;align-items:center;gap:8px!important;background:var(--gj-soft,#f6f8f6)!important;color:var(--gj-muted,#456052)!important;border:1px solid var(--gj-line,#d9e4dc)!important;white-space:normal}
.agenda-client-notification.has-pending{background:var(--gj-orange-soft,#fff4d9)!important;color:var(--gj-orange,#865309)!important;border-color:#e4bf6c!important;font-weight:650}
.agenda-client-count{display:inline-grid;place-items:center;min-width:24px;height:24px;padding:0 6px;background:#e4ebe6;border-radius:15px;font-size:12px}.has-pending .agenda-client-count{background:#a55d08;color:var(--gj-surface,white)}
.agenda-workspace .sheet{border:1px solid var(--gj-line,#dce6df);border-radius:12px;overflow:auto;max-width:100%;scrollbar-width:thin}
.agenda-workspace .matrix th{background:#f3f7f4;font-size:12px;padding:13px 10px;position:sticky;top:0;z-index:1}
.agenda-workspace .weekly-agenda-card{border-radius:10px!important;padding:12px!important;margin-bottom:10px;box-shadow:0 2px 6px #163f2910;min-width:0;gap:7px!important}
.agenda-workspace .weekly-service{font-size:12px;line-height:1.5}.agenda-workspace .weekly-client{font-size:13px}.agenda-workspace .weekly-team{font-size:11px}.agenda-workspace .weekly-state{font-size:11px;justify-self:start}
.agenda-workspace .appointment-client-badge{font-size:11px!important;padding:6px 8px!important;margin-top:3px;border-radius:7px;line-height:1.45!important}
.appointment-request-badge{background:var(--gj-orange-soft,#fff0ce)!important;color:var(--gj-orange,#865208)!important;border:1px solid #e2b962!important;font-weight:700!important}
.agenda-workspace .has-client-request{outline:2px solid #ddab43!important;outline-offset:-1px;background:#fffdf6!important}
.agenda-workspace .daily-agenda-grid{gap:14px}.agenda-workspace .complete-month{min-width:0}.agenda-workspace .month-status .appointment-client-badge{display:none!important}.agenda-workspace .month-status.has-client-request{box-shadow:0 0 0 2px #c37c0b!important}.agenda-workspace .month-status.has-client-request:after{content:'!';background:#a96000;color:var(--gj-surface,white);border-radius:8px;font-size:10px;padding:0 3px;margin-left:2px}
/* Fixed header and tabs; only the selected pane scrolls. */
dialog.appointment-dialog{width:min(1080px,calc(100vw - 36px))!important;max-width:calc(100vw - 36px)!important;height:min(880px,calc(100dvh - 40px));max-height:calc(100dvh - 40px)!important;padding:0!important;border:1px solid #ceded3!important;border-radius:16px!important;color:var(--gj-ink,#203f31)!important;background:var(--gj-page,#f7faf7)!important;font-family:inherit;overflow:hidden!important;box-shadow:0 24px 90px #123c3338}
dialog.appointment-dialog[open]{display:flex;flex-direction:column}
.appointment-dialog>.dialog-top-close{display:none!important}
.appointment-dialog .appointment-dialog-head{flex:none;position:static!important;display:flex;align-items:center;flex-wrap:nowrap;gap:10px;margin:0!important;padding:18px 22px!important;background:var(--gj-surface,white);border-bottom:1px solid var(--gj-line,#e2eae4)}
.appointment-dialog .appointment-dialog-head h2{font-family:inherit;font-size:21px!important;line-height:1.3;font-weight:650;margin:0!important;flex:1;min-width:0}
.appointment-dialog .appointment-dialog-head button{flex:none;min-height:40px!important;max-width:none!important}
.appointment-context{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;flex:none;padding:12px 22px;background:var(--gj-soft,#edf5ef);border-bottom:1px solid var(--gj-line,#dce7df);font-size:13px}.appointment-context strong{color:#2a563e}.appointment-context span{color:var(--gj-muted,#536f5e)}
.appointment-dialog .appointment-tabs{position:static!important;flex:none;display:flex;gap:4px;margin:0;padding:10px 18px!important;background:var(--gj-surface,#fff);border-bottom:1px solid var(--gj-line,#dae5dd);overflow-x:auto}
.appointment-dialog .appointment-tabs button{flex:1;white-space:nowrap!important;min-width:115px!important;min-height:42px;padding:9px 13px!important;border:1px solid transparent;border-radius:8px;background:var(--gj-surface,white);color:var(--gj-muted,#526b5b);font-size:13px}
.appointment-dialog .appointment-tabs button[aria-pressed=true]{color:#146d49;background:#eaf5ed;border-color:#c6dfcf;font-weight:700}
.appointment-dialog>[data-appointment-pane]:not([hidden]){display:block;flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;padding:20px 22px;overscroll-behavior:contain;scrollbar-gutter:stable}
.appointment-dialog .appointment-form{display:grid;grid-template-columns:1fr;gap:16px!important;min-width:0;font-size:13px}
.appointment-dialog .appointment-section{margin:0;padding:18px;border:1px solid var(--gj-line,#dce6df);background:var(--gj-surface,white);border-radius:12px;min-width:0}
.appointment-dialog h3,.appointment-dialog .appointment-section>h3{font-size:15px!important;line-height:1.4;margin:0 0 14px!important;color:var(--gj-ink,#2a503a)}
.appointment-dialog h4{font-size:13px;margin:10px 0 6px}
.appointment-dialog label{display:grid!important;gap:7px;font-size:12px;line-height:1.4;margin:0!important;color:var(--gj-muted,#52685a);min-width:0}
.appointment-dialog input:not([type=checkbox]),.appointment-dialog select,.appointment-dialog textarea{display:block!important;box-sizing:border-box!important;min-width:0!important;width:100%!important;max-width:100%!important;margin:0!important;font-family:inherit!important;font-size:14px!important;font-weight:400!important;min-height:44px;padding:10px 12px!important;border:1px solid #cbdacf;border-radius:8px;background:var(--gj-surface,white);color:#253f32}
.appointment-dialog textarea{min-height:90px;resize:vertical;line-height:1.5}
.appointment-contact-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.appointment-contact-grid>label:first-child{grid-column:1/-1}
.appointment-dialog .appointment-system-actions,.appointment-dialog .appointment-external-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}
.appointment-dialog .appointment-system-actions button{flex:1 1 230px}.appointment-dialog .appointment-external-actions>*{flex:1 1 200px;text-align:center}
.appointment-dialog button,.appointment-dialog .appointment-external-actions a{box-sizing:border-box!important;min-height:42px;border:1px solid #cadbcf;border-radius:8px;background:#f2f7f2;color:#28553b;font-family:inherit;font-size:13px;font-weight:600;line-height:1.4;padding:10px 14px!important;max-width:100%;margin:0;white-space:normal!important;text-decoration:none;cursor:pointer}
.appointment-dialog button.primary{background:var(--gj-green,#147b53);color:var(--gj-surface,white);border-color:var(--gj-green,#147b53)}.appointment-dialog button.appointment-reject{background:var(--gj-surface,white);border-color:#d8b0a9;color:#9a4333}
.appointment-dialog button.gj-action-icon,.agenda-workspace button.gj-action-icon{width:auto!important;height:auto!important;max-width:none!important;display:inline-flex!important;gap:8px!important}
.appointment-dialog button .gj-action-label,.agenda-workspace .agenda-main-actions button .gj-action-label,.agenda-workspace .agenda-control-row button .gj-action-label{position:static!important;display:inline!important;width:auto!important;height:auto!important;overflow:visible!important;clip:auto!important;clip-path:none!important;white-space:normal!important}
.appointment-help{font-size:12px!important;line-height:1.5!important;color:#708174;margin:12px 0 0!important}
.appointment-dialog details:not(.appointment-history){border:1px solid #dde6df;border-radius:10px;padding:14px 16px;background:var(--gj-surface,white)}
.appointment-dialog details>summary{font-size:13px;font-weight:600;cursor:pointer;color:#41684e}.appointment-dialog details[open]>summary{margin-bottom:14px}
.appointment-dialog .appointment-multichannel{margin:0;display:flex;align-items:center;gap:16px;flex-wrap:wrap;padding:14px;border:1px solid #dce5dd;border-radius:9px}
.appointment-dialog .appointment-multichannel label,.appointment-dialog label.appointment-consent{display:flex!important;align-items:center;gap:9px;flex-direction:row;line-height:1.5;min-height:32px}.appointment-dialog input[type=checkbox]{flex:0 0 18px!important;width:18px!important;height:18px!important;min-height:18px!important;margin:0!important;padding:0!important}
.appointment-dialog .appointment-multichannel>button{margin-left:auto;flex:0 1 230px}
.appointment-dialog .appointment-feedback{flex:none;margin:0!important;padding:12px 22px!important;border-radius:0!important;border:0;border-bottom:1px solid var(--gj-line,#dbe5de);background:#eaf4ed;max-height:180px;overflow:auto;font-size:13px}.appointment-dialog .appointment-feedback:empty{display:none!important}.appointment-dialog .appointment-feedback.appointment-error{background:#fff0ec;color:#9b3c2a;border-color:#ecc4b8;font-weight:600}
.appointment-dialog .appointment-feedback input{margin-top:8px!important}.appointment-dialog .appointment-feedback button,.appointment-dialog .appointment-feedback a{display:inline-flex;margin:8px 8px 0 0!important;align-items:center}
.appointment-change-section{display:grid;gap:14px}.appointment-change-section>.appointment-form{grid-template-columns:repeat(3,minmax(0,1fr))}
.appointment-request-notice{display:grid;gap:12px;padding:20px!important;border:1px solid #e3c67d;background:var(--gj-orange-soft,#fffaf0);border-radius:12px;margin-bottom:18px}
.appointment-request-kicker{font-size:10px;letter-spacing:1px;font-weight:750;color:#986111}.appointment-request-notice>h3{font-size:18px!important;margin:0!important}.appointment-request-author{font-size:12px;color:#7b7055;margin:0}
.appointment-request-comparison{display:grid;grid-template-columns:1fr 1fr;gap:12px}.appointment-request-comparison .appointment-section{padding:14px!important;margin:0;background:var(--gj-surface,#fff);border-color:#dfdfd2}.appointment-request-comparison .appointment-section:last-child{border-color:#dbb66b;background:#fff8e7}.appointment-request-comparison h3{font-size:12px!important;margin-bottom:7px!important}.appointment-request-comparison p{font-size:15px;font-weight:650;margin:0;line-height:1.5}
.appointment-client-reason{margin:0;padding:13px 15px;border-left:3px solid #c48b2e;background:var(--gj-surface,white);border-radius:5px;white-space:pre-wrap;font-size:14px;line-height:1.5}
.appointment-decision-actions{display:flex;flex-wrap:wrap;gap:10px}.appointment-decision-actions button{flex:1 1 240px}
.appointment-dialog .appointment-request-tools{padding:10px 12px!important;background:var(--gj-orange-soft,#fffaf0)!important}.appointment-request-tools[open]{display:grid;gap:9px}
.appointment-dialog .appointment-history{max-height:none;overflow:visible;font-size:13px}.appointment-history p{background:var(--gj-surface,white);border:1px solid #e0e8e1;border-left:3px solid #a1bca9;padding:12px;border-radius:7px;line-height:1.6}
.appointment-dialog .appointment-channel-summary{grid-template-columns:1fr 1fr;margin:0 0 16px;padding:16px;background:var(--gj-surface,white)}.appointment-channel-summary strong{grid-column:1/-1}
.appointment-dialog .appointment-job-details{background:var(--gj-surface,white);border:1px solid var(--gj-line,#dce6df);line-height:1.65;font-size:13px}
.appointment-dialog.appointment-center>.appointment-center-list{flex:1;min-height:0;overflow:auto;padding:16px 22px}.appointment-center>label,.appointment-center>p,.appointment-center>.appointment-tabs{flex:none;padding:8px 22px!important}.appointment-center>label{background:var(--gj-surface,white)}.appointment-center-list .appointment-job-details,.appointment-pending-row{border:1px solid var(--gj-line,#dce6df);border-radius:12px;padding:16px;background:var(--gj-surface,white);margin-bottom:12px}.appointment-pending-row small{color:#95600d;font-size:10px;font-weight:750;letter-spacing:1px}.appointment-pending-row h3{margin:10px 0!important}.appointment-pending-row blockquote{white-space:pre-wrap;border-left:3px solid #d3ac58;margin:12px 0;padding-left:12px;font-size:13px}.appointment-center-list>p{margin:0 0 10px}
.agenda-client-toast{position:fixed;bottom:24px;right:24px;z-index:2147483000;width:min(420px,calc(100vw - 32px));border:1px solid #dfbc71;border-left:5px solid #b87b12;border-radius:12px;padding:18px;background:var(--gj-orange-soft,#fffaf0);box-shadow:0 10px 35px #1a362a30;color:#53421e;font-size:13px}.agenda-client-toast strong{font-size:14px;line-height:1.5}.agenda-client-toast p{line-height:1.5}.agenda-client-toast>div{display:flex;gap:8px;flex-wrap:wrap}.agenda-client-toast button{min-height:40px;padding:8px 12px;border:1px solid #d9c58f;border-radius:7px;background:var(--gj-surface,white);color:#5e4c20;cursor:pointer}.agenda-client-toast button:first-child{background:var(--gj-orange,#926215);color:var(--gj-surface,white);border-color:var(--gj-orange,#926215)}
@media(min-width:900px){.appointment-workspace [data-appointment-pane=tracking] .appointment-form{grid-template-columns:1fr 1fr}.appointment-workspace [data-appointment-pane=tracking] .appointment-form>p,.appointment-workspace [data-appointment-pane=tracking] .appointment-form>button{grid-column:1/-1}}
@media(max-width:750px){.agenda-workspace{padding:14px!important}.agenda-workspace-header h2{font-size:19px}.agenda-main-actions{width:100%}.agenda-summary{grid-template-columns:1fr 1fr;gap:8px}.agenda-metric{padding:10px;gap:8px}.agenda-metric strong{font-size:20px}.agenda-control-row{gap:10px}.agenda-workspace .agenda-view-tabs{width:100%}.agenda-workspace .agenda-view-tabs button{flex:1}.agenda-utility-actions{margin-left:auto!important}dialog.appointment-dialog{width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important;height:calc(100dvh - 20px);max-height:calc(100dvh - 20px)!important;border-radius:12px!important}.appointment-dialog .appointment-dialog-head{padding:13px!important;gap:8px}.appointment-dialog .appointment-dialog-head h2{font-size:17px!important}.appointment-dialog .appointment-dialog-head button{font-size:12px!important;padding:8px!important}.appointment-context{padding:10px 14px;gap:5px;font-size:12px}.appointment-dialog .appointment-tabs{padding:8px 10px!important}.appointment-dialog .appointment-tabs button{min-width:108px!important;font-size:12px}.appointment-dialog>[data-appointment-pane]:not([hidden]){padding:14px}.appointment-contact-grid,.appointment-request-comparison,.appointment-change-section>.appointment-form{grid-template-columns:1fr}.appointment-contact-grid>label:first-child{grid-column:auto}.appointment-dialog .appointment-section{padding:14px}.appointment-dialog .appointment-multichannel{align-items:stretch;gap:10px}.appointment-dialog .appointment-multichannel label,.appointment-dialog .appointment-multichannel>button{flex-basis:100%;margin-left:0}.appointment-dialog input:not([type=checkbox]),.appointment-dialog select,.appointment-dialog textarea{font-size:16px!important}.appointment-request-notice{padding:14px!important}.appointment-client-toast{right:16px;bottom:16px}.appointment-dialog .appointment-feedback{padding:10px 14px!important;max-height:150px}.appointment-dialog .appointment-channel-summary{grid-template-columns:1fr}}
@media print{.agenda-workspace-header,.agenda-control-row,.agenda-summary,.agenda-client-toast{display:none!important}.agenda-workspace{border:0!important;padding:0!important}.agenda-workspace .sheet{overflow:visible!important;border:0}}

/* Mobile touch audit: utility menu remains available without a long "Mais opções" label. */
.agenda-more-tools>summary{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;box-sizing:border-box;font-size:24px;line-height:1;list-style:none}
.agenda-more-tools>summary::-webkit-details-marker{display:none}
.agenda-more-tools>summary:focus-visible{outline:3px solid #1683ca;outline-offset:2px}
@media screen and (max-width:760px){
 .agenda-more-tools{width:auto!important;max-width:100%;margin-left:auto!important}
 .agenda-workspace .agenda-view-tabs button,
 .agenda-workspace .agenda-main-actions button,
 .agenda-workspace .agenda-control-row button,
 .agenda-workspace .agenda-utility-actions button,
 .appointment-dialog .appointment-dialog-head button,
 .appointment-dialog .appointment-tabs button,
 .appointment-dialog .appointment-form button,
 .agenda-more-tools>summary{min-height:44px!important}
 .agenda-workspace .agenda-view-tabs{min-width:0;max-width:100%;overflow-x:auto;scrollbar-width:thin}
 .agenda-workspace .agenda-view-tabs button{flex:0 0 auto!important;white-space:nowrap}
 .agenda-workspace .agenda-period-controls{min-width:0;max-width:100%}
 .agenda-workspace .agenda-period-controls button{flex:0 1 auto}
}

.agenda-filter-panel{padding:12px 16px;margin:0 0 16px;border:1px solid var(--gj-line,#dce6df);border-radius:10px;background:#f8faf8}.agenda-filter-panel summary{font-size:13px;font-weight:600;color:#496951;cursor:pointer}.agenda-filter-panel[open]>summary{margin-bottom:10px}.agenda-filter-panel [data-maintenance-agenda-filters]{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px!important;padding:0!important;margin:0!important}.agenda-filter-panel select{width:100%;min-width:0;min-height:42px;font-size:13px;background:var(--gj-surface,white)}.agenda-filter-panel small{grid-column:1/-1;color:#6d7f71;padding-top:4px}
@media(max-width:750px){.agenda-filter-panel [data-maintenance-agenda-filters]{grid-template-columns:1fr 1fr}.agenda-filter-panel{padding:12px}}
@media(max-width:460px){.agenda-filter-panel [data-maintenance-agenda-filters]{grid-template-columns:1fr}}

.appointment-dialog>.agenda-client-toast{position:static!important;flex:none;margin:10px 18px;width:auto;max-height:160px;overflow:auto;padding:12px 14px;box-shadow:none}.appointment-dialog>.agenda-client-toast p{margin:7px 0}

/* Recorrência: confirmação compacta nas células estreitas. */
.month-status .appointment-client-badge.appointment-compact-icon{display:inline-flex!important;align-items:center;justify-content:center;width:20px!important;height:20px!important;min-width:20px!important;min-height:20px!important;max-width:20px!important;flex:0 0 20px!important;padding:2px!important;margin:3px auto 0!important;line-height:1!important;white-space:nowrap!important;overflow:hidden;border-radius:50%!important;vertical-align:middle;box-sizing:border-box}.appointment-compact-icon svg{display:block;flex:none;width:15px;height:15px;pointer-events:none}.month-status.has-client-request:after{display:none!important}.month-status .appointment-compact-icon[data-confirmation-state=confirmed]{background:#e4f5ea;color:#087742;border:1px solid #a7d6b9}.month-status .appointment-compact-icon[data-confirmation-state=request]{background:var(--gj-orange-soft,#fff0ce);color:var(--gj-orange,#865208);border:1px solid #d5a445}.month-status .appointment-compact-icon[data-confirmation-state=waiting]{background:var(--gj-soft,#eef4f0);color:#597064;border:1px solid #ccdcd1}

/* Acompanhamento: painel com rolagem e controles agrupados. */
.appointment-dialog [data-appointment-pane=tracking] .tracking-form{display:flex!important;flex-direction:column;gap:16px!important}.tracking-settings{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;min-width:0}.tracking-settings>.tracking-card:first-child,.tracking-settings>.tracking-card:last-child{grid-column:1/-1}.tracking-card{display:flex;flex-direction:column;gap:12px}.tracking-card h3{margin-bottom:0!important}.tracking-hint{font-size:12px;line-height:1.6;color:var(--gj-muted,#617269);margin:0}.appointment-dialog label.tracking-check{display:flex!important;flex-direction:row!important;align-items:center;gap:10px!important;min-height:44px;padding:10px!important;background:var(--gj-soft,#f5f9f6);border:1px solid var(--gj-line,#e0e9e2);border-radius:8px}.tracking-check input[type=checkbox]{flex:0 0 18px;width:18px!important;height:18px!important;min-height:18px!important;margin:0!important;accent-color:var(--gj-green,#117b50)}.tracking-check span{font-size:13px;font-weight:500;line-height:1.5}.tracking-coordinate-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;padding-top:12px}.tracking-coordinates summary{font-size:12px;color:#426b53;cursor:pointer}.tracking-save-bar{position:sticky;bottom:-20px;background:var(--gj-surface,#fff);border-top:1px solid var(--gj-line,#d7e4db);display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 0;z-index:2}.tracking-save-bar button{flex:none;background:var(--gj-green,#127b50)!important;color:var(--gj-surface,#fff)!important}.tracking-feedback{margin:0;font-size:13px;color:#246344}.tracking-feedback.is-error{color:var(--gj-red,#a0392c)}.tracking-feedback:empty{display:none}.tracking-card [hidden]{display:none!important}@media(max-width:750px){.tracking-settings,.tracking-coordinate-grid{grid-template-columns:1fr}.tracking-settings>.tracking-card{grid-column:auto!important}.tracking-save-bar{bottom:-14px;flex-direction:column;align-items:stretch;gap:10px}.tracking-save-bar button{width:100%}.tracking-card{padding:14px!important}}

/* Greenjob v3.111.4: central de confirmações compacta */
.appointment-dialog.appointment-center .appointment-center-filters{display:grid;grid-template-columns:minmax(240px,2fr) minmax(165px,1fr) minmax(165px,1fr);gap:12px;padding:12px 22px;background:var(--gj-surface,#fff);align-items:end;flex:none}
.appointment-dialog.appointment-center .appointment-center-filters label{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:650;color:var(--gj-ink,#285342);min-width:0}
.appointment-dialog.appointment-center .appointment-center-filters input,.appointment-dialog.appointment-center .appointment-center-filters select{width:100%;min-width:0;box-sizing:border-box;height:42px;font-size:14px;margin:0}
.appointment-dialog.appointment-center .appointment-center-columns,.appointment-dialog.appointment-center .appointment-center-row{display:grid;grid-template-columns:minmax(135px,1.25fr) minmax(180px,2fr) minmax(175px,1.65fr) minmax(145px,1fr);gap:14px;align-items:center}
.appointment-dialog.appointment-center .appointment-center-columns{padding:10px 22px;background:#edf4ef;color:var(--gj-ink,#285342);font-size:12px;border-top:1px solid var(--gj-line,#dce6df);border-bottom:1px solid var(--gj-line,#dce6df);flex:none}
.appointment-dialog.appointment-center .appointment-center-list .appointment-center-row{margin:0 0 7px;padding:11px 13px;border-radius:9px;line-height:1.4;white-space:normal;min-height:60px}
.appointment-center-identity,.appointment-center-service,.appointment-center-situation{display:flex;flex-direction:column;gap:4px;min-width:0;overflow-wrap:anywhere;font-size:13px}
.appointment-center-identity strong{font-size:15px;color:#18573e}.appointment-center-service strong{font-size:13px;font-weight:650}.appointment-center-identity span,.appointment-center-service span,.appointment-center-situation small{color:var(--gj-muted,#587066);font-size:12px}
.appointment-center-row-actions button{width:100%;font-size:12px;padding:9px 8px;white-space:normal}
@media(max-width:850px){.appointment-dialog.appointment-center .appointment-center-filters{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.appointment-dialog.appointment-center .appointment-center-filters label:first-child{grid-column:1/-1}.appointment-dialog.appointment-center .appointment-center-columns{display:none}.appointment-dialog.appointment-center .appointment-center-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px}.appointment-center-row-actions{align-self:end}}
@media(max-width:520px){.appointment-dialog.appointment-center .appointment-center-filters{grid-template-columns:1fr;padding:10px 14px}.appointment-dialog.appointment-center .appointment-center-filters label:first-child{grid-column:auto}.appointment-dialog.appointment-center .appointment-center-row{grid-template-columns:1fr}.appointment-center-row-actions button{width:auto}.appointment-dialog.appointment-center .appointment-center-list{padding:10px 14px}}
/* v3.156.1: secondary tools stay available without competing with scheduling. */
.agenda-more-tools{position:relative;margin-left:auto}
.agenda-more-tools>summary{cursor:pointer;padding:10px 14px;border:1px solid var(--gj-line,#d5e1d9);border-radius:8px;background:var(--gj-surface,#fff);min-height:44px}
.agenda-more-tools[open]>.agenda-utility-actions{display:flex;flex-wrap:wrap;gap:8px;padding:8px;background:var(--gj-surface,#fff)}
.agenda-filter-panel>summary{cursor:pointer;min-height:44px;align-content:center}
@media(max-width:680px){.agenda-more-tools{margin-left:0;width:100%}.agenda-main-actions{flex-wrap:wrap}.agenda-filter-panel select{max-width:100%;min-height:44px}}

/* Freeze the two heading rows together and the contract column horizontally. */
.monthly-agenda.agenda-workspace .matrix thead { position: sticky; top: 0; z-index: 5; }
.monthly-agenda.agenda-workspace .matrix thead th.date { position: static; padding: 5px 0; line-height: 1.2; }
.monthly-agenda.agenda-workspace .matrix tbody th.sticky { top: auto; }
.monthly-agenda.agenda-workspace .sheet { scroll-padding-top: 54px; }

/* A grade de recorrência usa uma coluna por dia do mês. */
@media screen and (max-width:700px){
 .monthly-agenda.agenda-workspace .sheet{--contract-col:clamp(106px,29vw,148px);--day-col:44px;max-width:100%;min-width:0;overflow:auto}
 .monthly-agenda.agenda-workspace .matrix{width:max-content;min-width:0!important;table-layout:fixed;border-spacing:0}
 .monthly-agenda.agenda-workspace .matrix .date{box-sizing:border-box;width:var(--day-col)!important;min-width:var(--day-col)!important;max-width:var(--day-col)!important;padding:2px}
 .monthly-agenda.agenda-workspace .matrix .sticky{box-sizing:border-box;width:var(--contract-col)!important;min-width:var(--contract-col)!important;max-width:var(--contract-col)!important;padding:5px!important;left:0}
 .monthly-agenda.agenda-workspace .contract-row-client,.monthly-agenda.agenda-workspace .contract-row-type{white-space:normal;overflow-wrap:anywhere;text-overflow:clip;line-height:1.25}
 .monthly-agenda.agenda-workspace .matrix .date .agenda-create{min-width:0!important;min-height:44px;margin:0}
}
/* 3.156.79 — shared controls, compact planning and mobile day view. */
.agenda-workspace .agenda-view-tabs{flex-wrap:wrap;max-width:100%}
.agenda-jump-date{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:13px}
.agenda-by-team td{vertical-align:top;min-width:190px}
.agenda-by-team .agenda-team-row{position:sticky;left:0;z-index:1;min-width:150px;max-width:190px;background:var(--gj-surface,#fff);white-space:normal;overflow-wrap:anywhere}
.agenda-create-guide{padding:12px;background:var(--gj-soft,#f0f5f1);border-radius:10px;margin:0;line-height:1.5}
@media(max-width:700px){
 .agenda-workspace .agenda-view-tabs{display:flex;flex-wrap:wrap;width:100%}
 .agenda-workspace .agenda-view-tabs button{flex:1 1 90px;min-height:44px!important;white-space:normal}
 .agenda-workspace .daily-agenda-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
 .agenda-workspace .daily-agenda-item,.agenda-workspace .weekly-agenda-card{min-width:0;max-width:100%;box-sizing:border-box}
 .agenda-workspace .daily-agenda-item .weekly-client,.agenda-workspace .daily-agenda-item .weekly-service{white-space:normal;overflow-wrap:anywhere}
 .agenda-workspace .agenda-period-controls{width:100%;justify-content:space-between}
 .agenda-workspace .agenda-jump-date{width:100%}
 .agenda-workspace .agenda-jump-date input{min-width:0;flex:1}
 .agenda-workspace .agenda-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
 .agenda-workspace .sheet{max-width:100%;overflow:auto}
}
@media print{.agenda-slot-create,.agenda-jump-date{display:none!important}}

/* Calendar actions stay compact inside the grid. */
html body #view .agenda-workspace button[data-action-presentation="icon"]:not([hidden]):is(.agenda-slot-create,.agenda-create,.contract-row-icons > button) {
  display: inline-grid !important;
  place-items: center;
  box-sizing: border-box;
  flex: none !important;
  width: 28px !important;
  min-width: 28px !important;
  max-width: 28px !important;
  height: 28px !important;
  min-height: 28px !important;
  max-height: 28px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 1px solid transparent !important;
  border-radius: 6px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--agenda-green, #196246) !important;
  font-size: 16px !important;
  line-height: 1 !important;
}
#view .agenda-workspace :is(.agenda-slot-create,.agenda-create,.contract-row-icons button) > svg {
  width: 16px !important;
  min-width: 16px !important;
  height: 16px !important;
}
#view .agenda-workspace :is(.agenda-slot-create,.agenda-create,.contract-row-icons button):hover {
  background: #eaf4ee !important;
  border-color: #c5dacd !important;
}
#view .agenda-workspace :is(.agenda-slot-create,.agenda-create,.contract-row-icons button):focus-visible {
  outline: 2px solid var(--agenda-green, #196246) !important;
  outline-offset: -2px !important;
}
#view .monthly-agenda .matrix .agenda-create { position: static; }
#view .monthly-agenda .matrix .agenda-create span { opacity: 1; font-size: inherit; }
#view .monthly-agenda .matrix .contract-row-number { display: block; }
#view .monthly-agenda .contract-row-icons {
  min-height: 0;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
#view .monthly-agenda .contract-row-icons:empty { display: none; }
#view .monthly-agenda .contract-row-icons .contract-program-button.danger { color: #a72929 !important; }
#view .complete-month-calendar {
  border: 1px solid var(--agenda-line);
  border-radius: 10px;
}
#view .complete-month-calendar .complete-month-head > b {
  background: var(--agenda-soft);
  text-align: left;
  padding-inline: 8px;
}
#view .complete-month-calendar .complete-month-day {
  min-width: 0 !important;
  min-height: 66px;
  padding: 4px 6px;
}
#view .complete-month-calendar .complete-month-day.outside { background: var(--agenda-soft) !important; }
.complete-month-date {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 28px;
  gap: 4px;
}
.complete-month-date strong { white-space: nowrap; font-size: 12px; }
.agenda-workspace .complete-month-os { margin: 2px 0; padding: 4px 5px; gap: 2px; }
.agenda-workspace .weekly-agenda-card { padding: 7px !important; gap: 3px !important; margin-bottom: 5px; }
.agenda-workspace .weekly-card-footer:empty { display: none; }
#view .daily-agenda-grid { align-items: stretch; }
#view .daily-agenda-item {
  align-self: stretch;
  padding: 0;
}
#view .daily-agenda-item .weekly-agenda-card {
  height: 100%;
  padding: 10px 12px !important;
}
#view .daily-agenda-item .weekly-card-heading {
  display: grid;
  justify-items: start;
  gap: 5px;
}
#view .daily-agenda-item .weekly-code {
  padding: 3px 7px;
  border-radius: 5px;
  background: #eaf4ee;
  color: #16573e !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}
#view .daily-agenda-item .weekly-client {
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}
.agenda-os-symbol,.agenda-key-confirmed,.agenda-key-waiting,.agenda-key-request,.agenda-key-status {
  display: inline-flex; width: fit-content; align-items: center; border-radius: 5px; padding: 1px 4px;
}
.agenda-status-key { margin: 4px 0 8px; color: #36594b; font-size: 12px; }
.agenda-status-key summary { cursor: pointer; }
.agenda-key-confirmed { background: #dff2e7; color: #176245; }
.agenda-key-waiting { background: #f9edd8; color: #80520d; }
.agenda-key-request { background: #f8e5e2; color: #922e28; }
.agenda-key-status { background: #e6edf6; color: #2b517b; }
.agenda-workspace .appointment-compact-icon { display: inline-flex; width: fit-content; padding: 1px 3px; }
@media screen and (max-width: 760px) {
  #view .complete-month-calendar > :is(.complete-month-head,.complete-month-week) { min-width: 840px; }
}
@media (pointer: coarse) {
  html body #view .agenda-workspace button[data-action-presentation="icon"]:not([hidden]):is(.agenda-slot-create,.agenda-create,.contract-row-icons > button) {
    width: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
  }
}
@media print {
  html body #view .agenda-workspace button[data-action-presentation="icon"]:not([hidden]):is(.agenda-slot-create,.agenda-create,.contract-row-icons > button) { display: none !important; }
}


/* Agenda diária e semanal conforme a amostra aprovada. */
#view .agenda-workspace .weekly-agenda-card { display:grid; text-align:left; align-content:start; }
#view .agenda-workspace .weekly-card-heading { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:4px 6px; }
#view .agenda-workspace .weekly-code { background:#eaf4ee; color:#16573e!important; padding:2px 6px; border-radius:5px; font-size:13px!important; font-weight:700!important; }
#view .agenda-workspace .weekly-client { text-align:left; overflow-wrap:anywhere; }
#view .agenda-workspace .weekly-state { font-size:11px!important; line-height:1.35; white-space:normal; }
#view .agenda-workspace .weekly-agenda-card .appointment-client-badge { width:fit-content; max-width:100%; margin:0; padding:2px 5px; border-radius:5px; background:#fff2d8; color:#704a0b; font-size:11px; text-align:left; }
.gj-quick-fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:12px 0; }
.gj-quick-fields label { display:grid; gap:4px; }
.gj-quick-fields :is(input,select) { min-width:0; width:100%; }
.gj-quick-planning [data-conflict-confirm]:not([hidden]) { display:flex; gap:6px; align-items:center; }
.gj-quick-planning [data-schedule-warnings]:empty { display:none; }
.gj-agenda-more[open] { display:flex; gap:6px; }
.gj-os-more summary,.gj-agenda-more summary { min-height:40px; padding:9px; border:1px solid var(--gj-line,#dce6df); border-radius:8px; }
.gj-os-more[open]>button,.gj-agenda-more[open]>button { display:block; margin-block:4px!important; }
@media(max-width:520px){.gj-quick-fields{grid-template-columns:repeat(2,minmax(0,1fr));}}

.gj-os-draft-recovery { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:8px 12px; background:var(--gj-soft,#eef5f0); }
.ah-os-queue article { display:flex; align-items:center; flex-wrap:wrap; justify-content:space-between; gap:8px; padding:6px 0; border-bottom:1px solid var(--gj-line,#dce6df); }
.sp-batch [data-batch-list] { display:grid; gap:8px; }
.sp-batch [data-batch-list] > label { display:flex; gap:8px; align-items:center; min-height:36px; }
.sp-batch [data-batch-list] > label > input[type="checkbox"] { display:block; flex:0 0 18px; width:18px; min-width:18px; height:18px; min-height:18px; margin:0; padding:0; }
.sp-batch [data-batch-list] fieldset { min-width:0; }
.sp-batch [data-batch-list] select { width:100%; }

.gj-quick-planning [hidden],.sp-batch [hidden] { display:none!important; }

.os-linked-documents[hidden],label[hidden]:has(#caListFrom,#caListTo) { display:none!important; }
.os-linked-documents>button { margin:4px 4px 4px 0; max-width:100%; white-space:normal; }
