/* INTEIRE · composition for the operational host. Domain and permissions stay in their own modules. */
html.pilot-mode{--pilot-space:24px;--pilot-radius:14px;--pilot-ease:cubic-bezier(.2,.7,.2,1)}
html.pilot-mode .toolbar{min-height:58px}
html.pilot-mode .toolbar-location{color:var(--muted);font-size:13px}
html.pilot-mode .sk-company{align-items:flex-start;min-height:54px;margin:8px 0 20px;text-align:left;opacity:1}
html.pilot-mode .sk-company>span:not(.company-monogram){display:flex;flex-direction:column;align-items:flex-start;min-width:0;gap:2px}
html.pilot-mode #company-name{white-space:normal;overflow-wrap:anywhere;line-height:1.25}
html.pilot-mode #company-kind{color:var(--muted);font-size:11px;line-height:1.3}
html.pilot-mode .pilot-demo-nav{margin:18px 0 8px;padding-top:15px;border-top:1px solid var(--line)}
html.pilot-mode .pilot-demo-nav summary{padding:8px 12px;color:var(--muted);font-size:12px;cursor:pointer;list-style:none;border-radius:8px}
html.pilot-mode .pilot-demo-nav summary::before{content:'›';display:inline-block;margin-right:8px;transition:transform .16s var(--pilot-ease)}
html.pilot-mode .pilot-demo-nav[open] summary::before{transform:rotate(90deg)}
html.pilot-mode .pilot-demo-nav summary:hover{background:var(--surface);color:var(--ink)}
html.pilot-mode .pilot-demo-nav small{font-size:11px}
html.pilot-mode .pilot-refresh{margin:8px 0}
html.pilot-mode .pilot-theme-setting{display:grid;gap:6px;padding:10px 14px;color:var(--muted);font-size:12px}
html.pilot-mode .pilot-theme-setting select{width:100%;min-height:38px;padding:6px 9px;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:8px}
html.pilot-mode .page-heading{gap:20px;align-items:flex-start;margin-bottom:20px}
html.pilot-mode .page-heading h1,html.pilot-mode .agenda-heading h1{font-size:28px;line-height:1.18;letter-spacing:-.7px}
html.pilot-mode .page-heading p{max-width:64ch;color:var(--muted);margin-top:6px}
html.pilot-mode .panel{border:1px solid var(--line);border-radius:var(--pilot-radius);background:var(--surface)}
html.pilot-mode .panel>h2{font-size:18px;line-height:1.3;letter-spacing:-.2px}
html.pilot-mode .data-table td,html.pilot-mode .data-table th{font-variant-numeric:tabular-nums}
html.pilot-mode .pilot-login-heading{padding-top:32px}
html.pilot-mode .pilot-login-heading img{display:block;margin:0 0 26px;filter:none}
html.pilot-mode[data-theme=dark] .pilot-login-heading img{filter:invert(1)}
html.pilot-mode #pilot-login .field{margin-top:12px}
html.pilot-mode #pilot-login .form-actions{margin-top:20px}
html.pilot-mode #pilot-login .form-actions .button{min-height:44px;min-width:120px}
html.pilot-mode .pcrm-primary-nav{gap:16px;flex-wrap:wrap;padding-bottom:14px}
html.pilot-mode .pcrm-primary-nav>.button{margin-left:auto}
html.pilot-mode .pcrm-view-toolbar{justify-content:flex-start;gap:10px;margin-top:16px;flex-wrap:wrap}
html.pilot-mode .pcrm-view-toolbar .pcrm-views{margin-right:auto}
html.pilot-mode .pcrm-view-content{margin-top:20px}
html.pilot-mode .pcrm-board{grid-template-columns:repeat(var(--pcrm-columns),minmax(240px,300px));gap:14px}
html.pilot-mode .pcrm-column{padding:0 3px 12px}
html.pilot-mode .pcrm-column>header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 5px 10px}
html.pilot-mode .pcrm-column>header small{color:var(--muted);font-variant-numeric:tabular-nums}
html.pilot-mode .pcrm-card{display:grid;gap:8px;padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
html.pilot-mode .pcrm-card-owner,html.pilot-mode .pcrm-card-opportunity,html.pilot-mode .pcrm-muted{font-size:12px;color:var(--muted);overflow-wrap:anywhere}
html.pilot-mode .pcrm-card-actions{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
html.pilot-mode .pcrm-card-actions .button{min-height:34px;padding:6px 10px;font-size:12px}
html.pilot-mode .pcrm-list-scroll{width:100%;overflow-x:auto;border:1px solid var(--line);border-radius:var(--pilot-radius);background:var(--surface)}
html.pilot-mode .pcrm-list-table{border-collapse:collapse;width:100%;min-width:690px;text-align:left;font-size:13px}
html.pilot-mode .pcrm-list-table th{padding:12px 14px;color:var(--muted);font-size:11px;font-weight:600;border-bottom:1px solid var(--line)}
html.pilot-mode .pcrm-list-table td{padding:10px 14px;border-bottom:1px solid var(--line);vertical-align:middle}
html.pilot-mode .pcrm-list-table tr:last-child td{border-bottom:0}
html.pilot-mode .pcrm-list-table tbody tr:hover{background:var(--rail)}
html.pilot-mode .pilot-stock-more{display:inline-block;position:relative;margin-left:6px;vertical-align:middle}
html.pilot-mode .pilot-stock-more summary{cursor:pointer;padding:8px 10px;border-radius:8px;color:var(--muted);font-size:12px;list-style:none}
html.pilot-mode .pilot-stock-more summary:hover{background:var(--rail);color:var(--ink)}
html.pilot-mode .pilot-stock-more>div{display:grid;gap:6px;position:static;min-width:200px;margin-top:6px;padding:10px;background:var(--surface);border:1px solid var(--line);border-radius:10px}
html.pilot-mode .pilot-stock-more>div>.button{text-align:left}
html.pilot-mode .pilot-campaign-layout{display:grid;grid-template-columns:minmax(240px,.75fr) minmax(0,1.25fr);gap:16px}
html.pilot-mode .pilot-campaign-layout .panel{margin:0;padding:20px;min-width:0}
html.pilot-mode .pilot-campaign-layout .panel>h2{margin-bottom:12px}
html.pilot-mode .pilot-campaign-people{grid-column:1/-1}
html.pilot-mode .pilot-campaign-people>p{margin-bottom:12px;color:var(--muted)}
html.pilot-mode .agenda-event-title{font-weight:650;line-height:1.25}
html.pilot-mode .agenda-event-time,html.pilot-mode .agenda-event-meta{line-height:1.25}
html.pilot-mode .sheet-header{position:sticky;top:0;z-index:2;background:var(--surface)}
html.pilot-mode .sheet-body{scroll-padding-top:16px}
html.pilot-mode button,html.pilot-mode summary{transition:background-color .14s var(--pilot-ease),border-color .14s var(--pilot-ease),color .14s var(--pilot-ease)}
@media(max-width:720px){html.pilot-mode{--pilot-space:16px}html.pilot-mode .page-heading h1,html.pilot-mode .agenda-heading h1{font-size:25px}html.pilot-mode .pcrm-view-toolbar .pcrm-views{flex:1 1 100%;margin-right:0}html.pilot-mode .pcrm-primary-nav>.button{margin-left:0}html.pilot-mode .pilot-campaign-layout{grid-template-columns:minmax(0,1fr)}html.pilot-mode .pilot-campaign-people{grid-column:auto}html.pilot-mode .pilot-stock-more>div{right:0;max-width:calc(100vw - 32px)}}
@media(prefers-reduced-motion:reduce){html.pilot-mode button,html.pilot-mode summary,html.pilot-mode .pilot-demo-nav summary::before{transition:none!important;animation:none!important}}

html.pilot-mode .pilot-stock-summary{display:flex;align-items:center;gap:24px;flex-wrap:wrap;padding:12px 0;border-bottom:1px solid var(--line);color:var(--muted);font-size:13px}html.pilot-mode .pilot-stock-summary strong{color:var(--ink);font-weight:600}
html.pilot-mode .pilot-quote-section{margin:24px 0;padding:18px 0;border-block:1px solid var(--line)}
html.pilot-mode .pilot-quote-section h3{margin-bottom:12px}
html.pilot-mode .pilot-quote-section>p{margin-top:10px}
html.pilot-mode .pilot-quote-table-wrap{overflow-x:auto}
html.pilot-mode .pilot-quote-table{width:100%;min-width:540px;border-collapse:collapse;font-size:13px;text-align:left;font-variant-numeric:tabular-nums}
html.pilot-mode .pilot-quote-table th,html.pilot-mode .pilot-quote-table td{padding:10px 12px;border-bottom:1px solid var(--line);vertical-align:top}
html.pilot-mode .pilot-quote-table th{color:var(--muted);font-size:11px;font-weight:600}
@media(max-width:720px){html.pilot-mode .pcrm-primary-nav{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px}html.pilot-mode .pcrm-primary-nav .pcrm-picker{min-width:0;max-width:none;width:100%}html.pilot-mode .pcrm-primary-nav>.button{grid-column:1/-1;justify-self:start}html.pilot-mode .pcrm-primary-nav .pcrm-sections{justify-content:flex-end}html.pilot-mode .pcrm-board{grid-template-columns:repeat(var(--pcrm-columns),minmax(240px,280px))}}
html.pilot-mode .agenda-toolbar{display:flex;align-items:end;gap:14px;flex-wrap:wrap}
html.pilot-mode .agenda-period-controls,html.pilot-mode .pilot-agenda-actions{display:flex;align-items:end;gap:8px;flex-wrap:wrap}
html.pilot-mode .pilot-agenda-actions{margin-left:auto}
html.pilot-mode .agenda-caption{color:var(--muted);font-size:12px}
@media(max-width:720px){html.pilot-mode .pilot-agenda-actions{margin-left:0}html.pilot-mode .agenda-period-controls{width:100%}}
html.pilot-mode .pilot-detail-context{color:var(--muted);font-size:12px;overflow-wrap:anywhere}
html.pilot-mode .shell[hidden]{display:none!important}
html.pilot-mode .modal:has(#pilot-login){width:min(460px,calc(100vw - 32px));max-width:none;border-radius:18px}
html.pilot-mode .pilot-login-heading{display:flex;flex-direction:column;align-items:flex-start;gap:0;padding:32px 32px 0;border:0}
html.pilot-mode .pilot-login-heading h1{font-size:28px;line-height:1.2}
html.pilot-mode .modal:has(#pilot-login) .modal-body{padding:16px 32px 30px}
html.pilot-mode #pilot-login .fields{display:grid;grid-template-columns:1fr;gap:2px}
html.pilot-mode #pilot-login .form-actions{background:transparent;padding:0;justify-content:flex-start}
@media(max-width:480px){html.pilot-mode .pilot-login-heading{padding:26px 24px 0}html.pilot-mode .modal:has(#pilot-login) .modal-body{padding:14px 24px 24px}}
html.pilot-mode .pilot-document-back{margin-bottom:18px}
html.pilot-mode .pilot-document-back .button{min-height:36px}
html.pilot-mode .pilot-stock-mobile-actions{display:none}
@media(max-width:720px){html.pilot-mode .pilot-stock-mobile-actions{display:block;margin-top:9px}html.pilot-mode .pilot-stock-mobile-actions .button{min-height:40px;padding:7px 10px}}
/* Identity stays available even where names coincide. */
html.pilot-mode .pcrm-sections h1{font-size:22px;line-height:1.2;letter-spacing:-.45px;font-weight:600}
html.pilot-mode .pcrm-person-meta{display:grid;gap:2px;min-width:0;color:var(--muted);font-size:12px;line-height:1.4;overflow-wrap:anywhere}
html.pilot-mode .pcrm-person-id{font-size:10.5px;letter-spacing:.01em;overflow-wrap:anywhere}
html.pilot-mode .pcrm-list-table .pcrm-person-meta{padding-left:30px;margin-top:4px}
html.pilot-mode .pcrm-view-toolbar [data-pilot=lead-create]{background:var(--action,var(--accent));color:var(--on-action,#fff);border-color:transparent}
html.pilot-mode .pcrm-list-table td:nth-child(1){min-width:210px}
html.pilot-mode .pilot-quote-table{min-width:620px;table-layout:auto}
html.pilot-mode .pilot-quote-table th:not(:first-child),html.pilot-mode .pilot-quote-number,html.pilot-mode .pilot-quote-money{text-align:right;white-space:nowrap}
html.pilot-mode .pilot-quote-table td:first-child{min-width:180px;overflow-wrap:anywhere}
html.pilot-mode .pilot-quote-identity{margin-top:4px;color:var(--muted);font-size:11px;line-height:1.35}
html.pilot-mode .pilot-quote-identity summary{cursor:pointer;width:fit-content}
html.pilot-mode .pilot-quote-identity small{display:block;font-size:11px;overflow-wrap:anywhere}
html.pilot-mode .pilot-quote-section{margin:16px 0;padding:14px 0}
html.pilot-mode .pilot-document-back{margin-bottom:12px}
html.pilot-mode .pilot-agenda-arrow{width:44px;min-width:44px;min-height:44px;padding:0;font-size:24px;line-height:1}
html.pilot-mode .pilot-stock-mobile-more{display:inline-block;vertical-align:top;margin-left:5px}
html.pilot-mode .pilot-stock-mobile-more summary{min-height:44px;display:flex;align-items:center;padding:8px;color:var(--muted);font-size:12px;cursor:pointer;list-style:none}
html.pilot-mode .pilot-stock-mobile-more>div{display:grid;gap:6px;min-width:170px;margin-top:4px;padding:8px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}
@media(max-width:720px){html.pilot-mode .pcrm-sections h1{font-size:19px}html.pilot-mode .pilot-agenda-actions{width:100%;justify-content:flex-start}html.pilot-mode .agenda-period-controls{gap:6px}html.pilot-mode .agenda-period-controls .select-label{min-width:0}html.pilot-mode .agenda-period-controls input[type=date]{max-width:150px}html.pilot-mode .pilot-stock-mobile-actions{display:flex;align-items:flex-start;flex-wrap:wrap;gap:4px}}
html.pilot-mode.pilot-crm-drag-active .pcrm-column:not(.pilot-crm-origin)>*{pointer-events:none}
html.pilot-mode .agenda-heading-identity{width:100%;min-width:0}
html.pilot-mode .agenda-heading-identity .select-label{min-width:0;flex:0 1 28rem}
html.pilot-mode .agenda-heading-identity select{width:100%;min-width:0;max-width:100%}
@media(max-width:720px){html.pilot-mode .agenda-heading-identity .select-label{flex:1 1 0}}
html.pilot-mode .pcrm-card .pcrm-person-name{display:flex;align-items:flex-start;gap:8px;width:100%;min-width:0;white-space:normal;overflow:hidden}
html.pilot-mode .pcrm-card .pcrm-person-name>span:last-child{min-width:0;white-space:normal;overflow-wrap:anywhere}
html.pilot-mode .pcrm-scroll-hint{display:none}
@media(max-width:720px){html.pilot-mode .pcrm-scroll-hint{display:block;color:var(--muted);font-size:12px;margin:0 0 8px}}
/* The operational agenda scopes its calendar tokens locally; it does not switch the shell route skin. */
html.pilot-mode .agenda-root{--agenda-well:#f1eadf;--agenda-head:#faf5ed;--agenda-elevated:#fffaf2;--agenda-edge:#d8cdbc;--agenda-popup-shadow:0 22px 54px rgb(55 38 22 / .17),0 3px 8px rgb(55 38 22 / .12);--status-confirmed:#255986;--status-pending:#805514;--event-light:#6f263d;--event-dark:#e0acbd}
html.pilot-mode[data-theme=dark] .agenda-root{--agenda-well:#1c1e1a;--agenda-head:#282b25;--agenda-elevated:#383c33;--agenda-edge:#565c4e;--agenda-popup-shadow:0 26px 64px rgb(0 0 0 / .55),0 3px 9px rgb(0 0 0 / .35);--status-confirmed:#a7d4f6;--status-pending:#f1cf88}
html.pilot-mode .agenda-grid-head,html.pilot-mode .agenda-month-weekdays{z-index:10}
html.pilot-mode .agenda-root .agenda-event.tone-2{--event-light:#436b84;--event-dark:#a7c5d9}
html.pilot-mode .pcrm-person-ref{font-size:11px;color:var(--muted)}
html.pilot-mode .pcrm-person-identity{font-size:11px;color:var(--muted)}
html.pilot-mode .pcrm-person-identity summary{cursor:pointer;width:fit-content}
html.pilot-mode .pcrm-person-identity span{display:block;overflow-wrap:anywhere}
@media(max-width:720px){
 html.pilot-mode .pilot-stock-table{display:table;min-width:0;width:100%}
 html.pilot-mode .pilot-stock-table thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
 html.pilot-mode .pilot-stock-table tbody{display:block;width:100%}
 html.pilot-mode .pilot-stock-table tr:not([hidden]){display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,4.8rem);gap:4px 8px;align-items:start;width:100%;padding:12px 0;border-bottom:1px solid var(--line)}
 html.pilot-mode .pilot-stock-table tr:not([hidden]) td{padding:0;border:0;min-width:0;overflow-wrap:anywhere}
 html.pilot-mode .pilot-stock-table tr:not([hidden]) td:nth-child(2),html.pilot-mode .pilot-stock-table tr:not([hidden]) td:nth-child(3){font-variant-numeric:tabular-nums;padding-top:7px}
 html.pilot-mode .pilot-stock-table tr:not([hidden]) td:nth-child(4){display:none}
 html.pilot-mode .pilot-stock-table tr#pilot-stock-empty:not([hidden]) td{grid-column:1/-1}
 html.pilot-mode .pilot-stock-open{max-width:100%;white-space:normal;overflow-wrap:anywhere}
}
/* A faixa de tempo mantém a data e a visão na mesma linha em telas estreitas. */
@media(max-width:720px){html.pilot-mode .agenda-root .agenda-period-controls{display:grid;grid-template-columns:44px minmax(100px,1fr) 44px 75px;gap:5px;width:100%}html.pilot-mode .agenda-root .agenda-period-controls .select-label{min-width:0;font-size:0}html.pilot-mode .agenda-root .agenda-period-controls input,html.pilot-mode .agenda-root .agenda-period-controls select{width:100%;min-width:0;font-size:13px!important;padding-inline:4px}html.pilot-mode .agenda-root .agenda-period-controls .pilot-agenda-arrow{min-width:44px;width:44px;padding:0}}
html.pilot-mode .agenda-root .select-label{font-size:13px}
html.pilot-mode .agenda-root .agenda-time-rail>span{font-size:12px}
html.pilot-mode .agenda-root .agenda-column-heading>span:not(.agenda-person-dot){font-size:12px}
@media(max-width:720px){html.pilot-mode .agenda-root .agenda-period-controls .select-label{font-size:0}}
/* Compromissos usam uma superfície central, preservando o mesmo diálogo e formulários. */
html.pilot-mode:has(.agenda-root) .sheet[open]{position:fixed;inset:0;margin:auto;width:min(560px,calc(100vw - 32px));max-width:calc(100vw - 32px);height:auto;max-height:min(820px,calc(100dvh - 32px));border-radius:12px;overflow:auto;animation:pilot-agenda-dialog-in 180ms cubic-bezier(.2,0,0,1)}
@keyframes pilot-agenda-dialog-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){html.pilot-mode:has(.agenda-root) .sheet[open]{animation:none}}
html.pilot-mode:has(.agenda-root) .sheet[open]{inset:auto;top:50%;left:50%;margin:0;transform:translate(-50%,-50%);animation-name:pilot-agenda-centered-in}
@keyframes pilot-agenda-centered-in{from{opacity:0;transform:translate(-50%,calc(-50% + 8px))}to{opacity:1;transform:translate(-50%,-50%)}}
html.pilot-mode:has(.agenda-root) .sheet-body .detail-actions{display:flex;flex-wrap:wrap;gap:8px}
html.pilot-mode:has(.agenda-root) .sheet-body .detail-actions>.button{flex:0 1 auto;min-height:44px;min-width:0;white-space:normal}
@media(max-width:520px){html.pilot-mode:has(.agenda-root) .sheet-body .detail-actions>.button{flex:1 1 110px}}
@media(prefers-reduced-motion:reduce){html.pilot-mode:has(.agenda-root) .sheet[open]{animation:none}}
/* Campaign sections preserve real coverage and source; avoid competing containers. */
html.pilot-mode .pilot-campaign-layout{gap:24px 32px;align-items:start}
html.pilot-mode .pilot-campaign-layout .panel{padding:18px 0;border:0;border-top:1px solid var(--line);border-radius:0;box-shadow:none;background:transparent}
html.pilot-mode .pilot-campaign-layout .panel>h2{font-size:18px;line-height:1.25;letter-spacing:-.02em}
html.pilot-mode .pilot-campaign-layout .panel p{line-height:1.5;max-width:72ch}
@media(max-width:720px){html.pilot-mode .pilot-campaign-layout{gap:8px}}
@media(max-width:720px){html.pilot-mode .agenda-root .agenda-period-controls input,html.pilot-mode .agenda-root .agenda-period-controls select{font-size:16px!important}}
@media(max-width:360px){html.pilot-mode .agenda-root .agenda-period-controls{grid-template-columns:44px minmax(0,1fr) 44px}html.pilot-mode .agenda-root .agenda-period-controls>.select-label:last-child{grid-column:1/-1}html.pilot-mode .agenda-root .agenda-period-controls input[type=date]{max-width:none}}

@media(max-width:390px){html.pilot-mode .agenda-root .agenda-period-controls{grid-template-columns:44px minmax(0,1fr) 44px}html.pilot-mode .agenda-root .agenda-period-controls>.select-label:last-child{grid-column:1/-1}html.pilot-mode .agenda-root .agenda-period-controls input[type=date]{max-width:none}}

/* Casca comum: contexto e comandos se distinguem do conteúdo de cada área. */
html.pilot-mode .toolbar{background:var(--canvas);border-bottom:1px solid var(--line)}
html.pilot-mode .toolbar-location{min-width:0;gap:10px}
html.pilot-mode .toolbar-location #breadcrumb{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html.pilot-mode .button,html.pilot-mode .icon-button{transition:background-color 180ms ease,border-color 180ms ease,color 180ms ease,box-shadow 180ms ease}
html.pilot-mode .button:focus-visible,html.pilot-mode .icon-button:focus-visible,html.pilot-mode input:focus-visible,html.pilot-mode select:focus-visible,html.pilot-mode textarea:focus-visible{outline:2px solid var(--focus);outline-offset:3px}
html.pilot-mode .button:disabled,html.pilot-mode .icon-button:disabled{cursor:not-allowed}
html.pilot-mode [role=alert]:not(:empty){overflow-wrap:anywhere;line-height:1.45}
html.pilot-mode .pilot-cost-document{border:1px solid var(--line);border-radius:16px 16px 16px 6px;padding:18px;background:var(--surface)}
html.pilot-mode .pilot-cost-document h3{margin:0 0 8px;font-size:16px;letter-spacing:-.015em}
html.pilot-mode .pilot-cost-document p{line-height:1.5;overflow-wrap:anywhere}
html.pilot-mode .pilot-cost-document details{margin-top:14px;border-top:1px solid var(--line);padding-top:12px}
html.pilot-mode .pilot-cost-document summary{min-height:44px;display:flex;align-items:center;cursor:pointer;color:var(--link);font-weight:600}
html.pilot-mode .pilot-cost-document li{line-height:1.6;margin:10px 0;overflow-wrap:anywhere}
@media(prefers-reduced-motion:reduce){html.pilot-mode .button,html.pilot-mode .icon-button{transition:none}}
html.pilot-mode .pilot-cost-document summary::after{content:'⌄';margin-left:auto;font-size:16px}
html.pilot-mode .pilot-cost-document details[open] summary::after{content:'⌃'}
